@limetech/lime-elements 35.0.0-next.3 → 35.0.0-next.32

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 (243) hide show
  1. package/dist/cjs/checkbox.template-7e3fd86a.js +43 -0
  2. package/dist/cjs/{component-f7ef9087.js → component-66df95e7.js} +190 -132
  3. package/dist/cjs/{component-f532119f.js → component-67144c1c.js} +47 -3
  4. package/dist/cjs/{component-ed21410d.js → component-ae3bfacf.js} +367 -235
  5. package/dist/cjs/{component-2faaa141.js → component-cf490570.js} +213 -143
  6. package/dist/cjs/{component-10dbdd60.js → component-dd795ff0.js} +7 -5
  7. package/dist/cjs/{index-e63a89d7.js → index-43283636.js} +23 -0
  8. package/dist/cjs/lime-elements.cjs.js +3 -3
  9. package/dist/cjs/limel-badge.cjs.entry.js +3 -3
  10. package/dist/cjs/limel-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-button-group.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-button.cjs.entry.js +2 -2
  13. package/dist/cjs/limel-checkbox.cjs.entry.js +135 -89
  14. package/dist/cjs/limel-chip-set.cjs.entry.js +234 -190
  15. package/dist/cjs/limel-circular-progress.cjs.entry.js +2 -2
  16. package/dist/cjs/limel-code-editor.cjs.entry.js +49 -22
  17. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  18. package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-color-picker.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-config.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-date-picker.cjs.entry.js +5 -5
  22. package/dist/cjs/limel-dialog.cjs.entry.js +8 -9
  23. package/dist/cjs/limel-file.cjs.entry.js +5 -5
  24. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +972 -648
  25. package/dist/cjs/limel-flex-container.cjs.entry.js +5 -1
  26. package/dist/cjs/limel-form.cjs.entry.js +382 -355
  27. package/dist/cjs/limel-grid.cjs.entry.js +1 -1
  28. package/dist/cjs/limel-header.cjs.entry.js +1 -1
  29. package/dist/cjs/limel-icon-button.cjs.entry.js +5 -5
  30. package/dist/cjs/limel-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/limel-input-field.cjs.entry.js +9 -8
  32. package/dist/cjs/limel-linear-progress.cjs.entry.js +3 -3
  33. package/dist/cjs/limel-list_3.cjs.entry.js +147 -88
  34. package/dist/cjs/limel-menu-list.cjs.entry.js +86 -73
  35. package/dist/cjs/limel-menu.cjs.entry.js +1 -1
  36. package/dist/cjs/limel-picker.cjs.entry.js +3 -6
  37. package/dist/cjs/limel-popover-surface.cjs.entry.js +2 -2
  38. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +1 -1
  39. package/dist/cjs/limel-progress-flow.cjs.entry.js +1 -1
  40. package/dist/cjs/limel-select.cjs.entry.js +5 -5
  41. package/dist/cjs/limel-slider.cjs.entry.js +33 -6
  42. package/dist/cjs/limel-snackbar.cjs.entry.js +78 -72
  43. package/dist/cjs/limel-spinner.cjs.entry.js +1 -1
  44. package/dist/cjs/limel-switch.cjs.entry.js +497 -201
  45. package/dist/cjs/limel-tab-bar.cjs.entry.js +262 -185
  46. package/dist/cjs/limel-tab-panel.cjs.entry.js +1 -1
  47. package/dist/cjs/limel-table.cjs.entry.js +375 -12
  48. package/dist/cjs/limel-tooltip_2.cjs.entry.js +1 -1
  49. package/dist/cjs/loader.cjs.js +3 -3
  50. package/dist/collection/collection-manifest.json +2 -2
  51. package/dist/collection/components/badge/badge.css +9 -15
  52. package/dist/collection/components/badge/badge.js +2 -2
  53. package/dist/collection/components/button/button.css +333 -145
  54. package/dist/collection/components/button-group/button-group.css +30 -5
  55. package/dist/collection/components/checkbox/checkbox.css +70 -17
  56. package/dist/collection/components/checkbox/checkbox.js +5 -4
  57. package/dist/collection/components/checkbox/checkbox.template.js +24 -20
  58. package/dist/collection/components/chip-set/chip-set.css +367 -34
  59. package/dist/collection/components/circular-progress/circular-progress.css +2 -2
  60. package/dist/collection/components/code-editor/code-editor.css +8 -13
  61. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +1 -1
  62. package/dist/collection/components/dialog/dialog.css +153 -109
  63. package/dist/collection/components/dialog/dialog.js +7 -0
  64. package/dist/collection/components/flex-container/flex-container.js +10 -0
  65. package/dist/collection/components/form/form.css +5 -1
  66. package/dist/collection/components/form/form.js +34 -0
  67. package/dist/collection/components/form/templates/common.js +4 -1
  68. package/dist/collection/components/icon-button/icon-button.css +116 -59
  69. package/dist/collection/components/icon-button/icon-button.js +1 -0
  70. package/dist/collection/components/input-field/input-field.css +344 -29
  71. package/dist/collection/components/input-field/input-field.js +3 -2
  72. package/dist/collection/components/linear-progress/linear-progress.css +14 -2
  73. package/dist/collection/components/list/list-renderer.js +1 -4
  74. package/dist/collection/components/list/list.css +937 -90
  75. package/dist/collection/components/list/list.js +13 -6
  76. package/dist/collection/components/menu-list/menu-list-renderer.js +1 -4
  77. package/dist/collection/components/menu-list/menu-list.css +937 -90
  78. package/dist/collection/components/menu-surface/menu-surface.css +31 -7
  79. package/dist/collection/components/picker/picker.js +4 -6
  80. package/dist/collection/components/popover-surface/popover-surface.css +1 -0
  81. package/dist/collection/components/select/select.css +424 -17
  82. package/dist/collection/components/select/select.template.js +1 -1
  83. package/dist/collection/components/slider/slider.css +49 -2
  84. package/dist/collection/components/snackbar/snackbar.css +588 -301
  85. package/dist/collection/components/switch/switch.css +592 -222
  86. package/dist/collection/components/switch/switch.js +18 -12
  87. package/dist/collection/components/tab-bar/tab-bar.css +77 -48
  88. package/dist/collection/components/table/columns.js +1 -1
  89. package/dist/collection/components/table/selection.js +111 -0
  90. package/dist/collection/components/table/table-selection.js +125 -0
  91. package/dist/collection/components/table/table.css +275 -141
  92. package/dist/collection/components/table/table.js +231 -13
  93. package/dist/collection/style/functions.scss +3 -1
  94. package/dist/collection/style/internal/lime-theme.scss +30 -31
  95. package/dist/collection/style/internal/lime-typography.scss +55 -56
  96. package/dist/collection/style/internal/z-index.scss +2 -1
  97. package/dist/esm/checkbox.template-e68ade4d.js +41 -0
  98. package/dist/esm/{component-89e0ce26.js → component-19eb6e2b.js} +7 -5
  99. package/dist/esm/{component-2630c3d7.js → component-288691f3.js} +367 -235
  100. package/dist/esm/{component-d682c974.js → component-410aad5a.js} +44 -4
  101. package/dist/esm/{component-429e92ee.js → component-5b4ac85a.js} +213 -143
  102. package/dist/esm/{component-2eb4e07b.js → component-fffa3419.js} +191 -133
  103. package/dist/esm/{index-2316f345.js → index-4456d4ad.js} +23 -0
  104. package/dist/esm/lime-elements.js +3 -3
  105. package/dist/esm/limel-badge.entry.js +3 -3
  106. package/dist/esm/limel-banner.entry.js +1 -1
  107. package/dist/esm/limel-button-group.entry.js +2 -2
  108. package/dist/esm/limel-button.entry.js +2 -2
  109. package/dist/esm/limel-checkbox.entry.js +136 -90
  110. package/dist/esm/limel-chip-set.entry.js +234 -190
  111. package/dist/esm/limel-circular-progress.entry.js +2 -2
  112. package/dist/esm/limel-code-editor.entry.js +49 -22
  113. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  114. package/dist/esm/limel-color-picker-palette_2.entry.js +1 -1
  115. package/dist/esm/limel-color-picker.entry.js +1 -1
  116. package/dist/esm/limel-config.entry.js +1 -1
  117. package/dist/esm/limel-date-picker.entry.js +5 -5
  118. package/dist/esm/limel-dialog.entry.js +8 -9
  119. package/dist/esm/limel-file.entry.js +5 -5
  120. package/dist/esm/limel-flatpickr-adapter.entry.js +972 -648
  121. package/dist/esm/limel-flex-container.entry.js +5 -1
  122. package/dist/esm/limel-form.entry.js +383 -356
  123. package/dist/esm/limel-grid.entry.js +1 -1
  124. package/dist/esm/limel-header.entry.js +1 -1
  125. package/dist/esm/limel-icon-button.entry.js +5 -5
  126. package/dist/esm/limel-icon.entry.js +1 -1
  127. package/dist/esm/limel-input-field.entry.js +9 -8
  128. package/dist/esm/limel-linear-progress.entry.js +4 -4
  129. package/dist/esm/limel-list_3.entry.js +148 -89
  130. package/dist/esm/limel-menu-list.entry.js +87 -74
  131. package/dist/esm/limel-menu.entry.js +1 -1
  132. package/dist/esm/limel-picker.entry.js +3 -6
  133. package/dist/esm/limel-popover-surface.entry.js +2 -2
  134. package/dist/esm/limel-progress-flow-item.entry.js +1 -1
  135. package/dist/esm/limel-progress-flow.entry.js +1 -1
  136. package/dist/esm/limel-select.entry.js +5 -5
  137. package/dist/esm/limel-slider.entry.js +34 -7
  138. package/dist/esm/limel-snackbar.entry.js +78 -72
  139. package/dist/esm/limel-spinner.entry.js +1 -1
  140. package/dist/esm/limel-switch.entry.js +497 -201
  141. package/dist/esm/limel-tab-bar.entry.js +262 -185
  142. package/dist/esm/limel-tab-panel.entry.js +1 -1
  143. package/dist/esm/limel-table.entry.js +375 -12
  144. package/dist/esm/limel-tooltip_2.entry.js +1 -1
  145. package/dist/esm/loader.js +3 -3
  146. package/dist/esm/polyfills/css-shim.js +1 -1
  147. package/dist/esm/{util-71a23335.js → util-f1bde91c.js} +1 -1
  148. package/dist/lime-elements/lime-elements.esm.js +1 -1
  149. package/dist/lime-elements/{p-a4c532a7.entry.js → p-00d485d8.entry.js} +1 -1
  150. package/dist/lime-elements/p-062a9599.entry.js +131 -0
  151. package/dist/lime-elements/p-0c5655e2.js +1 -0
  152. package/dist/lime-elements/{p-597cbe05.entry.js → p-0ea1cbf6.entry.js} +1 -1
  153. package/dist/lime-elements/p-1bacecd5.entry.js +73 -0
  154. package/dist/lime-elements/p-1c284626.js +73 -0
  155. package/dist/lime-elements/p-1fef7a86.entry.js +16 -0
  156. package/dist/lime-elements/{p-a2cf74c1.entry.js → p-255084bd.entry.js} +1 -1
  157. package/dist/lime-elements/{p-e881e98d.entry.js → p-2550ff27.entry.js} +1 -1
  158. package/dist/lime-elements/p-2a7c3c07.entry.js +1 -0
  159. package/dist/lime-elements/{p-31fecf5d.entry.js → p-3bef288b.entry.js} +1 -1
  160. package/dist/lime-elements/{p-58cbe99d.entry.js → p-3f440859.entry.js} +1 -1
  161. package/dist/lime-elements/{p-4b5af81b.entry.js → p-41ec08c9.entry.js} +1 -1
  162. package/dist/lime-elements/{p-92146da6.js → p-44f9b6d5.js} +0 -0
  163. package/dist/lime-elements/{p-1fb5340d.entry.js → p-45689f25.entry.js} +1 -1
  164. package/dist/lime-elements/p-47ef0ebb.entry.js +1 -0
  165. package/dist/lime-elements/{p-076bd4dc.js → p-48d4ef20.js} +3 -3
  166. package/dist/lime-elements/p-4e9869f4.entry.js +126 -0
  167. package/dist/lime-elements/{p-6003f817.entry.js → p-549190f6.entry.js} +1 -1
  168. package/dist/lime-elements/p-63516991.entry.js +1 -0
  169. package/dist/lime-elements/p-6fc9a0be.entry.js +59 -0
  170. package/dist/lime-elements/{p-64549ba6.entry.js → p-70a4d004.entry.js} +3 -3
  171. package/dist/lime-elements/p-7d4eb67f.entry.js +1 -0
  172. package/dist/lime-elements/p-87a8afd2.entry.js +16 -0
  173. package/dist/lime-elements/{p-714fde78.entry.js → p-897a7f8a.entry.js} +1 -1
  174. package/dist/lime-elements/{p-fc30b8e3.entry.js → p-8a5ca741.entry.js} +1 -1
  175. package/dist/lime-elements/{p-8a2c1038.entry.js → p-9607b6f9.entry.js} +2 -2
  176. package/dist/lime-elements/p-9caf28bd.entry.js +1 -0
  177. package/dist/lime-elements/{p-152a6d5f.js → p-9faad6eb.js} +1 -1
  178. package/dist/lime-elements/{p-34c7872e.entry.js → p-a35e6b8a.entry.js} +1 -1
  179. package/dist/lime-elements/{p-13f0e4f4.entry.js → p-ab88cc76.entry.js} +1 -1
  180. package/dist/lime-elements/{p-041ae00c.entry.js → p-b808ba3d.entry.js} +1 -1
  181. package/dist/lime-elements/p-bcaa25e1.entry.js +1 -0
  182. package/dist/lime-elements/p-be351178.entry.js +37 -0
  183. package/dist/lime-elements/p-c40f5030.entry.js +82 -0
  184. package/dist/lime-elements/p-c4e2eb42.entry.js +1 -0
  185. package/dist/lime-elements/{p-1876a96a.entry.js → p-c5168bda.entry.js} +1 -1
  186. package/dist/lime-elements/p-cbc43682.js +81 -0
  187. package/dist/lime-elements/{p-ace9affc.js → p-d0a7de87.js} +2 -2
  188. package/dist/lime-elements/{p-be56ffab.entry.js → p-d5f17adb.entry.js} +1 -1
  189. package/dist/lime-elements/p-d70f1c00.entry.js +59 -0
  190. package/dist/lime-elements/{p-8ad5e143.entry.js → p-dd62c71b.entry.js} +1 -1
  191. package/dist/lime-elements/p-dfba92de.js +126 -0
  192. package/dist/lime-elements/p-e320ba6a.entry.js +1 -0
  193. package/dist/lime-elements/p-e55144ec.entry.js +1 -0
  194. package/dist/lime-elements/p-e66816a4.entry.js +82 -0
  195. package/dist/lime-elements/{p-dfe0a58b.entry.js → p-e6f39a71.entry.js} +1 -1
  196. package/dist/lime-elements/p-f777d8a3.entry.js +82 -0
  197. package/dist/lime-elements/style/functions.scss +3 -1
  198. package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
  199. package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
  200. package/dist/lime-elements/style/internal/z-index.scss +2 -1
  201. package/dist/types/components/badge/badge.d.ts +1 -1
  202. package/dist/types/components/checkbox/checkbox.d.ts +3 -2
  203. package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
  204. package/dist/types/components/dialog/dialog.d.ts +7 -0
  205. package/dist/types/components/flex-container/flex-container.d.ts +7 -0
  206. package/dist/types/components/form/form.d.ts +8 -1
  207. package/dist/types/components/form/form.types.d.ts +6 -0
  208. package/dist/types/components/picker/picker.d.ts +2 -1
  209. package/dist/types/components/switch/switch.d.ts +2 -2
  210. package/dist/types/components/table/columns.d.ts +7 -0
  211. package/dist/types/components/table/selection.d.ts +79 -0
  212. package/dist/types/components/table/table-selection.d.ts +57 -0
  213. package/dist/types/components/table/table.d.ts +41 -7
  214. package/dist/types/components/table/table.types.d.ts +13 -0
  215. package/dist/types/components.d.ts +44 -4
  216. package/dist/types/stencil-public-runtime.d.ts +6 -4
  217. package/package.json +22 -22
  218. package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
  219. package/dist/esm/checkbox.template-50f7c07b.js +0 -37
  220. package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
  221. package/dist/lime-elements/p-0fd208f3.entry.js +0 -82
  222. package/dist/lime-elements/p-143705b1.entry.js +0 -1
  223. package/dist/lime-elements/p-250f55be.js +0 -1
  224. package/dist/lime-elements/p-29f054cc.entry.js +0 -37
  225. package/dist/lime-elements/p-31299106.js +0 -126
  226. package/dist/lime-elements/p-468e940e.entry.js +0 -16
  227. package/dist/lime-elements/p-4932c029.entry.js +0 -1
  228. package/dist/lime-elements/p-510bb5a4.entry.js +0 -1
  229. package/dist/lime-elements/p-668795a7.js +0 -73
  230. package/dist/lime-elements/p-6cfb45a1.entry.js +0 -1
  231. package/dist/lime-elements/p-7476efe0.entry.js +0 -1
  232. package/dist/lime-elements/p-902347b9.js +0 -81
  233. package/dist/lime-elements/p-90f3e17c.entry.js +0 -37
  234. package/dist/lime-elements/p-96e44a1e.entry.js +0 -82
  235. package/dist/lime-elements/p-b2a8cb31.entry.js +0 -59
  236. package/dist/lime-elements/p-bc0dcf01.entry.js +0 -73
  237. package/dist/lime-elements/p-c35874db.entry.js +0 -1
  238. package/dist/lime-elements/p-c8c8a946.entry.js +0 -59
  239. package/dist/lime-elements/p-ca664c9f.entry.js +0 -1
  240. package/dist/lime-elements/p-d2c74396.entry.js +0 -1
  241. package/dist/lime-elements/p-d48ad9f7.entry.js +0 -126
  242. package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
  243. package/dist/lime-elements/p-f2c706b8.entry.js +0 -131
@@ -1 +1 @@
1
- import{r as t,h as i,g as e}from"./p-92146da6.js";import{c as r}from"./p-240fda3b.js";const s=new class{constructor(){this.cache={},this.resolveFunctions={}}async get(t,i=""){return this.cache[t]||(this.cache[t]=await this.getIcon(t,i)),this.cache[t]}getIcon(t,i){return new Promise((e=>{this.resolveFunctions[t]||(this.resolveFunctions[t]=[],this.fetchData(t,i)),this.resolveFunctions[t].push(e)}))}async fetchData(t,i){let e=i||"";i&&!i.endsWith("/")&&(e=`${i}/`);const r=await fetch(`${e}assets/icons/${t}.svg`);let s=await r.text();if(s=s.replace(/#000000/g,"currentColor"),!this.validSvg(s))throw new Error("Invalid SVG");this.resolvePromises(t,s)}validSvg(t){return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.tagName.toLowerCase()}resolvePromises(t,i){this.resolveFunctions[t].forEach((t=>{t(i)})),this.resolveFunctions[t]=null}};let o=class{constructor(i){t(this,i)}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{class:"container"})}async loadIcon(t){if(void 0===t||""===t)return;const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return s.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");i&&(i.innerHTML=t)}get host(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};o.style=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host([hidden]){display:none}:host([size=x-small]){height:0.9375rem !important;width:0.9375rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5625rem !important;width:1.5625rem !important}:host([size=large]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=x-small]){height:1.4375rem !important;width:1.4375rem !important}:host([badge][size=x-small])>div{margin:0.25rem}:host([badge][size=small]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=small])>div{margin:0.3125rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important}:host([badge][size=medium])>div{margin:0.5rem}:host([badge][size=large]){height:2.875rem !important;width:2.875rem !important}:host([badge][size=large])>div{margin:0.5rem}";export{o as limel_icon}
1
+ import{r as t,h as i,g as e}from"./p-44f9b6d5.js";import{c as r}from"./p-240fda3b.js";const s=new class{constructor(){this.cache={},this.resolveFunctions={}}async get(t,i=""){return this.cache[t]||(this.cache[t]=await this.getIcon(t,i)),this.cache[t]}getIcon(t,i){return new Promise((e=>{this.resolveFunctions[t]||(this.resolveFunctions[t]=[],this.fetchData(t,i)),this.resolveFunctions[t].push(e)}))}async fetchData(t,i){let e=i||"";i&&!i.endsWith("/")&&(e=`${i}/`);const r=await fetch(`${e}assets/icons/${t}.svg`);let s=await r.text();if(s=s.replace(/#000000/g,"currentColor"),!this.validSvg(s))throw new Error("Invalid SVG");this.resolvePromises(t,s)}validSvg(t){return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.tagName.toLowerCase()}resolvePromises(t,i){this.resolveFunctions[t].forEach((t=>{t(i)})),this.resolveFunctions[t]=null}};let o=class{constructor(i){t(this,i)}componentDidLoad(){this.loadIcon(this.name)}render(){return i("div",{class:"container"})}async loadIcon(t){if(void 0===t||""===t)return;const i=await this.loadSvg(t);this.renderSvg(i)}loadSvg(t){return s.get(t,r.iconPath)}renderSvg(t){const i=this.host.shadowRoot.querySelector("div.container");i&&(i.innerHTML=t)}get host(){return e(this)}static get watchers(){return{name:["loadIcon"]}}};o.style=":host{background-color:var(--icon-background-color, transparent);border-radius:50%;display:inline-block;line-height:0;box-sizing:border-box}:host svg{fill:currentColor;height:100%;pointer-events:none;width:100%}:host([hidden]){display:none}:host([size=x-small]){height:0.9375rem !important;width:0.9375rem !important}:host([size=small]){height:1.25rem !important;width:1.25rem !important}:host([size=medium]){height:1.5625rem !important;width:1.5625rem !important}:host([size=large]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=x-small]){height:1.4375rem !important;width:1.4375rem !important}:host([badge][size=x-small])>div{margin:0.25rem}:host([badge][size=small]){height:1.875rem !important;width:1.875rem !important}:host([badge][size=small])>div{margin:0.3125rem}:host([badge][size=medium]){height:2.5rem !important;width:2.5rem !important}:host([badge][size=medium])>div{margin:0.5rem}:host([badge][size=large]){height:2.875rem !important;width:2.875rem !important}:host([badge][size=large])>div{margin:0.5rem}";export{o as limel_icon}
@@ -0,0 +1,59 @@
1
+ import{r as t,c as o,h as e,g as n}from"./p-44f9b6d5.js";import{t as r}from"./p-3bf54a4c.js";import{M as i,a}from"./p-48d4ef20.js";import{c}from"./p-dcc97cc2.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */var d={CLOSING:"mdc-snackbar--closing",OPEN:"mdc-snackbar--open",OPENING:"mdc-snackbar--opening"},p={ACTION_SELECTOR:".mdc-snackbar__action",ARIA_LIVE_LABEL_TEXT_ATTR:"data-mdc-snackbar-label-text",CLOSED_EVENT:"MDCSnackbar:closed",CLOSING_EVENT:"MDCSnackbar:closing",DISMISS_SELECTOR:".mdc-snackbar__dismiss",LABEL_SELECTOR:".mdc-snackbar__label",OPENED_EVENT:"MDCSnackbar:opened",OPENING_EVENT:"MDCSnackbar:opening",REASON_ACTION:"action",REASON_DISMISS:"dismiss",SURFACE_SELECTOR:".mdc-snackbar__surface"},m={DEFAULT_AUTO_DISMISS_TIMEOUT_MS:5e3,INDETERMINATE:-1,MAX_AUTO_DISMISS_TIMEOUT_MS:1e4,MIN_AUTO_DISMISS_TIMEOUT_MS:4e3,SNACKBAR_ANIMATION_CLOSE_TIME_MS:75,SNACKBAR_ANIMATION_OPEN_TIME_MS:150,ARIA_LIVE_DELAY_MS:1e3},s=m.ARIA_LIVE_DELAY_MS,l=p.ARIA_LIVE_LABEL_TEXT_ATTR;function b(t,o){void 0===o&&(o=t);var e=t.getAttribute("aria-live"),n=o.textContent.trim();n&&e&&(t.setAttribute("aria-live","off"),o.textContent="",o.innerHTML='<span style="display: inline-block; width: 0; height: 1px;">&nbsp;</span>',o.setAttribute(l,n),setTimeout((function(){t.setAttribute("aria-live",e),o.removeAttribute(l),o.textContent=n}),s))}
24
+ /*! *****************************************************************************
25
+ Copyright (c) Microsoft Corporation.
26
+
27
+ Permission to use, copy, modify, and/or distribute this software for any
28
+ purpose with or without fee is hereby granted.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
31
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
32
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
33
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
34
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
36
+ PERFORMANCE OF THIS SOFTWARE.
37
+ ***************************************************************************** */var u=function(t,o){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)};function f(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}u(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}var g=function(){return(g=Object.assign||function(t){for(var o,e=1,n=arguments.length;e<n;e++)for(var r in o=arguments[e])Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r]);return t}).apply(this,arguments)},h=d.OPENING,_=d.OPEN,x=d.CLOSING,v=p.REASON_ACTION,y=p.REASON_DISMISS,k=function(t){function o(e){var n=t.call(this,g(g({},o.defaultAdapter),e))||this;return n.opened=!1,n.animationFrame=0,n.animationTimer=0,n.autoDismissTimer=0,n.autoDismissTimeoutMs=m.DEFAULT_AUTO_DISMISS_TIMEOUT_MS,n.closeOnEscape=!0,n}return f(o,t),Object.defineProperty(o,"cssClasses",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},announce:function(){},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},removeClass:function(){}}},enumerable:!1,configurable:!0}),o.prototype.destroy=function(){this.clearAutoDismissTimer(),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=0,this.adapter.removeClass(h),this.adapter.removeClass(_),this.adapter.removeClass(x)},o.prototype.open=function(){var t=this;this.clearAutoDismissTimer(),this.opened=!0,this.adapter.notifyOpening(),this.adapter.removeClass(x),this.adapter.addClass(h),this.adapter.announce(),this.runNextAnimationFrame((function(){t.adapter.addClass(_),t.animationTimer=setTimeout((function(){var o=t.getTimeoutMs();t.handleAnimationTimerEnd(),t.adapter.notifyOpened(),o!==m.INDETERMINATE&&(t.autoDismissTimer=setTimeout((function(){t.close(y)}),o))}),m.SNACKBAR_ANIMATION_OPEN_TIME_MS)}))},o.prototype.close=function(t){var o=this;void 0===t&&(t=""),this.opened&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=0,this.clearAutoDismissTimer(),this.opened=!1,this.adapter.notifyClosing(t),this.adapter.addClass(d.CLOSING),this.adapter.removeClass(d.OPEN),this.adapter.removeClass(d.OPENING),clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){o.handleAnimationTimerEnd(),o.adapter.notifyClosed(t)}),m.SNACKBAR_ANIMATION_CLOSE_TIME_MS))},o.prototype.isOpen=function(){return this.opened},o.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs},o.prototype.setTimeoutMs=function(t){var o=m.MIN_AUTO_DISMISS_TIMEOUT_MS,e=m.MAX_AUTO_DISMISS_TIMEOUT_MS;if(!(t===m.INDETERMINATE||t<=e&&t>=o))throw new Error("\n timeoutMs must be an integer in the range "+o+"–"+e+"\n (or "+m.INDETERMINATE+" to disable), but got '"+t+"'");this.autoDismissTimeoutMs=t},o.prototype.getCloseOnEscape=function(){return this.closeOnEscape},o.prototype.setCloseOnEscape=function(t){this.closeOnEscape=t},o.prototype.handleKeyDown=function(t){("Escape"===t.key||27===t.keyCode)&&this.getCloseOnEscape()&&this.close(y)},o.prototype.handleActionButtonClick=function(){this.close(v)},o.prototype.handleActionIconClick=function(){this.close(y)},o.prototype.clearAutoDismissTimer=function(){clearTimeout(this.autoDismissTimer),this.autoDismissTimer=0},o.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(d.OPENING),this.adapter.removeClass(d.CLOSING)},o.prototype.runNextAnimationFrame=function(t){var o=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){o.animationFrame=0,clearTimeout(o.animationTimer),o.animationTimer=setTimeout(t,0)}))},o}(i),w=p.SURFACE_SELECTOR,z=p.LABEL_SELECTOR,E=p.ACTION_SELECTOR,O=p.DISMISS_SELECTOR,T=p.OPENING_EVENT,S=p.OPENED_EVENT,C=p.CLOSING_EVENT,A=p.CLOSED_EVENT,I=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return f(o,t),o.attachTo=function(t){return new o(t)},o.prototype.initialize=function(t){void 0===t&&(t=function(){return b}),this.announce=t()},o.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl=this.root.querySelector(w),this.labelEl=this.root.querySelector(z),this.actionEl=this.root.querySelector(E),this.handleKeyDown=function(o){t.foundation.handleKeyDown(o)},this.handleSurfaceClick=function(o){var e=o.target;t.isActionButton(e)?t.foundation.handleActionButtonClick(o):t.isActionIcon(e)&&t.foundation.handleActionIconClick(o)},this.registerKeyDownHandler(this.handleKeyDown),this.registerSurfaceClickHandler(this.handleSurfaceClick)},o.prototype.destroy=function(){t.prototype.destroy.call(this),this.deregisterKeyDownHandler(this.handleKeyDown),this.deregisterSurfaceClickHandler(this.handleSurfaceClick)},o.prototype.open=function(){this.foundation.open()},o.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},o.prototype.getDefaultFoundation=function(){var t=this;return new k({addClass:function(o){t.root.classList.add(o)},announce:function(){t.announce(t.labelEl)},notifyClosed:function(o){return t.emit(A,o?{reason:o}:{})},notifyClosing:function(o){return t.emit(C,o?{reason:o}:{})},notifyOpened:function(){return t.emit(S,{})},notifyOpening:function(){return t.emit(T,{})},removeClass:function(o){return t.root.classList.remove(o)}})},Object.defineProperty(o.prototype,"timeoutMs",{get:function(){return this.foundation.getTimeoutMs()},set:function(t){this.foundation.setTimeoutMs(t)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"closeOnEscape",{get:function(){return this.foundation.getCloseOnEscape()},set:function(t){this.foundation.setCloseOnEscape(t)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"labelText",{get:function(){return this.labelEl.textContent},set:function(t){this.labelEl.textContent=t},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"actionButtonText",{get:function(){return this.actionEl.textContent},set:function(t){this.actionEl.textContent=t},enumerable:!1,configurable:!0}),o.prototype.registerKeyDownHandler=function(t){this.listen("keydown",t)},o.prototype.deregisterKeyDownHandler=function(t){this.unlisten("keydown",t)},o.prototype.registerSurfaceClickHandler=function(t){this.surfaceEl.addEventListener("click",t)},o.prototype.deregisterSurfaceClickHandler=function(t){this.surfaceEl.removeEventListener("click",t)},o.prototype.isActionButton=function(t){return Boolean(c(t,E))},o.prototype.isActionIcon=function(t){return Boolean(c(t,O))},o}(a);
38
+ /**
39
+ * @license
40
+ * Copyright 2018 Google Inc.
41
+ *
42
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
43
+ * of this software and associated documentation files (the "Software"), to deal
44
+ * in the Software without restriction, including without limitation the rights
45
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
46
+ * copies of the Software, and to permit persons to whom the Software is
47
+ * furnished to do so, subject to the following conditions:
48
+ *
49
+ * The above copyright notice and this permission notice shall be included in
50
+ * all copies or substantial portions of the Software.
51
+ *
52
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
55
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
56
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
57
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
58
+ * THE SOFTWARE.
59
+ */let M=class{constructor(e){t(this,e),this.action=o(this,"action",7),this.hide=o(this,"hide",7),this.language="en",this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-snackbar");t&&(this.mdcSnackbar=new I(t),this.mdcSnackbar.listen("MDCSnackbar:closing",this.handleMdcClosing))}disconnectedCallback(){this.mdcSnackbar.unlisten("MDCSnackbar:closing",this.handleMdcClosing),this.mdcSnackbar.destroy()}async show(){this.timeout&&(this.mdcSnackbar.timeoutMs=this.timeout),this.mdcSnackbar.labelText=this.message,this.mdcSnackbar.open()}render(){return e("aside",{class:`\n mdc-snackbar\n ${this.multiline?"mdc-snackbar--stacked":""}\n `},e("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},e("div",{class:"mdc-snackbar__label","aria-atomic":"false"}),this.renderActions(this.actionText,this.dismissible)))}handleMdcClosing(t){"action"===t.detail.reason?this.action.emit():this.hide.emit()}renderActions(t,o){if(t||o)return e("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},this.renderActionButton(t),this.renderDismissButton(o))}renderActionButton(t){if(t)return e("button",{type:"button",class:"mdc-button mdc-snackbar__action"},e("span",{class:"mdc-button__label"},t))}renderDismissButton(t){if(!t)return;const o=r.get("snackbar.dismiss",this.language);return e("button",{class:"mdc-icon-button mdc-snackbar__dismiss",innerHTML:'<svg width="32" height="32" x="0px" y="0px" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">\n <line fill="none" id="svg_1" stroke="currentColor" stroke-width="2" x1="8" x2="24" y1="8" y2="24"/>\n <line fill="none" id="svg_2" stroke="currentColor" stroke-width="2" x1="24" x2="8" y1="8" y2="24"/>\n</svg>',title:o})}get host(){return n(this)}};M.style=':host{--mdc-theme-primary:var(\n --lime-primary-color,\n rgb(var(--color-teal-default))\n );--mdc-theme-secondary:var(\n --lime-secondary-color,\n rgb(var(--contrast-1100))\n );--mdc-theme-on-primary:var(\n --lime-on-primary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-secondary:var(\n --lime-on-secondary-color,\n rgb(var(--contrast-100))\n );--mdc-theme-text-disabled-on-background:var(\n --lime-text-disabled-on-background-color,\n rgba(var(--contrast-1700), 0.38)\n );--mdc-theme-text-primary-on-background:var(\n --lime-text-primary-on-background-color,\n rgba(var(--contrast-1700), 0.87)\n );--mdc-theme-text-secondary-on-background:var(\n --lime-text-secondary-on-background-color,\n rgba(var(--contrast-1700), 0.54)\n );--lime-error-text-color:rgb(var(--color-red-darker));--mdc-theme-surface:var(\n --lime-surface-background-color,\n rgb(var(--contrast-100))\n );--mdc-theme-on-surface:var(\n --lime-on-surface-color,\n var(--lime-text-primary-on-background-color)\n )}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:transparent}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0;}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px;}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none)}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-button{--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-button .mdc-button__ripple::before,.mdc-button .mdc-button__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-button .mdc-button__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-button .mdc-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-button.mdc-ripple-upgraded .mdc-button__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-button.mdc-ripple-upgraded .mdc-button__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-button.mdc-ripple-upgraded--unbounded .mdc-button__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-button.mdc-ripple-upgraded--foreground-activation .mdc-button__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-button.mdc-ripple-upgraded--foreground-deactivation .mdc-button__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-button .mdc-button__ripple::before,.mdc-button .mdc-button__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-button.mdc-ripple-upgraded .mdc-button__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-button .mdc-button__ripple{position:absolute;box-sizing:content-box;width:100%;height:100%;overflow:hidden;z-index:0}.mdc-button:not(.mdc-button--outlined) .mdc-button__ripple{top:0;left:0}.mdc-button{font-family:Roboto, sans-serif;font-family:var(--mdc-text-button-label-text-font, var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif)));font-size:0.875rem;font-size:var(--mdc-text-button-label-text-size, var(--mdc-typography-button-font-size, 0.875rem));letter-spacing:0.0892857143em;letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mdc-typography-button-letter-spacing, 0.0892857143em));font-weight:500;font-weight:var(--mdc-text-button-label-text-weight, var(--mdc-typography-button-font-weight, 500));text-transform:none;text-transform:var(--mdc-text-button-label-text-transform, var(--mdc-typography-button-text-transform, none));height:36px;height:var(--mdc-text-button-container-height, 36px);border-radius:4px;border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button:not(:disabled){color:#26a69a;color:var(--mdc-text-button-label-text-color, var(--mdc-theme-primary, #26a69a))}.mdc-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mdc-button .mdc-button__icon{font-size:1.125rem;font-size:var(--mdc-text-button-with-icon-icon-size, 1.125rem);width:1.125rem;width:var(--mdc-text-button-with-icon-icon-size, 1.125rem);height:1.125rem;height:var(--mdc-text-button-with-icon-icon-size, 1.125rem)}.mdc-button .mdc-button__ripple::before,.mdc-button .mdc-button__ripple::after{background-color:#26a69a;background-color:var(--mdc-text-button-hover-state-layer-color, var(--mdc-theme-primary, #26a69a))}.mdc-button:hover .mdc-button__ripple::before,.mdc-button.mdc-ripple-surface--hover .mdc-button__ripple::before{opacity:0.04;opacity:var(--mdc-text-button-hover-state-layer-opacity, 0.04)}.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__ripple::before,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-text-button-focus-state-layer-opacity, 0.12)}.mdc-button:not(.mdc-ripple-upgraded) .mdc-button__ripple::after{transition:opacity 150ms linear}.mdc-button:not(.mdc-ripple-upgraded):active .mdc-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-text-button-pressed-state-layer-opacity, 0.12)}.mdc-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-text-button-pressed-state-layer-opacity, 0.12)}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button--unelevated{font-family:Roboto, sans-serif;font-family:var(--mdc-filled-button-label-text-font, var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif)));font-size:0.875rem;font-size:var(--mdc-filled-button-label-text-size, var(--mdc-typography-button-font-size, 0.875rem));letter-spacing:0.0892857143em;letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mdc-typography-button-letter-spacing, 0.0892857143em));font-weight:500;font-weight:var(--mdc-filled-button-label-text-weight, var(--mdc-typography-button-font-weight, 500));text-transform:none;text-transform:var(--mdc-filled-button-label-text-transform, var(--mdc-typography-button-text-transform, none));height:36px;height:var(--mdc-filled-button-container-height, 36px);border-radius:4px;border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button--unelevated:not(:disabled){background-color:#26a69a;background-color:var(--mdc-filled-button-container-color, var(--mdc-theme-primary, #26a69a))}.mdc-button--unelevated:disabled{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-filled-button-label-text-color, var(--mdc-theme-on-primary, #fff))}.mdc-button--unelevated:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;font-size:var(--mdc-filled-button-with-icon-icon-size, 1.125rem);width:1.125rem;width:var(--mdc-filled-button-with-icon-icon-size, 1.125rem);height:1.125rem;height:var(--mdc-filled-button-with-icon-icon-size, 1.125rem)}.mdc-button--unelevated .mdc-button__ripple::before,.mdc-button--unelevated .mdc-button__ripple::after{background-color:#fff;background-color:var(--mdc-filled-button-hover-state-layer-color, var(--mdc-theme-on-primary, #fff))}.mdc-button--unelevated:hover .mdc-button__ripple::before,.mdc-button--unelevated.mdc-ripple-surface--hover .mdc-button__ripple::before{opacity:0.08;opacity:var(--mdc-filled-button-hover-state-layer-opacity, 0.08)}.mdc-button--unelevated.mdc-ripple-upgraded--background-focused .mdc-button__ripple::before,.mdc-button--unelevated:not(.mdc-ripple-upgraded):focus .mdc-button__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-filled-button-focus-state-layer-opacity, 0.24)}.mdc-button--unelevated:not(.mdc-ripple-upgraded) .mdc-button__ripple::after{transition:opacity 150ms linear}.mdc-button--unelevated:not(.mdc-ripple-upgraded):active .mdc-button__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-filled-button-pressed-state-layer-opacity, 0.24)}.mdc-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-filled-button-pressed-state-layer-opacity, 0.24)}.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button--raised{font-family:Roboto, sans-serif;font-family:var(--mdc-protected-button-label-text-font, var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif)));font-size:0.875rem;font-size:var(--mdc-protected-button-label-text-size, var(--mdc-typography-button-font-size, 0.875rem));letter-spacing:0.0892857143em;letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mdc-typography-button-letter-spacing, 0.0892857143em));font-weight:500;font-weight:var(--mdc-protected-button-label-text-weight, var(--mdc-typography-button-font-weight, 500));text-transform:none;text-transform:var(--mdc-protected-button-label-text-transform, var(--mdc-typography-button-text-transform, none));height:36px;height:var(--mdc-protected-button-container-height, 36px);border-radius:4px;border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-protected-button-container-elevation, var(--mdc-elevation-box-shadow-for-gss));--mdc-elevation-box-shadow-for-gss:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled){background-color:#26a69a;background-color:var(--mdc-protected-button-container-color, var(--mdc-theme-primary, #26a69a))}.mdc-button--raised:disabled{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mdc-button--raised:not(:disabled){color:#fff;color:var(--mdc-protected-button-label-text-color, var(--mdc-theme-on-primary, #fff))}.mdc-button--raised:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mdc-button--raised .mdc-button__icon{font-size:1.125rem;font-size:var(--mdc-protected-button-with-icon-icon-size, 1.125rem);width:1.125rem;width:var(--mdc-protected-button-with-icon-icon-size, 1.125rem);height:1.125rem;height:var(--mdc-protected-button-with-icon-icon-size, 1.125rem)}.mdc-button--raised .mdc-button__ripple::before,.mdc-button--raised .mdc-button__ripple::after{background-color:#fff;background-color:var(--mdc-protected-button-hover-state-layer-color, var(--mdc-theme-on-primary, #fff))}.mdc-button--raised:hover .mdc-button__ripple::before,.mdc-button--raised.mdc-ripple-surface--hover .mdc-button__ripple::before{opacity:0.08;opacity:var(--mdc-protected-button-hover-state-layer-opacity, 0.08)}.mdc-button--raised.mdc-ripple-upgraded--background-focused .mdc-button__ripple::before,.mdc-button--raised:not(.mdc-ripple-upgraded):focus .mdc-button__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-protected-button-focus-state-layer-opacity, 0.24)}.mdc-button--raised:not(.mdc-ripple-upgraded) .mdc-button__ripple::after{transition:opacity 150ms linear}.mdc-button--raised:not(.mdc-ripple-upgraded):active .mdc-button__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-protected-button-pressed-state-layer-opacity, 0.24)}.mdc-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-protected-button-pressed-state-layer-opacity, 0.24)}.mdc-button--raised .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button--raised.mdc-ripple-upgraded--background-focused,.mdc-button--raised:not(.mdc-ripple-upgraded):focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-protected-button-focus-container-elevation, var(--mdc-elevation-box-shadow-for-gss));--mdc-elevation-box-shadow-for-gss:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-protected-button-hover-container-elevation, var(--mdc-elevation-box-shadow-for-gss));--mdc-elevation-box-shadow-for-gss:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled):active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-protected-button-pressed-container-elevation, var(--mdc-elevation-box-shadow-for-gss));--mdc-elevation-box-shadow-for-gss:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-protected-button-disabled-container-elevation, var(--mdc-elevation-box-shadow-for-gss));--mdc-elevation-box-shadow-for-gss:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12)}.mdc-button--outlined{font-family:Roboto, sans-serif;font-family:var(--mdc-outlined-button-label-text-font, var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif)));font-size:0.875rem;font-size:var(--mdc-outlined-button-label-text-size, var(--mdc-typography-button-font-size, 0.875rem));letter-spacing:0.0892857143em;letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mdc-typography-button-letter-spacing, 0.0892857143em));font-weight:500;font-weight:var(--mdc-outlined-button-label-text-weight, var(--mdc-typography-button-font-weight, 500));text-transform:none;text-transform:var(--mdc-outlined-button-label-text-transform, var(--mdc-typography-button-text-transform, none));height:36px;height:var(--mdc-outlined-button-container-height, 36px);border-radius:4px;border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mdc-button--outlined:not(:disabled){color:#26a69a;color:var(--mdc-outlined-button-label-text-color, var(--mdc-theme-primary, #26a69a))}.mdc-button--outlined:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;font-size:var(--mdc-outlined-button-with-icon-icon-size, 1.125rem);width:1.125rem;width:var(--mdc-outlined-button-with-icon-icon-size, 1.125rem);height:1.125rem;height:var(--mdc-outlined-button-with-icon-icon-size, 1.125rem)}.mdc-button--outlined .mdc-button__ripple::before,.mdc-button--outlined .mdc-button__ripple::after{background-color:#26a69a;background-color:var(--mdc-outlined-button-hover-state-layer-color, var(--mdc-theme-primary, #26a69a))}.mdc-button--outlined:hover .mdc-button__ripple::before,.mdc-button--outlined.mdc-ripple-surface--hover .mdc-button__ripple::before{opacity:0.04;opacity:var(--mdc-outlined-button-hover-state-layer-opacity, 0.04)}.mdc-button--outlined.mdc-ripple-upgraded--background-focused .mdc-button__ripple::before,.mdc-button--outlined:not(.mdc-ripple-upgraded):focus .mdc-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-outlined-button-focus-state-layer-opacity, 0.12)}.mdc-button--outlined:not(.mdc-ripple-upgraded) .mdc-button__ripple::after{transition:opacity 150ms linear}.mdc-button--outlined:not(.mdc-ripple-upgraded):active .mdc-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-outlined-button-pressed-state-layer-opacity, 0.12)}.mdc-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-outlined-button-pressed-state-layer-opacity, 0.12)}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined:disabled{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));border-width:1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * 1px);width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon,.mdc-button--outlined .mdc-button__icon{margin-left:-4px;margin-right:8px}[dir=rtl] .mdc-button--raised .mdc-button__icon,[dir=rtl] .mdc-button--unelevated .mdc-button__icon,[dir=rtl] .mdc-button--outlined .mdc-button__icon,.mdc-button--raised .mdc-button__icon[dir=rtl],.mdc-button--unelevated .mdc-button__icon[dir=rtl],.mdc-button--outlined .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:-4px;}.mdc-button--raised .mdc-button__label+.mdc-button__icon,.mdc-button--unelevated .mdc-button__label+.mdc-button__icon,.mdc-button--outlined .mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mdc-button--raised .mdc-button__label+.mdc-button__icon,[dir=rtl] .mdc-button--unelevated .mdc-button__label+.mdc-button__icon,[dir=rtl] .mdc-button--outlined .mdc-button__label+.mdc-button__icon,.mdc-button--raised .mdc-button__label+.mdc-button__icon[dir=rtl],.mdc-button--unelevated .mdc-button__label+.mdc-button__icon[dir=rtl],.mdc-button--outlined .mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:-4px;margin-right:8px;}.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button.mdc-icon-button--reduced-size{width:40px;height:40px;padding:8px}.mdc-icon-button.mdc-icon-button--reduced-size.mdc-icon-button--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{color:rgba(0, 0, 0, 0.38);color:var(--mdc-theme-text-disabled-on-light, rgba(0, 0, 0, 0.38))}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:transparent;fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--touch{margin-top:0px;margin-bottom:0px}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button{--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-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-icon-button .mdc-icon-button__ripple::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-icon-button .mdc-icon-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-icon-button.mdc-ripple-upgraded--unbounded .mdc-icon-button__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-icon-button.mdc-ripple-upgraded--foreground-activation .mdc-icon-button__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-icon-button.mdc-ripple-upgraded--foreground-deactivation .mdc-icon-button__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::before,.mdc-icon-button.mdc-ripple-upgraded .mdc-icon-button__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-icon-button.mdc-ripple-upgraded .mdc-icon-button__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-icon-button .mdc-icon-button__ripple::before,.mdc-icon-button .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-icon-button:hover .mdc-icon-button__ripple::before,.mdc-icon-button.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-icon-button:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-icon-button:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-icon-button .mdc-icon-button__ripple{pointer-events:none;z-index:1}.mdc-snackbar{z-index:8;margin:8px;display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.mdc-snackbar__surface{background-color:#333333}.mdc-snackbar__label{color:rgba(255, 255, 255, 0.87)}.mdc-snackbar__surface{min-width:344px}@media (max-width: 480px), (max-width: 344px){.mdc-snackbar__surface{min-width:100%}}.mdc-snackbar__surface{max-width:672px}.mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mdc-snackbar__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--leading{justify-content:flex-start}.mdc-snackbar--stacked .mdc-snackbar__label{padding-left:16px;padding-right:8px;padding-bottom:12px}[dir=rtl] .mdc-snackbar--stacked .mdc-snackbar__label,.mdc-snackbar--stacked .mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px;}.mdc-snackbar--stacked .mdc-snackbar__surface{flex-direction:column;align-items:flex-start}.mdc-snackbar--stacked .mdc-snackbar__actions{align-self:flex-end;margin-bottom:8px}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0;}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto;transition:opacity 150ms 0ms cubic-bezier(0, 0, 0.2, 1), transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1);transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-snackbar__label{-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.8125rem;font-size:var(--mdc-typography-body2-font-size, 0.8125rem);line-height:1.625rem;line-height:var(--mdc-typography-body2-line-height, 1.625rem);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;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px;}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action:not(:disabled){color:#bb86fc}.mdc-snackbar__action::before,.mdc-snackbar__action::after{background-color:#bb86fc;background-color:var(--mdc-ripple-color, #bb86fc)}.mdc-snackbar__action:hover::before,.mdc-snackbar__action.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-snackbar__action.mdc-ripple-upgraded--background-focused::before,.mdc-snackbar__action:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-snackbar__action:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-snackbar__action:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__action.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss{color:rgba(255, 255, 255, 0.87)}.mdc-snackbar__dismiss .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss .mdc-icon-button__ripple::after{background-color:rgba(255, 255, 255, 0.87);background-color:var(--mdc-ripple-color, rgba(255, 255, 255, 0.87))}.mdc-snackbar__dismiss:hover .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss.mdc-snackbar__dismiss{width:36px;height:36px;padding:6px;font-size:18px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-icon-button--reduced-size{width:36px;height:36px;padding:6px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-icon-button--reduced-size.mdc-icon-button--touch{margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss .mdc-icon-button__touch{position:absolute;top:50%;height:36px;left:50%;width:36px;transform:translate(-50%, -50%)}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px;}.mdc-button:not(:disabled){color:#29b6f6}.mdc-snackbar__actions .mdc-snackbar__dismiss{color:var(--mdc-theme-on-secondary)}';export{M as limel_snackbar}
@@ -1 +1 @@
1
- import{r,c as o,h as a,g as l}from"./p-92146da6.js";import{t as e}from"./p-3bf54a4c.js";import{c as t}from"./p-6c094f3f.js";import{M as i}from"./p-668795a7.js";import"./p-076bd4dc.js";import"./p-902347b9.js";import"./p-dcc97cc2.js";import"./p-ace9affc.js";const g="ms_word_copyrighted",c="ms_powerpoint_copyrighted",s={msg:"ms_outlook_copyrighted",ics:"tear_off_calendar",ical:"tear_off_calendar",icalendar:"tear_off_calendar",ifb:"tear_off_calendar",email:"email",eml:"email",oft:"email",ost:"email",emlx:"email",html:"internet",xml:"internet",txt:"text_box",rtf:"text_box",dot:g,doc:g,docx:g,dotx:g,docm:g,dotm:g,odt:"overview_pages_2",pages:"overview_pages_2",pdf:"PDF_2",ppt:c,pot:c,pps:c,pptx:c,pptm:c,potx:c,potm:c,ppam:c,ppsx:c,ppsm:c,sldx:c,sldm:c,odp:"presentation_filled",key:"presentation_filled",xls:"ms_excel_copyrighted",xlsx:"ms_excel_copyrighted",csv:"data_sheet",numbers:"data_sheet",jpg:"camera",jpeg:"camera",heic:"camera",bmp:"picture",png:"picture",gif:"picture",psd:"adobe_photoshop_copyrighted",ai:"adobe_illustrator_copyrighted",svg:"vector",svgz:"vector",ep:"vector",eps:"vector",sketch:"vector",mp3:"audio_wave",wav:"audio_wave",wma:"audio_wave",ogg:"audio_wave",avi:"video_file",flv:"video_file",h264:"video_file",mov:"video_file",mp4:"video_file",mwv:"video_file",zip:"condom_package","7z":"condom_package",rar:"condom_package",json:"json",yaml:"database",sql:"database",db:"database",dbf:"database"},d="rgb(var(--color-glaucous-dark))",h={msg:"rgb(var(--color-yellow-dark))",ics:"rgb(var(--color-cyan-dark))",ical:"rgb(var(--color-cyan-dark))",icalendar:"rgb(var(--color-cyan-dark))",ifb:"rgb(var(--color-cyan-dark))",email:"rgb(var(--color-gray-dark))",eml:"rgb(var(--color-gray-dark))",oft:"rgb(var(--color-gray-dark))",ost:"rgb(var(--color-gray-dark))",emlx:"rgb(var(--color-gray-dark))",html:"rgb(var(--color-blue-dark))",xml:"rgb(var(--color-blue-dark))",txt:"rgb(var(--color-yellow-darker))",rtf:"rgb(var(--color-yellow-darker))",dot:"rgb(var(--color-sky-dark))",doc:"rgb(var(--color-sky-dark))",docx:"rgb(var(--color-sky-dark))",dotx:"rgb(var(--color-sky-dark))",docm:"rgb(var(--color-sky-dark))",dotm:"rgb(var(--color-sky-dark))",odt:"rgb(var(--color-orange-dark))",pages:"rgb(var(--color-orange-dark))",pdf:"rgb(var(--color-red-dark))",ppt:"rgb(var(--color-coral-dark))",pot:"rgb(var(--color-coral-dark))",pps:"rgb(var(--color-coral-dark))",pptx:"rgb(var(--color-coral-dark))",pptm:"rgb(var(--color-coral-dark))",potx:"rgb(var(--color-coral-dark))",potm:"rgb(var(--color-coral-dark))",ppam:"rgb(var(--color-coral-dark))",ppsx:"rgb(var(--color-coral-dark))",ppsm:"rgb(var(--color-coral-dark))",sldx:"rgb(var(--color-coral-dark))",sldm:"rgb(var(--color-coral-dark))",odp:"rgb(var(--color-blue-dark))",key:"rgb(var(--color-blue-dark))",xls:"rgb(var(--color-green-dark))",xlsx:"rgb(var(--color-green-dark))",csv:"rgb(var(--color-gray-dark))",numbers:"rgb(var(--color-green-dark))",bmp:"rgb(var(--color-lime-dark))",jpg:"rgb(var(--color-lime-dark))",jpeg:"rgb(var(--color-lime-dark))",heic:"rgb(var(--color-lime-dark))",png:"rgb(var(--color-lime-dark))",gif:"rgb(var(--color-lime-dark))",psd:"rgb(var(--color-blue-dark))",ai:"rgb(var(--color-orange-dark))",svg:"rgb(var(--color-magenta-dark))",svgz:"rgb(var(--color-magenta-dark))",ep:"rgb(var(--color-magenta-dark))",eps:"rgb(var(--color-magenta-dark))",sketch:"rgb(var(--color-magenta-dark))",mp3:"rgb(var(--color-indigo-dark))",wav:"rgb(var(--color-indigo-dark))",wma:"rgb(var(--color-indigo-dark))",ogg:"rgb(var(--color-indigo-dark))",flv:"rgb(var(--color-red-dark))",h264:"rgb(var(--color-red-dark))",mov:"rgb(var(--color-red-dark))",mp4:"rgb(var(--color-red-dark))",mwv:"rgb(var(--color-red-dark))",zip:"rgb(var(--color-brown-default))","7z":"rgb(var(--color-brown-default))",rar:"rgb(var(--color-brown-default))",json:d,yaml:d,sql:d,db:d,dbf:d},n="rgba(var(--color-coral-lighter), 0.4)",v="rgba(var(--color-sky-lighter), 0.4)",b="rgba(var(--color-glaucous-lighter), 0.4)",p={msg:"rgba(var(--color-yellow-lighter), 0.4)",ics:"rgba(var(--color-cyan-lighter), 0.4)",ical:"rgba(var(--color-cyan-lighter), 0.4)",icalendar:"rgba(var(--color-cyan-lighter), 0.4)",ifb:"rgba(var(--color-cyan-lighter), 0.4)",email:"rgba(var(--color-gray-lighter), 0.4)",eml:"rgba(var(--color-gray-lighter), 0.4)",oft:"rgba(var(--color-gray-lighter), 0.4)",ost:"rgba(var(--color-gray-lighter), 0.4)",emlx:"rgba(var(--color-gray-lighter), 0.4)",html:"rgba(var(--color-blue-lighter), 0.4)",xml:"rgba(var(--color-blue-lighter), 0.4)",txt:"rgba(var(--color-yellow-lighter), 0.4)",rtf:"rgba(var(--color-yellow-lighter), 0.4)",dot:v,doc:v,docx:v,dotx:v,docm:v,dotm:v,odt:"rgba(var(--color-orange-lighter), 0.4)",pages:"rgba(var(--color-orange-lighter), 0.4)",pdf:"rgba(var(--color-red-lighter), 0.4)",ppt:n,pot:n,pps:n,pptx:n,pptm:n,potx:n,potm:n,ppam:n,ppsx:n,ppsm:n,sldx:n,sldm:n,odp:"rgba(var(--color-blue-lighter), 0.4)",key:"rgba(var(--color-blue-lighter), 0.4)",xls:"rgba(var(--color-green-lighter), 0.4)",xlsx:"rgba(var(--color-green-lighter), 0.4)",csv:"rgba(var(--color-gray-lighter), 0.4)",numbers:"rgba(var(--color-green-lighter), 0.4)",bmp:"rgba(var(--color-lime-lighter), 0.4)",jpg:"rgba(var(--color-lime-lighter), 0.4)",jpeg:"rgba(var(--color-lime-lighter), 0.4)",heic:"rgba(var(--color-lime-lighter), 0.4)",png:"rgba(var(--color-lime-lighter), 0.4)",gif:"rgba(var(--color-lime-lighter), 0.4)",psd:"rgba(var(--color-blue-lighter), 0.4)",ai:"rgba(var(--color-orange-lighter), 0.4)",svg:"rgba(var(--color-magenta-lighter), 0.4)",svgz:"rgba(var(--color-magenta-lighter), 0.4)",ep:"rgba(var(--color-magenta-lighter), 0.4)",eps:"rgba(var(--color-magenta-lighter), 0.4)",sketch:"rgba(var(--color-magenta-lighter), 0.4)",mp3:"rgba(var(--color-indigo-lighter), 0.4)",wav:"rgba(var(--color-indigo-lighter), 0.4)",wma:"rgba(var(--color-indigo-lighter), 0.4)",ogg:"rgba(var(--color-indigo-lighter), 0.4)",flv:"rgba(var(--color-red-lighter), 0.4)",h264:"rgba(var(--color-red-lighter), 0.4)",mov:"rgba(var(--color-red-lighter), 0.4)",mp4:"rgba(var(--color-red-lighter), 0.4)",mwv:"rgba(var(--color-red-lighter), 0.4)",zip:"rgba(var(--color-orange-lighter), 0.4)","7z":"rgba(var(--color-orange-lighter), 0.4)",rar:"rgba(var(--color-orange-lighter), 0.4)",json:b,yaml:b,sql:b,db:b,dbf:b};function m(r){if(null==r?void 0:r.icon)return r.icon;const o=u(r);return o?function(r){return s[r]||"file"}(o):void 0}function k(r){if(null==r?void 0:r.iconColor)return r.iconColor;const o=u(r);return o?function(r){return h[r]||"rgb(var(--color-gray-dark))"}(o):void 0}function f(r){if(null==r?void 0:r.iconBackgroundColor)return r.iconBackgroundColor;const o=u(r);return o?function(r){return p[r]||"rgba(var(--color-gray-lighter), 0.4)"}(o):void 0}function u(r){if(r)return r.filename.split(".").pop()}const y={id:null,text:null,removable:!0};let _=class{constructor(a){r(this,a),this.change=o(this,"change",7),this.interact=o(this,"interact",7),this.required=!1,this.disabled=!1,this.readonly=!1,this.accept="*",this.language="en",this.isDraggingOverDropZone=!1,this.fileInputId=t(),this.handleDragEnter=r=>{this.isDraggingOverDropZone=!0,this.preventAndStop(r)},this.handleDragLeave=()=>{this.isDraggingOverDropZone=!1},this.handleFileDrop=r=>{this.preventAndStop(r),this.isDraggingOverDropZone=!1,this.handleFile(r.dataTransfer.files[0])},this.handleFileSelection=this.handleFileSelection.bind(this),this.handleFileChange=this.handleFileChange.bind(this),this.handleChipSetChange=this.handleChipSetChange.bind(this),this.handleFileDrop=this.handleFileDrop.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleChipInteract=this.handleChipInteract.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.fileInput=this.element.shadowRoot.getElementById(this.fileInputId),this.chipSet=this.element.shadowRoot.querySelector("limel-chip-set"),this.initialize()}initialize(){this.chipSet&&(this.mdcTextField=new i(this.chipSet.shadowRoot.querySelector(".mdc-text-field")))}disconnectedCallback(){this.mdcTextField&&this.mdcTextField.destroy()}render(){return[a("input",{hidden:!0,id:this.fileInputId,onChange:this.handleFileChange,type:"file",accept:this.accept,disabled:this.disabled||this.readonly}),a("limel-chip-set",{class:{"is-file-picker":!0,"shows-dropzone":!0,"highlight-dropzone":this.isDraggingOverDropZone},disabled:this.disabled,readonly:this.readonly,label:this.label,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onClick:this.handleFileSelection,onInteract:this.handleChipInteract,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,required:this.required,type:"input",value:this.chipArray,title:this.getTranslation("drag-and-drop-tips"),onDragEnter:this.handleDragEnter,onDragOver:this.preventAndStop,onDragLeave:this.handleDragLeave,onDrop:this.handleFileDrop})]}get chipArray(){return this.value?[Object.assign(Object.assign({},y),{text:this.value.filename,id:this.value.id,icon:m(this.value),iconFillColor:k(this.value),iconBackgroundColor:f(this.value),href:this.value.href,iconTitle:(r=this.value,(null==r?void 0:r.icon)?r.icon:u(r))})]:[];var r}handleKeyDown(r){"Tab"!==r.code&&"Backspace"!==r.code&&"Enter"!==r.code&&(r.preventDefault(),r.stopPropagation())}handleKeyUp(r){"Enter"!==r.code||this.value||this.fileInput.click()}handleFileSelection(r){r.stopPropagation(),r.preventDefault(),this.value||this.fileInput.click()}handleFileChange(r){this.fileInput.files.length>0&&(r.stopPropagation(),this.handleFile(this.fileInput.files[0]))}handleFile(r){const o={id:t(),filename:r.name,contentType:r.type,size:r.size,fileContent:r};this.change.emit(o),this.chipSet.blur(),this.mdcTextField.valid=!0}handleChipSetChange(r){r.stopPropagation();const o=r.detail.length?null:r.detail[0];this.chipSet.blur(),o||(this.fileInput.value="",this.change.emit(o),this.required&&(this.mdcTextField.valid=!1))}handleChipInteract(r){r.stopPropagation(),r.preventDefault(),this.interact.emit(r.detail.id)}preventAndStop(r){r.stopPropagation(),r.preventDefault()}getTranslation(r){return e.get(`file.${r}`,this.language)}get element(){return l(this)}};_.style=":host{--icon-background-color:rgb(var(--contrast-400));--icon-color:rgb(var(--contrast-1100))}";export{_ as limel_file}
1
+ import{r,c as o,h as a,g as l}from"./p-44f9b6d5.js";import{t as e}from"./p-3bf54a4c.js";import{c as t}from"./p-6c094f3f.js";import{M as i}from"./p-1c284626.js";import"./p-48d4ef20.js";import"./p-cbc43682.js";import"./p-dcc97cc2.js";import"./p-d0a7de87.js";const g="ms_word_copyrighted",c="ms_powerpoint_copyrighted",s={msg:"ms_outlook_copyrighted",ics:"tear_off_calendar",ical:"tear_off_calendar",icalendar:"tear_off_calendar",ifb:"tear_off_calendar",email:"email",eml:"email",oft:"email",ost:"email",emlx:"email",html:"internet",xml:"internet",txt:"text_box",rtf:"text_box",dot:g,doc:g,docx:g,dotx:g,docm:g,dotm:g,odt:"overview_pages_2",pages:"overview_pages_2",pdf:"PDF_2",ppt:c,pot:c,pps:c,pptx:c,pptm:c,potx:c,potm:c,ppam:c,ppsx:c,ppsm:c,sldx:c,sldm:c,odp:"presentation_filled",key:"presentation_filled",xls:"ms_excel_copyrighted",xlsx:"ms_excel_copyrighted",csv:"data_sheet",numbers:"data_sheet",jpg:"camera",jpeg:"camera",heic:"camera",bmp:"picture",png:"picture",gif:"picture",psd:"adobe_photoshop_copyrighted",ai:"adobe_illustrator_copyrighted",svg:"vector",svgz:"vector",ep:"vector",eps:"vector",sketch:"vector",mp3:"audio_wave",wav:"audio_wave",wma:"audio_wave",ogg:"audio_wave",avi:"video_file",flv:"video_file",h264:"video_file",mov:"video_file",mp4:"video_file",mwv:"video_file",zip:"condom_package","7z":"condom_package",rar:"condom_package",json:"json",yaml:"database",sql:"database",db:"database",dbf:"database"},d="rgb(var(--color-glaucous-dark))",h={msg:"rgb(var(--color-yellow-dark))",ics:"rgb(var(--color-cyan-dark))",ical:"rgb(var(--color-cyan-dark))",icalendar:"rgb(var(--color-cyan-dark))",ifb:"rgb(var(--color-cyan-dark))",email:"rgb(var(--color-gray-dark))",eml:"rgb(var(--color-gray-dark))",oft:"rgb(var(--color-gray-dark))",ost:"rgb(var(--color-gray-dark))",emlx:"rgb(var(--color-gray-dark))",html:"rgb(var(--color-blue-dark))",xml:"rgb(var(--color-blue-dark))",txt:"rgb(var(--color-yellow-darker))",rtf:"rgb(var(--color-yellow-darker))",dot:"rgb(var(--color-sky-dark))",doc:"rgb(var(--color-sky-dark))",docx:"rgb(var(--color-sky-dark))",dotx:"rgb(var(--color-sky-dark))",docm:"rgb(var(--color-sky-dark))",dotm:"rgb(var(--color-sky-dark))",odt:"rgb(var(--color-orange-dark))",pages:"rgb(var(--color-orange-dark))",pdf:"rgb(var(--color-red-dark))",ppt:"rgb(var(--color-coral-dark))",pot:"rgb(var(--color-coral-dark))",pps:"rgb(var(--color-coral-dark))",pptx:"rgb(var(--color-coral-dark))",pptm:"rgb(var(--color-coral-dark))",potx:"rgb(var(--color-coral-dark))",potm:"rgb(var(--color-coral-dark))",ppam:"rgb(var(--color-coral-dark))",ppsx:"rgb(var(--color-coral-dark))",ppsm:"rgb(var(--color-coral-dark))",sldx:"rgb(var(--color-coral-dark))",sldm:"rgb(var(--color-coral-dark))",odp:"rgb(var(--color-blue-dark))",key:"rgb(var(--color-blue-dark))",xls:"rgb(var(--color-green-dark))",xlsx:"rgb(var(--color-green-dark))",csv:"rgb(var(--color-gray-dark))",numbers:"rgb(var(--color-green-dark))",bmp:"rgb(var(--color-lime-dark))",jpg:"rgb(var(--color-lime-dark))",jpeg:"rgb(var(--color-lime-dark))",heic:"rgb(var(--color-lime-dark))",png:"rgb(var(--color-lime-dark))",gif:"rgb(var(--color-lime-dark))",psd:"rgb(var(--color-blue-dark))",ai:"rgb(var(--color-orange-dark))",svg:"rgb(var(--color-magenta-dark))",svgz:"rgb(var(--color-magenta-dark))",ep:"rgb(var(--color-magenta-dark))",eps:"rgb(var(--color-magenta-dark))",sketch:"rgb(var(--color-magenta-dark))",mp3:"rgb(var(--color-indigo-dark))",wav:"rgb(var(--color-indigo-dark))",wma:"rgb(var(--color-indigo-dark))",ogg:"rgb(var(--color-indigo-dark))",flv:"rgb(var(--color-red-dark))",h264:"rgb(var(--color-red-dark))",mov:"rgb(var(--color-red-dark))",mp4:"rgb(var(--color-red-dark))",mwv:"rgb(var(--color-red-dark))",zip:"rgb(var(--color-brown-default))","7z":"rgb(var(--color-brown-default))",rar:"rgb(var(--color-brown-default))",json:d,yaml:d,sql:d,db:d,dbf:d},n="rgba(var(--color-coral-lighter), 0.4)",v="rgba(var(--color-sky-lighter), 0.4)",b="rgba(var(--color-glaucous-lighter), 0.4)",p={msg:"rgba(var(--color-yellow-lighter), 0.4)",ics:"rgba(var(--color-cyan-lighter), 0.4)",ical:"rgba(var(--color-cyan-lighter), 0.4)",icalendar:"rgba(var(--color-cyan-lighter), 0.4)",ifb:"rgba(var(--color-cyan-lighter), 0.4)",email:"rgba(var(--color-gray-lighter), 0.4)",eml:"rgba(var(--color-gray-lighter), 0.4)",oft:"rgba(var(--color-gray-lighter), 0.4)",ost:"rgba(var(--color-gray-lighter), 0.4)",emlx:"rgba(var(--color-gray-lighter), 0.4)",html:"rgba(var(--color-blue-lighter), 0.4)",xml:"rgba(var(--color-blue-lighter), 0.4)",txt:"rgba(var(--color-yellow-lighter), 0.4)",rtf:"rgba(var(--color-yellow-lighter), 0.4)",dot:v,doc:v,docx:v,dotx:v,docm:v,dotm:v,odt:"rgba(var(--color-orange-lighter), 0.4)",pages:"rgba(var(--color-orange-lighter), 0.4)",pdf:"rgba(var(--color-red-lighter), 0.4)",ppt:n,pot:n,pps:n,pptx:n,pptm:n,potx:n,potm:n,ppam:n,ppsx:n,ppsm:n,sldx:n,sldm:n,odp:"rgba(var(--color-blue-lighter), 0.4)",key:"rgba(var(--color-blue-lighter), 0.4)",xls:"rgba(var(--color-green-lighter), 0.4)",xlsx:"rgba(var(--color-green-lighter), 0.4)",csv:"rgba(var(--color-gray-lighter), 0.4)",numbers:"rgba(var(--color-green-lighter), 0.4)",bmp:"rgba(var(--color-lime-lighter), 0.4)",jpg:"rgba(var(--color-lime-lighter), 0.4)",jpeg:"rgba(var(--color-lime-lighter), 0.4)",heic:"rgba(var(--color-lime-lighter), 0.4)",png:"rgba(var(--color-lime-lighter), 0.4)",gif:"rgba(var(--color-lime-lighter), 0.4)",psd:"rgba(var(--color-blue-lighter), 0.4)",ai:"rgba(var(--color-orange-lighter), 0.4)",svg:"rgba(var(--color-magenta-lighter), 0.4)",svgz:"rgba(var(--color-magenta-lighter), 0.4)",ep:"rgba(var(--color-magenta-lighter), 0.4)",eps:"rgba(var(--color-magenta-lighter), 0.4)",sketch:"rgba(var(--color-magenta-lighter), 0.4)",mp3:"rgba(var(--color-indigo-lighter), 0.4)",wav:"rgba(var(--color-indigo-lighter), 0.4)",wma:"rgba(var(--color-indigo-lighter), 0.4)",ogg:"rgba(var(--color-indigo-lighter), 0.4)",flv:"rgba(var(--color-red-lighter), 0.4)",h264:"rgba(var(--color-red-lighter), 0.4)",mov:"rgba(var(--color-red-lighter), 0.4)",mp4:"rgba(var(--color-red-lighter), 0.4)",mwv:"rgba(var(--color-red-lighter), 0.4)",zip:"rgba(var(--color-orange-lighter), 0.4)","7z":"rgba(var(--color-orange-lighter), 0.4)",rar:"rgba(var(--color-orange-lighter), 0.4)",json:b,yaml:b,sql:b,db:b,dbf:b};function m(r){if(null==r?void 0:r.icon)return r.icon;const o=u(r);return o?function(r){return s[r]||"file"}(o):void 0}function k(r){if(null==r?void 0:r.iconColor)return r.iconColor;const o=u(r);return o?function(r){return h[r]||"rgb(var(--color-gray-dark))"}(o):void 0}function f(r){if(null==r?void 0:r.iconBackgroundColor)return r.iconBackgroundColor;const o=u(r);return o?function(r){return p[r]||"rgba(var(--color-gray-lighter), 0.4)"}(o):void 0}function u(r){if(r)return r.filename.split(".").pop()}const y={id:null,text:null,removable:!0};let _=class{constructor(a){r(this,a),this.change=o(this,"change",7),this.interact=o(this,"interact",7),this.required=!1,this.disabled=!1,this.readonly=!1,this.accept="*",this.language="en",this.isDraggingOverDropZone=!1,this.fileInputId=t(),this.handleDragEnter=r=>{this.isDraggingOverDropZone=!0,this.preventAndStop(r)},this.handleDragLeave=()=>{this.isDraggingOverDropZone=!1},this.handleFileDrop=r=>{this.preventAndStop(r),this.isDraggingOverDropZone=!1,this.handleFile(r.dataTransfer.files[0])},this.handleFileSelection=this.handleFileSelection.bind(this),this.handleFileChange=this.handleFileChange.bind(this),this.handleChipSetChange=this.handleChipSetChange.bind(this),this.handleFileDrop=this.handleFileDrop.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleChipInteract=this.handleChipInteract.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.fileInput=this.element.shadowRoot.getElementById(this.fileInputId),this.chipSet=this.element.shadowRoot.querySelector("limel-chip-set"),this.initialize()}initialize(){this.chipSet&&(this.mdcTextField=new i(this.chipSet.shadowRoot.querySelector(".mdc-text-field")))}disconnectedCallback(){this.mdcTextField&&this.mdcTextField.destroy()}render(){return[a("input",{hidden:!0,id:this.fileInputId,onChange:this.handleFileChange,type:"file",accept:this.accept,disabled:this.disabled||this.readonly}),a("limel-chip-set",{class:{"is-file-picker":!0,"shows-dropzone":!0,"highlight-dropzone":this.isDraggingOverDropZone},disabled:this.disabled,readonly:this.readonly,label:this.label,leadingIcon:"upload_to_cloud",language:this.language,onChange:this.handleChipSetChange,onClick:this.handleFileSelection,onInteract:this.handleChipInteract,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,required:this.required,type:"input",value:this.chipArray,title:this.getTranslation("drag-and-drop-tips"),onDragEnter:this.handleDragEnter,onDragOver:this.preventAndStop,onDragLeave:this.handleDragLeave,onDrop:this.handleFileDrop})]}get chipArray(){return this.value?[Object.assign(Object.assign({},y),{text:this.value.filename,id:this.value.id,icon:m(this.value),iconFillColor:k(this.value),iconBackgroundColor:f(this.value),href:this.value.href,iconTitle:(r=this.value,(null==r?void 0:r.icon)?r.icon:u(r))})]:[];var r}handleKeyDown(r){"Tab"!==r.code&&"Backspace"!==r.code&&"Enter"!==r.code&&(r.preventDefault(),r.stopPropagation())}handleKeyUp(r){"Enter"!==r.code||this.value||this.fileInput.click()}handleFileSelection(r){r.stopPropagation(),r.preventDefault(),this.value||this.fileInput.click()}handleFileChange(r){this.fileInput.files.length>0&&(r.stopPropagation(),this.handleFile(this.fileInput.files[0]))}handleFile(r){const o={id:t(),filename:r.name,contentType:r.type,size:r.size,fileContent:r};this.change.emit(o),this.chipSet.blur(),this.mdcTextField.valid=!0}handleChipSetChange(r){r.stopPropagation();const o=r.detail.length?null:r.detail[0];this.chipSet.blur(),o||(this.fileInput.value="",this.change.emit(o),this.required&&(this.mdcTextField.valid=!1))}handleChipInteract(r){r.stopPropagation(),r.preventDefault(),this.interact.emit(r.detail.id)}preventAndStop(r){r.stopPropagation(),r.preventDefault()}getTranslation(r){return e.get(`file.${r}`,this.language)}get element(){return l(this)}};_.style=":host{--icon-background-color:rgb(var(--contrast-400));--icon-color:rgb(var(--contrast-1100))}";export{_ as limel_file}
@@ -0,0 +1,126 @@
1
+ import{M as t,a as i}from"./p-48d4ef20.js";import{m as n,c as e}from"./p-dcc97cc2.js";import{n as s}from"./p-6e219bb4.js";import{g as r}from"./p-9faad6eb.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */var o,u,h={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},c={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},f={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(o||(o={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(u||(u={}));
24
+ /*! *****************************************************************************
25
+ Copyright (c) Microsoft Corporation.
26
+
27
+ Permission to use, copy, modify, and/or distribute this software for any
28
+ purpose with or without fee is hereby granted.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
31
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
32
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
33
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
34
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
36
+ PERFORMANCE OF THIS SOFTWARE.
37
+ ***************************************************************************** */
38
+ var a=function(t,i){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,i)};function d(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}a(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var l,m,b=function(){return(b=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var s in i=arguments[n])Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);return t}).apply(this,arguments)},I={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},E=((l={})[""+I.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",l[""+I.LIST_ITEM_CLASS]="mdc-list-item",l[""+I.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",l[""+I.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",l[""+I.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",l[""+I.ROOT]="mdc-list",l),A=((m={})[""+I.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",m[""+I.LIST_ITEM_CLASS]="mdc-deprecated-list-item",m[""+I.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",m[""+I.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",m[""+I.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",m[""+I.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",m[""+I.ROOT]="mdc-deprecated-list",m),v={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+I.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+I.LIST_ITEM_CLASS+" a,\n ."+A[I.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+A[I.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+I.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+I.LIST_ITEM_CLASS+" a,\n ."+I.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+I.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled),\n .'+A[I.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+A[I.LIST_ITEM_CLASS]+" a,\n ."+A[I.LIST_ITEM_CLASS]+' input[type="radio"]:not(:disabled),\n .'+A[I.LIST_ITEM_CLASS]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},T={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},x=["input","button","textarea","select"],C=function(t){var i=t.target;if(i){var n=(""+i.tagName).toLowerCase();-1===x.indexOf(n)&&t.preventDefault()}};
39
+ /**
40
+ * @license
41
+ * Copyright 2018 Google Inc.
42
+ *
43
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
44
+ * of this software and associated documentation files (the "Software"), to deal
45
+ * in the Software without restriction, including without limitation the rights
46
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
47
+ * copies of the Software, and to permit persons to whom the Software is
48
+ * furnished to do so, subject to the following conditions:
49
+ *
50
+ * The above copyright notice and this permission notice shall be included in
51
+ * all copies or substantial portions of the Software.
52
+ *
53
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59
+ * THE SOFTWARE.
60
+ */function _(t,i){var n,e=t.nextChar,s=t.focusItemAtIndex,r=t.sortedIndexByFirstChar,o=t.focusedItemIndex,u=t.skipFocus,h=t.isItemAtIndexDisabled;return clearTimeout(i.bufferClearTimeout),i.bufferClearTimeout=setTimeout((function(){p(i)}),T.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),i.typeaheadBuffer=i.typeaheadBuffer+e,-1===(n=1===i.typeaheadBuffer.length?function(t,i,n,e){var s=e.typeaheadBuffer[0],r=t.get(s);if(!r)return-1;if(s===e.currentFirstChar&&r[e.sortedIndexCursor].index===i){e.sortedIndexCursor=(e.sortedIndexCursor+1)%r.length;var o=r[e.sortedIndexCursor].index;if(!n(o))return o}e.currentFirstChar=s;var u,h=-1;for(u=0;u<r.length;u++)if(!n(r[u].index)){h=u;break}for(;u<r.length;u++)if(r[u].index>i&&!n(r[u].index)){h=u;break}return-1!==h?(e.sortedIndexCursor=h,r[e.sortedIndexCursor].index):-1}(r,o,h,i):function(t,i,n){var e=t.get(n.typeaheadBuffer[0]);if(!e)return-1;var s=e[n.sortedIndexCursor];if(0===s.text.lastIndexOf(n.typeaheadBuffer,0)&&!i(s.index))return s.index;for(var r=(n.sortedIndexCursor+1)%e.length,o=-1;r!==n.sortedIndexCursor;){var u=e[r],h=0===u.text.lastIndexOf(n.typeaheadBuffer,0),c=!i(u.index);if(h&&c){o=r;break}r=(r+1)%e.length}return-1!==o?(n.sortedIndexCursor=o,e[n.sortedIndexCursor].index):-1}(r,h,i))||u||s(n),n}function O(t){return t.typeaheadBuffer.length>0}function p(t){t.typeaheadBuffer=""}function g(t,i){var n=t.event,e=t.isTargetListItem,r=t.focusedItemIndex,o=t.focusItemAtIndex,u=t.sortedIndexByFirstChar,h=t.isItemAtIndexDisabled,c="ArrowLeft"===s(n),f="ArrowUp"===s(n),a="ArrowRight"===s(n),d="ArrowDown"===s(n),l="Home"===s(n),m="End"===s(n),b="Enter"===s(n),I="Spacebar"===s(n);return n.ctrlKey||n.metaKey||c||f||a||d||l||m||b?-1:I||1!==n.key.length?I?(e&&C(n),e&&O(i)?_({focusItemAtIndex:o,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:u,skipFocus:!1,isItemAtIndexDisabled:h},i):-1):-1:(C(n),_({focusItemAtIndex:o,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:u,skipFocus:!1,isItemAtIndexDisabled:h},i))}
61
+ /**
62
+ * @license
63
+ * Copyright 2018 Google Inc.
64
+ *
65
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
66
+ * of this software and associated documentation files (the "Software"), to deal
67
+ * in the Software without restriction, including without limitation the rights
68
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69
+ * copies of the Software, and to permit persons to whom the Software is
70
+ * furnished to do so, subject to the following conditions:
71
+ *
72
+ * The above copyright notice and this permission notice shall be included in
73
+ * all copies or substantial portions of the Software.
74
+ *
75
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81
+ * THE SOFTWARE.
82
+ */var y=function(t){function i(n){var e=t.call(this,b(b({},i.defaultAdapter),n))||this;return e.wrapFocus=!1,e.isVertical=!0,e.isSingleSelectionList=!1,e.selectedIndex=T.UNSET_INDEX,e.focusedItemIndex=T.UNSET_INDEX,e.useActivatedClass=!1,e.useSelectedAttr=!1,e.ariaCurrentAttrValue=null,e.isCheckboxList=!1,e.isRadioList=!1,e.hasTypeahead=!1,e.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},e.sortedIndexByFirstChar=new Map,e}return d(i,t),Object.defineProperty(i,"strings",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),i.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},i.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},i.prototype.setWrapFocus=function(t){this.wrapFocus=t},i.prototype.setVerticalOrientation=function(t){this.isVertical=t},i.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},i.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==T.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},i.prototype.getSelectedIndexFromDOM=function(){for(var t=T.UNSET_INDEX,i=this.adapter.getListItemCount(),n=0;n<i;n++){var e=this.adapter.listItemAtIndexHasClass(n,I.LIST_ITEM_SELECTED_CLASS),s=this.adapter.listItemAtIndexHasClass(n,I.LIST_ITEM_ACTIVATED_CLASS);if(e||s){t=n;break}}return t},i.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},i.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&O(this.typeaheadState)},i.prototype.setUseActivatedClass=function(t){this.useActivatedClass=t},i.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr=t},i.prototype.getSelectedIndex=function(){return this.selectedIndex},i.prototype.setSelectedIndex=function(t,i){var n=(void 0===i?{}:i).forceUpdate;this.isIndexValid(t)&&(this.isCheckboxList?this.setCheckboxAtIndex(t):this.isRadioList?this.setRadioAtIndex(t):this.setSingleSelectionAtIndex(t,{forceUpdate:n}))},i.prototype.handleFocusIn=function(t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},i.prototype.handleFocusOut=function(t){var i=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout((function(){i.adapter.isFocusInsideList()||i.setTabindexToFirstSelectedOrFocusedItem()}),0)},i.prototype.handleKeydown=function(t,i,n){var e=this,r="ArrowLeft"===s(t),o="ArrowUp"===s(t),u="ArrowRight"===s(t),h="ArrowDown"===s(t),c="Home"===s(t),f="End"===s(t),a="Enter"===s(t),d="Spacebar"===s(t),l="A"===t.key||"a"===t.key;if(this.adapter.isRootFocused())o||f?(t.preventDefault(),this.focusLastElement()):(h||c)&&(t.preventDefault(),this.focusFirstElement()),this.hasTypeahead&&g({event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState);else{var m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=n)<0)){if(this.isVertical&&h||!this.isVertical&&u)C(t),this.focusNextElement(m);else if(this.isVertical&&o||!this.isVertical&&r)C(t),this.focusPrevElement(m);else if(c)C(t),this.focusFirstElement();else if(f)C(t),this.focusLastElement();else if(l&&t.ctrlKey&&this.isCheckboxList)t.preventDefault(),this.toggleAll(this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex);else if((a||d)&&i){var b=t.target;if(b&&"A"===b.tagName&&a)return;if(C(t),this.adapter.listItemAtIndexHasClass(m,I.LIST_ITEM_DISABLED_CLASS))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(m),this.adapter.notifyAction(m))}this.hasTypeahead&&g({event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)}}},i.prototype.handleClick=function(t,i){t!==T.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList()&&this.setSelectedIndexOnAction(t,i),this.adapter.notifyAction(t)))},i.prototype.focusNextElement=function(t){var i=t+1;if(i>=this.adapter.getListItemCount()){if(!this.wrapFocus)return t;i=0}return this.focusItemAtIndex(i),i},i.prototype.focusPrevElement=function(t){var i=t-1;if(i<0){if(!this.wrapFocus)return t;i=this.adapter.getListItemCount()-1}return this.focusItemAtIndex(i),i},i.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},i.prototype.focusLastElement=function(){var t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},i.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},i.prototype.setEnabled=function(t,i){this.isIndexValid(t)&&(i?(this.adapter.removeClassForElementIndex(t,I.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,v.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,I.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,v.ARIA_DISABLED,"true")))},i.prototype.setSingleSelectionAtIndex=function(t,i){if(this.selectedIndex!==t||(void 0===i?{}:i).forceUpdate){var n=I.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=I.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==T.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==T.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t}},i.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===T.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,v.ARIA_CURRENT));var i=null!==this.ariaCurrentAttrValue,n=i?v.ARIA_CURRENT:v.ARIA_SELECTED;this.selectedIndex!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,n,i?this.ariaCurrentAttrValue:"true")},i.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?v.ARIA_SELECTED:v.ARIA_CHECKED},i.prototype.setRadioAtIndex=function(t){var i=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,i,"false"),this.adapter.setAttributeForElementIndex(t,i,"true"),this.selectedIndex=t},i.prototype.setCheckboxAtIndex=function(t){for(var i=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var e=!1;t.indexOf(n)>=0&&(e=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,e),this.adapter.setAttributeForElementIndex(n,i,e?"true":"false")}this.selectedIndex=t},i.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===T.UNSET_INDEX&&0!==t?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},i.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},i.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},i.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?"number"==typeof this.selectedIndex&&this.selectedIndex!==T.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce((function(t,i){return Math.min(t,i)})):0:Math.max(this.focusedItemIndex,0)},i.prototype.isIndexValid=function(t){var i=this;if(t instanceof Array){if(!this.isCheckboxList)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some((function(t){return i.isIndexInRange(t)}))}if("number"==typeof t){if(this.isCheckboxList)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===T.UNSET_INDEX}return!1},i.prototype.isIndexInRange=function(t){var i=this.adapter.getListItemCount();return t>=0&&t<i},i.prototype.setSelectedIndexOnAction=function(t,i){void 0===i&&(i=!0),this.isCheckboxList?this.toggleCheckboxAtIndex(t,i):this.setSelectedIndex(t)},i.prototype.toggleCheckboxAtIndex=function(t,i){var n=this.getSelectionAttribute(),e=this.adapter.isCheckboxCheckedAtIndex(t);i&&this.adapter.setCheckedCheckboxOrRadioAtIndex(t,e=!e),this.adapter.setAttributeForElementIndex(t,n,e?"true":"false");var s=this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex.slice();e?s.push(t):s=s.filter((function(i){return i!==t})),this.selectedIndex=s},i.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},i.prototype.toggleAll=function(t){var i=this.adapter.getListItemCount();if(t.length===i)this.setCheckboxAtIndex([]);else{for(var n=[],e=0;e<i;e++)(!this.adapter.listItemAtIndexHasClass(e,I.LIST_ITEM_DISABLED_CLASS)||t.indexOf(e)>-1)&&n.push(e);this.setCheckboxAtIndex(n)}},i.prototype.typeaheadMatchItem=function(t,i,n){var e=this;return void 0===n&&(n=!1),_({focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:i||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},i.prototype.typeaheadInitSortedIndex=function(){return function(t,i){for(var n=new Map,e=0;e<t;e++){var s=i(e).trim();if(s){var r=s[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:s.toLowerCase(),index:e})}}return n.forEach((function(t){t.sort((function(t,i){return t.index-i.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},i.prototype.clearTypeaheadBuffer=function(){p(this.typeaheadState)},i}(t),S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return d(i,t),Object.defineProperty(i.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[I.LIST_ITEM_CLASS]))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!1,configurable:!0}),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled="evolution"in this.root.dataset,this.classNameMap=this.isEvolutionEnabled?E:n(this.root,v.DEPRECATED_SELECTOR)?A:Object.values(I).reduce((function(t,i){return t[i]=i,t}),{}),this.handleClick=this.handleClickEvent.bind(this),this.handleKeydown=this.handleKeydownEvent.bind(this),this.focusInEventListener=this.handleFocusInEvent.bind(this),this.focusOutEventListener=this.handleFocusOutEvent.bind(this),this.listen("keydown",this.handleKeydown),this.listen("click",this.handleClick),this.listen("focusin",this.focusInEventListener),this.listen("focusout",this.focusOutEventListener),this.layout(),this.initializeListType(),this.ensureFocusable()},i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.focusInEventListener),this.unlisten("focusout",this.focusOutEventListener)},i.prototype.layout=function(){var t=this.root.getAttribute(v.ARIA_ORIENTATION);this.vertical=t!==v.ARIA_ORIENTATION_HORIZONTAL;var i=v.FOCUSABLE_CHILD_ELEMENTS,n=this.root.querySelectorAll("."+this.classNameMap[I.LIST_ITEM_CLASS]+":not([tabindex])");n.length&&Array.prototype.forEach.call(n,(function(t){t.setAttribute("tabindex","-1")}));var e=this.root.querySelectorAll(i);e.length&&Array.prototype.forEach.call(e,(function(t){t.setAttribute("tabindex","-1")})),this.isEvolutionEnabled&&this.foundation.setUseSelectedAttribute(!0),this.foundation.layout()},i.prototype.getPrimaryText=function(t){var i,n=t.querySelector("."+this.classNameMap[I.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||n)return null!==(i=null==n?void 0:n.textContent)&&void 0!==i?i:"";var e=t.querySelector("."+this.classNameMap[I.LIST_ITEM_TEXT_CLASS]);return e&&e.textContent||""},i.prototype.initializeListType=function(){var t=this;if(this.isInteractive=n(this.root,v.ARIA_INTERACTIVE_ROLES_SELECTOR),this.isEvolutionEnabled&&this.isInteractive){var i=Array.from(this.root.querySelectorAll(v.SELECTED_ITEM_SELECTOR),(function(i){return t.listElements.indexOf(i)}));n(this.root,v.ARIA_MULTI_SELECTABLE_SELECTOR)?this.selectedIndex=i:i.length>0&&(this.selectedIndex=i[0])}else{var e=this.root.querySelectorAll(v.ARIA_ROLE_CHECKBOX_SELECTOR),s=this.root.querySelector(v.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var r=this.root.querySelectorAll(v.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(r,(function(i){return t.listElements.indexOf(i)}))}else s&&(this.selectedIndex=this.listElements.indexOf(s))}},i.prototype.setEnabled=function(t,i){this.foundation.setEnabled(t,i)},i.prototype.typeaheadMatchItem=function(t,i){return this.foundation.typeaheadMatchItem(t,i,!0)},i.prototype.getDefaultFoundation=function(){var t=this;return new y({addClassForElementIndex:function(i,n){var e=t.listElements[i];e&&e.classList.add(t.classNameMap[n])},focusItemAtIndex:function(i){var n=t.listElements[i];n&&n.focus()},getAttributeForElementIndex:function(i,n){return t.listElements[i].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(i){return t.getPrimaryText(t.listElements[i])},hasCheckboxAtIndex:function(i){return!!t.listElements[i].querySelector(v.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(i){return!!t.listElements[i].querySelector(v.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(i){return t.listElements[i].querySelector(v.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(i,n){return t.listElements[i].classList.contains(t.classNameMap[n])},notifyAction:function(i){t.emit(v.ACTION_EVENT,{index:i},!0)},removeClassForElementIndex:function(i,n){var e=t.listElements[i];e&&e.classList.remove(t.classNameMap[n])},setAttributeForElementIndex:function(i,n,e){var s=t.listElements[i];s&&s.setAttribute(n,e)},setCheckedCheckboxOrRadioAtIndex:function(i,n){var e=t.listElements[i].querySelector(v.CHECKBOX_RADIO_SELECTOR);e.checked=n;var s=document.createEvent("Event");s.initEvent("change",!0,!0),e.dispatchEvent(s)},setTabIndexForListItemChildren:function(i,n){Array.prototype.forEach.call(t.listElements[i].querySelectorAll(v.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX),(function(t){t.setAttribute("tabindex",n)}))}})},i.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[I.LIST_ITEM_CLASS]+'[tabindex="0"]')){var t=this.initialFocusIndex();-1!==t&&(this.listElements[t].tabIndex=0)}},i.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if("number"==typeof this.selectedIndex&&this.selectedIndex!==T.UNSET_INDEX)return this.selectedIndex;var t=this.root.querySelector("."+this.classNameMap[I.LIST_ITEM_CLASS]+":not(."+this.classNameMap[I.LIST_ITEM_DISABLED_CLASS]+")");return null===t?-1:this.getListItemIndex(t)},i.prototype.getListItemIndex=function(t){var i=e(t,"."+this.classNameMap[I.LIST_ITEM_CLASS]+", ."+this.classNameMap[I.ROOT]);return i&&n(i,"."+this.classNameMap[I.LIST_ITEM_CLASS])?this.listElements.indexOf(i):-1},i.prototype.handleFocusInEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusIn(i)},i.prototype.handleFocusOutEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusOut(i)},i.prototype.handleKeydownEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleKeydown(t,t.target.classList.contains(this.classNameMap[I.LIST_ITEM_CLASS]),i)},i.prototype.handleClickEvent=function(t){var i=this.getListItemIndex(t.target),e=!n(t.target,v.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(i,e)},i}(i),R=function(t,i){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,i)};
83
+ /**
84
+ * @license
85
+ * Copyright 2018 Google Inc.
86
+ *
87
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
88
+ * of this software and associated documentation files (the "Software"), to deal
89
+ * in the Software without restriction, including without limitation the rights
90
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
91
+ * copies of the Software, and to permit persons to whom the Software is
92
+ * furnished to do so, subject to the following conditions:
93
+ *
94
+ * The above copyright notice and this permission notice shall be included in
95
+ * all copies or substantial portions of the Software.
96
+ *
97
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
100
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
101
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
102
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
103
+ * THE SOFTWARE.
104
+ */function L(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}R(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var w=function(){return(w=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var s in i=arguments[n])Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);return t}).apply(this,arguments)},D=function(t){function i(n){var e=t.call(this,w(w({},i.defaultAdapter),n))||this;return e.isSurfaceOpen=!1,e.isQuickOpen=!1,e.isHoistedElement=!1,e.isFixedPosition=!1,e.isHorizontallyCenteredOnViewport=!1,e.maxHeight=0,e.openAnimationEndTimerId=0,e.closeAnimationEndTimerId=0,e.animationRequestId=0,e.anchorCorner=u.TOP_START,e.originCorner=u.TOP_START,e.anchorMargin={top:0,right:0,bottom:0,left:0},e.position={x:0,y:0},e}return L(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(i,"Corner",{get:function(){return u},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){var t=i.cssClasses,n=t.ROOT,e=t.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(e)&&(this.isSurfaceOpen=!0)},i.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},i.prototype.setAnchorCorner=function(t){this.anchorCorner=t},i.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^o.RIGHT},i.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},i.prototype.setIsHoisted=function(t){this.isHoistedElement=t},i.prototype.setFixedPosition=function(t){this.isFixedPosition=t},i.prototype.isFixed=function(){return this.isFixedPosition},i.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(i)?i:0},i.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},i.prototype.setQuickOpen=function(t){this.isQuickOpen=t},i.prototype.setMaxHeight=function(t){this.maxHeight=t},i.prototype.isOpen=function(){return this.isSurfaceOpen},i.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(i.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(i.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(i.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(i.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()}),f.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},i.prototype.close=function(t){var n=this;if(void 0===t&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(i.cssClasses.OPEN),this.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(i.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(i.cssClasses.OPEN),n.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(i.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),f.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},i.prototype.handleBodyClick=function(t){this.adapter.isElementInContainer(t.target)||this.close()},i.prototype.handleKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&this.close()},i.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),e=this.getMenuSurfaceMaxHeight(n),s=this.hasBit(n,o.BOTTOM)?"bottom":"top",r=this.hasBit(n,o.RIGHT)?"right":"left",u=this.getHorizontalOriginOffset(n),h=this.getVerticalOriginOffset(n),c=this.measurements,a=c.anchorSize,d=c.surfaceSize,l=((t={})[r]=u,t[s]=h,t);a.width/d.width>f.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(l),this.adapter.setTransformOrigin(r+" "+s),this.adapter.setPosition(l),this.adapter.setMaxHeight(e?e+"px":""),this.hasBit(n,o.BOTTOM)||this.adapter.addClass(i.cssClasses.IS_OPEN_BELOW)},i.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),e=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:e}},i.prototype.getoriginCorner=function(){var t,n,e=this.originCorner,s=this.measurements,r=s.viewportDistance,u=s.anchorSize,h=s.surfaceSize,c=i.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,o.BOTTOM)?(t=r.top-c+this.anchorMargin.bottom,n=r.bottom-c-this.anchorMargin.bottom):(t=r.top-c+this.anchorMargin.top,n=r.bottom-c+u.height-this.anchorMargin.top),!(n-h.height>0)&&t>n&&(e=this.setBit(e,o.BOTTOM));var f,a,d,l=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,o.FLIP_RTL),b=this.hasBit(this.anchorCorner,o.RIGHT)||this.hasBit(e,o.RIGHT);(d=l&&m?!b:b)?(f=r.left+u.width+this.anchorMargin.right,a=r.right-this.anchorMargin.right):(f=r.left+this.anchorMargin.left,a=r.right+u.width-this.anchorMargin.left);var I=f-h.width>0,E=a-h.width>0,A=this.hasBit(e,o.FLIP_RTL)&&this.hasBit(e,o.RIGHT);return E&&A&&l||!I&&A?e=this.unsetBit(e,o.RIGHT):(I&&d&&l||I&&!d&&b||!E&&f>=a)&&(e=this.setBit(e,o.RIGHT)),e},i.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var n=this.measurements.viewportDistance,e=0,s=this.hasBit(t,o.BOTTOM),r=this.hasBit(this.anchorCorner,o.BOTTOM),u=i.numbers.MARGIN_TO_EDGE;return s?(e=n.top+this.anchorMargin.top-u,r||(e+=this.measurements.anchorSize.height)):(e=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-u,r&&(e-=this.measurements.anchorSize.height)),e},i.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,o.RIGHT),e=this.hasBit(this.anchorCorner,o.RIGHT);if(n){var s=e?i.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?s-(this.measurements.viewportSize.width-this.measurements.bodySize.width):s}return e?i.width-this.anchorMargin.right:this.anchorMargin.left},i.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,o.BOTTOM),e=this.hasBit(this.anchorCorner,o.BOTTOM);return n?e?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:e?i.height+this.anchorMargin.bottom:this.anchorMargin.top},i.prototype.adjustPositionForHoistedElement=function(t){var i,n,e=this.measurements,s=e.windowScroll,r=e.viewportDistance,o=e.surfaceSize,u=e.viewportSize,h=Object.keys(t);try{for(var c=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}
105
+ /**
106
+ * @license
107
+ * Copyright 2018 Google Inc.
108
+ *
109
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
110
+ * of this software and associated documentation files (the "Software"), to deal
111
+ * in the Software without restriction, including without limitation the rights
112
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113
+ * copies of the Software, and to permit persons to whom the Software is
114
+ * furnished to do so, subject to the following conditions:
115
+ *
116
+ * The above copyright notice and this permission notice shall be included in
117
+ * all copies or substantial portions of the Software.
118
+ *
119
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
125
+ * THE SOFTWARE.
126
+ */(h),f=c.next();!f.done;f=c.next()){var a=f.value,d=t[a]||0;!this.isHorizontallyCenteredOnViewport||"left"!==a&&"right"!==a?(d+=r[a],this.isFixedPosition||("top"===a?d+=s.y:"bottom"===a?d-=s.y:"left"===a?d+=s.x:d-=s.x),t[a]=d):t[a]=(u.width-o.width)/2}}catch(t){i={error:t}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}},i.prototype.maybeRestoreFocus=function(){var t=this,i=this.adapter.isFocused(),n=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(i||n)&&setTimeout((function(){t.adapter.restoreFocus()}),f.TOUCH_EVENT_WAIT_MS)},i.prototype.hasBit=function(t,i){return Boolean(t&i)},i.prototype.setBit=function(t,i){return t|i},i.prototype.unsetBit=function(t,i){return t^i},i.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},i}(t),F=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return L(i,t),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){var t=this,i=this.root.parentElement;this.anchorElement=i&&i.classList.contains(h.ANCHOR)?i:null,this.root.classList.contains(h.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(i){t.foundation.handleKeydown(i)},this.handleBodyClick=function(i){t.foundation.handleBodyClick(i)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(c.OPENED_EVENT,this.registerBodyClickListener),this.listen(c.CLOSED_EVENT,this.deregisterBodyClickListener)},i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(c.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(c.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},i.prototype.isOpen=function(){return this.foundation.isOpen()},i.prototype.open=function(){this.foundation.open()},i.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(i.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!1,configurable:!0}),i.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},i.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},i.prototype.setFixedPosition=function(t){t?this.root.classList.add(h.FIXED):this.root.classList.remove(h.FIXED),this.foundation.setFixedPosition(t)},i.prototype.setAbsolutePosition=function(t,i){this.foundation.setAbsolutePosition(t,i),this.setIsHoisted(!0)},i.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},i.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},i.prototype.getDefaultFoundation=function(){var t=this;return new D({addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(D.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(D.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(D.strings.OPENED_EVENT,{})},isElementInContainer:function(i){return t.root.contains(i)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(i){var n=r(window,"transform")+"-origin";t.root.style.setProperty(n,i)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(i){var n=t.root;n.style.left="left"in i?i.left+"px":"",n.style.right="right"in i?i.right+"px":"",n.style.top="top"in i?i.top+"px":"",n.style.bottom="bottom"in i?i.bottom+"px":""},setMaxHeight:function(i){t.root.style.maxHeight=i}})},i}(i);export{u as C,D as M,y as a,F as b,I as c,S as d,T as n,v as s}