stripe-pwa-elements 2.0.2

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 (1403) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/index-aec82bce.js +1698 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/ion-icon.cjs.entry.js +310 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/stripe-elements.cjs.js +19 -0
  7. package/dist/cjs/stripe-payment-request-button.cjs.entry.js +177 -0
  8. package/dist/cjs/stripe-payment-sheet.cjs.entry.js +112 -0
  9. package/dist/cjs/stripe-payment_2.cjs.entry.js +3469 -0
  10. package/dist/cjs/stripe.esm-648239f0.js +131 -0
  11. package/dist/collection/collection-manifest.json +22 -0
  12. package/dist/collection/components/stripe-element-modal/stripe-element-modal.css +62 -0
  13. package/dist/collection/components/stripe-element-modal/stripe-element-modal.js +162 -0
  14. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.css +3 -0
  15. package/dist/collection/components/stripe-payment-request-button/stripe-payment-request-button.js +510 -0
  16. package/dist/collection/components/stripe-payment-sheet/stripe-payment-sheet.css +86 -0
  17. package/dist/collection/components/stripe-payment-sheet/stripe-payment-sheet.js +864 -0
  18. package/dist/collection/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.css +3 -0
  19. package/dist/collection/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.js +495 -0
  20. package/dist/collection/index.js +1 -0
  21. package/dist/collection/interfaces.js +1 -0
  22. package/dist/collection/utils/i18n.js +28 -0
  23. package/dist/collection/utils/platform.js +81 -0
  24. package/dist/collection/utils/utils.js +27 -0
  25. package/dist/custom-elements/index.d.ts +63 -0
  26. package/dist/custom-elements/index.js +4197 -0
  27. package/dist/esm/index-a7e5d6fd.js +1669 -0
  28. package/dist/esm/index.js +1 -0
  29. package/dist/esm/ion-icon.entry.js +306 -0
  30. package/dist/esm/loader.js +17 -0
  31. package/dist/esm/polyfills/core-js.js +11 -0
  32. package/dist/esm/polyfills/css-shim.js +1 -0
  33. package/dist/esm/polyfills/dom.js +79 -0
  34. package/dist/esm/polyfills/es5-html-element.js +1 -0
  35. package/dist/esm/polyfills/index.js +34 -0
  36. package/dist/esm/polyfills/system.js +6 -0
  37. package/dist/esm/stripe-elements.js +17 -0
  38. package/dist/esm/stripe-payment-request-button.entry.js +173 -0
  39. package/dist/esm/stripe-payment-sheet.entry.js +108 -0
  40. package/dist/esm/stripe-payment_2.entry.js +3464 -0
  41. package/dist/esm/stripe.esm-ea56157a.js +129 -0
  42. package/dist/index.cjs.js +1 -0
  43. package/dist/index.js +1 -0
  44. package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +101 -0
  45. package/dist/stripe-elements/index.esm.js +0 -0
  46. package/dist/stripe-elements/p-3922cc8d.js +2 -0
  47. package/dist/stripe-elements/p-50848f78.entry.js +1 -0
  48. package/dist/stripe-elements/p-56a89bc1.js +1 -0
  49. package/dist/stripe-elements/p-8e1243b3.entry.js +1 -0
  50. package/dist/stripe-elements/p-9232a32e.entry.js +1 -0
  51. package/dist/stripe-elements/p-cdf60a81.entry.js +1 -0
  52. package/dist/stripe-elements/stripe-elements.esm.js +1 -0
  53. package/dist/stripe-elements/svg/accessibility-outline.svg +1 -0
  54. package/dist/stripe-elements/svg/accessibility-sharp.svg +1 -0
  55. package/dist/stripe-elements/svg/accessibility.svg +1 -0
  56. package/dist/stripe-elements/svg/add-circle-outline.svg +1 -0
  57. package/dist/stripe-elements/svg/add-circle-sharp.svg +1 -0
  58. package/dist/stripe-elements/svg/add-circle.svg +1 -0
  59. package/dist/stripe-elements/svg/add-outline.svg +1 -0
  60. package/dist/stripe-elements/svg/add-sharp.svg +1 -0
  61. package/dist/stripe-elements/svg/add.svg +1 -0
  62. package/dist/stripe-elements/svg/airplane-outline.svg +1 -0
  63. package/dist/stripe-elements/svg/airplane-sharp.svg +1 -0
  64. package/dist/stripe-elements/svg/airplane.svg +1 -0
  65. package/dist/stripe-elements/svg/alarm-outline.svg +1 -0
  66. package/dist/stripe-elements/svg/alarm-sharp.svg +1 -0
  67. package/dist/stripe-elements/svg/alarm.svg +1 -0
  68. package/dist/stripe-elements/svg/albums-outline.svg +1 -0
  69. package/dist/stripe-elements/svg/albums-sharp.svg +1 -0
  70. package/dist/stripe-elements/svg/albums.svg +1 -0
  71. package/dist/stripe-elements/svg/alert-circle-outline.svg +1 -0
  72. package/dist/stripe-elements/svg/alert-circle-sharp.svg +1 -0
  73. package/dist/stripe-elements/svg/alert-circle.svg +1 -0
  74. package/dist/stripe-elements/svg/alert-outline.svg +1 -0
  75. package/dist/stripe-elements/svg/alert-sharp.svg +1 -0
  76. package/dist/stripe-elements/svg/alert.svg +1 -0
  77. package/dist/stripe-elements/svg/american-football-outline.svg +1 -0
  78. package/dist/stripe-elements/svg/american-football-sharp.svg +1 -0
  79. package/dist/stripe-elements/svg/american-football.svg +1 -0
  80. package/dist/stripe-elements/svg/analytics-outline.svg +1 -0
  81. package/dist/stripe-elements/svg/analytics-sharp.svg +1 -0
  82. package/dist/stripe-elements/svg/analytics.svg +1 -0
  83. package/dist/stripe-elements/svg/aperture-outline.svg +1 -0
  84. package/dist/stripe-elements/svg/aperture-sharp.svg +1 -0
  85. package/dist/stripe-elements/svg/aperture.svg +1 -0
  86. package/dist/stripe-elements/svg/apps-outline.svg +1 -0
  87. package/dist/stripe-elements/svg/apps-sharp.svg +1 -0
  88. package/dist/stripe-elements/svg/apps.svg +1 -0
  89. package/dist/stripe-elements/svg/archive-outline.svg +1 -0
  90. package/dist/stripe-elements/svg/archive-sharp.svg +1 -0
  91. package/dist/stripe-elements/svg/archive.svg +1 -0
  92. package/dist/stripe-elements/svg/arrow-back-circle-outline.svg +1 -0
  93. package/dist/stripe-elements/svg/arrow-back-circle-sharp.svg +1 -0
  94. package/dist/stripe-elements/svg/arrow-back-circle.svg +1 -0
  95. package/dist/stripe-elements/svg/arrow-back-outline.svg +1 -0
  96. package/dist/stripe-elements/svg/arrow-back-sharp.svg +1 -0
  97. package/dist/stripe-elements/svg/arrow-back.svg +1 -0
  98. package/dist/stripe-elements/svg/arrow-down-circle-outline.svg +1 -0
  99. package/dist/stripe-elements/svg/arrow-down-circle-sharp.svg +1 -0
  100. package/dist/stripe-elements/svg/arrow-down-circle.svg +1 -0
  101. package/dist/stripe-elements/svg/arrow-down-outline.svg +1 -0
  102. package/dist/stripe-elements/svg/arrow-down-sharp.svg +1 -0
  103. package/dist/stripe-elements/svg/arrow-down.svg +1 -0
  104. package/dist/stripe-elements/svg/arrow-forward-circle-outline.svg +1 -0
  105. package/dist/stripe-elements/svg/arrow-forward-circle-sharp.svg +1 -0
  106. package/dist/stripe-elements/svg/arrow-forward-circle.svg +1 -0
  107. package/dist/stripe-elements/svg/arrow-forward-outline.svg +1 -0
  108. package/dist/stripe-elements/svg/arrow-forward-sharp.svg +1 -0
  109. package/dist/stripe-elements/svg/arrow-forward.svg +1 -0
  110. package/dist/stripe-elements/svg/arrow-redo-circle-outline.svg +1 -0
  111. package/dist/stripe-elements/svg/arrow-redo-circle-sharp.svg +1 -0
  112. package/dist/stripe-elements/svg/arrow-redo-circle.svg +1 -0
  113. package/dist/stripe-elements/svg/arrow-redo-outline.svg +1 -0
  114. package/dist/stripe-elements/svg/arrow-redo-sharp.svg +1 -0
  115. package/dist/stripe-elements/svg/arrow-redo.svg +1 -0
  116. package/dist/stripe-elements/svg/arrow-undo-circle-outline.svg +1 -0
  117. package/dist/stripe-elements/svg/arrow-undo-circle-sharp.svg +1 -0
  118. package/dist/stripe-elements/svg/arrow-undo-circle.svg +1 -0
  119. package/dist/stripe-elements/svg/arrow-undo-outline.svg +1 -0
  120. package/dist/stripe-elements/svg/arrow-undo-sharp.svg +1 -0
  121. package/dist/stripe-elements/svg/arrow-undo.svg +1 -0
  122. package/dist/stripe-elements/svg/arrow-up-circle-outline.svg +1 -0
  123. package/dist/stripe-elements/svg/arrow-up-circle-sharp.svg +1 -0
  124. package/dist/stripe-elements/svg/arrow-up-circle.svg +1 -0
  125. package/dist/stripe-elements/svg/arrow-up-outline.svg +1 -0
  126. package/dist/stripe-elements/svg/arrow-up-sharp.svg +1 -0
  127. package/dist/stripe-elements/svg/arrow-up.svg +1 -0
  128. package/dist/stripe-elements/svg/at-circle-outline.svg +1 -0
  129. package/dist/stripe-elements/svg/at-circle-sharp.svg +1 -0
  130. package/dist/stripe-elements/svg/at-circle.svg +1 -0
  131. package/dist/stripe-elements/svg/at-outline.svg +1 -0
  132. package/dist/stripe-elements/svg/at-sharp.svg +1 -0
  133. package/dist/stripe-elements/svg/at.svg +1 -0
  134. package/dist/stripe-elements/svg/attach-outline.svg +1 -0
  135. package/dist/stripe-elements/svg/attach-sharp.svg +1 -0
  136. package/dist/stripe-elements/svg/attach.svg +1 -0
  137. package/dist/stripe-elements/svg/backspace-outline.svg +1 -0
  138. package/dist/stripe-elements/svg/backspace-sharp.svg +1 -0
  139. package/dist/stripe-elements/svg/backspace.svg +1 -0
  140. package/dist/stripe-elements/svg/bag-add-outline.svg +1 -0
  141. package/dist/stripe-elements/svg/bag-add-sharp.svg +1 -0
  142. package/dist/stripe-elements/svg/bag-add.svg +1 -0
  143. package/dist/stripe-elements/svg/bag-check-outline.svg +1 -0
  144. package/dist/stripe-elements/svg/bag-check-sharp.svg +1 -0
  145. package/dist/stripe-elements/svg/bag-check.svg +1 -0
  146. package/dist/stripe-elements/svg/bag-handle-outline.svg +1 -0
  147. package/dist/stripe-elements/svg/bag-handle-sharp.svg +1 -0
  148. package/dist/stripe-elements/svg/bag-handle.svg +1 -0
  149. package/dist/stripe-elements/svg/bag-outline.svg +1 -0
  150. package/dist/stripe-elements/svg/bag-remove-outline.svg +1 -0
  151. package/dist/stripe-elements/svg/bag-remove-sharp.svg +1 -0
  152. package/dist/stripe-elements/svg/bag-remove.svg +1 -0
  153. package/dist/stripe-elements/svg/bag-sharp.svg +1 -0
  154. package/dist/stripe-elements/svg/bag.svg +1 -0
  155. package/dist/stripe-elements/svg/balloon-outline.svg +1 -0
  156. package/dist/stripe-elements/svg/balloon-sharp.svg +1 -0
  157. package/dist/stripe-elements/svg/balloon.svg +1 -0
  158. package/dist/stripe-elements/svg/ban-outline.svg +1 -0
  159. package/dist/stripe-elements/svg/ban-sharp.svg +1 -0
  160. package/dist/stripe-elements/svg/ban.svg +1 -0
  161. package/dist/stripe-elements/svg/bandage-outline.svg +1 -0
  162. package/dist/stripe-elements/svg/bandage-sharp.svg +1 -0
  163. package/dist/stripe-elements/svg/bandage.svg +1 -0
  164. package/dist/stripe-elements/svg/bar-chart-outline.svg +1 -0
  165. package/dist/stripe-elements/svg/bar-chart-sharp.svg +1 -0
  166. package/dist/stripe-elements/svg/bar-chart.svg +1 -0
  167. package/dist/stripe-elements/svg/barbell-outline.svg +1 -0
  168. package/dist/stripe-elements/svg/barbell-sharp.svg +1 -0
  169. package/dist/stripe-elements/svg/barbell.svg +1 -0
  170. package/dist/stripe-elements/svg/barcode-outline.svg +1 -0
  171. package/dist/stripe-elements/svg/barcode-sharp.svg +1 -0
  172. package/dist/stripe-elements/svg/barcode.svg +1 -0
  173. package/dist/stripe-elements/svg/baseball-outline.svg +1 -0
  174. package/dist/stripe-elements/svg/baseball-sharp.svg +1 -0
  175. package/dist/stripe-elements/svg/baseball.svg +1 -0
  176. package/dist/stripe-elements/svg/basket-outline.svg +1 -0
  177. package/dist/stripe-elements/svg/basket-sharp.svg +1 -0
  178. package/dist/stripe-elements/svg/basket.svg +1 -0
  179. package/dist/stripe-elements/svg/basketball-outline.svg +1 -0
  180. package/dist/stripe-elements/svg/basketball-sharp.svg +1 -0
  181. package/dist/stripe-elements/svg/basketball.svg +1 -0
  182. package/dist/stripe-elements/svg/battery-charging-outline.svg +1 -0
  183. package/dist/stripe-elements/svg/battery-charging-sharp.svg +1 -0
  184. package/dist/stripe-elements/svg/battery-charging.svg +1 -0
  185. package/dist/stripe-elements/svg/battery-dead-outline.svg +1 -0
  186. package/dist/stripe-elements/svg/battery-dead-sharp.svg +1 -0
  187. package/dist/stripe-elements/svg/battery-dead.svg +1 -0
  188. package/dist/stripe-elements/svg/battery-full-outline.svg +1 -0
  189. package/dist/stripe-elements/svg/battery-full-sharp.svg +1 -0
  190. package/dist/stripe-elements/svg/battery-full.svg +1 -0
  191. package/dist/stripe-elements/svg/battery-half-outline.svg +1 -0
  192. package/dist/stripe-elements/svg/battery-half-sharp.svg +1 -0
  193. package/dist/stripe-elements/svg/battery-half.svg +1 -0
  194. package/dist/stripe-elements/svg/beaker-outline.svg +1 -0
  195. package/dist/stripe-elements/svg/beaker-sharp.svg +1 -0
  196. package/dist/stripe-elements/svg/beaker.svg +1 -0
  197. package/dist/stripe-elements/svg/bed-outline.svg +1 -0
  198. package/dist/stripe-elements/svg/bed-sharp.svg +1 -0
  199. package/dist/stripe-elements/svg/bed.svg +1 -0
  200. package/dist/stripe-elements/svg/beer-outline.svg +1 -0
  201. package/dist/stripe-elements/svg/beer-sharp.svg +1 -0
  202. package/dist/stripe-elements/svg/beer.svg +1 -0
  203. package/dist/stripe-elements/svg/bicycle-outline.svg +1 -0
  204. package/dist/stripe-elements/svg/bicycle-sharp.svg +1 -0
  205. package/dist/stripe-elements/svg/bicycle.svg +1 -0
  206. package/dist/stripe-elements/svg/bluetooth-outline.svg +1 -0
  207. package/dist/stripe-elements/svg/bluetooth-sharp.svg +1 -0
  208. package/dist/stripe-elements/svg/bluetooth.svg +1 -0
  209. package/dist/stripe-elements/svg/boat-outline.svg +1 -0
  210. package/dist/stripe-elements/svg/boat-sharp.svg +1 -0
  211. package/dist/stripe-elements/svg/boat.svg +1 -0
  212. package/dist/stripe-elements/svg/body-outline.svg +1 -0
  213. package/dist/stripe-elements/svg/body-sharp.svg +1 -0
  214. package/dist/stripe-elements/svg/body.svg +1 -0
  215. package/dist/stripe-elements/svg/bonfire-outline.svg +1 -0
  216. package/dist/stripe-elements/svg/bonfire-sharp.svg +1 -0
  217. package/dist/stripe-elements/svg/bonfire.svg +1 -0
  218. package/dist/stripe-elements/svg/book-outline.svg +1 -0
  219. package/dist/stripe-elements/svg/book-sharp.svg +1 -0
  220. package/dist/stripe-elements/svg/book.svg +1 -0
  221. package/dist/stripe-elements/svg/bookmark-outline.svg +1 -0
  222. package/dist/stripe-elements/svg/bookmark-sharp.svg +1 -0
  223. package/dist/stripe-elements/svg/bookmark.svg +1 -0
  224. package/dist/stripe-elements/svg/bookmarks-outline.svg +1 -0
  225. package/dist/stripe-elements/svg/bookmarks-sharp.svg +1 -0
  226. package/dist/stripe-elements/svg/bookmarks.svg +1 -0
  227. package/dist/stripe-elements/svg/bowling-ball-outline.svg +1 -0
  228. package/dist/stripe-elements/svg/bowling-ball-sharp.svg +1 -0
  229. package/dist/stripe-elements/svg/bowling-ball.svg +1 -0
  230. package/dist/stripe-elements/svg/briefcase-outline.svg +1 -0
  231. package/dist/stripe-elements/svg/briefcase-sharp.svg +1 -0
  232. package/dist/stripe-elements/svg/briefcase.svg +1 -0
  233. package/dist/stripe-elements/svg/browsers-outline.svg +1 -0
  234. package/dist/stripe-elements/svg/browsers-sharp.svg +1 -0
  235. package/dist/stripe-elements/svg/browsers.svg +1 -0
  236. package/dist/stripe-elements/svg/brush-outline.svg +1 -0
  237. package/dist/stripe-elements/svg/brush-sharp.svg +1 -0
  238. package/dist/stripe-elements/svg/brush.svg +1 -0
  239. package/dist/stripe-elements/svg/bug-outline.svg +1 -0
  240. package/dist/stripe-elements/svg/bug-sharp.svg +1 -0
  241. package/dist/stripe-elements/svg/bug.svg +1 -0
  242. package/dist/stripe-elements/svg/build-outline.svg +1 -0
  243. package/dist/stripe-elements/svg/build-sharp.svg +1 -0
  244. package/dist/stripe-elements/svg/build.svg +1 -0
  245. package/dist/stripe-elements/svg/bulb-outline.svg +1 -0
  246. package/dist/stripe-elements/svg/bulb-sharp.svg +1 -0
  247. package/dist/stripe-elements/svg/bulb.svg +1 -0
  248. package/dist/stripe-elements/svg/bus-outline.svg +1 -0
  249. package/dist/stripe-elements/svg/bus-sharp.svg +1 -0
  250. package/dist/stripe-elements/svg/bus.svg +1 -0
  251. package/dist/stripe-elements/svg/business-outline.svg +1 -0
  252. package/dist/stripe-elements/svg/business-sharp.svg +1 -0
  253. package/dist/stripe-elements/svg/business.svg +1 -0
  254. package/dist/stripe-elements/svg/cafe-outline.svg +1 -0
  255. package/dist/stripe-elements/svg/cafe-sharp.svg +1 -0
  256. package/dist/stripe-elements/svg/cafe.svg +1 -0
  257. package/dist/stripe-elements/svg/calculator-outline.svg +1 -0
  258. package/dist/stripe-elements/svg/calculator-sharp.svg +1 -0
  259. package/dist/stripe-elements/svg/calculator.svg +1 -0
  260. package/dist/stripe-elements/svg/calendar-clear-outline.svg +1 -0
  261. package/dist/stripe-elements/svg/calendar-clear-sharp.svg +1 -0
  262. package/dist/stripe-elements/svg/calendar-clear.svg +1 -0
  263. package/dist/stripe-elements/svg/calendar-number-outline.svg +1 -0
  264. package/dist/stripe-elements/svg/calendar-number-sharp.svg +1 -0
  265. package/dist/stripe-elements/svg/calendar-number.svg +1 -0
  266. package/dist/stripe-elements/svg/calendar-outline.svg +1 -0
  267. package/dist/stripe-elements/svg/calendar-sharp.svg +1 -0
  268. package/dist/stripe-elements/svg/calendar.svg +1 -0
  269. package/dist/stripe-elements/svg/call-outline.svg +1 -0
  270. package/dist/stripe-elements/svg/call-sharp.svg +1 -0
  271. package/dist/stripe-elements/svg/call.svg +1 -0
  272. package/dist/stripe-elements/svg/camera-outline.svg +1 -0
  273. package/dist/stripe-elements/svg/camera-reverse-outline.svg +1 -0
  274. package/dist/stripe-elements/svg/camera-reverse-sharp.svg +1 -0
  275. package/dist/stripe-elements/svg/camera-reverse.svg +1 -0
  276. package/dist/stripe-elements/svg/camera-sharp.svg +1 -0
  277. package/dist/stripe-elements/svg/camera.svg +1 -0
  278. package/dist/stripe-elements/svg/car-outline.svg +1 -0
  279. package/dist/stripe-elements/svg/car-sharp.svg +1 -0
  280. package/dist/stripe-elements/svg/car-sport-outline.svg +1 -0
  281. package/dist/stripe-elements/svg/car-sport-sharp.svg +1 -0
  282. package/dist/stripe-elements/svg/car-sport.svg +1 -0
  283. package/dist/stripe-elements/svg/car.svg +1 -0
  284. package/dist/stripe-elements/svg/card-outline.svg +1 -0
  285. package/dist/stripe-elements/svg/card-sharp.svg +1 -0
  286. package/dist/stripe-elements/svg/card.svg +1 -0
  287. package/dist/stripe-elements/svg/caret-back-circle-outline.svg +1 -0
  288. package/dist/stripe-elements/svg/caret-back-circle-sharp.svg +1 -0
  289. package/dist/stripe-elements/svg/caret-back-circle.svg +1 -0
  290. package/dist/stripe-elements/svg/caret-back-outline.svg +1 -0
  291. package/dist/stripe-elements/svg/caret-back-sharp.svg +1 -0
  292. package/dist/stripe-elements/svg/caret-back.svg +1 -0
  293. package/dist/stripe-elements/svg/caret-down-circle-outline.svg +1 -0
  294. package/dist/stripe-elements/svg/caret-down-circle-sharp.svg +1 -0
  295. package/dist/stripe-elements/svg/caret-down-circle.svg +1 -0
  296. package/dist/stripe-elements/svg/caret-down-outline.svg +1 -0
  297. package/dist/stripe-elements/svg/caret-down-sharp.svg +1 -0
  298. package/dist/stripe-elements/svg/caret-down.svg +1 -0
  299. package/dist/stripe-elements/svg/caret-forward-circle-outline.svg +1 -0
  300. package/dist/stripe-elements/svg/caret-forward-circle-sharp.svg +1 -0
  301. package/dist/stripe-elements/svg/caret-forward-circle.svg +1 -0
  302. package/dist/stripe-elements/svg/caret-forward-outline.svg +1 -0
  303. package/dist/stripe-elements/svg/caret-forward-sharp.svg +1 -0
  304. package/dist/stripe-elements/svg/caret-forward.svg +1 -0
  305. package/dist/stripe-elements/svg/caret-up-circle-outline.svg +1 -0
  306. package/dist/stripe-elements/svg/caret-up-circle-sharp.svg +1 -0
  307. package/dist/stripe-elements/svg/caret-up-circle.svg +1 -0
  308. package/dist/stripe-elements/svg/caret-up-outline.svg +1 -0
  309. package/dist/stripe-elements/svg/caret-up-sharp.svg +1 -0
  310. package/dist/stripe-elements/svg/caret-up.svg +1 -0
  311. package/dist/stripe-elements/svg/cart-outline.svg +1 -0
  312. package/dist/stripe-elements/svg/cart-sharp.svg +1 -0
  313. package/dist/stripe-elements/svg/cart.svg +1 -0
  314. package/dist/stripe-elements/svg/cash-outline.svg +1 -0
  315. package/dist/stripe-elements/svg/cash-sharp.svg +1 -0
  316. package/dist/stripe-elements/svg/cash.svg +1 -0
  317. package/dist/stripe-elements/svg/cellular-outline.svg +1 -0
  318. package/dist/stripe-elements/svg/cellular-sharp.svg +1 -0
  319. package/dist/stripe-elements/svg/cellular.svg +1 -0
  320. package/dist/stripe-elements/svg/chatbox-ellipses-outline.svg +1 -0
  321. package/dist/stripe-elements/svg/chatbox-ellipses-sharp.svg +1 -0
  322. package/dist/stripe-elements/svg/chatbox-ellipses.svg +1 -0
  323. package/dist/stripe-elements/svg/chatbox-outline.svg +1 -0
  324. package/dist/stripe-elements/svg/chatbox-sharp.svg +1 -0
  325. package/dist/stripe-elements/svg/chatbox.svg +1 -0
  326. package/dist/stripe-elements/svg/chatbubble-ellipses-outline.svg +1 -0
  327. package/dist/stripe-elements/svg/chatbubble-ellipses-sharp.svg +1 -0
  328. package/dist/stripe-elements/svg/chatbubble-ellipses.svg +1 -0
  329. package/dist/stripe-elements/svg/chatbubble-outline.svg +1 -0
  330. package/dist/stripe-elements/svg/chatbubble-sharp.svg +1 -0
  331. package/dist/stripe-elements/svg/chatbubble.svg +1 -0
  332. package/dist/stripe-elements/svg/chatbubbles-outline.svg +1 -0
  333. package/dist/stripe-elements/svg/chatbubbles-sharp.svg +1 -0
  334. package/dist/stripe-elements/svg/chatbubbles.svg +1 -0
  335. package/dist/stripe-elements/svg/checkbox-outline.svg +1 -0
  336. package/dist/stripe-elements/svg/checkbox-sharp.svg +1 -0
  337. package/dist/stripe-elements/svg/checkbox.svg +1 -0
  338. package/dist/stripe-elements/svg/checkmark-circle-outline.svg +1 -0
  339. package/dist/stripe-elements/svg/checkmark-circle-sharp.svg +1 -0
  340. package/dist/stripe-elements/svg/checkmark-circle.svg +1 -0
  341. package/dist/stripe-elements/svg/checkmark-done-circle-outline.svg +1 -0
  342. package/dist/stripe-elements/svg/checkmark-done-circle-sharp.svg +1 -0
  343. package/dist/stripe-elements/svg/checkmark-done-circle.svg +1 -0
  344. package/dist/stripe-elements/svg/checkmark-done-outline.svg +1 -0
  345. package/dist/stripe-elements/svg/checkmark-done-sharp.svg +1 -0
  346. package/dist/stripe-elements/svg/checkmark-done.svg +1 -0
  347. package/dist/stripe-elements/svg/checkmark-outline.svg +1 -0
  348. package/dist/stripe-elements/svg/checkmark-sharp.svg +1 -0
  349. package/dist/stripe-elements/svg/checkmark.svg +1 -0
  350. package/dist/stripe-elements/svg/chevron-back-circle-outline.svg +1 -0
  351. package/dist/stripe-elements/svg/chevron-back-circle-sharp.svg +1 -0
  352. package/dist/stripe-elements/svg/chevron-back-circle.svg +1 -0
  353. package/dist/stripe-elements/svg/chevron-back-outline.svg +1 -0
  354. package/dist/stripe-elements/svg/chevron-back-sharp.svg +1 -0
  355. package/dist/stripe-elements/svg/chevron-back.svg +1 -0
  356. package/dist/stripe-elements/svg/chevron-down-circle-outline.svg +1 -0
  357. package/dist/stripe-elements/svg/chevron-down-circle-sharp.svg +1 -0
  358. package/dist/stripe-elements/svg/chevron-down-circle.svg +1 -0
  359. package/dist/stripe-elements/svg/chevron-down-outline.svg +1 -0
  360. package/dist/stripe-elements/svg/chevron-down-sharp.svg +1 -0
  361. package/dist/stripe-elements/svg/chevron-down.svg +1 -0
  362. package/dist/stripe-elements/svg/chevron-forward-circle-outline.svg +1 -0
  363. package/dist/stripe-elements/svg/chevron-forward-circle-sharp.svg +1 -0
  364. package/dist/stripe-elements/svg/chevron-forward-circle.svg +1 -0
  365. package/dist/stripe-elements/svg/chevron-forward-outline.svg +1 -0
  366. package/dist/stripe-elements/svg/chevron-forward-sharp.svg +1 -0
  367. package/dist/stripe-elements/svg/chevron-forward.svg +1 -0
  368. package/dist/stripe-elements/svg/chevron-up-circle-outline.svg +1 -0
  369. package/dist/stripe-elements/svg/chevron-up-circle-sharp.svg +1 -0
  370. package/dist/stripe-elements/svg/chevron-up-circle.svg +1 -0
  371. package/dist/stripe-elements/svg/chevron-up-outline.svg +1 -0
  372. package/dist/stripe-elements/svg/chevron-up-sharp.svg +1 -0
  373. package/dist/stripe-elements/svg/chevron-up.svg +1 -0
  374. package/dist/stripe-elements/svg/clipboard-outline.svg +1 -0
  375. package/dist/stripe-elements/svg/clipboard-sharp.svg +1 -0
  376. package/dist/stripe-elements/svg/clipboard.svg +1 -0
  377. package/dist/stripe-elements/svg/close-circle-outline.svg +1 -0
  378. package/dist/stripe-elements/svg/close-circle-sharp.svg +1 -0
  379. package/dist/stripe-elements/svg/close-circle.svg +1 -0
  380. package/dist/stripe-elements/svg/close-outline.svg +1 -0
  381. package/dist/stripe-elements/svg/close-sharp.svg +1 -0
  382. package/dist/stripe-elements/svg/close.svg +1 -0
  383. package/dist/stripe-elements/svg/cloud-circle-outline.svg +1 -0
  384. package/dist/stripe-elements/svg/cloud-circle-sharp.svg +1 -0
  385. package/dist/stripe-elements/svg/cloud-circle.svg +1 -0
  386. package/dist/stripe-elements/svg/cloud-done-outline.svg +1 -0
  387. package/dist/stripe-elements/svg/cloud-done-sharp.svg +1 -0
  388. package/dist/stripe-elements/svg/cloud-done.svg +1 -0
  389. package/dist/stripe-elements/svg/cloud-download-outline.svg +1 -0
  390. package/dist/stripe-elements/svg/cloud-download-sharp.svg +1 -0
  391. package/dist/stripe-elements/svg/cloud-download.svg +1 -0
  392. package/dist/stripe-elements/svg/cloud-offline-outline.svg +1 -0
  393. package/dist/stripe-elements/svg/cloud-offline-sharp.svg +1 -0
  394. package/dist/stripe-elements/svg/cloud-offline.svg +1 -0
  395. package/dist/stripe-elements/svg/cloud-outline.svg +1 -0
  396. package/dist/stripe-elements/svg/cloud-sharp.svg +1 -0
  397. package/dist/stripe-elements/svg/cloud-upload-outline.svg +1 -0
  398. package/dist/stripe-elements/svg/cloud-upload-sharp.svg +1 -0
  399. package/dist/stripe-elements/svg/cloud-upload.svg +1 -0
  400. package/dist/stripe-elements/svg/cloud.svg +1 -0
  401. package/dist/stripe-elements/svg/cloudy-night-outline.svg +1 -0
  402. package/dist/stripe-elements/svg/cloudy-night-sharp.svg +1 -0
  403. package/dist/stripe-elements/svg/cloudy-night.svg +1 -0
  404. package/dist/stripe-elements/svg/cloudy-outline.svg +1 -0
  405. package/dist/stripe-elements/svg/cloudy-sharp.svg +1 -0
  406. package/dist/stripe-elements/svg/cloudy.svg +1 -0
  407. package/dist/stripe-elements/svg/code-download-outline.svg +1 -0
  408. package/dist/stripe-elements/svg/code-download-sharp.svg +1 -0
  409. package/dist/stripe-elements/svg/code-download.svg +1 -0
  410. package/dist/stripe-elements/svg/code-outline.svg +1 -0
  411. package/dist/stripe-elements/svg/code-sharp.svg +1 -0
  412. package/dist/stripe-elements/svg/code-slash-outline.svg +1 -0
  413. package/dist/stripe-elements/svg/code-slash-sharp.svg +1 -0
  414. package/dist/stripe-elements/svg/code-slash.svg +1 -0
  415. package/dist/stripe-elements/svg/code-working-outline.svg +1 -0
  416. package/dist/stripe-elements/svg/code-working-sharp.svg +1 -0
  417. package/dist/stripe-elements/svg/code-working.svg +1 -0
  418. package/dist/stripe-elements/svg/code.svg +1 -0
  419. package/dist/stripe-elements/svg/cog-outline.svg +1 -0
  420. package/dist/stripe-elements/svg/cog-sharp.svg +1 -0
  421. package/dist/stripe-elements/svg/cog.svg +1 -0
  422. package/dist/stripe-elements/svg/color-fill-outline.svg +1 -0
  423. package/dist/stripe-elements/svg/color-fill-sharp.svg +1 -0
  424. package/dist/stripe-elements/svg/color-fill.svg +1 -0
  425. package/dist/stripe-elements/svg/color-filter-outline.svg +1 -0
  426. package/dist/stripe-elements/svg/color-filter-sharp.svg +1 -0
  427. package/dist/stripe-elements/svg/color-filter.svg +1 -0
  428. package/dist/stripe-elements/svg/color-palette-outline.svg +1 -0
  429. package/dist/stripe-elements/svg/color-palette-sharp.svg +1 -0
  430. package/dist/stripe-elements/svg/color-palette.svg +1 -0
  431. package/dist/stripe-elements/svg/color-wand-outline.svg +1 -0
  432. package/dist/stripe-elements/svg/color-wand-sharp.svg +1 -0
  433. package/dist/stripe-elements/svg/color-wand.svg +1 -0
  434. package/dist/stripe-elements/svg/compass-outline.svg +1 -0
  435. package/dist/stripe-elements/svg/compass-sharp.svg +1 -0
  436. package/dist/stripe-elements/svg/compass.svg +1 -0
  437. package/dist/stripe-elements/svg/construct-outline.svg +1 -0
  438. package/dist/stripe-elements/svg/construct-sharp.svg +1 -0
  439. package/dist/stripe-elements/svg/construct.svg +1 -0
  440. package/dist/stripe-elements/svg/contract-outline.svg +1 -0
  441. package/dist/stripe-elements/svg/contract-sharp.svg +1 -0
  442. package/dist/stripe-elements/svg/contract.svg +1 -0
  443. package/dist/stripe-elements/svg/contrast-outline.svg +1 -0
  444. package/dist/stripe-elements/svg/contrast-sharp.svg +1 -0
  445. package/dist/stripe-elements/svg/contrast.svg +1 -0
  446. package/dist/stripe-elements/svg/copy-outline.svg +1 -0
  447. package/dist/stripe-elements/svg/copy-sharp.svg +1 -0
  448. package/dist/stripe-elements/svg/copy.svg +1 -0
  449. package/dist/stripe-elements/svg/create-outline.svg +1 -0
  450. package/dist/stripe-elements/svg/create-sharp.svg +1 -0
  451. package/dist/stripe-elements/svg/create.svg +1 -0
  452. package/dist/stripe-elements/svg/crop-outline.svg +1 -0
  453. package/dist/stripe-elements/svg/crop-sharp.svg +1 -0
  454. package/dist/stripe-elements/svg/crop.svg +1 -0
  455. package/dist/stripe-elements/svg/cube-outline.svg +1 -0
  456. package/dist/stripe-elements/svg/cube-sharp.svg +1 -0
  457. package/dist/stripe-elements/svg/cube.svg +1 -0
  458. package/dist/stripe-elements/svg/cut-outline.svg +1 -0
  459. package/dist/stripe-elements/svg/cut-sharp.svg +1 -0
  460. package/dist/stripe-elements/svg/cut.svg +1 -0
  461. package/dist/stripe-elements/svg/desktop-outline.svg +1 -0
  462. package/dist/stripe-elements/svg/desktop-sharp.svg +1 -0
  463. package/dist/stripe-elements/svg/desktop.svg +1 -0
  464. package/dist/stripe-elements/svg/diamond-outline.svg +1 -0
  465. package/dist/stripe-elements/svg/diamond-sharp.svg +1 -0
  466. package/dist/stripe-elements/svg/diamond.svg +1 -0
  467. package/dist/stripe-elements/svg/dice-outline.svg +1 -0
  468. package/dist/stripe-elements/svg/dice-sharp.svg +1 -0
  469. package/dist/stripe-elements/svg/dice.svg +1 -0
  470. package/dist/stripe-elements/svg/disc-outline.svg +1 -0
  471. package/dist/stripe-elements/svg/disc-sharp.svg +1 -0
  472. package/dist/stripe-elements/svg/disc.svg +1 -0
  473. package/dist/stripe-elements/svg/document-attach-outline.svg +1 -0
  474. package/dist/stripe-elements/svg/document-attach-sharp.svg +1 -0
  475. package/dist/stripe-elements/svg/document-attach.svg +1 -0
  476. package/dist/stripe-elements/svg/document-lock-outline.svg +1 -0
  477. package/dist/stripe-elements/svg/document-lock-sharp.svg +1 -0
  478. package/dist/stripe-elements/svg/document-lock.svg +1 -0
  479. package/dist/stripe-elements/svg/document-outline.svg +1 -0
  480. package/dist/stripe-elements/svg/document-sharp.svg +1 -0
  481. package/dist/stripe-elements/svg/document-text-outline.svg +1 -0
  482. package/dist/stripe-elements/svg/document-text-sharp.svg +1 -0
  483. package/dist/stripe-elements/svg/document-text.svg +1 -0
  484. package/dist/stripe-elements/svg/document.svg +1 -0
  485. package/dist/stripe-elements/svg/documents-outline.svg +1 -0
  486. package/dist/stripe-elements/svg/documents-sharp.svg +1 -0
  487. package/dist/stripe-elements/svg/documents.svg +1 -0
  488. package/dist/stripe-elements/svg/download-outline.svg +1 -0
  489. package/dist/stripe-elements/svg/download-sharp.svg +1 -0
  490. package/dist/stripe-elements/svg/download.svg +1 -0
  491. package/dist/stripe-elements/svg/duplicate-outline.svg +1 -0
  492. package/dist/stripe-elements/svg/duplicate-sharp.svg +1 -0
  493. package/dist/stripe-elements/svg/duplicate.svg +1 -0
  494. package/dist/stripe-elements/svg/ear-outline.svg +1 -0
  495. package/dist/stripe-elements/svg/ear-sharp.svg +1 -0
  496. package/dist/stripe-elements/svg/ear.svg +1 -0
  497. package/dist/stripe-elements/svg/earth-outline.svg +1 -0
  498. package/dist/stripe-elements/svg/earth-sharp.svg +1 -0
  499. package/dist/stripe-elements/svg/earth.svg +1 -0
  500. package/dist/stripe-elements/svg/easel-outline.svg +1 -0
  501. package/dist/stripe-elements/svg/easel-sharp.svg +1 -0
  502. package/dist/stripe-elements/svg/easel.svg +1 -0
  503. package/dist/stripe-elements/svg/egg-outline.svg +1 -0
  504. package/dist/stripe-elements/svg/egg-sharp.svg +1 -0
  505. package/dist/stripe-elements/svg/egg.svg +1 -0
  506. package/dist/stripe-elements/svg/ellipse-outline.svg +1 -0
  507. package/dist/stripe-elements/svg/ellipse-sharp.svg +1 -0
  508. package/dist/stripe-elements/svg/ellipse.svg +1 -0
  509. package/dist/stripe-elements/svg/ellipsis-horizontal-circle-outline.svg +1 -0
  510. package/dist/stripe-elements/svg/ellipsis-horizontal-circle-sharp.svg +1 -0
  511. package/dist/stripe-elements/svg/ellipsis-horizontal-circle.svg +1 -0
  512. package/dist/stripe-elements/svg/ellipsis-horizontal-outline.svg +1 -0
  513. package/dist/stripe-elements/svg/ellipsis-horizontal-sharp.svg +1 -0
  514. package/dist/stripe-elements/svg/ellipsis-horizontal.svg +1 -0
  515. package/dist/stripe-elements/svg/ellipsis-vertical-circle-outline.svg +1 -0
  516. package/dist/stripe-elements/svg/ellipsis-vertical-circle-sharp.svg +1 -0
  517. package/dist/stripe-elements/svg/ellipsis-vertical-circle.svg +1 -0
  518. package/dist/stripe-elements/svg/ellipsis-vertical-outline.svg +1 -0
  519. package/dist/stripe-elements/svg/ellipsis-vertical-sharp.svg +1 -0
  520. package/dist/stripe-elements/svg/ellipsis-vertical.svg +1 -0
  521. package/dist/stripe-elements/svg/enter-outline.svg +1 -0
  522. package/dist/stripe-elements/svg/enter-sharp.svg +1 -0
  523. package/dist/stripe-elements/svg/enter.svg +1 -0
  524. package/dist/stripe-elements/svg/exit-outline.svg +1 -0
  525. package/dist/stripe-elements/svg/exit-sharp.svg +1 -0
  526. package/dist/stripe-elements/svg/exit.svg +1 -0
  527. package/dist/stripe-elements/svg/expand-outline.svg +1 -0
  528. package/dist/stripe-elements/svg/expand-sharp.svg +1 -0
  529. package/dist/stripe-elements/svg/expand.svg +1 -0
  530. package/dist/stripe-elements/svg/extension-puzzle-outline.svg +1 -0
  531. package/dist/stripe-elements/svg/extension-puzzle-sharp.svg +1 -0
  532. package/dist/stripe-elements/svg/extension-puzzle.svg +1 -0
  533. package/dist/stripe-elements/svg/eye-off-outline.svg +1 -0
  534. package/dist/stripe-elements/svg/eye-off-sharp.svg +1 -0
  535. package/dist/stripe-elements/svg/eye-off.svg +1 -0
  536. package/dist/stripe-elements/svg/eye-outline.svg +1 -0
  537. package/dist/stripe-elements/svg/eye-sharp.svg +1 -0
  538. package/dist/stripe-elements/svg/eye.svg +1 -0
  539. package/dist/stripe-elements/svg/eyedrop-outline.svg +1 -0
  540. package/dist/stripe-elements/svg/eyedrop-sharp.svg +1 -0
  541. package/dist/stripe-elements/svg/eyedrop.svg +1 -0
  542. package/dist/stripe-elements/svg/fast-food-outline.svg +1 -0
  543. package/dist/stripe-elements/svg/fast-food-sharp.svg +1 -0
  544. package/dist/stripe-elements/svg/fast-food.svg +1 -0
  545. package/dist/stripe-elements/svg/female-outline.svg +1 -0
  546. package/dist/stripe-elements/svg/female-sharp.svg +1 -0
  547. package/dist/stripe-elements/svg/female.svg +1 -0
  548. package/dist/stripe-elements/svg/file-tray-full-outline.svg +1 -0
  549. package/dist/stripe-elements/svg/file-tray-full-sharp.svg +1 -0
  550. package/dist/stripe-elements/svg/file-tray-full.svg +1 -0
  551. package/dist/stripe-elements/svg/file-tray-outline.svg +1 -0
  552. package/dist/stripe-elements/svg/file-tray-sharp.svg +1 -0
  553. package/dist/stripe-elements/svg/file-tray-stacked-outline.svg +1 -0
  554. package/dist/stripe-elements/svg/file-tray-stacked-sharp.svg +1 -0
  555. package/dist/stripe-elements/svg/file-tray-stacked.svg +1 -0
  556. package/dist/stripe-elements/svg/file-tray.svg +1 -0
  557. package/dist/stripe-elements/svg/film-outline.svg +1 -0
  558. package/dist/stripe-elements/svg/film-sharp.svg +1 -0
  559. package/dist/stripe-elements/svg/film.svg +1 -0
  560. package/dist/stripe-elements/svg/filter-circle-outline.svg +1 -0
  561. package/dist/stripe-elements/svg/filter-circle-sharp.svg +1 -0
  562. package/dist/stripe-elements/svg/filter-circle.svg +1 -0
  563. package/dist/stripe-elements/svg/filter-outline.svg +1 -0
  564. package/dist/stripe-elements/svg/filter-sharp.svg +1 -0
  565. package/dist/stripe-elements/svg/filter.svg +1 -0
  566. package/dist/stripe-elements/svg/finger-print-outline.svg +1 -0
  567. package/dist/stripe-elements/svg/finger-print-sharp.svg +1 -0
  568. package/dist/stripe-elements/svg/finger-print.svg +1 -0
  569. package/dist/stripe-elements/svg/fish-outline.svg +1 -0
  570. package/dist/stripe-elements/svg/fish-sharp.svg +1 -0
  571. package/dist/stripe-elements/svg/fish.svg +1 -0
  572. package/dist/stripe-elements/svg/fitness-outline.svg +1 -0
  573. package/dist/stripe-elements/svg/fitness-sharp.svg +1 -0
  574. package/dist/stripe-elements/svg/fitness.svg +1 -0
  575. package/dist/stripe-elements/svg/flag-outline.svg +1 -0
  576. package/dist/stripe-elements/svg/flag-sharp.svg +1 -0
  577. package/dist/stripe-elements/svg/flag.svg +1 -0
  578. package/dist/stripe-elements/svg/flame-outline.svg +1 -0
  579. package/dist/stripe-elements/svg/flame-sharp.svg +1 -0
  580. package/dist/stripe-elements/svg/flame.svg +1 -0
  581. package/dist/stripe-elements/svg/flash-off-outline.svg +1 -0
  582. package/dist/stripe-elements/svg/flash-off-sharp.svg +1 -0
  583. package/dist/stripe-elements/svg/flash-off.svg +1 -0
  584. package/dist/stripe-elements/svg/flash-outline.svg +1 -0
  585. package/dist/stripe-elements/svg/flash-sharp.svg +1 -0
  586. package/dist/stripe-elements/svg/flash.svg +1 -0
  587. package/dist/stripe-elements/svg/flashlight-outline.svg +1 -0
  588. package/dist/stripe-elements/svg/flashlight-sharp.svg +1 -0
  589. package/dist/stripe-elements/svg/flashlight.svg +1 -0
  590. package/dist/stripe-elements/svg/flask-outline.svg +1 -0
  591. package/dist/stripe-elements/svg/flask-sharp.svg +1 -0
  592. package/dist/stripe-elements/svg/flask.svg +1 -0
  593. package/dist/stripe-elements/svg/flower-outline.svg +1 -0
  594. package/dist/stripe-elements/svg/flower-sharp.svg +1 -0
  595. package/dist/stripe-elements/svg/flower.svg +1 -0
  596. package/dist/stripe-elements/svg/folder-open-outline.svg +1 -0
  597. package/dist/stripe-elements/svg/folder-open-sharp.svg +1 -0
  598. package/dist/stripe-elements/svg/folder-open.svg +1 -0
  599. package/dist/stripe-elements/svg/folder-outline.svg +1 -0
  600. package/dist/stripe-elements/svg/folder-sharp.svg +1 -0
  601. package/dist/stripe-elements/svg/folder.svg +1 -0
  602. package/dist/stripe-elements/svg/football-outline.svg +1 -0
  603. package/dist/stripe-elements/svg/football-sharp.svg +1 -0
  604. package/dist/stripe-elements/svg/football.svg +1 -0
  605. package/dist/stripe-elements/svg/footsteps-outline.svg +1 -0
  606. package/dist/stripe-elements/svg/footsteps-sharp.svg +1 -0
  607. package/dist/stripe-elements/svg/footsteps.svg +1 -0
  608. package/dist/stripe-elements/svg/funnel-outline.svg +1 -0
  609. package/dist/stripe-elements/svg/funnel-sharp.svg +1 -0
  610. package/dist/stripe-elements/svg/funnel.svg +1 -0
  611. package/dist/stripe-elements/svg/game-controller-outline.svg +1 -0
  612. package/dist/stripe-elements/svg/game-controller-sharp.svg +1 -0
  613. package/dist/stripe-elements/svg/game-controller.svg +1 -0
  614. package/dist/stripe-elements/svg/gift-outline.svg +1 -0
  615. package/dist/stripe-elements/svg/gift-sharp.svg +1 -0
  616. package/dist/stripe-elements/svg/gift.svg +1 -0
  617. package/dist/stripe-elements/svg/git-branch-outline.svg +1 -0
  618. package/dist/stripe-elements/svg/git-branch-sharp.svg +1 -0
  619. package/dist/stripe-elements/svg/git-branch.svg +1 -0
  620. package/dist/stripe-elements/svg/git-commit-outline.svg +1 -0
  621. package/dist/stripe-elements/svg/git-commit-sharp.svg +1 -0
  622. package/dist/stripe-elements/svg/git-commit.svg +1 -0
  623. package/dist/stripe-elements/svg/git-compare-outline.svg +1 -0
  624. package/dist/stripe-elements/svg/git-compare-sharp.svg +1 -0
  625. package/dist/stripe-elements/svg/git-compare.svg +1 -0
  626. package/dist/stripe-elements/svg/git-merge-outline.svg +1 -0
  627. package/dist/stripe-elements/svg/git-merge-sharp.svg +1 -0
  628. package/dist/stripe-elements/svg/git-merge.svg +1 -0
  629. package/dist/stripe-elements/svg/git-network-outline.svg +1 -0
  630. package/dist/stripe-elements/svg/git-network-sharp.svg +1 -0
  631. package/dist/stripe-elements/svg/git-network.svg +1 -0
  632. package/dist/stripe-elements/svg/git-pull-request-outline.svg +1 -0
  633. package/dist/stripe-elements/svg/git-pull-request-sharp.svg +1 -0
  634. package/dist/stripe-elements/svg/git-pull-request.svg +1 -0
  635. package/dist/stripe-elements/svg/glasses-outline.svg +1 -0
  636. package/dist/stripe-elements/svg/glasses-sharp.svg +1 -0
  637. package/dist/stripe-elements/svg/glasses.svg +1 -0
  638. package/dist/stripe-elements/svg/globe-outline.svg +1 -0
  639. package/dist/stripe-elements/svg/globe-sharp.svg +1 -0
  640. package/dist/stripe-elements/svg/globe.svg +1 -0
  641. package/dist/stripe-elements/svg/golf-outline.svg +1 -0
  642. package/dist/stripe-elements/svg/golf-sharp.svg +1 -0
  643. package/dist/stripe-elements/svg/golf.svg +1 -0
  644. package/dist/stripe-elements/svg/grid-outline.svg +1 -0
  645. package/dist/stripe-elements/svg/grid-sharp.svg +1 -0
  646. package/dist/stripe-elements/svg/grid.svg +1 -0
  647. package/dist/stripe-elements/svg/hammer-outline.svg +1 -0
  648. package/dist/stripe-elements/svg/hammer-sharp.svg +1 -0
  649. package/dist/stripe-elements/svg/hammer.svg +1 -0
  650. package/dist/stripe-elements/svg/hand-left-outline.svg +1 -0
  651. package/dist/stripe-elements/svg/hand-left-sharp.svg +1 -0
  652. package/dist/stripe-elements/svg/hand-left.svg +1 -0
  653. package/dist/stripe-elements/svg/hand-right-outline.svg +1 -0
  654. package/dist/stripe-elements/svg/hand-right-sharp.svg +1 -0
  655. package/dist/stripe-elements/svg/hand-right.svg +1 -0
  656. package/dist/stripe-elements/svg/happy-outline.svg +1 -0
  657. package/dist/stripe-elements/svg/happy-sharp.svg +1 -0
  658. package/dist/stripe-elements/svg/happy.svg +1 -0
  659. package/dist/stripe-elements/svg/hardware-chip-outline.svg +1 -0
  660. package/dist/stripe-elements/svg/hardware-chip-sharp.svg +1 -0
  661. package/dist/stripe-elements/svg/hardware-chip.svg +1 -0
  662. package/dist/stripe-elements/svg/headset-outline.svg +1 -0
  663. package/dist/stripe-elements/svg/headset-sharp.svg +1 -0
  664. package/dist/stripe-elements/svg/headset.svg +1 -0
  665. package/dist/stripe-elements/svg/heart-circle-outline.svg +1 -0
  666. package/dist/stripe-elements/svg/heart-circle-sharp.svg +1 -0
  667. package/dist/stripe-elements/svg/heart-circle.svg +1 -0
  668. package/dist/stripe-elements/svg/heart-dislike-circle-outline.svg +1 -0
  669. package/dist/stripe-elements/svg/heart-dislike-circle-sharp.svg +1 -0
  670. package/dist/stripe-elements/svg/heart-dislike-circle.svg +1 -0
  671. package/dist/stripe-elements/svg/heart-dislike-outline.svg +1 -0
  672. package/dist/stripe-elements/svg/heart-dislike-sharp.svg +1 -0
  673. package/dist/stripe-elements/svg/heart-dislike.svg +1 -0
  674. package/dist/stripe-elements/svg/heart-half-outline.svg +1 -0
  675. package/dist/stripe-elements/svg/heart-half-sharp.svg +1 -0
  676. package/dist/stripe-elements/svg/heart-half.svg +1 -0
  677. package/dist/stripe-elements/svg/heart-outline.svg +1 -0
  678. package/dist/stripe-elements/svg/heart-sharp.svg +1 -0
  679. package/dist/stripe-elements/svg/heart.svg +1 -0
  680. package/dist/stripe-elements/svg/help-buoy-outline.svg +1 -0
  681. package/dist/stripe-elements/svg/help-buoy-sharp.svg +1 -0
  682. package/dist/stripe-elements/svg/help-buoy.svg +1 -0
  683. package/dist/stripe-elements/svg/help-circle-outline.svg +1 -0
  684. package/dist/stripe-elements/svg/help-circle-sharp.svg +1 -0
  685. package/dist/stripe-elements/svg/help-circle.svg +1 -0
  686. package/dist/stripe-elements/svg/help-outline.svg +1 -0
  687. package/dist/stripe-elements/svg/help-sharp.svg +1 -0
  688. package/dist/stripe-elements/svg/help.svg +1 -0
  689. package/dist/stripe-elements/svg/home-outline.svg +1 -0
  690. package/dist/stripe-elements/svg/home-sharp.svg +1 -0
  691. package/dist/stripe-elements/svg/home.svg +1 -0
  692. package/dist/stripe-elements/svg/hourglass-outline.svg +1 -0
  693. package/dist/stripe-elements/svg/hourglass-sharp.svg +1 -0
  694. package/dist/stripe-elements/svg/hourglass.svg +1 -0
  695. package/dist/stripe-elements/svg/ice-cream-outline.svg +1 -0
  696. package/dist/stripe-elements/svg/ice-cream-sharp.svg +1 -0
  697. package/dist/stripe-elements/svg/ice-cream.svg +1 -0
  698. package/dist/stripe-elements/svg/id-card-outline.svg +1 -0
  699. package/dist/stripe-elements/svg/id-card-sharp.svg +1 -0
  700. package/dist/stripe-elements/svg/id-card.svg +1 -0
  701. package/dist/stripe-elements/svg/image-outline.svg +1 -0
  702. package/dist/stripe-elements/svg/image-sharp.svg +1 -0
  703. package/dist/stripe-elements/svg/image.svg +1 -0
  704. package/dist/stripe-elements/svg/images-outline.svg +1 -0
  705. package/dist/stripe-elements/svg/images-sharp.svg +1 -0
  706. package/dist/stripe-elements/svg/images.svg +1 -0
  707. package/dist/stripe-elements/svg/infinite-outline.svg +1 -0
  708. package/dist/stripe-elements/svg/infinite-sharp.svg +1 -0
  709. package/dist/stripe-elements/svg/infinite.svg +1 -0
  710. package/dist/stripe-elements/svg/information-circle-outline.svg +1 -0
  711. package/dist/stripe-elements/svg/information-circle-sharp.svg +1 -0
  712. package/dist/stripe-elements/svg/information-circle.svg +1 -0
  713. package/dist/stripe-elements/svg/information-outline.svg +1 -0
  714. package/dist/stripe-elements/svg/information-sharp.svg +1 -0
  715. package/dist/stripe-elements/svg/information.svg +1 -0
  716. package/dist/stripe-elements/svg/invert-mode-outline.svg +1 -0
  717. package/dist/stripe-elements/svg/invert-mode-sharp.svg +1 -0
  718. package/dist/stripe-elements/svg/invert-mode.svg +1 -0
  719. package/dist/stripe-elements/svg/journal-outline.svg +1 -0
  720. package/dist/stripe-elements/svg/journal-sharp.svg +1 -0
  721. package/dist/stripe-elements/svg/journal.svg +1 -0
  722. package/dist/stripe-elements/svg/key-outline.svg +1 -0
  723. package/dist/stripe-elements/svg/key-sharp.svg +1 -0
  724. package/dist/stripe-elements/svg/key.svg +1 -0
  725. package/dist/stripe-elements/svg/keypad-outline.svg +1 -0
  726. package/dist/stripe-elements/svg/keypad-sharp.svg +1 -0
  727. package/dist/stripe-elements/svg/keypad.svg +1 -0
  728. package/dist/stripe-elements/svg/language-outline.svg +1 -0
  729. package/dist/stripe-elements/svg/language-sharp.svg +1 -0
  730. package/dist/stripe-elements/svg/language.svg +1 -0
  731. package/dist/stripe-elements/svg/laptop-outline.svg +1 -0
  732. package/dist/stripe-elements/svg/laptop-sharp.svg +1 -0
  733. package/dist/stripe-elements/svg/laptop.svg +1 -0
  734. package/dist/stripe-elements/svg/layers-outline.svg +1 -0
  735. package/dist/stripe-elements/svg/layers-sharp.svg +1 -0
  736. package/dist/stripe-elements/svg/layers.svg +1 -0
  737. package/dist/stripe-elements/svg/leaf-outline.svg +1 -0
  738. package/dist/stripe-elements/svg/leaf-sharp.svg +1 -0
  739. package/dist/stripe-elements/svg/leaf.svg +1 -0
  740. package/dist/stripe-elements/svg/library-outline.svg +1 -0
  741. package/dist/stripe-elements/svg/library-sharp.svg +1 -0
  742. package/dist/stripe-elements/svg/library.svg +1 -0
  743. package/dist/stripe-elements/svg/link-outline.svg +1 -0
  744. package/dist/stripe-elements/svg/link-sharp.svg +1 -0
  745. package/dist/stripe-elements/svg/link.svg +1 -0
  746. package/dist/stripe-elements/svg/list-circle-outline.svg +1 -0
  747. package/dist/stripe-elements/svg/list-circle-sharp.svg +1 -0
  748. package/dist/stripe-elements/svg/list-circle.svg +1 -0
  749. package/dist/stripe-elements/svg/list-outline.svg +1 -0
  750. package/dist/stripe-elements/svg/list-sharp.svg +1 -0
  751. package/dist/stripe-elements/svg/list.svg +1 -0
  752. package/dist/stripe-elements/svg/locate-outline.svg +1 -0
  753. package/dist/stripe-elements/svg/locate-sharp.svg +1 -0
  754. package/dist/stripe-elements/svg/locate.svg +1 -0
  755. package/dist/stripe-elements/svg/location-outline.svg +1 -0
  756. package/dist/stripe-elements/svg/location-sharp.svg +1 -0
  757. package/dist/stripe-elements/svg/location.svg +1 -0
  758. package/dist/stripe-elements/svg/lock-closed-outline.svg +1 -0
  759. package/dist/stripe-elements/svg/lock-closed-sharp.svg +1 -0
  760. package/dist/stripe-elements/svg/lock-closed.svg +1 -0
  761. package/dist/stripe-elements/svg/lock-open-outline.svg +1 -0
  762. package/dist/stripe-elements/svg/lock-open-sharp.svg +1 -0
  763. package/dist/stripe-elements/svg/lock-open.svg +1 -0
  764. package/dist/stripe-elements/svg/log-in-outline.svg +1 -0
  765. package/dist/stripe-elements/svg/log-in-sharp.svg +1 -0
  766. package/dist/stripe-elements/svg/log-in.svg +1 -0
  767. package/dist/stripe-elements/svg/log-out-outline.svg +1 -0
  768. package/dist/stripe-elements/svg/log-out-sharp.svg +1 -0
  769. package/dist/stripe-elements/svg/log-out.svg +1 -0
  770. package/dist/stripe-elements/svg/logo-alipay.svg +1 -0
  771. package/dist/stripe-elements/svg/logo-amazon.svg +1 -0
  772. package/dist/stripe-elements/svg/logo-amplify.svg +1 -0
  773. package/dist/stripe-elements/svg/logo-android.svg +1 -0
  774. package/dist/stripe-elements/svg/logo-angular.svg +1 -0
  775. package/dist/stripe-elements/svg/logo-apple-appstore.svg +1 -0
  776. package/dist/stripe-elements/svg/logo-apple-ar.svg +1 -0
  777. package/dist/stripe-elements/svg/logo-apple.svg +1 -0
  778. package/dist/stripe-elements/svg/logo-behance.svg +1 -0
  779. package/dist/stripe-elements/svg/logo-bitbucket.svg +1 -0
  780. package/dist/stripe-elements/svg/logo-bitcoin.svg +1 -0
  781. package/dist/stripe-elements/svg/logo-buffer.svg +1 -0
  782. package/dist/stripe-elements/svg/logo-capacitor.svg +1 -0
  783. package/dist/stripe-elements/svg/logo-chrome.svg +1 -0
  784. package/dist/stripe-elements/svg/logo-closed-captioning.svg +1 -0
  785. package/dist/stripe-elements/svg/logo-codepen.svg +1 -0
  786. package/dist/stripe-elements/svg/logo-css3.svg +1 -0
  787. package/dist/stripe-elements/svg/logo-designernews.svg +1 -0
  788. package/dist/stripe-elements/svg/logo-deviantart.svg +1 -0
  789. package/dist/stripe-elements/svg/logo-discord.svg +1 -0
  790. package/dist/stripe-elements/svg/logo-docker.svg +1 -0
  791. package/dist/stripe-elements/svg/logo-dribbble.svg +1 -0
  792. package/dist/stripe-elements/svg/logo-dropbox.svg +1 -0
  793. package/dist/stripe-elements/svg/logo-edge.svg +1 -0
  794. package/dist/stripe-elements/svg/logo-electron.svg +1 -0
  795. package/dist/stripe-elements/svg/logo-euro.svg +1 -0
  796. package/dist/stripe-elements/svg/logo-facebook.svg +1 -0
  797. package/dist/stripe-elements/svg/logo-figma.svg +1 -0
  798. package/dist/stripe-elements/svg/logo-firebase.svg +1 -0
  799. package/dist/stripe-elements/svg/logo-firefox.svg +1 -0
  800. package/dist/stripe-elements/svg/logo-flickr.svg +1 -0
  801. package/dist/stripe-elements/svg/logo-foursquare.svg +1 -0
  802. package/dist/stripe-elements/svg/logo-github.svg +1 -0
  803. package/dist/stripe-elements/svg/logo-gitlab.svg +1 -0
  804. package/dist/stripe-elements/svg/logo-google-playstore.svg +1 -0
  805. package/dist/stripe-elements/svg/logo-google.svg +1 -0
  806. package/dist/stripe-elements/svg/logo-hackernews.svg +1 -0
  807. package/dist/stripe-elements/svg/logo-html5.svg +1 -0
  808. package/dist/stripe-elements/svg/logo-instagram.svg +1 -0
  809. package/dist/stripe-elements/svg/logo-ionic.svg +1 -0
  810. package/dist/stripe-elements/svg/logo-ionitron.svg +1 -0
  811. package/dist/stripe-elements/svg/logo-javascript.svg +1 -0
  812. package/dist/stripe-elements/svg/logo-laravel.svg +1 -0
  813. package/dist/stripe-elements/svg/logo-linkedin.svg +1 -0
  814. package/dist/stripe-elements/svg/logo-markdown.svg +1 -0
  815. package/dist/stripe-elements/svg/logo-mastodon.svg +1 -0
  816. package/dist/stripe-elements/svg/logo-medium.svg +1 -0
  817. package/dist/stripe-elements/svg/logo-microsoft.svg +1 -0
  818. package/dist/stripe-elements/svg/logo-no-smoking.svg +1 -0
  819. package/dist/stripe-elements/svg/logo-nodejs.svg +1 -0
  820. package/dist/stripe-elements/svg/logo-npm.svg +1 -0
  821. package/dist/stripe-elements/svg/logo-octocat.svg +1 -0
  822. package/dist/stripe-elements/svg/logo-paypal.svg +1 -0
  823. package/dist/stripe-elements/svg/logo-pinterest.svg +1 -0
  824. package/dist/stripe-elements/svg/logo-playstation.svg +1 -0
  825. package/dist/stripe-elements/svg/logo-pwa.svg +1 -0
  826. package/dist/stripe-elements/svg/logo-python.svg +1 -0
  827. package/dist/stripe-elements/svg/logo-react.svg +1 -0
  828. package/dist/stripe-elements/svg/logo-reddit.svg +1 -0
  829. package/dist/stripe-elements/svg/logo-rss.svg +1 -0
  830. package/dist/stripe-elements/svg/logo-sass.svg +1 -0
  831. package/dist/stripe-elements/svg/logo-skype.svg +1 -0
  832. package/dist/stripe-elements/svg/logo-slack.svg +1 -0
  833. package/dist/stripe-elements/svg/logo-snapchat.svg +1 -0
  834. package/dist/stripe-elements/svg/logo-soundcloud.svg +1 -0
  835. package/dist/stripe-elements/svg/logo-stackoverflow.svg +1 -0
  836. package/dist/stripe-elements/svg/logo-steam.svg +1 -0
  837. package/dist/stripe-elements/svg/logo-stencil.svg +1 -0
  838. package/dist/stripe-elements/svg/logo-tableau.svg +1 -0
  839. package/dist/stripe-elements/svg/logo-tiktok.svg +1 -0
  840. package/dist/stripe-elements/svg/logo-tumblr.svg +1 -0
  841. package/dist/stripe-elements/svg/logo-tux.svg +1 -0
  842. package/dist/stripe-elements/svg/logo-twitch.svg +1 -0
  843. package/dist/stripe-elements/svg/logo-twitter.svg +1 -0
  844. package/dist/stripe-elements/svg/logo-usd.svg +1 -0
  845. package/dist/stripe-elements/svg/logo-venmo.svg +1 -0
  846. package/dist/stripe-elements/svg/logo-vercel.svg +1 -0
  847. package/dist/stripe-elements/svg/logo-vimeo.svg +1 -0
  848. package/dist/stripe-elements/svg/logo-vk.svg +1 -0
  849. package/dist/stripe-elements/svg/logo-vue.svg +1 -0
  850. package/dist/stripe-elements/svg/logo-web-component.svg +1 -0
  851. package/dist/stripe-elements/svg/logo-wechat.svg +1 -0
  852. package/dist/stripe-elements/svg/logo-whatsapp.svg +1 -0
  853. package/dist/stripe-elements/svg/logo-windows.svg +1 -0
  854. package/dist/stripe-elements/svg/logo-wordpress.svg +1 -0
  855. package/dist/stripe-elements/svg/logo-xbox.svg +1 -0
  856. package/dist/stripe-elements/svg/logo-xing.svg +1 -0
  857. package/dist/stripe-elements/svg/logo-yahoo.svg +1 -0
  858. package/dist/stripe-elements/svg/logo-yen.svg +1 -0
  859. package/dist/stripe-elements/svg/logo-youtube.svg +1 -0
  860. package/dist/stripe-elements/svg/magnet-outline.svg +1 -0
  861. package/dist/stripe-elements/svg/magnet-sharp.svg +1 -0
  862. package/dist/stripe-elements/svg/magnet.svg +1 -0
  863. package/dist/stripe-elements/svg/mail-open-outline.svg +1 -0
  864. package/dist/stripe-elements/svg/mail-open-sharp.svg +1 -0
  865. package/dist/stripe-elements/svg/mail-open.svg +1 -0
  866. package/dist/stripe-elements/svg/mail-outline.svg +1 -0
  867. package/dist/stripe-elements/svg/mail-sharp.svg +1 -0
  868. package/dist/stripe-elements/svg/mail-unread-outline.svg +1 -0
  869. package/dist/stripe-elements/svg/mail-unread-sharp.svg +1 -0
  870. package/dist/stripe-elements/svg/mail-unread.svg +1 -0
  871. package/dist/stripe-elements/svg/mail.svg +1 -0
  872. package/dist/stripe-elements/svg/male-female-outline.svg +1 -0
  873. package/dist/stripe-elements/svg/male-female-sharp.svg +1 -0
  874. package/dist/stripe-elements/svg/male-female.svg +1 -0
  875. package/dist/stripe-elements/svg/male-outline.svg +1 -0
  876. package/dist/stripe-elements/svg/male-sharp.svg +1 -0
  877. package/dist/stripe-elements/svg/male.svg +1 -0
  878. package/dist/stripe-elements/svg/man-outline.svg +1 -0
  879. package/dist/stripe-elements/svg/man-sharp.svg +1 -0
  880. package/dist/stripe-elements/svg/man.svg +1 -0
  881. package/dist/stripe-elements/svg/map-outline.svg +1 -0
  882. package/dist/stripe-elements/svg/map-sharp.svg +1 -0
  883. package/dist/stripe-elements/svg/map.svg +1 -0
  884. package/dist/stripe-elements/svg/medal-outline.svg +1 -0
  885. package/dist/stripe-elements/svg/medal-sharp.svg +1 -0
  886. package/dist/stripe-elements/svg/medal.svg +1 -0
  887. package/dist/stripe-elements/svg/medical-outline.svg +1 -0
  888. package/dist/stripe-elements/svg/medical-sharp.svg +1 -0
  889. package/dist/stripe-elements/svg/medical.svg +1 -0
  890. package/dist/stripe-elements/svg/medkit-outline.svg +1 -0
  891. package/dist/stripe-elements/svg/medkit-sharp.svg +1 -0
  892. package/dist/stripe-elements/svg/medkit.svg +1 -0
  893. package/dist/stripe-elements/svg/megaphone-outline.svg +1 -0
  894. package/dist/stripe-elements/svg/megaphone-sharp.svg +1 -0
  895. package/dist/stripe-elements/svg/megaphone.svg +1 -0
  896. package/dist/stripe-elements/svg/menu-outline.svg +1 -0
  897. package/dist/stripe-elements/svg/menu-sharp.svg +1 -0
  898. package/dist/stripe-elements/svg/menu.svg +1 -0
  899. package/dist/stripe-elements/svg/mic-circle-outline.svg +1 -0
  900. package/dist/stripe-elements/svg/mic-circle-sharp.svg +1 -0
  901. package/dist/stripe-elements/svg/mic-circle.svg +1 -0
  902. package/dist/stripe-elements/svg/mic-off-circle-outline.svg +1 -0
  903. package/dist/stripe-elements/svg/mic-off-circle-sharp.svg +1 -0
  904. package/dist/stripe-elements/svg/mic-off-circle.svg +1 -0
  905. package/dist/stripe-elements/svg/mic-off-outline.svg +1 -0
  906. package/dist/stripe-elements/svg/mic-off-sharp.svg +1 -0
  907. package/dist/stripe-elements/svg/mic-off.svg +1 -0
  908. package/dist/stripe-elements/svg/mic-outline.svg +1 -0
  909. package/dist/stripe-elements/svg/mic-sharp.svg +1 -0
  910. package/dist/stripe-elements/svg/mic.svg +1 -0
  911. package/dist/stripe-elements/svg/moon-outline.svg +1 -0
  912. package/dist/stripe-elements/svg/moon-sharp.svg +1 -0
  913. package/dist/stripe-elements/svg/moon.svg +1 -0
  914. package/dist/stripe-elements/svg/move-outline.svg +1 -0
  915. package/dist/stripe-elements/svg/move-sharp.svg +1 -0
  916. package/dist/stripe-elements/svg/move.svg +1 -0
  917. package/dist/stripe-elements/svg/musical-note-outline.svg +1 -0
  918. package/dist/stripe-elements/svg/musical-note-sharp.svg +1 -0
  919. package/dist/stripe-elements/svg/musical-note.svg +1 -0
  920. package/dist/stripe-elements/svg/musical-notes-outline.svg +1 -0
  921. package/dist/stripe-elements/svg/musical-notes-sharp.svg +1 -0
  922. package/dist/stripe-elements/svg/musical-notes.svg +1 -0
  923. package/dist/stripe-elements/svg/navigate-circle-outline.svg +1 -0
  924. package/dist/stripe-elements/svg/navigate-circle-sharp.svg +1 -0
  925. package/dist/stripe-elements/svg/navigate-circle.svg +1 -0
  926. package/dist/stripe-elements/svg/navigate-outline.svg +1 -0
  927. package/dist/stripe-elements/svg/navigate-sharp.svg +1 -0
  928. package/dist/stripe-elements/svg/navigate.svg +1 -0
  929. package/dist/stripe-elements/svg/newspaper-outline.svg +1 -0
  930. package/dist/stripe-elements/svg/newspaper-sharp.svg +1 -0
  931. package/dist/stripe-elements/svg/newspaper.svg +1 -0
  932. package/dist/stripe-elements/svg/notifications-circle-outline.svg +1 -0
  933. package/dist/stripe-elements/svg/notifications-circle-sharp.svg +1 -0
  934. package/dist/stripe-elements/svg/notifications-circle.svg +1 -0
  935. package/dist/stripe-elements/svg/notifications-off-circle-outline.svg +1 -0
  936. package/dist/stripe-elements/svg/notifications-off-circle-sharp.svg +1 -0
  937. package/dist/stripe-elements/svg/notifications-off-circle.svg +1 -0
  938. package/dist/stripe-elements/svg/notifications-off-outline.svg +1 -0
  939. package/dist/stripe-elements/svg/notifications-off-sharp.svg +1 -0
  940. package/dist/stripe-elements/svg/notifications-off.svg +1 -0
  941. package/dist/stripe-elements/svg/notifications-outline.svg +1 -0
  942. package/dist/stripe-elements/svg/notifications-sharp.svg +1 -0
  943. package/dist/stripe-elements/svg/notifications.svg +1 -0
  944. package/dist/stripe-elements/svg/nuclear-outline.svg +1 -0
  945. package/dist/stripe-elements/svg/nuclear-sharp.svg +1 -0
  946. package/dist/stripe-elements/svg/nuclear.svg +1 -0
  947. package/dist/stripe-elements/svg/nutrition-outline.svg +1 -0
  948. package/dist/stripe-elements/svg/nutrition-sharp.svg +1 -0
  949. package/dist/stripe-elements/svg/nutrition.svg +1 -0
  950. package/dist/stripe-elements/svg/open-outline.svg +1 -0
  951. package/dist/stripe-elements/svg/open-sharp.svg +1 -0
  952. package/dist/stripe-elements/svg/open.svg +1 -0
  953. package/dist/stripe-elements/svg/options-outline.svg +1 -0
  954. package/dist/stripe-elements/svg/options-sharp.svg +1 -0
  955. package/dist/stripe-elements/svg/options.svg +1 -0
  956. package/dist/stripe-elements/svg/paper-plane-outline.svg +1 -0
  957. package/dist/stripe-elements/svg/paper-plane-sharp.svg +1 -0
  958. package/dist/stripe-elements/svg/paper-plane.svg +1 -0
  959. package/dist/stripe-elements/svg/partly-sunny-outline.svg +1 -0
  960. package/dist/stripe-elements/svg/partly-sunny-sharp.svg +1 -0
  961. package/dist/stripe-elements/svg/partly-sunny.svg +1 -0
  962. package/dist/stripe-elements/svg/pause-circle-outline.svg +1 -0
  963. package/dist/stripe-elements/svg/pause-circle-sharp.svg +1 -0
  964. package/dist/stripe-elements/svg/pause-circle.svg +1 -0
  965. package/dist/stripe-elements/svg/pause-outline.svg +1 -0
  966. package/dist/stripe-elements/svg/pause-sharp.svg +1 -0
  967. package/dist/stripe-elements/svg/pause.svg +1 -0
  968. package/dist/stripe-elements/svg/paw-outline.svg +1 -0
  969. package/dist/stripe-elements/svg/paw-sharp.svg +1 -0
  970. package/dist/stripe-elements/svg/paw.svg +1 -0
  971. package/dist/stripe-elements/svg/pencil-outline.svg +1 -0
  972. package/dist/stripe-elements/svg/pencil-sharp.svg +1 -0
  973. package/dist/stripe-elements/svg/pencil.svg +1 -0
  974. package/dist/stripe-elements/svg/people-circle-outline.svg +1 -0
  975. package/dist/stripe-elements/svg/people-circle-sharp.svg +1 -0
  976. package/dist/stripe-elements/svg/people-circle.svg +1 -0
  977. package/dist/stripe-elements/svg/people-outline.svg +1 -0
  978. package/dist/stripe-elements/svg/people-sharp.svg +1 -0
  979. package/dist/stripe-elements/svg/people.svg +1 -0
  980. package/dist/stripe-elements/svg/person-add-outline.svg +1 -0
  981. package/dist/stripe-elements/svg/person-add-sharp.svg +1 -0
  982. package/dist/stripe-elements/svg/person-add.svg +1 -0
  983. package/dist/stripe-elements/svg/person-circle-outline.svg +1 -0
  984. package/dist/stripe-elements/svg/person-circle-sharp.svg +1 -0
  985. package/dist/stripe-elements/svg/person-circle.svg +1 -0
  986. package/dist/stripe-elements/svg/person-outline.svg +1 -0
  987. package/dist/stripe-elements/svg/person-remove-outline.svg +1 -0
  988. package/dist/stripe-elements/svg/person-remove-sharp.svg +1 -0
  989. package/dist/stripe-elements/svg/person-remove.svg +1 -0
  990. package/dist/stripe-elements/svg/person-sharp.svg +1 -0
  991. package/dist/stripe-elements/svg/person.svg +1 -0
  992. package/dist/stripe-elements/svg/phone-landscape-outline.svg +1 -0
  993. package/dist/stripe-elements/svg/phone-landscape-sharp.svg +1 -0
  994. package/dist/stripe-elements/svg/phone-landscape.svg +1 -0
  995. package/dist/stripe-elements/svg/phone-portrait-outline.svg +1 -0
  996. package/dist/stripe-elements/svg/phone-portrait-sharp.svg +1 -0
  997. package/dist/stripe-elements/svg/phone-portrait.svg +1 -0
  998. package/dist/stripe-elements/svg/pie-chart-outline.svg +1 -0
  999. package/dist/stripe-elements/svg/pie-chart-sharp.svg +1 -0
  1000. package/dist/stripe-elements/svg/pie-chart.svg +1 -0
  1001. package/dist/stripe-elements/svg/pin-outline.svg +1 -0
  1002. package/dist/stripe-elements/svg/pin-sharp.svg +1 -0
  1003. package/dist/stripe-elements/svg/pin.svg +1 -0
  1004. package/dist/stripe-elements/svg/pint-outline.svg +1 -0
  1005. package/dist/stripe-elements/svg/pint-sharp.svg +1 -0
  1006. package/dist/stripe-elements/svg/pint.svg +1 -0
  1007. package/dist/stripe-elements/svg/pizza-outline.svg +1 -0
  1008. package/dist/stripe-elements/svg/pizza-sharp.svg +1 -0
  1009. package/dist/stripe-elements/svg/pizza.svg +1 -0
  1010. package/dist/stripe-elements/svg/planet-outline.svg +1 -0
  1011. package/dist/stripe-elements/svg/planet-sharp.svg +1 -0
  1012. package/dist/stripe-elements/svg/planet.svg +1 -0
  1013. package/dist/stripe-elements/svg/play-back-circle-outline.svg +1 -0
  1014. package/dist/stripe-elements/svg/play-back-circle-sharp.svg +1 -0
  1015. package/dist/stripe-elements/svg/play-back-circle.svg +1 -0
  1016. package/dist/stripe-elements/svg/play-back-outline.svg +1 -0
  1017. package/dist/stripe-elements/svg/play-back-sharp.svg +1 -0
  1018. package/dist/stripe-elements/svg/play-back.svg +1 -0
  1019. package/dist/stripe-elements/svg/play-circle-outline.svg +1 -0
  1020. package/dist/stripe-elements/svg/play-circle-sharp.svg +1 -0
  1021. package/dist/stripe-elements/svg/play-circle.svg +1 -0
  1022. package/dist/stripe-elements/svg/play-forward-circle-outline.svg +1 -0
  1023. package/dist/stripe-elements/svg/play-forward-circle-sharp.svg +1 -0
  1024. package/dist/stripe-elements/svg/play-forward-circle.svg +1 -0
  1025. package/dist/stripe-elements/svg/play-forward-outline.svg +1 -0
  1026. package/dist/stripe-elements/svg/play-forward-sharp.svg +1 -0
  1027. package/dist/stripe-elements/svg/play-forward.svg +1 -0
  1028. package/dist/stripe-elements/svg/play-outline.svg +1 -0
  1029. package/dist/stripe-elements/svg/play-sharp.svg +1 -0
  1030. package/dist/stripe-elements/svg/play-skip-back-circle-outline.svg +1 -0
  1031. package/dist/stripe-elements/svg/play-skip-back-circle-sharp.svg +1 -0
  1032. package/dist/stripe-elements/svg/play-skip-back-circle.svg +1 -0
  1033. package/dist/stripe-elements/svg/play-skip-back-outline.svg +1 -0
  1034. package/dist/stripe-elements/svg/play-skip-back-sharp.svg +1 -0
  1035. package/dist/stripe-elements/svg/play-skip-back.svg +1 -0
  1036. package/dist/stripe-elements/svg/play-skip-forward-circle-outline.svg +1 -0
  1037. package/dist/stripe-elements/svg/play-skip-forward-circle-sharp.svg +1 -0
  1038. package/dist/stripe-elements/svg/play-skip-forward-circle.svg +1 -0
  1039. package/dist/stripe-elements/svg/play-skip-forward-outline.svg +1 -0
  1040. package/dist/stripe-elements/svg/play-skip-forward-sharp.svg +1 -0
  1041. package/dist/stripe-elements/svg/play-skip-forward.svg +1 -0
  1042. package/dist/stripe-elements/svg/play.svg +1 -0
  1043. package/dist/stripe-elements/svg/podium-outline.svg +1 -0
  1044. package/dist/stripe-elements/svg/podium-sharp.svg +1 -0
  1045. package/dist/stripe-elements/svg/podium.svg +1 -0
  1046. package/dist/stripe-elements/svg/power-outline.svg +1 -0
  1047. package/dist/stripe-elements/svg/power-sharp.svg +1 -0
  1048. package/dist/stripe-elements/svg/power.svg +1 -0
  1049. package/dist/stripe-elements/svg/pricetag-outline.svg +1 -0
  1050. package/dist/stripe-elements/svg/pricetag-sharp.svg +1 -0
  1051. package/dist/stripe-elements/svg/pricetag.svg +1 -0
  1052. package/dist/stripe-elements/svg/pricetags-outline.svg +1 -0
  1053. package/dist/stripe-elements/svg/pricetags-sharp.svg +1 -0
  1054. package/dist/stripe-elements/svg/pricetags.svg +1 -0
  1055. package/dist/stripe-elements/svg/print-outline.svg +1 -0
  1056. package/dist/stripe-elements/svg/print-sharp.svg +1 -0
  1057. package/dist/stripe-elements/svg/print.svg +1 -0
  1058. package/dist/stripe-elements/svg/prism-outline.svg +1 -0
  1059. package/dist/stripe-elements/svg/prism-sharp.svg +1 -0
  1060. package/dist/stripe-elements/svg/prism.svg +1 -0
  1061. package/dist/stripe-elements/svg/pulse-outline.svg +1 -0
  1062. package/dist/stripe-elements/svg/pulse-sharp.svg +1 -0
  1063. package/dist/stripe-elements/svg/pulse.svg +1 -0
  1064. package/dist/stripe-elements/svg/push-outline.svg +1 -0
  1065. package/dist/stripe-elements/svg/push-sharp.svg +1 -0
  1066. package/dist/stripe-elements/svg/push.svg +1 -0
  1067. package/dist/stripe-elements/svg/qr-code-outline.svg +1 -0
  1068. package/dist/stripe-elements/svg/qr-code-sharp.svg +1 -0
  1069. package/dist/stripe-elements/svg/qr-code.svg +1 -0
  1070. package/dist/stripe-elements/svg/radio-button-off-outline.svg +1 -0
  1071. package/dist/stripe-elements/svg/radio-button-off-sharp.svg +1 -0
  1072. package/dist/stripe-elements/svg/radio-button-off.svg +1 -0
  1073. package/dist/stripe-elements/svg/radio-button-on-outline.svg +1 -0
  1074. package/dist/stripe-elements/svg/radio-button-on-sharp.svg +1 -0
  1075. package/dist/stripe-elements/svg/radio-button-on.svg +1 -0
  1076. package/dist/stripe-elements/svg/radio-outline.svg +1 -0
  1077. package/dist/stripe-elements/svg/radio-sharp.svg +1 -0
  1078. package/dist/stripe-elements/svg/radio.svg +1 -0
  1079. package/dist/stripe-elements/svg/rainy-outline.svg +1 -0
  1080. package/dist/stripe-elements/svg/rainy-sharp.svg +1 -0
  1081. package/dist/stripe-elements/svg/rainy.svg +1 -0
  1082. package/dist/stripe-elements/svg/reader-outline.svg +1 -0
  1083. package/dist/stripe-elements/svg/reader-sharp.svg +1 -0
  1084. package/dist/stripe-elements/svg/reader.svg +1 -0
  1085. package/dist/stripe-elements/svg/receipt-outline.svg +1 -0
  1086. package/dist/stripe-elements/svg/receipt-sharp.svg +1 -0
  1087. package/dist/stripe-elements/svg/receipt.svg +1 -0
  1088. package/dist/stripe-elements/svg/recording-outline.svg +1 -0
  1089. package/dist/stripe-elements/svg/recording-sharp.svg +1 -0
  1090. package/dist/stripe-elements/svg/recording.svg +1 -0
  1091. package/dist/stripe-elements/svg/refresh-circle-outline.svg +1 -0
  1092. package/dist/stripe-elements/svg/refresh-circle-sharp.svg +1 -0
  1093. package/dist/stripe-elements/svg/refresh-circle.svg +1 -0
  1094. package/dist/stripe-elements/svg/refresh-outline.svg +1 -0
  1095. package/dist/stripe-elements/svg/refresh-sharp.svg +1 -0
  1096. package/dist/stripe-elements/svg/refresh.svg +1 -0
  1097. package/dist/stripe-elements/svg/reload-circle-outline.svg +1 -0
  1098. package/dist/stripe-elements/svg/reload-circle-sharp.svg +1 -0
  1099. package/dist/stripe-elements/svg/reload-circle.svg +1 -0
  1100. package/dist/stripe-elements/svg/reload-outline.svg +1 -0
  1101. package/dist/stripe-elements/svg/reload-sharp.svg +1 -0
  1102. package/dist/stripe-elements/svg/reload.svg +1 -0
  1103. package/dist/stripe-elements/svg/remove-circle-outline.svg +1 -0
  1104. package/dist/stripe-elements/svg/remove-circle-sharp.svg +1 -0
  1105. package/dist/stripe-elements/svg/remove-circle.svg +1 -0
  1106. package/dist/stripe-elements/svg/remove-outline.svg +1 -0
  1107. package/dist/stripe-elements/svg/remove-sharp.svg +1 -0
  1108. package/dist/stripe-elements/svg/remove.svg +1 -0
  1109. package/dist/stripe-elements/svg/reorder-four-outline.svg +1 -0
  1110. package/dist/stripe-elements/svg/reorder-four-sharp.svg +1 -0
  1111. package/dist/stripe-elements/svg/reorder-four.svg +1 -0
  1112. package/dist/stripe-elements/svg/reorder-three-outline.svg +1 -0
  1113. package/dist/stripe-elements/svg/reorder-three-sharp.svg +1 -0
  1114. package/dist/stripe-elements/svg/reorder-three.svg +1 -0
  1115. package/dist/stripe-elements/svg/reorder-two-outline.svg +1 -0
  1116. package/dist/stripe-elements/svg/reorder-two-sharp.svg +1 -0
  1117. package/dist/stripe-elements/svg/reorder-two.svg +1 -0
  1118. package/dist/stripe-elements/svg/repeat-outline.svg +1 -0
  1119. package/dist/stripe-elements/svg/repeat-sharp.svg +1 -0
  1120. package/dist/stripe-elements/svg/repeat.svg +1 -0
  1121. package/dist/stripe-elements/svg/resize-outline.svg +1 -0
  1122. package/dist/stripe-elements/svg/resize-sharp.svg +1 -0
  1123. package/dist/stripe-elements/svg/resize.svg +1 -0
  1124. package/dist/stripe-elements/svg/restaurant-outline.svg +1 -0
  1125. package/dist/stripe-elements/svg/restaurant-sharp.svg +1 -0
  1126. package/dist/stripe-elements/svg/restaurant.svg +1 -0
  1127. package/dist/stripe-elements/svg/return-down-back-outline.svg +1 -0
  1128. package/dist/stripe-elements/svg/return-down-back-sharp.svg +1 -0
  1129. package/dist/stripe-elements/svg/return-down-back.svg +1 -0
  1130. package/dist/stripe-elements/svg/return-down-forward-outline.svg +1 -0
  1131. package/dist/stripe-elements/svg/return-down-forward-sharp.svg +1 -0
  1132. package/dist/stripe-elements/svg/return-down-forward.svg +1 -0
  1133. package/dist/stripe-elements/svg/return-up-back-outline.svg +1 -0
  1134. package/dist/stripe-elements/svg/return-up-back-sharp.svg +1 -0
  1135. package/dist/stripe-elements/svg/return-up-back.svg +1 -0
  1136. package/dist/stripe-elements/svg/return-up-forward-outline.svg +1 -0
  1137. package/dist/stripe-elements/svg/return-up-forward-sharp.svg +1 -0
  1138. package/dist/stripe-elements/svg/return-up-forward.svg +1 -0
  1139. package/dist/stripe-elements/svg/ribbon-outline.svg +1 -0
  1140. package/dist/stripe-elements/svg/ribbon-sharp.svg +1 -0
  1141. package/dist/stripe-elements/svg/ribbon.svg +1 -0
  1142. package/dist/stripe-elements/svg/rocket-outline.svg +1 -0
  1143. package/dist/stripe-elements/svg/rocket-sharp.svg +1 -0
  1144. package/dist/stripe-elements/svg/rocket.svg +1 -0
  1145. package/dist/stripe-elements/svg/rose-outline.svg +1 -0
  1146. package/dist/stripe-elements/svg/rose-sharp.svg +1 -0
  1147. package/dist/stripe-elements/svg/rose.svg +1 -0
  1148. package/dist/stripe-elements/svg/sad-outline.svg +1 -0
  1149. package/dist/stripe-elements/svg/sad-sharp.svg +1 -0
  1150. package/dist/stripe-elements/svg/sad.svg +1 -0
  1151. package/dist/stripe-elements/svg/save-outline.svg +1 -0
  1152. package/dist/stripe-elements/svg/save-sharp.svg +1 -0
  1153. package/dist/stripe-elements/svg/save.svg +1 -0
  1154. package/dist/stripe-elements/svg/scale-outline.svg +1 -0
  1155. package/dist/stripe-elements/svg/scale-sharp.svg +1 -0
  1156. package/dist/stripe-elements/svg/scale.svg +1 -0
  1157. package/dist/stripe-elements/svg/scan-circle-outline.svg +1 -0
  1158. package/dist/stripe-elements/svg/scan-circle-sharp.svg +1 -0
  1159. package/dist/stripe-elements/svg/scan-circle.svg +1 -0
  1160. package/dist/stripe-elements/svg/scan-outline.svg +1 -0
  1161. package/dist/stripe-elements/svg/scan-sharp.svg +1 -0
  1162. package/dist/stripe-elements/svg/scan.svg +1 -0
  1163. package/dist/stripe-elements/svg/school-outline.svg +1 -0
  1164. package/dist/stripe-elements/svg/school-sharp.svg +1 -0
  1165. package/dist/stripe-elements/svg/school.svg +1 -0
  1166. package/dist/stripe-elements/svg/search-circle-outline.svg +1 -0
  1167. package/dist/stripe-elements/svg/search-circle-sharp.svg +1 -0
  1168. package/dist/stripe-elements/svg/search-circle.svg +1 -0
  1169. package/dist/stripe-elements/svg/search-outline.svg +1 -0
  1170. package/dist/stripe-elements/svg/search-sharp.svg +1 -0
  1171. package/dist/stripe-elements/svg/search.svg +1 -0
  1172. package/dist/stripe-elements/svg/send-outline.svg +1 -0
  1173. package/dist/stripe-elements/svg/send-sharp.svg +1 -0
  1174. package/dist/stripe-elements/svg/send.svg +1 -0
  1175. package/dist/stripe-elements/svg/server-outline.svg +1 -0
  1176. package/dist/stripe-elements/svg/server-sharp.svg +1 -0
  1177. package/dist/stripe-elements/svg/server.svg +1 -0
  1178. package/dist/stripe-elements/svg/settings-outline.svg +1 -0
  1179. package/dist/stripe-elements/svg/settings-sharp.svg +1 -0
  1180. package/dist/stripe-elements/svg/settings.svg +1 -0
  1181. package/dist/stripe-elements/svg/shapes-outline.svg +1 -0
  1182. package/dist/stripe-elements/svg/shapes-sharp.svg +1 -0
  1183. package/dist/stripe-elements/svg/shapes.svg +1 -0
  1184. package/dist/stripe-elements/svg/share-outline.svg +1 -0
  1185. package/dist/stripe-elements/svg/share-sharp.svg +1 -0
  1186. package/dist/stripe-elements/svg/share-social-outline.svg +1 -0
  1187. package/dist/stripe-elements/svg/share-social-sharp.svg +1 -0
  1188. package/dist/stripe-elements/svg/share-social.svg +1 -0
  1189. package/dist/stripe-elements/svg/share.svg +1 -0
  1190. package/dist/stripe-elements/svg/shield-checkmark-outline.svg +1 -0
  1191. package/dist/stripe-elements/svg/shield-checkmark-sharp.svg +1 -0
  1192. package/dist/stripe-elements/svg/shield-checkmark.svg +1 -0
  1193. package/dist/stripe-elements/svg/shield-half-outline.svg +1 -0
  1194. package/dist/stripe-elements/svg/shield-half-sharp.svg +1 -0
  1195. package/dist/stripe-elements/svg/shield-half.svg +1 -0
  1196. package/dist/stripe-elements/svg/shield-outline.svg +1 -0
  1197. package/dist/stripe-elements/svg/shield-sharp.svg +1 -0
  1198. package/dist/stripe-elements/svg/shield.svg +1 -0
  1199. package/dist/stripe-elements/svg/shirt-outline.svg +1 -0
  1200. package/dist/stripe-elements/svg/shirt-sharp.svg +1 -0
  1201. package/dist/stripe-elements/svg/shirt.svg +1 -0
  1202. package/dist/stripe-elements/svg/shuffle-outline.svg +1 -0
  1203. package/dist/stripe-elements/svg/shuffle-sharp.svg +1 -0
  1204. package/dist/stripe-elements/svg/shuffle.svg +1 -0
  1205. package/dist/stripe-elements/svg/skull-outline.svg +1 -0
  1206. package/dist/stripe-elements/svg/skull-sharp.svg +1 -0
  1207. package/dist/stripe-elements/svg/skull.svg +1 -0
  1208. package/dist/stripe-elements/svg/snow-outline.svg +1 -0
  1209. package/dist/stripe-elements/svg/snow-sharp.svg +1 -0
  1210. package/dist/stripe-elements/svg/snow.svg +1 -0
  1211. package/dist/stripe-elements/svg/sparkles-outline.svg +1 -0
  1212. package/dist/stripe-elements/svg/sparkles-sharp.svg +1 -0
  1213. package/dist/stripe-elements/svg/sparkles.svg +1 -0
  1214. package/dist/stripe-elements/svg/speedometer-outline.svg +1 -0
  1215. package/dist/stripe-elements/svg/speedometer-sharp.svg +1 -0
  1216. package/dist/stripe-elements/svg/speedometer.svg +1 -0
  1217. package/dist/stripe-elements/svg/square-outline.svg +1 -0
  1218. package/dist/stripe-elements/svg/square-sharp.svg +1 -0
  1219. package/dist/stripe-elements/svg/square.svg +1 -0
  1220. package/dist/stripe-elements/svg/star-half-outline.svg +1 -0
  1221. package/dist/stripe-elements/svg/star-half-sharp.svg +1 -0
  1222. package/dist/stripe-elements/svg/star-half.svg +1 -0
  1223. package/dist/stripe-elements/svg/star-outline.svg +1 -0
  1224. package/dist/stripe-elements/svg/star-sharp.svg +1 -0
  1225. package/dist/stripe-elements/svg/star.svg +1 -0
  1226. package/dist/stripe-elements/svg/stats-chart-outline.svg +1 -0
  1227. package/dist/stripe-elements/svg/stats-chart-sharp.svg +1 -0
  1228. package/dist/stripe-elements/svg/stats-chart.svg +1 -0
  1229. package/dist/stripe-elements/svg/stop-circle-outline.svg +1 -0
  1230. package/dist/stripe-elements/svg/stop-circle-sharp.svg +1 -0
  1231. package/dist/stripe-elements/svg/stop-circle.svg +1 -0
  1232. package/dist/stripe-elements/svg/stop-outline.svg +1 -0
  1233. package/dist/stripe-elements/svg/stop-sharp.svg +1 -0
  1234. package/dist/stripe-elements/svg/stop.svg +1 -0
  1235. package/dist/stripe-elements/svg/stopwatch-outline.svg +1 -0
  1236. package/dist/stripe-elements/svg/stopwatch-sharp.svg +1 -0
  1237. package/dist/stripe-elements/svg/stopwatch.svg +1 -0
  1238. package/dist/stripe-elements/svg/storefront-outline.svg +1 -0
  1239. package/dist/stripe-elements/svg/storefront-sharp.svg +1 -0
  1240. package/dist/stripe-elements/svg/storefront.svg +1 -0
  1241. package/dist/stripe-elements/svg/subway-outline.svg +1 -0
  1242. package/dist/stripe-elements/svg/subway-sharp.svg +1 -0
  1243. package/dist/stripe-elements/svg/subway.svg +1 -0
  1244. package/dist/stripe-elements/svg/sunny-outline.svg +1 -0
  1245. package/dist/stripe-elements/svg/sunny-sharp.svg +1 -0
  1246. package/dist/stripe-elements/svg/sunny.svg +1 -0
  1247. package/dist/stripe-elements/svg/swap-horizontal-outline.svg +1 -0
  1248. package/dist/stripe-elements/svg/swap-horizontal-sharp.svg +1 -0
  1249. package/dist/stripe-elements/svg/swap-horizontal.svg +1 -0
  1250. package/dist/stripe-elements/svg/swap-vertical-outline.svg +1 -0
  1251. package/dist/stripe-elements/svg/swap-vertical-sharp.svg +1 -0
  1252. package/dist/stripe-elements/svg/swap-vertical.svg +1 -0
  1253. package/dist/stripe-elements/svg/sync-circle-outline.svg +1 -0
  1254. package/dist/stripe-elements/svg/sync-circle-sharp.svg +1 -0
  1255. package/dist/stripe-elements/svg/sync-circle.svg +1 -0
  1256. package/dist/stripe-elements/svg/sync-outline.svg +1 -0
  1257. package/dist/stripe-elements/svg/sync-sharp.svg +1 -0
  1258. package/dist/stripe-elements/svg/sync.svg +1 -0
  1259. package/dist/stripe-elements/svg/tablet-landscape-outline.svg +1 -0
  1260. package/dist/stripe-elements/svg/tablet-landscape-sharp.svg +1 -0
  1261. package/dist/stripe-elements/svg/tablet-landscape.svg +1 -0
  1262. package/dist/stripe-elements/svg/tablet-portrait-outline.svg +1 -0
  1263. package/dist/stripe-elements/svg/tablet-portrait-sharp.svg +1 -0
  1264. package/dist/stripe-elements/svg/tablet-portrait.svg +1 -0
  1265. package/dist/stripe-elements/svg/telescope-outline.svg +1 -0
  1266. package/dist/stripe-elements/svg/telescope-sharp.svg +1 -0
  1267. package/dist/stripe-elements/svg/telescope.svg +1 -0
  1268. package/dist/stripe-elements/svg/tennisball-outline.svg +1 -0
  1269. package/dist/stripe-elements/svg/tennisball-sharp.svg +1 -0
  1270. package/dist/stripe-elements/svg/tennisball.svg +1 -0
  1271. package/dist/stripe-elements/svg/terminal-outline.svg +1 -0
  1272. package/dist/stripe-elements/svg/terminal-sharp.svg +1 -0
  1273. package/dist/stripe-elements/svg/terminal.svg +1 -0
  1274. package/dist/stripe-elements/svg/text-outline.svg +1 -0
  1275. package/dist/stripe-elements/svg/text-sharp.svg +1 -0
  1276. package/dist/stripe-elements/svg/text.svg +1 -0
  1277. package/dist/stripe-elements/svg/thermometer-outline.svg +1 -0
  1278. package/dist/stripe-elements/svg/thermometer-sharp.svg +1 -0
  1279. package/dist/stripe-elements/svg/thermometer.svg +1 -0
  1280. package/dist/stripe-elements/svg/thumbs-down-outline.svg +1 -0
  1281. package/dist/stripe-elements/svg/thumbs-down-sharp.svg +1 -0
  1282. package/dist/stripe-elements/svg/thumbs-down.svg +1 -0
  1283. package/dist/stripe-elements/svg/thumbs-up-outline.svg +1 -0
  1284. package/dist/stripe-elements/svg/thumbs-up-sharp.svg +1 -0
  1285. package/dist/stripe-elements/svg/thumbs-up.svg +1 -0
  1286. package/dist/stripe-elements/svg/thunderstorm-outline.svg +1 -0
  1287. package/dist/stripe-elements/svg/thunderstorm-sharp.svg +1 -0
  1288. package/dist/stripe-elements/svg/thunderstorm.svg +1 -0
  1289. package/dist/stripe-elements/svg/ticket-outline.svg +1 -0
  1290. package/dist/stripe-elements/svg/ticket-sharp.svg +1 -0
  1291. package/dist/stripe-elements/svg/ticket.svg +1 -0
  1292. package/dist/stripe-elements/svg/time-outline.svg +1 -0
  1293. package/dist/stripe-elements/svg/time-sharp.svg +1 -0
  1294. package/dist/stripe-elements/svg/time.svg +1 -0
  1295. package/dist/stripe-elements/svg/timer-outline.svg +1 -0
  1296. package/dist/stripe-elements/svg/timer-sharp.svg +1 -0
  1297. package/dist/stripe-elements/svg/timer.svg +1 -0
  1298. package/dist/stripe-elements/svg/today-outline.svg +1 -0
  1299. package/dist/stripe-elements/svg/today-sharp.svg +1 -0
  1300. package/dist/stripe-elements/svg/today.svg +1 -0
  1301. package/dist/stripe-elements/svg/toggle-outline.svg +1 -0
  1302. package/dist/stripe-elements/svg/toggle-sharp.svg +1 -0
  1303. package/dist/stripe-elements/svg/toggle.svg +1 -0
  1304. package/dist/stripe-elements/svg/trail-sign-outline.svg +1 -0
  1305. package/dist/stripe-elements/svg/trail-sign-sharp.svg +1 -0
  1306. package/dist/stripe-elements/svg/trail-sign.svg +1 -0
  1307. package/dist/stripe-elements/svg/train-outline.svg +1 -0
  1308. package/dist/stripe-elements/svg/train-sharp.svg +1 -0
  1309. package/dist/stripe-elements/svg/train.svg +1 -0
  1310. package/dist/stripe-elements/svg/transgender-outline.svg +1 -0
  1311. package/dist/stripe-elements/svg/transgender-sharp.svg +1 -0
  1312. package/dist/stripe-elements/svg/transgender.svg +1 -0
  1313. package/dist/stripe-elements/svg/trash-bin-outline.svg +1 -0
  1314. package/dist/stripe-elements/svg/trash-bin-sharp.svg +1 -0
  1315. package/dist/stripe-elements/svg/trash-bin.svg +1 -0
  1316. package/dist/stripe-elements/svg/trash-outline.svg +1 -0
  1317. package/dist/stripe-elements/svg/trash-sharp.svg +1 -0
  1318. package/dist/stripe-elements/svg/trash.svg +1 -0
  1319. package/dist/stripe-elements/svg/trending-down-outline.svg +1 -0
  1320. package/dist/stripe-elements/svg/trending-down-sharp.svg +1 -0
  1321. package/dist/stripe-elements/svg/trending-down.svg +1 -0
  1322. package/dist/stripe-elements/svg/trending-up-outline.svg +1 -0
  1323. package/dist/stripe-elements/svg/trending-up-sharp.svg +1 -0
  1324. package/dist/stripe-elements/svg/trending-up.svg +1 -0
  1325. package/dist/stripe-elements/svg/triangle-outline.svg +1 -0
  1326. package/dist/stripe-elements/svg/triangle-sharp.svg +1 -0
  1327. package/dist/stripe-elements/svg/triangle.svg +1 -0
  1328. package/dist/stripe-elements/svg/trophy-outline.svg +1 -0
  1329. package/dist/stripe-elements/svg/trophy-sharp.svg +1 -0
  1330. package/dist/stripe-elements/svg/trophy.svg +1 -0
  1331. package/dist/stripe-elements/svg/tv-outline.svg +1 -0
  1332. package/dist/stripe-elements/svg/tv-sharp.svg +1 -0
  1333. package/dist/stripe-elements/svg/tv.svg +1 -0
  1334. package/dist/stripe-elements/svg/umbrella-outline.svg +1 -0
  1335. package/dist/stripe-elements/svg/umbrella-sharp.svg +1 -0
  1336. package/dist/stripe-elements/svg/umbrella.svg +1 -0
  1337. package/dist/stripe-elements/svg/unlink-outline.svg +1 -0
  1338. package/dist/stripe-elements/svg/unlink-sharp.svg +1 -0
  1339. package/dist/stripe-elements/svg/unlink.svg +1 -0
  1340. package/dist/stripe-elements/svg/videocam-off-outline.svg +1 -0
  1341. package/dist/stripe-elements/svg/videocam-off-sharp.svg +1 -0
  1342. package/dist/stripe-elements/svg/videocam-off.svg +1 -0
  1343. package/dist/stripe-elements/svg/videocam-outline.svg +1 -0
  1344. package/dist/stripe-elements/svg/videocam-sharp.svg +1 -0
  1345. package/dist/stripe-elements/svg/videocam.svg +1 -0
  1346. package/dist/stripe-elements/svg/volume-high-outline.svg +1 -0
  1347. package/dist/stripe-elements/svg/volume-high-sharp.svg +1 -0
  1348. package/dist/stripe-elements/svg/volume-high.svg +1 -0
  1349. package/dist/stripe-elements/svg/volume-low-outline.svg +1 -0
  1350. package/dist/stripe-elements/svg/volume-low-sharp.svg +1 -0
  1351. package/dist/stripe-elements/svg/volume-low.svg +1 -0
  1352. package/dist/stripe-elements/svg/volume-medium-outline.svg +1 -0
  1353. package/dist/stripe-elements/svg/volume-medium-sharp.svg +1 -0
  1354. package/dist/stripe-elements/svg/volume-medium.svg +1 -0
  1355. package/dist/stripe-elements/svg/volume-mute-outline.svg +1 -0
  1356. package/dist/stripe-elements/svg/volume-mute-sharp.svg +1 -0
  1357. package/dist/stripe-elements/svg/volume-mute.svg +1 -0
  1358. package/dist/stripe-elements/svg/volume-off-outline.svg +1 -0
  1359. package/dist/stripe-elements/svg/volume-off-sharp.svg +1 -0
  1360. package/dist/stripe-elements/svg/volume-off.svg +1 -0
  1361. package/dist/stripe-elements/svg/walk-outline.svg +1 -0
  1362. package/dist/stripe-elements/svg/walk-sharp.svg +1 -0
  1363. package/dist/stripe-elements/svg/walk.svg +1 -0
  1364. package/dist/stripe-elements/svg/wallet-outline.svg +1 -0
  1365. package/dist/stripe-elements/svg/wallet-sharp.svg +1 -0
  1366. package/dist/stripe-elements/svg/wallet.svg +1 -0
  1367. package/dist/stripe-elements/svg/warning-outline.svg +1 -0
  1368. package/dist/stripe-elements/svg/warning-sharp.svg +1 -0
  1369. package/dist/stripe-elements/svg/warning.svg +1 -0
  1370. package/dist/stripe-elements/svg/watch-outline.svg +1 -0
  1371. package/dist/stripe-elements/svg/watch-sharp.svg +1 -0
  1372. package/dist/stripe-elements/svg/watch.svg +1 -0
  1373. package/dist/stripe-elements/svg/water-outline.svg +1 -0
  1374. package/dist/stripe-elements/svg/water-sharp.svg +1 -0
  1375. package/dist/stripe-elements/svg/water.svg +1 -0
  1376. package/dist/stripe-elements/svg/wifi-outline.svg +1 -0
  1377. package/dist/stripe-elements/svg/wifi-sharp.svg +1 -0
  1378. package/dist/stripe-elements/svg/wifi.svg +1 -0
  1379. package/dist/stripe-elements/svg/wine-outline.svg +1 -0
  1380. package/dist/stripe-elements/svg/wine-sharp.svg +1 -0
  1381. package/dist/stripe-elements/svg/wine.svg +1 -0
  1382. package/dist/stripe-elements/svg/woman-outline.svg +1 -0
  1383. package/dist/stripe-elements/svg/woman-sharp.svg +1 -0
  1384. package/dist/stripe-elements/svg/woman.svg +1 -0
  1385. package/dist/types/components/stripe-element-modal/stripe-element-modal.d.ts +31 -0
  1386. package/dist/types/components/stripe-payment-request-button/stripe-payment-request-button.d.ts +141 -0
  1387. package/dist/types/components/stripe-payment-sheet/stripe-payment-sheet.d.ts +278 -0
  1388. package/dist/types/components/stripe-payment-sheet-modal/stripe-payment-sheet-modal.d.ts +124 -0
  1389. package/dist/types/components.d.ts +512 -0
  1390. package/dist/types/index.d.ts +2 -0
  1391. package/dist/types/interfaces.d.ts +53 -0
  1392. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  1393. package/dist/types/utils/i18n.d.ts +1 -0
  1394. package/dist/types/utils/platform.d.ts +26 -0
  1395. package/dist/types/utils/utils.d.ts +2 -0
  1396. package/loader/cdn.js +3 -0
  1397. package/loader/index.cjs.js +3 -0
  1398. package/loader/index.d.ts +12 -0
  1399. package/loader/index.es2017.js +3 -0
  1400. package/loader/index.js +4 -0
  1401. package/loader/package.json +10 -0
  1402. package/package.json +79 -0
  1403. package/readme.md +179 -0
@@ -0,0 +1,3469 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-aec82bce.js');
6
+ const stripe_esm = require('./stripe.esm-648239f0.js');
7
+
8
+ const getPlatforms = (win) => setupPlatforms(win);
9
+ const setupPlatforms = (win = window) => {
10
+ if (typeof win === 'undefined') {
11
+ return [];
12
+ }
13
+ win.Ionic = win.Ionic || {};
14
+ let platforms = win.Ionic.platforms;
15
+ if (platforms == null) {
16
+ platforms = win.Ionic.platforms = detectPlatforms(win);
17
+ platforms.forEach(p => win.document.documentElement.classList.add(`plt-${p}`));
18
+ }
19
+ return platforms;
20
+ };
21
+ const detectPlatforms = (win) => Object.keys(PLATFORMS_MAP).filter(p => PLATFORMS_MAP[p](win));
22
+ const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
23
+ const isIpad = (win) => {
24
+ // iOS 12 and below
25
+ if (testUserAgent(win, /iPad/i)) {
26
+ return true;
27
+ }
28
+ // iOS 13+
29
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
30
+ return true;
31
+ }
32
+ return false;
33
+ };
34
+ const isIphone = (win) => testUserAgent(win, /iPhone/i);
35
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
36
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
37
+ const isAndroidTablet = (win) => {
38
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
39
+ };
40
+ const isPhablet = (win) => {
41
+ const width = win.innerWidth;
42
+ const height = win.innerHeight;
43
+ const smallest = Math.min(width, height);
44
+ const largest = Math.max(width, height);
45
+ return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
46
+ };
47
+ const isTablet = (win) => {
48
+ const width = win.innerWidth;
49
+ const height = win.innerHeight;
50
+ const smallest = Math.min(width, height);
51
+ const largest = Math.max(width, height);
52
+ return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
53
+ };
54
+ const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
55
+ const isDesktop = (win) => !isMobile(win);
56
+ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
57
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
58
+ const isCapacitorNative = (win) => {
59
+ const capacitor = win['Capacitor'];
60
+ return !!(capacitor && capacitor.isNative);
61
+ };
62
+ const isElectron = (win) => testUserAgent(win, /electron/i);
63
+ const isPWA = (win) => !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone);
64
+ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
65
+ const matchMedia = (win, query) => win.matchMedia(query).matches;
66
+ const PLATFORMS_MAP = {
67
+ ipad: isIpad,
68
+ iphone: isIphone,
69
+ ios: isIOS,
70
+ android: isAndroid,
71
+ phablet: isPhablet,
72
+ tablet: isTablet,
73
+ cordova: isCordova,
74
+ capacitor: isCapacitorNative,
75
+ electron: isElectron,
76
+ pwa: isPWA,
77
+ mobile: isMobile,
78
+ mobileweb: isMobileWeb,
79
+ desktop: isDesktop,
80
+ hybrid: isHybrid,
81
+ };
82
+
83
+ const checkPlatform = () => {
84
+ const device = getPlatforms();
85
+ if (device.includes('ios')) {
86
+ return 'ios';
87
+ }
88
+ if (device.includes('android')) {
89
+ return 'android';
90
+ }
91
+ };
92
+ const waitForElm = (el, selector) => {
93
+ return new Promise(resolve => {
94
+ if (el.querySelector(selector)) {
95
+ return resolve(el.querySelector(selector));
96
+ }
97
+ const observer = new MutationObserver(() => {
98
+ if (el.querySelector(selector)) {
99
+ resolve(el.querySelector(selector));
100
+ observer.disconnect();
101
+ }
102
+ });
103
+ observer.observe(el, {
104
+ childList: true,
105
+ subtree: true
106
+ });
107
+ });
108
+ };
109
+
110
+ function _typeof(obj) {
111
+ "@babel/helpers - typeof";
112
+
113
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
114
+ return typeof obj;
115
+ } : function (obj) {
116
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
117
+ }, _typeof(obj);
118
+ }
119
+
120
+ function _defineProperty(obj, key, value) {
121
+ if (key in obj) {
122
+ Object.defineProperty(obj, key, {
123
+ value: value,
124
+ enumerable: true,
125
+ configurable: true,
126
+ writable: true
127
+ });
128
+ } else {
129
+ obj[key] = value;
130
+ }
131
+
132
+ return obj;
133
+ }
134
+
135
+ function _objectSpread(target) {
136
+ for (var i = 1; i < arguments.length; i++) {
137
+ var source = arguments[i] != null ? Object(arguments[i]) : {};
138
+ var ownKeys = Object.keys(source);
139
+
140
+ if (typeof Object.getOwnPropertySymbols === 'function') {
141
+ ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {
142
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
143
+ }));
144
+ }
145
+
146
+ ownKeys.forEach(function (key) {
147
+ _defineProperty(target, key, source[key]);
148
+ });
149
+ }
150
+
151
+ return target;
152
+ }
153
+
154
+ function _classCallCheck(instance, Constructor) {
155
+ if (!(instance instanceof Constructor)) {
156
+ throw new TypeError("Cannot call a class as a function");
157
+ }
158
+ }
159
+
160
+ function _defineProperties(target, props) {
161
+ for (var i = 0; i < props.length; i++) {
162
+ var descriptor = props[i];
163
+ descriptor.enumerable = descriptor.enumerable || false;
164
+ descriptor.configurable = true;
165
+ if ("value" in descriptor) descriptor.writable = true;
166
+ Object.defineProperty(target, descriptor.key, descriptor);
167
+ }
168
+ }
169
+
170
+ function _createClass(Constructor, protoProps, staticProps) {
171
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
172
+ if (staticProps) _defineProperties(Constructor, staticProps);
173
+ Object.defineProperty(Constructor, "prototype", {
174
+ writable: false
175
+ });
176
+ return Constructor;
177
+ }
178
+
179
+ function _assertThisInitialized(self) {
180
+ if (self === void 0) {
181
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
182
+ }
183
+
184
+ return self;
185
+ }
186
+
187
+ function _possibleConstructorReturn(self, call) {
188
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
189
+ return call;
190
+ } else if (call !== void 0) {
191
+ throw new TypeError("Derived constructors may only return object or undefined");
192
+ }
193
+
194
+ return _assertThisInitialized(self);
195
+ }
196
+
197
+ function _getPrototypeOf(o) {
198
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
199
+ return o.__proto__ || Object.getPrototypeOf(o);
200
+ };
201
+ return _getPrototypeOf(o);
202
+ }
203
+
204
+ function _setPrototypeOf(o, p) {
205
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
206
+ o.__proto__ = p;
207
+ return o;
208
+ };
209
+ return _setPrototypeOf(o, p);
210
+ }
211
+
212
+ function _inherits(subClass, superClass) {
213
+ if (typeof superClass !== "function" && superClass !== null) {
214
+ throw new TypeError("Super expression must either be null or a function");
215
+ }
216
+
217
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
218
+ constructor: {
219
+ value: subClass,
220
+ writable: true,
221
+ configurable: true
222
+ }
223
+ });
224
+ Object.defineProperty(subClass, "prototype", {
225
+ writable: false
226
+ });
227
+ if (superClass) _setPrototypeOf(subClass, superClass);
228
+ }
229
+
230
+ var consoleLogger = {
231
+ type: 'logger',
232
+ log: function log(args) {
233
+ this.output('log', args);
234
+ },
235
+ warn: function warn(args) {
236
+ this.output('warn', args);
237
+ },
238
+ error: function error(args) {
239
+ this.output('error', args);
240
+ },
241
+ output: function output(type, args) {
242
+ if (console && console[type]) console[type].apply(console, args);
243
+ }
244
+ };
245
+
246
+ var Logger = function () {
247
+ function Logger(concreteLogger) {
248
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
249
+
250
+ _classCallCheck(this, Logger);
251
+
252
+ this.init(concreteLogger, options);
253
+ }
254
+
255
+ _createClass(Logger, [{
256
+ key: "init",
257
+ value: function init(concreteLogger) {
258
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
259
+ this.prefix = options.prefix || 'i18next:';
260
+ this.logger = concreteLogger || consoleLogger;
261
+ this.options = options;
262
+ this.debug = options.debug;
263
+ }
264
+ }, {
265
+ key: "setDebug",
266
+ value: function setDebug(bool) {
267
+ this.debug = bool;
268
+ }
269
+ }, {
270
+ key: "log",
271
+ value: function log() {
272
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
273
+ args[_key] = arguments[_key];
274
+ }
275
+
276
+ return this.forward(args, 'log', '', true);
277
+ }
278
+ }, {
279
+ key: "warn",
280
+ value: function warn() {
281
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
282
+ args[_key2] = arguments[_key2];
283
+ }
284
+
285
+ return this.forward(args, 'warn', '', true);
286
+ }
287
+ }, {
288
+ key: "error",
289
+ value: function error() {
290
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
291
+ args[_key3] = arguments[_key3];
292
+ }
293
+
294
+ return this.forward(args, 'error', '');
295
+ }
296
+ }, {
297
+ key: "deprecate",
298
+ value: function deprecate() {
299
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
300
+ args[_key4] = arguments[_key4];
301
+ }
302
+
303
+ return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
304
+ }
305
+ }, {
306
+ key: "forward",
307
+ value: function forward(args, lvl, prefix, debugOnly) {
308
+ if (debugOnly && !this.debug) return null;
309
+ if (typeof args[0] === 'string') args[0] = "".concat(prefix).concat(this.prefix, " ").concat(args[0]);
310
+ return this.logger[lvl](args);
311
+ }
312
+ }, {
313
+ key: "create",
314
+ value: function create(moduleName) {
315
+ return new Logger(this.logger, _objectSpread({}, {
316
+ prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
317
+ }, this.options));
318
+ }
319
+ }]);
320
+
321
+ return Logger;
322
+ }();
323
+
324
+ var baseLogger = new Logger();
325
+
326
+ var EventEmitter = function () {
327
+ function EventEmitter() {
328
+ _classCallCheck(this, EventEmitter);
329
+
330
+ this.observers = {};
331
+ }
332
+
333
+ _createClass(EventEmitter, [{
334
+ key: "on",
335
+ value: function on(events, listener) {
336
+ var _this = this;
337
+
338
+ events.split(' ').forEach(function (event) {
339
+ _this.observers[event] = _this.observers[event] || [];
340
+
341
+ _this.observers[event].push(listener);
342
+ });
343
+ return this;
344
+ }
345
+ }, {
346
+ key: "off",
347
+ value: function off(event, listener) {
348
+ if (!this.observers[event]) return;
349
+
350
+ if (!listener) {
351
+ delete this.observers[event];
352
+ return;
353
+ }
354
+
355
+ this.observers[event] = this.observers[event].filter(function (l) {
356
+ return l !== listener;
357
+ });
358
+ }
359
+ }, {
360
+ key: "emit",
361
+ value: function emit(event) {
362
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
363
+ args[_key - 1] = arguments[_key];
364
+ }
365
+
366
+ if (this.observers[event]) {
367
+ var cloned = [].concat(this.observers[event]);
368
+ cloned.forEach(function (observer) {
369
+ observer.apply(void 0, args);
370
+ });
371
+ }
372
+
373
+ if (this.observers['*']) {
374
+ var _cloned = [].concat(this.observers['*']);
375
+
376
+ _cloned.forEach(function (observer) {
377
+ observer.apply(observer, [event].concat(args));
378
+ });
379
+ }
380
+ }
381
+ }]);
382
+
383
+ return EventEmitter;
384
+ }();
385
+
386
+ function defer() {
387
+ var res;
388
+ var rej;
389
+ var promise = new Promise(function (resolve, reject) {
390
+ res = resolve;
391
+ rej = reject;
392
+ });
393
+ promise.resolve = res;
394
+ promise.reject = rej;
395
+ return promise;
396
+ }
397
+ function makeString(object) {
398
+ if (object == null) return '';
399
+ return '' + object;
400
+ }
401
+ function copy(a, s, t) {
402
+ a.forEach(function (m) {
403
+ if (s[m]) t[m] = s[m];
404
+ });
405
+ }
406
+
407
+ function getLastOfPath(object, path, Empty) {
408
+ function cleanKey(key) {
409
+ return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;
410
+ }
411
+
412
+ function canNotTraverseDeeper() {
413
+ return !object || typeof object === 'string';
414
+ }
415
+
416
+ var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');
417
+
418
+ while (stack.length > 1) {
419
+ if (canNotTraverseDeeper()) return {};
420
+ var key = cleanKey(stack.shift());
421
+ if (!object[key] && Empty) object[key] = new Empty();
422
+
423
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
424
+ object = object[key];
425
+ } else {
426
+ object = {};
427
+ }
428
+ }
429
+
430
+ if (canNotTraverseDeeper()) return {};
431
+ return {
432
+ obj: object,
433
+ k: cleanKey(stack.shift())
434
+ };
435
+ }
436
+
437
+ function setPath(object, path, newValue) {
438
+ var _getLastOfPath = getLastOfPath(object, path, Object),
439
+ obj = _getLastOfPath.obj,
440
+ k = _getLastOfPath.k;
441
+
442
+ obj[k] = newValue;
443
+ }
444
+ function pushPath(object, path, newValue, concat) {
445
+ var _getLastOfPath2 = getLastOfPath(object, path, Object),
446
+ obj = _getLastOfPath2.obj,
447
+ k = _getLastOfPath2.k;
448
+
449
+ obj[k] = obj[k] || [];
450
+ if (concat) obj[k] = obj[k].concat(newValue);
451
+ if (!concat) obj[k].push(newValue);
452
+ }
453
+ function getPath(object, path) {
454
+ var _getLastOfPath3 = getLastOfPath(object, path),
455
+ obj = _getLastOfPath3.obj,
456
+ k = _getLastOfPath3.k;
457
+
458
+ if (!obj) return undefined;
459
+ return obj[k];
460
+ }
461
+ function getPathWithDefaults(data, defaultData, key) {
462
+ var value = getPath(data, key);
463
+
464
+ if (value !== undefined) {
465
+ return value;
466
+ }
467
+
468
+ return getPath(defaultData, key);
469
+ }
470
+ function deepExtend(target, source, overwrite) {
471
+ for (var prop in source) {
472
+ if (prop !== '__proto__' && prop !== 'constructor') {
473
+ if (prop in target) {
474
+ if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {
475
+ if (overwrite) target[prop] = source[prop];
476
+ } else {
477
+ deepExtend(target[prop], source[prop], overwrite);
478
+ }
479
+ } else {
480
+ target[prop] = source[prop];
481
+ }
482
+ }
483
+ }
484
+
485
+ return target;
486
+ }
487
+ function regexEscape(str) {
488
+ return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
489
+ }
490
+ var _entityMap = {
491
+ '&': '&amp;',
492
+ '<': '&lt;',
493
+ '>': '&gt;',
494
+ '"': '&quot;',
495
+ "'": '&#39;',
496
+ '/': '&#x2F;'
497
+ };
498
+ function escape(data) {
499
+ if (typeof data === 'string') {
500
+ return data.replace(/[&<>"'\/]/g, function (s) {
501
+ return _entityMap[s];
502
+ });
503
+ }
504
+
505
+ return data;
506
+ }
507
+ var isIE10 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
508
+
509
+ function deepFind(obj, path) {
510
+ var keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';
511
+ if (!obj) return undefined;
512
+ if (obj[path]) return obj[path];
513
+ var paths = path.split(keySeparator);
514
+ var current = obj;
515
+
516
+ for (var i = 0; i < paths.length; ++i) {
517
+ if (!current) return undefined;
518
+
519
+ if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {
520
+ return undefined;
521
+ }
522
+
523
+ if (current[paths[i]] === undefined) {
524
+ var j = 2;
525
+ var p = paths.slice(i, i + j).join(keySeparator);
526
+ var mix = current[p];
527
+
528
+ while (mix === undefined && paths.length > i + j) {
529
+ j++;
530
+ p = paths.slice(i, i + j).join(keySeparator);
531
+ mix = current[p];
532
+ }
533
+
534
+ if (mix === undefined) return undefined;
535
+ if (typeof mix === 'string') return mix;
536
+ if (p && typeof mix[p] === 'string') return mix[p];
537
+ var joinedPath = paths.slice(i + j).join(keySeparator);
538
+ if (joinedPath) return deepFind(mix, joinedPath, keySeparator);
539
+ return undefined;
540
+ }
541
+
542
+ current = current[paths[i]];
543
+ }
544
+
545
+ return current;
546
+ }
547
+
548
+ var ResourceStore = function (_EventEmitter) {
549
+ _inherits(ResourceStore, _EventEmitter);
550
+
551
+ function ResourceStore(data) {
552
+ var _this;
553
+
554
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
555
+ ns: ['translation'],
556
+ defaultNS: 'translation'
557
+ };
558
+
559
+ _classCallCheck(this, ResourceStore);
560
+
561
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));
562
+
563
+ if (isIE10) {
564
+ EventEmitter.call(_assertThisInitialized(_this));
565
+ }
566
+
567
+ _this.data = data || {};
568
+ _this.options = options;
569
+
570
+ if (_this.options.keySeparator === undefined) {
571
+ _this.options.keySeparator = '.';
572
+ }
573
+
574
+ if (_this.options.ignoreJSONStructure === undefined) {
575
+ _this.options.ignoreJSONStructure = true;
576
+ }
577
+
578
+ return _this;
579
+ }
580
+
581
+ _createClass(ResourceStore, [{
582
+ key: "addNamespaces",
583
+ value: function addNamespaces(ns) {
584
+ if (this.options.ns.indexOf(ns) < 0) {
585
+ this.options.ns.push(ns);
586
+ }
587
+ }
588
+ }, {
589
+ key: "removeNamespaces",
590
+ value: function removeNamespaces(ns) {
591
+ var index = this.options.ns.indexOf(ns);
592
+
593
+ if (index > -1) {
594
+ this.options.ns.splice(index, 1);
595
+ }
596
+ }
597
+ }, {
598
+ key: "getResource",
599
+ value: function getResource(lng, ns, key) {
600
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
601
+ var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
602
+ var ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
603
+ var path = [lng, ns];
604
+ if (key && typeof key !== 'string') path = path.concat(key);
605
+ if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);
606
+
607
+ if (lng.indexOf('.') > -1) {
608
+ path = lng.split('.');
609
+ }
610
+
611
+ var result = getPath(this.data, path);
612
+ if (result || !ignoreJSONStructure || typeof key !== 'string') return result;
613
+ return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
614
+ }
615
+ }, {
616
+ key: "addResource",
617
+ value: function addResource(lng, ns, key, value) {
618
+ var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
619
+ silent: false
620
+ };
621
+ var keySeparator = this.options.keySeparator;
622
+ if (keySeparator === undefined) keySeparator = '.';
623
+ var path = [lng, ns];
624
+ if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
625
+
626
+ if (lng.indexOf('.') > -1) {
627
+ path = lng.split('.');
628
+ value = ns;
629
+ ns = path[1];
630
+ }
631
+
632
+ this.addNamespaces(ns);
633
+ setPath(this.data, path, value);
634
+ if (!options.silent) this.emit('added', lng, ns, key, value);
635
+ }
636
+ }, {
637
+ key: "addResources",
638
+ value: function addResources(lng, ns, resources) {
639
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {
640
+ silent: false
641
+ };
642
+
643
+ for (var m in resources) {
644
+ if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {
645
+ silent: true
646
+ });
647
+ }
648
+
649
+ if (!options.silent) this.emit('added', lng, ns, resources);
650
+ }
651
+ }, {
652
+ key: "addResourceBundle",
653
+ value: function addResourceBundle(lng, ns, resources, deep, overwrite) {
654
+ var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
655
+ silent: false
656
+ };
657
+ var path = [lng, ns];
658
+
659
+ if (lng.indexOf('.') > -1) {
660
+ path = lng.split('.');
661
+ deep = resources;
662
+ resources = ns;
663
+ ns = path[1];
664
+ }
665
+
666
+ this.addNamespaces(ns);
667
+ var pack = getPath(this.data, path) || {};
668
+
669
+ if (deep) {
670
+ deepExtend(pack, resources, overwrite);
671
+ } else {
672
+ pack = _objectSpread({}, pack, resources);
673
+ }
674
+
675
+ setPath(this.data, path, pack);
676
+ if (!options.silent) this.emit('added', lng, ns, resources);
677
+ }
678
+ }, {
679
+ key: "removeResourceBundle",
680
+ value: function removeResourceBundle(lng, ns) {
681
+ if (this.hasResourceBundle(lng, ns)) {
682
+ delete this.data[lng][ns];
683
+ }
684
+
685
+ this.removeNamespaces(ns);
686
+ this.emit('removed', lng, ns);
687
+ }
688
+ }, {
689
+ key: "hasResourceBundle",
690
+ value: function hasResourceBundle(lng, ns) {
691
+ return this.getResource(lng, ns) !== undefined;
692
+ }
693
+ }, {
694
+ key: "getResourceBundle",
695
+ value: function getResourceBundle(lng, ns) {
696
+ if (!ns) ns = this.options.defaultNS;
697
+ if (this.options.compatibilityAPI === 'v1') return _objectSpread({}, {}, this.getResource(lng, ns));
698
+ return this.getResource(lng, ns);
699
+ }
700
+ }, {
701
+ key: "getDataByLanguage",
702
+ value: function getDataByLanguage(lng) {
703
+ return this.data[lng];
704
+ }
705
+ }, {
706
+ key: "toJSON",
707
+ value: function toJSON() {
708
+ return this.data;
709
+ }
710
+ }]);
711
+
712
+ return ResourceStore;
713
+ }(EventEmitter);
714
+
715
+ var postProcessor = {
716
+ processors: {},
717
+ addPostProcessor: function addPostProcessor(module) {
718
+ this.processors[module.name] = module;
719
+ },
720
+ handle: function handle(processors, value, key, options, translator) {
721
+ var _this = this;
722
+
723
+ processors.forEach(function (processor) {
724
+ if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);
725
+ });
726
+ return value;
727
+ }
728
+ };
729
+
730
+ var checkedLoadedFor = {};
731
+
732
+ var Translator = function (_EventEmitter) {
733
+ _inherits(Translator, _EventEmitter);
734
+
735
+ function Translator(services) {
736
+ var _this;
737
+
738
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
739
+
740
+ _classCallCheck(this, Translator);
741
+
742
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));
743
+
744
+ if (isIE10) {
745
+ EventEmitter.call(_assertThisInitialized(_this));
746
+ }
747
+
748
+ copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized(_this));
749
+ _this.options = options;
750
+
751
+ if (_this.options.keySeparator === undefined) {
752
+ _this.options.keySeparator = '.';
753
+ }
754
+
755
+ _this.logger = baseLogger.create('translator');
756
+ return _this;
757
+ }
758
+
759
+ _createClass(Translator, [{
760
+ key: "changeLanguage",
761
+ value: function changeLanguage(lng) {
762
+ if (lng) this.language = lng;
763
+ }
764
+ }, {
765
+ key: "exists",
766
+ value: function exists(key) {
767
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
768
+ interpolation: {}
769
+ };
770
+
771
+ if (key === undefined || key === null) {
772
+ return false;
773
+ }
774
+
775
+ var resolved = this.resolve(key, options);
776
+ return resolved && resolved.res !== undefined;
777
+ }
778
+ }, {
779
+ key: "extractFromKey",
780
+ value: function extractFromKey(key, options) {
781
+ var nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;
782
+ if (nsSeparator === undefined) nsSeparator = ':';
783
+ var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
784
+ var namespaces = options.ns || this.options.defaultNS;
785
+
786
+ if (nsSeparator && key.indexOf(nsSeparator) > -1) {
787
+ var m = key.match(this.interpolator.nestingRegexp);
788
+
789
+ if (m && m.length > 0) {
790
+ return {
791
+ key: key,
792
+ namespaces: namespaces
793
+ };
794
+ }
795
+
796
+ var parts = key.split(nsSeparator);
797
+ if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();
798
+ key = parts.join(keySeparator);
799
+ }
800
+
801
+ if (typeof namespaces === 'string') namespaces = [namespaces];
802
+ return {
803
+ key: key,
804
+ namespaces: namespaces
805
+ };
806
+ }
807
+ }, {
808
+ key: "translate",
809
+ value: function translate(keys, options, lastKey) {
810
+ var _this2 = this;
811
+
812
+ if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
813
+ options = this.options.overloadTranslationOptionHandler(arguments);
814
+ }
815
+
816
+ if (!options) options = {};
817
+ if (keys === undefined || keys === null) return '';
818
+ if (!Array.isArray(keys)) keys = [String(keys)];
819
+ var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
820
+
821
+ var _this$extractFromKey = this.extractFromKey(keys[keys.length - 1], options),
822
+ key = _this$extractFromKey.key,
823
+ namespaces = _this$extractFromKey.namespaces;
824
+
825
+ var namespace = namespaces[namespaces.length - 1];
826
+ var lng = options.lng || this.language;
827
+ var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
828
+
829
+ if (lng && lng.toLowerCase() === 'cimode') {
830
+ if (appendNamespaceToCIMode) {
831
+ var nsSeparator = options.nsSeparator || this.options.nsSeparator;
832
+ return namespace + nsSeparator + key;
833
+ }
834
+
835
+ return key;
836
+ }
837
+
838
+ var resolved = this.resolve(keys, options);
839
+ var res = resolved && resolved.res;
840
+ var resUsedKey = resolved && resolved.usedKey || key;
841
+ var resExactUsedKey = resolved && resolved.exactUsedKey || key;
842
+ var resType = Object.prototype.toString.apply(res);
843
+ var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
844
+ var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;
845
+ var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
846
+ var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';
847
+
848
+ if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {
849
+ if (!options.returnObjects && !this.options.returnObjects) {
850
+ if (!this.options.returnedObjectHandler) {
851
+ this.logger.warn('accessing an object - but returnObjects options is not enabled!');
852
+ }
853
+
854
+ return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, _objectSpread({}, options, {
855
+ ns: namespaces
856
+ })) : "key '".concat(key, " (").concat(this.language, ")' returned an object instead of string.");
857
+ }
858
+
859
+ if (keySeparator) {
860
+ var resTypeIsArray = resType === '[object Array]';
861
+ var copy = resTypeIsArray ? [] : {};
862
+ var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
863
+
864
+ for (var m in res) {
865
+ if (Object.prototype.hasOwnProperty.call(res, m)) {
866
+ var deepKey = "".concat(newKeyToUse).concat(keySeparator).concat(m);
867
+ copy[m] = this.translate(deepKey, _objectSpread({}, options, {
868
+ joinArrays: false,
869
+ ns: namespaces
870
+ }));
871
+ if (copy[m] === deepKey) copy[m] = res[m];
872
+ }
873
+ }
874
+
875
+ res = copy;
876
+ }
877
+ } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {
878
+ res = res.join(joinArrays);
879
+ if (res) res = this.extendTranslation(res, keys, options, lastKey);
880
+ } else {
881
+ var usedDefault = false;
882
+ var usedKey = false;
883
+ var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
884
+ var hasDefaultValue = Translator.hasDefaultValue(options);
885
+ var defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count) : '';
886
+ var defaultValue = options["defaultValue".concat(defaultValueSuffix)] || options.defaultValue;
887
+
888
+ if (!this.isValidLookup(res) && hasDefaultValue) {
889
+ usedDefault = true;
890
+ res = defaultValue;
891
+ }
892
+
893
+ if (!this.isValidLookup(res)) {
894
+ usedKey = true;
895
+ res = key;
896
+ }
897
+
898
+ var missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
899
+ var resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
900
+ var updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
901
+
902
+ if (usedKey || usedDefault || updateMissing) {
903
+ this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
904
+
905
+ if (keySeparator) {
906
+ var fk = this.resolve(key, _objectSpread({}, options, {
907
+ keySeparator: false
908
+ }));
909
+ if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
910
+ }
911
+
912
+ var lngs = [];
913
+ var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);
914
+
915
+ if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
916
+ for (var i = 0; i < fallbackLngs.length; i++) {
917
+ lngs.push(fallbackLngs[i]);
918
+ }
919
+ } else if (this.options.saveMissingTo === 'all') {
920
+ lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);
921
+ } else {
922
+ lngs.push(options.lng || this.language);
923
+ }
924
+
925
+ var send = function send(l, k, fallbackValue) {
926
+ if (_this2.options.missingKeyHandler) {
927
+ _this2.options.missingKeyHandler(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);
928
+ } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {
929
+ _this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? fallbackValue : resForMissing, updateMissing, options);
930
+ }
931
+
932
+ _this2.emit('missingKey', l, namespace, k, res);
933
+ };
934
+
935
+ if (this.options.saveMissing) {
936
+ if (this.options.saveMissingPlurals && needsPluralHandling) {
937
+ lngs.forEach(function (language) {
938
+ _this2.pluralResolver.getSuffixes(language).forEach(function (suffix) {
939
+ send([language], key + suffix, options["defaultValue".concat(suffix)] || defaultValue);
940
+ });
941
+ });
942
+ } else {
943
+ send(lngs, key, defaultValue);
944
+ }
945
+ }
946
+ }
947
+
948
+ res = this.extendTranslation(res, keys, options, resolved, lastKey);
949
+ if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = "".concat(namespace, ":").concat(key);
950
+ if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);
951
+ }
952
+
953
+ return res;
954
+ }
955
+ }, {
956
+ key: "extendTranslation",
957
+ value: function extendTranslation(res, key, options, resolved, lastKey) {
958
+ var _this3 = this;
959
+
960
+ if (this.i18nFormat && this.i18nFormat.parse) {
961
+ res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {
962
+ resolved: resolved
963
+ });
964
+ } else if (!options.skipInterpolation) {
965
+ if (options.interpolation) this.interpolator.init(_objectSpread({}, options, {
966
+ interpolation: _objectSpread({}, this.options.interpolation, options.interpolation)
967
+ }));
968
+ var skipOnVariables = options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
969
+ var nestBef;
970
+
971
+ if (skipOnVariables) {
972
+ var nb = res.match(this.interpolator.nestingRegexp);
973
+ nestBef = nb && nb.length;
974
+ }
975
+
976
+ var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;
977
+ if (this.options.interpolation.defaultVariables) data = _objectSpread({}, this.options.interpolation.defaultVariables, data);
978
+ res = this.interpolator.interpolate(res, data, options.lng || this.language, options);
979
+
980
+ if (skipOnVariables) {
981
+ var na = res.match(this.interpolator.nestingRegexp);
982
+ var nestAft = na && na.length;
983
+ if (nestBef < nestAft) options.nest = false;
984
+ }
985
+
986
+ if (options.nest !== false) res = this.interpolator.nest(res, function () {
987
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
988
+ args[_key] = arguments[_key];
989
+ }
990
+
991
+ if (lastKey && lastKey[0] === args[0] && !options.context) {
992
+ _this3.logger.warn("It seems you are nesting recursively key: ".concat(args[0], " in key: ").concat(key[0]));
993
+
994
+ return null;
995
+ }
996
+
997
+ return _this3.translate.apply(_this3, args.concat([key]));
998
+ }, options);
999
+ if (options.interpolation) this.interpolator.reset();
1000
+ }
1001
+
1002
+ var postProcess = options.postProcess || this.options.postProcess;
1003
+ var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;
1004
+
1005
+ if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
1006
+ res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? _objectSpread({
1007
+ i18nResolved: resolved
1008
+ }, options) : options, this);
1009
+ }
1010
+
1011
+ return res;
1012
+ }
1013
+ }, {
1014
+ key: "resolve",
1015
+ value: function resolve(keys) {
1016
+ var _this4 = this;
1017
+
1018
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1019
+ var found;
1020
+ var usedKey;
1021
+ var exactUsedKey;
1022
+ var usedLng;
1023
+ var usedNS;
1024
+ if (typeof keys === 'string') keys = [keys];
1025
+ keys.forEach(function (k) {
1026
+ if (_this4.isValidLookup(found)) return;
1027
+
1028
+ var extracted = _this4.extractFromKey(k, options);
1029
+
1030
+ var key = extracted.key;
1031
+ usedKey = key;
1032
+ var namespaces = extracted.namespaces;
1033
+ if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);
1034
+ var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';
1035
+ var needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';
1036
+ var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);
1037
+ namespaces.forEach(function (ns) {
1038
+ if (_this4.isValidLookup(found)) return;
1039
+ usedNS = ns;
1040
+
1041
+ if (!checkedLoadedFor["".concat(codes[0], "-").concat(ns)] && _this4.utils && _this4.utils.hasLoadedNamespace && !_this4.utils.hasLoadedNamespace(usedNS)) {
1042
+ checkedLoadedFor["".concat(codes[0], "-").concat(ns)] = true;
1043
+
1044
+ _this4.logger.warn("key \"".concat(usedKey, "\" for languages \"").concat(codes.join(', '), "\" won't get resolved as namespace \"").concat(usedNS, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1045
+ }
1046
+
1047
+ codes.forEach(function (code) {
1048
+ if (_this4.isValidLookup(found)) return;
1049
+ usedLng = code;
1050
+ var finalKey = key;
1051
+ var finalKeys = [finalKey];
1052
+
1053
+ if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {
1054
+ _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
1055
+ } else {
1056
+ var pluralSuffix;
1057
+ if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);
1058
+ if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);
1059
+ if (needsContextHandling) finalKeys.push(finalKey += "".concat(_this4.options.contextSeparator).concat(options.context));
1060
+ if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);
1061
+ }
1062
+
1063
+ var possibleKey;
1064
+
1065
+ while (possibleKey = finalKeys.pop()) {
1066
+ if (!_this4.isValidLookup(found)) {
1067
+ exactUsedKey = possibleKey;
1068
+ found = _this4.getResource(code, ns, possibleKey, options);
1069
+ }
1070
+ }
1071
+ });
1072
+ });
1073
+ });
1074
+ return {
1075
+ res: found,
1076
+ usedKey: usedKey,
1077
+ exactUsedKey: exactUsedKey,
1078
+ usedLng: usedLng,
1079
+ usedNS: usedNS
1080
+ };
1081
+ }
1082
+ }, {
1083
+ key: "isValidLookup",
1084
+ value: function isValidLookup(res) {
1085
+ return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
1086
+ }
1087
+ }, {
1088
+ key: "getResource",
1089
+ value: function getResource(code, ns, key) {
1090
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1091
+ if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
1092
+ return this.resourceStore.getResource(code, ns, key, options);
1093
+ }
1094
+ }], [{
1095
+ key: "hasDefaultValue",
1096
+ value: function hasDefaultValue(options) {
1097
+ var prefix = 'defaultValue';
1098
+
1099
+ for (var option in options) {
1100
+ if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {
1101
+ return true;
1102
+ }
1103
+ }
1104
+
1105
+ return false;
1106
+ }
1107
+ }]);
1108
+
1109
+ return Translator;
1110
+ }(EventEmitter);
1111
+
1112
+ function capitalize(string) {
1113
+ return string.charAt(0).toUpperCase() + string.slice(1);
1114
+ }
1115
+
1116
+ var LanguageUtil = function () {
1117
+ function LanguageUtil(options) {
1118
+ _classCallCheck(this, LanguageUtil);
1119
+
1120
+ this.options = options;
1121
+ this.whitelist = this.options.supportedLngs || false;
1122
+ this.supportedLngs = this.options.supportedLngs || false;
1123
+ this.logger = baseLogger.create('languageUtils');
1124
+ }
1125
+
1126
+ _createClass(LanguageUtil, [{
1127
+ key: "getScriptPartFromCode",
1128
+ value: function getScriptPartFromCode(code) {
1129
+ if (!code || code.indexOf('-') < 0) return null;
1130
+ var p = code.split('-');
1131
+ if (p.length === 2) return null;
1132
+ p.pop();
1133
+ if (p[p.length - 1].toLowerCase() === 'x') return null;
1134
+ return this.formatLanguageCode(p.join('-'));
1135
+ }
1136
+ }, {
1137
+ key: "getLanguagePartFromCode",
1138
+ value: function getLanguagePartFromCode(code) {
1139
+ if (!code || code.indexOf('-') < 0) return code;
1140
+ var p = code.split('-');
1141
+ return this.formatLanguageCode(p[0]);
1142
+ }
1143
+ }, {
1144
+ key: "formatLanguageCode",
1145
+ value: function formatLanguageCode(code) {
1146
+ if (typeof code === 'string' && code.indexOf('-') > -1) {
1147
+ var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];
1148
+ var p = code.split('-');
1149
+
1150
+ if (this.options.lowerCaseLng) {
1151
+ p = p.map(function (part) {
1152
+ return part.toLowerCase();
1153
+ });
1154
+ } else if (p.length === 2) {
1155
+ p[0] = p[0].toLowerCase();
1156
+ p[1] = p[1].toUpperCase();
1157
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1158
+ } else if (p.length === 3) {
1159
+ p[0] = p[0].toLowerCase();
1160
+ if (p[1].length === 2) p[1] = p[1].toUpperCase();
1161
+ if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();
1162
+ if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
1163
+ if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
1164
+ }
1165
+
1166
+ return p.join('-');
1167
+ }
1168
+
1169
+ return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
1170
+ }
1171
+ }, {
1172
+ key: "isWhitelisted",
1173
+ value: function isWhitelisted(code) {
1174
+ this.logger.deprecate('languageUtils.isWhitelisted', 'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.');
1175
+ return this.isSupportedCode(code);
1176
+ }
1177
+ }, {
1178
+ key: "isSupportedCode",
1179
+ value: function isSupportedCode(code) {
1180
+ if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
1181
+ code = this.getLanguagePartFromCode(code);
1182
+ }
1183
+
1184
+ return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;
1185
+ }
1186
+ }, {
1187
+ key: "getBestMatchFromCodes",
1188
+ value: function getBestMatchFromCodes(codes) {
1189
+ var _this = this;
1190
+
1191
+ if (!codes) return null;
1192
+ var found;
1193
+ codes.forEach(function (code) {
1194
+ if (found) return;
1195
+
1196
+ var cleanedLng = _this.formatLanguageCode(code);
1197
+
1198
+ if (!_this.options.supportedLngs || _this.isSupportedCode(cleanedLng)) found = cleanedLng;
1199
+ });
1200
+
1201
+ if (!found && this.options.supportedLngs) {
1202
+ codes.forEach(function (code) {
1203
+ if (found) return;
1204
+
1205
+ var lngOnly = _this.getLanguagePartFromCode(code);
1206
+
1207
+ if (_this.isSupportedCode(lngOnly)) return found = lngOnly;
1208
+ found = _this.options.supportedLngs.find(function (supportedLng) {
1209
+ if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;
1210
+ });
1211
+ });
1212
+ }
1213
+
1214
+ if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
1215
+ return found;
1216
+ }
1217
+ }, {
1218
+ key: "getFallbackCodes",
1219
+ value: function getFallbackCodes(fallbacks, code) {
1220
+ if (!fallbacks) return [];
1221
+ if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
1222
+ if (typeof fallbacks === 'string') fallbacks = [fallbacks];
1223
+ if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;
1224
+ if (!code) return fallbacks["default"] || [];
1225
+ var found = fallbacks[code];
1226
+ if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
1227
+ if (!found) found = fallbacks[this.formatLanguageCode(code)];
1228
+ if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
1229
+ if (!found) found = fallbacks["default"];
1230
+ return found || [];
1231
+ }
1232
+ }, {
1233
+ key: "toResolveHierarchy",
1234
+ value: function toResolveHierarchy(code, fallbackCode) {
1235
+ var _this2 = this;
1236
+
1237
+ var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);
1238
+ var codes = [];
1239
+
1240
+ var addCode = function addCode(c) {
1241
+ if (!c) return;
1242
+
1243
+ if (_this2.isSupportedCode(c)) {
1244
+ codes.push(c);
1245
+ } else {
1246
+ _this2.logger.warn("rejecting language code not found in supportedLngs: ".concat(c));
1247
+ }
1248
+ };
1249
+
1250
+ if (typeof code === 'string' && code.indexOf('-') > -1) {
1251
+ if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
1252
+ if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
1253
+ if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
1254
+ } else if (typeof code === 'string') {
1255
+ addCode(this.formatLanguageCode(code));
1256
+ }
1257
+
1258
+ fallbackCodes.forEach(function (fc) {
1259
+ if (codes.indexOf(fc) < 0) addCode(_this2.formatLanguageCode(fc));
1260
+ });
1261
+ return codes;
1262
+ }
1263
+ }]);
1264
+
1265
+ return LanguageUtil;
1266
+ }();
1267
+
1268
+ var sets = [{
1269
+ lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],
1270
+ nr: [1, 2],
1271
+ fc: 1
1272
+ }, {
1273
+ lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],
1274
+ nr: [1, 2],
1275
+ fc: 2
1276
+ }, {
1277
+ lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],
1278
+ nr: [1],
1279
+ fc: 3
1280
+ }, {
1281
+ lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],
1282
+ nr: [1, 2, 5],
1283
+ fc: 4
1284
+ }, {
1285
+ lngs: ['ar'],
1286
+ nr: [0, 1, 2, 3, 11, 100],
1287
+ fc: 5
1288
+ }, {
1289
+ lngs: ['cs', 'sk'],
1290
+ nr: [1, 2, 5],
1291
+ fc: 6
1292
+ }, {
1293
+ lngs: ['csb', 'pl'],
1294
+ nr: [1, 2, 5],
1295
+ fc: 7
1296
+ }, {
1297
+ lngs: ['cy'],
1298
+ nr: [1, 2, 3, 8],
1299
+ fc: 8
1300
+ }, {
1301
+ lngs: ['fr'],
1302
+ nr: [1, 2],
1303
+ fc: 9
1304
+ }, {
1305
+ lngs: ['ga'],
1306
+ nr: [1, 2, 3, 7, 11],
1307
+ fc: 10
1308
+ }, {
1309
+ lngs: ['gd'],
1310
+ nr: [1, 2, 3, 20],
1311
+ fc: 11
1312
+ }, {
1313
+ lngs: ['is'],
1314
+ nr: [1, 2],
1315
+ fc: 12
1316
+ }, {
1317
+ lngs: ['jv'],
1318
+ nr: [0, 1],
1319
+ fc: 13
1320
+ }, {
1321
+ lngs: ['kw'],
1322
+ nr: [1, 2, 3, 4],
1323
+ fc: 14
1324
+ }, {
1325
+ lngs: ['lt'],
1326
+ nr: [1, 2, 10],
1327
+ fc: 15
1328
+ }, {
1329
+ lngs: ['lv'],
1330
+ nr: [1, 2, 0],
1331
+ fc: 16
1332
+ }, {
1333
+ lngs: ['mk'],
1334
+ nr: [1, 2],
1335
+ fc: 17
1336
+ }, {
1337
+ lngs: ['mnk'],
1338
+ nr: [0, 1, 2],
1339
+ fc: 18
1340
+ }, {
1341
+ lngs: ['mt'],
1342
+ nr: [1, 2, 11, 20],
1343
+ fc: 19
1344
+ }, {
1345
+ lngs: ['or'],
1346
+ nr: [2, 1],
1347
+ fc: 2
1348
+ }, {
1349
+ lngs: ['ro'],
1350
+ nr: [1, 2, 20],
1351
+ fc: 20
1352
+ }, {
1353
+ lngs: ['sl'],
1354
+ nr: [5, 1, 2, 3],
1355
+ fc: 21
1356
+ }, {
1357
+ lngs: ['he', 'iw'],
1358
+ nr: [1, 2, 20, 21],
1359
+ fc: 22
1360
+ }];
1361
+ var _rulesPluralsTypes = {
1362
+ 1: function _(n) {
1363
+ return Number(n > 1);
1364
+ },
1365
+ 2: function _(n) {
1366
+ return Number(n != 1);
1367
+ },
1368
+ 3: function _(n) {
1369
+ return 0;
1370
+ },
1371
+ 4: function _(n) {
1372
+ return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1373
+ },
1374
+ 5: function _(n) {
1375
+ return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);
1376
+ },
1377
+ 6: function _(n) {
1378
+ return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);
1379
+ },
1380
+ 7: function _(n) {
1381
+ return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1382
+ },
1383
+ 8: function _(n) {
1384
+ return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);
1385
+ },
1386
+ 9: function _(n) {
1387
+ return Number(n >= 2);
1388
+ },
1389
+ 10: function _(n) {
1390
+ return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);
1391
+ },
1392
+ 11: function _(n) {
1393
+ return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);
1394
+ },
1395
+ 12: function _(n) {
1396
+ return Number(n % 10 != 1 || n % 100 == 11);
1397
+ },
1398
+ 13: function _(n) {
1399
+ return Number(n !== 0);
1400
+ },
1401
+ 14: function _(n) {
1402
+ return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);
1403
+ },
1404
+ 15: function _(n) {
1405
+ return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);
1406
+ },
1407
+ 16: function _(n) {
1408
+ return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);
1409
+ },
1410
+ 17: function _(n) {
1411
+ return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);
1412
+ },
1413
+ 18: function _(n) {
1414
+ return Number(n == 0 ? 0 : n == 1 ? 1 : 2);
1415
+ },
1416
+ 19: function _(n) {
1417
+ return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);
1418
+ },
1419
+ 20: function _(n) {
1420
+ return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);
1421
+ },
1422
+ 21: function _(n) {
1423
+ return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);
1424
+ },
1425
+ 22: function _(n) {
1426
+ return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);
1427
+ }
1428
+ };
1429
+
1430
+ function createRules() {
1431
+ var rules = {};
1432
+ sets.forEach(function (set) {
1433
+ set.lngs.forEach(function (l) {
1434
+ rules[l] = {
1435
+ numbers: set.nr,
1436
+ plurals: _rulesPluralsTypes[set.fc]
1437
+ };
1438
+ });
1439
+ });
1440
+ return rules;
1441
+ }
1442
+
1443
+ var PluralResolver = function () {
1444
+ function PluralResolver(languageUtils) {
1445
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1446
+
1447
+ _classCallCheck(this, PluralResolver);
1448
+
1449
+ this.languageUtils = languageUtils;
1450
+ this.options = options;
1451
+ this.logger = baseLogger.create('pluralResolver');
1452
+ this.rules = createRules();
1453
+ }
1454
+
1455
+ _createClass(PluralResolver, [{
1456
+ key: "addRule",
1457
+ value: function addRule(lng, obj) {
1458
+ this.rules[lng] = obj;
1459
+ }
1460
+ }, {
1461
+ key: "getRule",
1462
+ value: function getRule(code) {
1463
+ return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];
1464
+ }
1465
+ }, {
1466
+ key: "needsPlural",
1467
+ value: function needsPlural(code) {
1468
+ var rule = this.getRule(code);
1469
+ return rule && rule.numbers.length > 1;
1470
+ }
1471
+ }, {
1472
+ key: "getPluralFormsOfKey",
1473
+ value: function getPluralFormsOfKey(code, key) {
1474
+ return this.getSuffixes(code).map(function (suffix) {
1475
+ return key + suffix;
1476
+ });
1477
+ }
1478
+ }, {
1479
+ key: "getSuffixes",
1480
+ value: function getSuffixes(code) {
1481
+ var _this = this;
1482
+
1483
+ var rule = this.getRule(code);
1484
+
1485
+ if (!rule) {
1486
+ return [];
1487
+ }
1488
+
1489
+ return rule.numbers.map(function (number) {
1490
+ return _this.getSuffix(code, number);
1491
+ });
1492
+ }
1493
+ }, {
1494
+ key: "getSuffix",
1495
+ value: function getSuffix(code, count) {
1496
+ var _this2 = this;
1497
+
1498
+ var rule = this.getRule(code);
1499
+
1500
+ if (rule) {
1501
+ var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
1502
+ var suffix = rule.numbers[idx];
1503
+
1504
+ if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
1505
+ if (suffix === 2) {
1506
+ suffix = 'plural';
1507
+ } else if (suffix === 1) {
1508
+ suffix = '';
1509
+ }
1510
+ }
1511
+
1512
+ var returnSuffix = function returnSuffix() {
1513
+ return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();
1514
+ };
1515
+
1516
+ if (this.options.compatibilityJSON === 'v1') {
1517
+ if (suffix === 1) return '';
1518
+ if (typeof suffix === 'number') return "_plural_".concat(suffix.toString());
1519
+ return returnSuffix();
1520
+ } else if (this.options.compatibilityJSON === 'v2') {
1521
+ return returnSuffix();
1522
+ } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
1523
+ return returnSuffix();
1524
+ }
1525
+
1526
+ return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
1527
+ }
1528
+
1529
+ this.logger.warn("no plural rule found for: ".concat(code));
1530
+ return '';
1531
+ }
1532
+ }]);
1533
+
1534
+ return PluralResolver;
1535
+ }();
1536
+
1537
+ var Interpolator = function () {
1538
+ function Interpolator() {
1539
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1540
+
1541
+ _classCallCheck(this, Interpolator);
1542
+
1543
+ this.logger = baseLogger.create('interpolator');
1544
+ this.options = options;
1545
+
1546
+ this.format = options.interpolation && options.interpolation.format || function (value) {
1547
+ return value;
1548
+ };
1549
+
1550
+ this.init(options);
1551
+ }
1552
+
1553
+ _createClass(Interpolator, [{
1554
+ key: "init",
1555
+ value: function init() {
1556
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1557
+ if (!options.interpolation) options.interpolation = {
1558
+ escapeValue: true
1559
+ };
1560
+ var iOpts = options.interpolation;
1561
+ this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;
1562
+ this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;
1563
+ this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;
1564
+ this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';
1565
+ this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';
1566
+ this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';
1567
+ this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';
1568
+ this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';
1569
+ this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');
1570
+ this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');
1571
+ this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';
1572
+ this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;
1573
+ this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;
1574
+ this.resetRegExp();
1575
+ }
1576
+ }, {
1577
+ key: "reset",
1578
+ value: function reset() {
1579
+ if (this.options) this.init(this.options);
1580
+ }
1581
+ }, {
1582
+ key: "resetRegExp",
1583
+ value: function resetRegExp() {
1584
+ var regexpStr = "".concat(this.prefix, "(.+?)").concat(this.suffix);
1585
+ this.regexp = new RegExp(regexpStr, 'g');
1586
+ var regexpUnescapeStr = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
1587
+ this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');
1588
+ var nestingRegexpStr = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix);
1589
+ this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');
1590
+ }
1591
+ }, {
1592
+ key: "interpolate",
1593
+ value: function interpolate(str, data, lng, options) {
1594
+ var _this = this;
1595
+
1596
+ var match;
1597
+ var value;
1598
+ var replaces;
1599
+ var defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
1600
+
1601
+ function regexSafe(val) {
1602
+ return val.replace(/\$/g, '$$$$');
1603
+ }
1604
+
1605
+ var handleFormat = function handleFormat(key) {
1606
+ if (key.indexOf(_this.formatSeparator) < 0) {
1607
+ var path = getPathWithDefaults(data, defaultData, key);
1608
+ return _this.alwaysFormat ? _this.format(path, undefined, lng, _objectSpread({}, options, data, {
1609
+ interpolationkey: key
1610
+ })) : path;
1611
+ }
1612
+
1613
+ var p = key.split(_this.formatSeparator);
1614
+ var k = p.shift().trim();
1615
+ var f = p.join(_this.formatSeparator).trim();
1616
+ return _this.format(getPathWithDefaults(data, defaultData, k), f, lng, _objectSpread({}, options, data, {
1617
+ interpolationkey: k
1618
+ }));
1619
+ };
1620
+
1621
+ this.resetRegExp();
1622
+ var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
1623
+ var skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
1624
+ var todos = [{
1625
+ regex: this.regexpUnescape,
1626
+ safeValue: function safeValue(val) {
1627
+ return regexSafe(val);
1628
+ }
1629
+ }, {
1630
+ regex: this.regexp,
1631
+ safeValue: function safeValue(val) {
1632
+ return _this.escapeValue ? regexSafe(_this.escape(val)) : regexSafe(val);
1633
+ }
1634
+ }];
1635
+ todos.forEach(function (todo) {
1636
+ replaces = 0;
1637
+
1638
+ while (match = todo.regex.exec(str)) {
1639
+ value = handleFormat(match[1].trim());
1640
+
1641
+ if (value === undefined) {
1642
+ if (typeof missingInterpolationHandler === 'function') {
1643
+ var temp = missingInterpolationHandler(str, match, options);
1644
+ value = typeof temp === 'string' ? temp : '';
1645
+ } else if (skipOnVariables) {
1646
+ value = match[0];
1647
+ continue;
1648
+ } else {
1649
+ _this.logger.warn("missed to pass in variable ".concat(match[1], " for interpolating ").concat(str));
1650
+
1651
+ value = '';
1652
+ }
1653
+ } else if (typeof value !== 'string' && !_this.useRawValueToEscape) {
1654
+ value = makeString(value);
1655
+ }
1656
+
1657
+ var safeValue = todo.safeValue(value);
1658
+ str = str.replace(match[0], safeValue);
1659
+
1660
+ if (skipOnVariables) {
1661
+ todo.regex.lastIndex += safeValue.length;
1662
+ todo.regex.lastIndex -= match[0].length;
1663
+ } else {
1664
+ todo.regex.lastIndex = 0;
1665
+ }
1666
+
1667
+ replaces++;
1668
+
1669
+ if (replaces >= _this.maxReplaces) {
1670
+ break;
1671
+ }
1672
+ }
1673
+ });
1674
+ return str;
1675
+ }
1676
+ }, {
1677
+ key: "nest",
1678
+ value: function nest(str, fc) {
1679
+ var _this2 = this;
1680
+
1681
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1682
+ var match;
1683
+ var value;
1684
+
1685
+ var clonedOptions = _objectSpread({}, options);
1686
+
1687
+ clonedOptions.applyPostProcessor = false;
1688
+ delete clonedOptions.defaultValue;
1689
+
1690
+ function handleHasOptions(key, inheritedOptions) {
1691
+ var sep = this.nestingOptionsSeparator;
1692
+ if (key.indexOf(sep) < 0) return key;
1693
+ var c = key.split(new RegExp("".concat(sep, "[ ]*{")));
1694
+ var optionsString = "{".concat(c[1]);
1695
+ key = c[0];
1696
+ optionsString = this.interpolate(optionsString, clonedOptions);
1697
+ optionsString = optionsString.replace(/'/g, '"');
1698
+
1699
+ try {
1700
+ clonedOptions = JSON.parse(optionsString);
1701
+ if (inheritedOptions) clonedOptions = _objectSpread({}, inheritedOptions, clonedOptions);
1702
+ } catch (e) {
1703
+ this.logger.warn("failed parsing options string in nesting for key ".concat(key), e);
1704
+ return "".concat(key).concat(sep).concat(optionsString);
1705
+ }
1706
+
1707
+ delete clonedOptions.defaultValue;
1708
+ return key;
1709
+ }
1710
+
1711
+ while (match = this.nestingRegexp.exec(str)) {
1712
+ var formatters = [];
1713
+ var doReduce = false;
1714
+
1715
+ if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {
1716
+ var r = match[1].split(this.formatSeparator).map(function (elem) {
1717
+ return elem.trim();
1718
+ });
1719
+ match[1] = r.shift();
1720
+ formatters = r;
1721
+ doReduce = true;
1722
+ }
1723
+
1724
+ value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
1725
+ if (value && match[0] === str && typeof value !== 'string') return value;
1726
+ if (typeof value !== 'string') value = makeString(value);
1727
+
1728
+ if (!value) {
1729
+ this.logger.warn("missed to resolve ".concat(match[1], " for nesting ").concat(str));
1730
+ value = '';
1731
+ }
1732
+
1733
+ if (doReduce) {
1734
+ value = formatters.reduce(function (v, f) {
1735
+ return _this2.format(v, f, options.lng, _objectSpread({}, options, {
1736
+ interpolationkey: match[1].trim()
1737
+ }));
1738
+ }, value.trim());
1739
+ }
1740
+
1741
+ str = str.replace(match[0], value);
1742
+ this.regexp.lastIndex = 0;
1743
+ }
1744
+
1745
+ return str;
1746
+ }
1747
+ }]);
1748
+
1749
+ return Interpolator;
1750
+ }();
1751
+
1752
+ function remove(arr, what) {
1753
+ var found = arr.indexOf(what);
1754
+
1755
+ while (found !== -1) {
1756
+ arr.splice(found, 1);
1757
+ found = arr.indexOf(what);
1758
+ }
1759
+ }
1760
+
1761
+ var Connector = function (_EventEmitter) {
1762
+ _inherits(Connector, _EventEmitter);
1763
+
1764
+ function Connector(backend, store, services) {
1765
+ var _this;
1766
+
1767
+ var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1768
+
1769
+ _classCallCheck(this, Connector);
1770
+
1771
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));
1772
+
1773
+ if (isIE10) {
1774
+ EventEmitter.call(_assertThisInitialized(_this));
1775
+ }
1776
+
1777
+ _this.backend = backend;
1778
+ _this.store = store;
1779
+ _this.services = services;
1780
+ _this.languageUtils = services.languageUtils;
1781
+ _this.options = options;
1782
+ _this.logger = baseLogger.create('backendConnector');
1783
+ _this.state = {};
1784
+ _this.queue = [];
1785
+
1786
+ if (_this.backend && _this.backend.init) {
1787
+ _this.backend.init(services, options.backend, options);
1788
+ }
1789
+
1790
+ return _this;
1791
+ }
1792
+
1793
+ _createClass(Connector, [{
1794
+ key: "queueLoad",
1795
+ value: function queueLoad(languages, namespaces, options, callback) {
1796
+ var _this2 = this;
1797
+
1798
+ var toLoad = [];
1799
+ var pending = [];
1800
+ var toLoadLanguages = [];
1801
+ var toLoadNamespaces = [];
1802
+ languages.forEach(function (lng) {
1803
+ var hasAllNamespaces = true;
1804
+ namespaces.forEach(function (ns) {
1805
+ var name = "".concat(lng, "|").concat(ns);
1806
+
1807
+ if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {
1808
+ _this2.state[name] = 2;
1809
+ } else if (_this2.state[name] < 0) ; else if (_this2.state[name] === 1) {
1810
+ if (pending.indexOf(name) < 0) pending.push(name);
1811
+ } else {
1812
+ _this2.state[name] = 1;
1813
+ hasAllNamespaces = false;
1814
+ if (pending.indexOf(name) < 0) pending.push(name);
1815
+ if (toLoad.indexOf(name) < 0) toLoad.push(name);
1816
+ if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);
1817
+ }
1818
+ });
1819
+ if (!hasAllNamespaces) toLoadLanguages.push(lng);
1820
+ });
1821
+
1822
+ if (toLoad.length || pending.length) {
1823
+ this.queue.push({
1824
+ pending: pending,
1825
+ loaded: {},
1826
+ errors: [],
1827
+ callback: callback
1828
+ });
1829
+ }
1830
+
1831
+ return {
1832
+ toLoad: toLoad,
1833
+ pending: pending,
1834
+ toLoadLanguages: toLoadLanguages,
1835
+ toLoadNamespaces: toLoadNamespaces
1836
+ };
1837
+ }
1838
+ }, {
1839
+ key: "loaded",
1840
+ value: function loaded(name, err, data) {
1841
+ var s = name.split('|');
1842
+ var lng = s[0];
1843
+ var ns = s[1];
1844
+ if (err) this.emit('failedLoading', lng, ns, err);
1845
+
1846
+ if (data) {
1847
+ this.store.addResourceBundle(lng, ns, data);
1848
+ }
1849
+
1850
+ this.state[name] = err ? -1 : 2;
1851
+ var loaded = {};
1852
+ this.queue.forEach(function (q) {
1853
+ pushPath(q.loaded, [lng], ns);
1854
+ remove(q.pending, name);
1855
+ if (err) q.errors.push(err);
1856
+
1857
+ if (q.pending.length === 0 && !q.done) {
1858
+ Object.keys(q.loaded).forEach(function (l) {
1859
+ if (!loaded[l]) loaded[l] = [];
1860
+
1861
+ if (q.loaded[l].length) {
1862
+ q.loaded[l].forEach(function (ns) {
1863
+ if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);
1864
+ });
1865
+ }
1866
+ });
1867
+ q.done = true;
1868
+
1869
+ if (q.errors.length) {
1870
+ q.callback(q.errors);
1871
+ } else {
1872
+ q.callback();
1873
+ }
1874
+ }
1875
+ });
1876
+ this.emit('loaded', loaded);
1877
+ this.queue = this.queue.filter(function (q) {
1878
+ return !q.done;
1879
+ });
1880
+ }
1881
+ }, {
1882
+ key: "read",
1883
+ value: function read(lng, ns, fcName) {
1884
+ var _this3 = this;
1885
+
1886
+ var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
1887
+ var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 350;
1888
+ var callback = arguments.length > 5 ? arguments[5] : undefined;
1889
+ if (!lng.length) return callback(null, {});
1890
+ return this.backend[fcName](lng, ns, function (err, data) {
1891
+ if (err && data && tried < 5) {
1892
+ setTimeout(function () {
1893
+ _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
1894
+ }, wait);
1895
+ return;
1896
+ }
1897
+
1898
+ callback(err, data);
1899
+ });
1900
+ }
1901
+ }, {
1902
+ key: "prepareLoading",
1903
+ value: function prepareLoading(languages, namespaces) {
1904
+ var _this4 = this;
1905
+
1906
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1907
+ var callback = arguments.length > 3 ? arguments[3] : undefined;
1908
+
1909
+ if (!this.backend) {
1910
+ this.logger.warn('No backend was added via i18next.use. Will not load resources.');
1911
+ return callback && callback();
1912
+ }
1913
+
1914
+ if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);
1915
+ if (typeof namespaces === 'string') namespaces = [namespaces];
1916
+ var toLoad = this.queueLoad(languages, namespaces, options, callback);
1917
+
1918
+ if (!toLoad.toLoad.length) {
1919
+ if (!toLoad.pending.length) callback();
1920
+ return null;
1921
+ }
1922
+
1923
+ toLoad.toLoad.forEach(function (name) {
1924
+ _this4.loadOne(name);
1925
+ });
1926
+ }
1927
+ }, {
1928
+ key: "load",
1929
+ value: function load(languages, namespaces, callback) {
1930
+ this.prepareLoading(languages, namespaces, {}, callback);
1931
+ }
1932
+ }, {
1933
+ key: "reload",
1934
+ value: function reload(languages, namespaces, callback) {
1935
+ this.prepareLoading(languages, namespaces, {
1936
+ reload: true
1937
+ }, callback);
1938
+ }
1939
+ }, {
1940
+ key: "loadOne",
1941
+ value: function loadOne(name) {
1942
+ var _this5 = this;
1943
+
1944
+ var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
1945
+ var s = name.split('|');
1946
+ var lng = s[0];
1947
+ var ns = s[1];
1948
+ this.read(lng, ns, 'read', undefined, undefined, function (err, data) {
1949
+ if (err) _this5.logger.warn("".concat(prefix, "loading namespace ").concat(ns, " for language ").concat(lng, " failed"), err);
1950
+ if (!err && data) _this5.logger.log("".concat(prefix, "loaded namespace ").concat(ns, " for language ").concat(lng), data);
1951
+
1952
+ _this5.loaded(name, err, data);
1953
+ });
1954
+ }
1955
+ }, {
1956
+ key: "saveMissing",
1957
+ value: function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {
1958
+ var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
1959
+
1960
+ if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
1961
+ this.logger.warn("did not save key \"".concat(key, "\" as the namespace \"").concat(namespace, "\" was not yet loaded"), 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1962
+ return;
1963
+ }
1964
+
1965
+ if (key === undefined || key === null || key === '') return;
1966
+
1967
+ if (this.backend && this.backend.create) {
1968
+ this.backend.create(languages, namespace, key, fallbackValue, null, _objectSpread({}, options, {
1969
+ isUpdate: isUpdate
1970
+ }));
1971
+ }
1972
+
1973
+ if (!languages || !languages[0]) return;
1974
+ this.store.addResource(languages[0], namespace, key, fallbackValue);
1975
+ }
1976
+ }]);
1977
+
1978
+ return Connector;
1979
+ }(EventEmitter);
1980
+
1981
+ function get() {
1982
+ return {
1983
+ debug: false,
1984
+ initImmediate: true,
1985
+ ns: ['translation'],
1986
+ defaultNS: ['translation'],
1987
+ fallbackLng: ['dev'],
1988
+ fallbackNS: false,
1989
+ whitelist: false,
1990
+ nonExplicitWhitelist: false,
1991
+ supportedLngs: false,
1992
+ nonExplicitSupportedLngs: false,
1993
+ load: 'all',
1994
+ preload: false,
1995
+ simplifyPluralSuffix: true,
1996
+ keySeparator: '.',
1997
+ nsSeparator: ':',
1998
+ pluralSeparator: '_',
1999
+ contextSeparator: '_',
2000
+ partialBundledLanguages: false,
2001
+ saveMissing: false,
2002
+ updateMissing: false,
2003
+ saveMissingTo: 'fallback',
2004
+ saveMissingPlurals: true,
2005
+ missingKeyHandler: false,
2006
+ missingInterpolationHandler: false,
2007
+ postProcess: false,
2008
+ postProcessPassResolved: false,
2009
+ returnNull: true,
2010
+ returnEmptyString: true,
2011
+ returnObjects: false,
2012
+ joinArrays: false,
2013
+ returnedObjectHandler: false,
2014
+ parseMissingKeyHandler: false,
2015
+ appendNamespaceToMissingKey: false,
2016
+ appendNamespaceToCIMode: false,
2017
+ overloadTranslationOptionHandler: function handle(args) {
2018
+ var ret = {};
2019
+ if (_typeof(args[1]) === 'object') ret = args[1];
2020
+ if (typeof args[1] === 'string') ret.defaultValue = args[1];
2021
+ if (typeof args[2] === 'string') ret.tDescription = args[2];
2022
+
2023
+ if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
2024
+ var options = args[3] || args[2];
2025
+ Object.keys(options).forEach(function (key) {
2026
+ ret[key] = options[key];
2027
+ });
2028
+ }
2029
+
2030
+ return ret;
2031
+ },
2032
+ interpolation: {
2033
+ escapeValue: true,
2034
+ format: function format(value, _format, lng, options) {
2035
+ return value;
2036
+ },
2037
+ prefix: '{{',
2038
+ suffix: '}}',
2039
+ formatSeparator: ',',
2040
+ unescapePrefix: '-',
2041
+ nestingPrefix: '$t(',
2042
+ nestingSuffix: ')',
2043
+ nestingOptionsSeparator: ',',
2044
+ maxReplaces: 1000,
2045
+ skipOnVariables: false
2046
+ }
2047
+ };
2048
+ }
2049
+ function transformOptions(options) {
2050
+ if (typeof options.ns === 'string') options.ns = [options.ns];
2051
+ if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];
2052
+ if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];
2053
+
2054
+ if (options.whitelist) {
2055
+ if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {
2056
+ options.whitelist = options.whitelist.concat(['cimode']);
2057
+ }
2058
+
2059
+ options.supportedLngs = options.whitelist;
2060
+ }
2061
+
2062
+ if (options.nonExplicitWhitelist) {
2063
+ options.nonExplicitSupportedLngs = options.nonExplicitWhitelist;
2064
+ }
2065
+
2066
+ if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {
2067
+ options.supportedLngs = options.supportedLngs.concat(['cimode']);
2068
+ }
2069
+
2070
+ return options;
2071
+ }
2072
+
2073
+ function noop() {}
2074
+
2075
+ var I18n = function (_EventEmitter) {
2076
+ _inherits(I18n, _EventEmitter);
2077
+
2078
+ function I18n() {
2079
+ var _this;
2080
+
2081
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2082
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
2083
+
2084
+ _classCallCheck(this, I18n);
2085
+
2086
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));
2087
+
2088
+ if (isIE10) {
2089
+ EventEmitter.call(_assertThisInitialized(_this));
2090
+ }
2091
+
2092
+ _this.options = transformOptions(options);
2093
+ _this.services = {};
2094
+ _this.logger = baseLogger;
2095
+ _this.modules = {
2096
+ external: []
2097
+ };
2098
+
2099
+ if (callback && !_this.isInitialized && !options.isClone) {
2100
+ if (!_this.options.initImmediate) {
2101
+ _this.init(options, callback);
2102
+
2103
+ return _possibleConstructorReturn(_this, _assertThisInitialized(_this));
2104
+ }
2105
+
2106
+ setTimeout(function () {
2107
+ _this.init(options, callback);
2108
+ }, 0);
2109
+ }
2110
+
2111
+ return _this;
2112
+ }
2113
+
2114
+ _createClass(I18n, [{
2115
+ key: "init",
2116
+ value: function init() {
2117
+ var _this2 = this;
2118
+
2119
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2120
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
2121
+
2122
+ if (typeof options === 'function') {
2123
+ callback = options;
2124
+ options = {};
2125
+ }
2126
+
2127
+ if (options.whitelist && !options.supportedLngs) {
2128
+ this.logger.deprecate('whitelist', 'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.');
2129
+ }
2130
+
2131
+ if (options.nonExplicitWhitelist && !options.nonExplicitSupportedLngs) {
2132
+ this.logger.deprecate('whitelist', 'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.');
2133
+ }
2134
+
2135
+ this.options = _objectSpread({}, get(), this.options, transformOptions(options));
2136
+ this.format = this.options.interpolation.format;
2137
+ if (!callback) callback = noop;
2138
+
2139
+ function createClassOnDemand(ClassOrObject) {
2140
+ if (!ClassOrObject) return null;
2141
+ if (typeof ClassOrObject === 'function') return new ClassOrObject();
2142
+ return ClassOrObject;
2143
+ }
2144
+
2145
+ if (!this.options.isClone) {
2146
+ if (this.modules.logger) {
2147
+ baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
2148
+ } else {
2149
+ baseLogger.init(null, this.options);
2150
+ }
2151
+
2152
+ var lu = new LanguageUtil(this.options);
2153
+ this.store = new ResourceStore(this.options.resources, this.options);
2154
+ var s = this.services;
2155
+ s.logger = baseLogger;
2156
+ s.resourceStore = this.store;
2157
+ s.languageUtils = lu;
2158
+ s.pluralResolver = new PluralResolver(lu, {
2159
+ prepend: this.options.pluralSeparator,
2160
+ compatibilityJSON: this.options.compatibilityJSON,
2161
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
2162
+ });
2163
+ s.interpolator = new Interpolator(this.options);
2164
+ s.utils = {
2165
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
2166
+ };
2167
+ s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
2168
+ s.backendConnector.on('*', function (event) {
2169
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2170
+ args[_key - 1] = arguments[_key];
2171
+ }
2172
+
2173
+ _this2.emit.apply(_this2, [event].concat(args));
2174
+ });
2175
+
2176
+ if (this.modules.languageDetector) {
2177
+ s.languageDetector = createClassOnDemand(this.modules.languageDetector);
2178
+ s.languageDetector.init(s, this.options.detection, this.options);
2179
+ }
2180
+
2181
+ if (this.modules.i18nFormat) {
2182
+ s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
2183
+ if (s.i18nFormat.init) s.i18nFormat.init(this);
2184
+ }
2185
+
2186
+ this.translator = new Translator(this.services, this.options);
2187
+ this.translator.on('*', function (event) {
2188
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2189
+ args[_key2 - 1] = arguments[_key2];
2190
+ }
2191
+
2192
+ _this2.emit.apply(_this2, [event].concat(args));
2193
+ });
2194
+ this.modules.external.forEach(function (m) {
2195
+ if (m.init) m.init(_this2);
2196
+ });
2197
+ }
2198
+
2199
+ if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2200
+ var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2201
+ if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
2202
+ }
2203
+
2204
+ if (!this.services.languageDetector && !this.options.lng) {
2205
+ this.logger.warn('init: no languageDetector is used and no lng is defined');
2206
+ }
2207
+
2208
+ var storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
2209
+ storeApi.forEach(function (fcName) {
2210
+ _this2[fcName] = function () {
2211
+ var _this2$store;
2212
+
2213
+ return (_this2$store = _this2.store)[fcName].apply(_this2$store, arguments);
2214
+ };
2215
+ });
2216
+ var storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
2217
+ storeApiChained.forEach(function (fcName) {
2218
+ _this2[fcName] = function () {
2219
+ var _this2$store2;
2220
+
2221
+ (_this2$store2 = _this2.store)[fcName].apply(_this2$store2, arguments);
2222
+
2223
+ return _this2;
2224
+ };
2225
+ });
2226
+ var deferred = defer();
2227
+
2228
+ var load = function load() {
2229
+ var finish = function finish(err, t) {
2230
+ if (_this2.isInitialized && !_this2.initializedStoreOnce) _this2.logger.warn('init: i18next is already initialized. You should call init just once!');
2231
+ _this2.isInitialized = true;
2232
+ if (!_this2.options.isClone) _this2.logger.log('initialized', _this2.options);
2233
+
2234
+ _this2.emit('initialized', _this2.options);
2235
+
2236
+ deferred.resolve(t);
2237
+ callback(err, t);
2238
+ };
2239
+
2240
+ if (_this2.languages && _this2.options.compatibilityAPI !== 'v1' && !_this2.isInitialized) return finish(null, _this2.t.bind(_this2));
2241
+
2242
+ _this2.changeLanguage(_this2.options.lng, finish);
2243
+ };
2244
+
2245
+ if (this.options.resources || !this.options.initImmediate) {
2246
+ load();
2247
+ } else {
2248
+ setTimeout(load, 0);
2249
+ }
2250
+
2251
+ return deferred;
2252
+ }
2253
+ }, {
2254
+ key: "loadResources",
2255
+ value: function loadResources(language) {
2256
+ var _this3 = this;
2257
+
2258
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2259
+ var usedCallback = callback;
2260
+ var usedLng = typeof language === 'string' ? language : this.language;
2261
+ if (typeof language === 'function') usedCallback = language;
2262
+
2263
+ if (!this.options.resources || this.options.partialBundledLanguages) {
2264
+ if (usedLng && usedLng.toLowerCase() === 'cimode') return usedCallback();
2265
+ var toLoad = [];
2266
+
2267
+ var append = function append(lng) {
2268
+ if (!lng) return;
2269
+
2270
+ var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);
2271
+
2272
+ lngs.forEach(function (l) {
2273
+ if (toLoad.indexOf(l) < 0) toLoad.push(l);
2274
+ });
2275
+ };
2276
+
2277
+ if (!usedLng) {
2278
+ var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2279
+ fallbacks.forEach(function (l) {
2280
+ return append(l);
2281
+ });
2282
+ } else {
2283
+ append(usedLng);
2284
+ }
2285
+
2286
+ if (this.options.preload) {
2287
+ this.options.preload.forEach(function (l) {
2288
+ return append(l);
2289
+ });
2290
+ }
2291
+
2292
+ this.services.backendConnector.load(toLoad, this.options.ns, usedCallback);
2293
+ } else {
2294
+ usedCallback(null);
2295
+ }
2296
+ }
2297
+ }, {
2298
+ key: "reloadResources",
2299
+ value: function reloadResources(lngs, ns, callback) {
2300
+ var deferred = defer();
2301
+ if (!lngs) lngs = this.languages;
2302
+ if (!ns) ns = this.options.ns;
2303
+ if (!callback) callback = noop;
2304
+ this.services.backendConnector.reload(lngs, ns, function (err) {
2305
+ deferred.resolve();
2306
+ callback(err);
2307
+ });
2308
+ return deferred;
2309
+ }
2310
+ }, {
2311
+ key: "use",
2312
+ value: function use(module) {
2313
+ if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
2314
+ if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
2315
+
2316
+ if (module.type === 'backend') {
2317
+ this.modules.backend = module;
2318
+ }
2319
+
2320
+ if (module.type === 'logger' || module.log && module.warn && module.error) {
2321
+ this.modules.logger = module;
2322
+ }
2323
+
2324
+ if (module.type === 'languageDetector') {
2325
+ this.modules.languageDetector = module;
2326
+ }
2327
+
2328
+ if (module.type === 'i18nFormat') {
2329
+ this.modules.i18nFormat = module;
2330
+ }
2331
+
2332
+ if (module.type === 'postProcessor') {
2333
+ postProcessor.addPostProcessor(module);
2334
+ }
2335
+
2336
+ if (module.type === '3rdParty') {
2337
+ this.modules.external.push(module);
2338
+ }
2339
+
2340
+ return this;
2341
+ }
2342
+ }, {
2343
+ key: "changeLanguage",
2344
+ value: function changeLanguage(lng, callback) {
2345
+ var _this4 = this;
2346
+
2347
+ this.isLanguageChangingTo = lng;
2348
+ var deferred = defer();
2349
+ this.emit('languageChanging', lng);
2350
+
2351
+ var done = function done(err, l) {
2352
+ if (l) {
2353
+ _this4.language = l;
2354
+ _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
2355
+
2356
+ _this4.translator.changeLanguage(l);
2357
+
2358
+ _this4.isLanguageChangingTo = undefined;
2359
+
2360
+ _this4.emit('languageChanged', l);
2361
+
2362
+ _this4.logger.log('languageChanged', l);
2363
+ } else {
2364
+ _this4.isLanguageChangingTo = undefined;
2365
+ }
2366
+
2367
+ deferred.resolve(function () {
2368
+ return _this4.t.apply(_this4, arguments);
2369
+ });
2370
+ if (callback) callback(err, function () {
2371
+ return _this4.t.apply(_this4, arguments);
2372
+ });
2373
+ };
2374
+
2375
+ var setLng = function setLng(lngs) {
2376
+ if (!lng && !lngs && _this4.services.languageDetector) lngs = [];
2377
+ var l = typeof lngs === 'string' ? lngs : _this4.services.languageUtils.getBestMatchFromCodes(lngs);
2378
+
2379
+ if (l) {
2380
+ if (!_this4.language) {
2381
+ _this4.language = l;
2382
+ _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);
2383
+ }
2384
+
2385
+ if (!_this4.translator.language) _this4.translator.changeLanguage(l);
2386
+ if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);
2387
+ }
2388
+
2389
+ _this4.loadResources(l, function (err) {
2390
+ done(err, l);
2391
+ });
2392
+ };
2393
+
2394
+ if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
2395
+ setLng(this.services.languageDetector.detect());
2396
+ } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
2397
+ this.services.languageDetector.detect(setLng);
2398
+ } else {
2399
+ setLng(lng);
2400
+ }
2401
+
2402
+ return deferred;
2403
+ }
2404
+ }, {
2405
+ key: "getFixedT",
2406
+ value: function getFixedT(lng, ns, keyPrefix) {
2407
+ var _this5 = this;
2408
+
2409
+ var fixedT = function fixedT(key, opts) {
2410
+ var options;
2411
+
2412
+ if (_typeof(opts) !== 'object') {
2413
+ for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
2414
+ rest[_key3 - 2] = arguments[_key3];
2415
+ }
2416
+
2417
+ options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));
2418
+ } else {
2419
+ options = _objectSpread({}, opts);
2420
+ }
2421
+
2422
+ options.lng = options.lng || fixedT.lng;
2423
+ options.lngs = options.lngs || fixedT.lngs;
2424
+ options.ns = options.ns || fixedT.ns;
2425
+ var keySeparator = _this5.options.keySeparator || '.';
2426
+ var resultKey = keyPrefix ? "".concat(keyPrefix).concat(keySeparator).concat(key) : key;
2427
+ return _this5.t(resultKey, options);
2428
+ };
2429
+
2430
+ if (typeof lng === 'string') {
2431
+ fixedT.lng = lng;
2432
+ } else {
2433
+ fixedT.lngs = lng;
2434
+ }
2435
+
2436
+ fixedT.ns = ns;
2437
+ fixedT.keyPrefix = keyPrefix;
2438
+ return fixedT;
2439
+ }
2440
+ }, {
2441
+ key: "t",
2442
+ value: function t() {
2443
+ var _this$translator;
2444
+
2445
+ return this.translator && (_this$translator = this.translator).translate.apply(_this$translator, arguments);
2446
+ }
2447
+ }, {
2448
+ key: "exists",
2449
+ value: function exists() {
2450
+ var _this$translator2;
2451
+
2452
+ return this.translator && (_this$translator2 = this.translator).exists.apply(_this$translator2, arguments);
2453
+ }
2454
+ }, {
2455
+ key: "setDefaultNamespace",
2456
+ value: function setDefaultNamespace(ns) {
2457
+ this.options.defaultNS = ns;
2458
+ }
2459
+ }, {
2460
+ key: "hasLoadedNamespace",
2461
+ value: function hasLoadedNamespace(ns) {
2462
+ var _this6 = this;
2463
+
2464
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2465
+
2466
+ if (!this.isInitialized) {
2467
+ this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
2468
+ return false;
2469
+ }
2470
+
2471
+ if (!this.languages || !this.languages.length) {
2472
+ this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
2473
+ return false;
2474
+ }
2475
+
2476
+ var lng = this.languages[0];
2477
+ var fallbackLng = this.options ? this.options.fallbackLng : false;
2478
+ var lastLng = this.languages[this.languages.length - 1];
2479
+ if (lng.toLowerCase() === 'cimode') return true;
2480
+
2481
+ var loadNotPending = function loadNotPending(l, n) {
2482
+ var loadState = _this6.services.backendConnector.state["".concat(l, "|").concat(n)];
2483
+
2484
+ return loadState === -1 || loadState === 2;
2485
+ };
2486
+
2487
+ if (options.precheck) {
2488
+ var preResult = options.precheck(this, loadNotPending);
2489
+ if (preResult !== undefined) return preResult;
2490
+ }
2491
+
2492
+ if (this.hasResourceBundle(lng, ns)) return true;
2493
+ if (!this.services.backendConnector.backend) return true;
2494
+ if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
2495
+ return false;
2496
+ }
2497
+ }, {
2498
+ key: "loadNamespaces",
2499
+ value: function loadNamespaces(ns, callback) {
2500
+ var _this7 = this;
2501
+
2502
+ var deferred = defer();
2503
+
2504
+ if (!this.options.ns) {
2505
+ callback && callback();
2506
+ return Promise.resolve();
2507
+ }
2508
+
2509
+ if (typeof ns === 'string') ns = [ns];
2510
+ ns.forEach(function (n) {
2511
+ if (_this7.options.ns.indexOf(n) < 0) _this7.options.ns.push(n);
2512
+ });
2513
+ this.loadResources(function (err) {
2514
+ deferred.resolve();
2515
+ if (callback) callback(err);
2516
+ });
2517
+ return deferred;
2518
+ }
2519
+ }, {
2520
+ key: "loadLanguages",
2521
+ value: function loadLanguages(lngs, callback) {
2522
+ var deferred = defer();
2523
+ if (typeof lngs === 'string') lngs = [lngs];
2524
+ var preloaded = this.options.preload || [];
2525
+ var newLngs = lngs.filter(function (lng) {
2526
+ return preloaded.indexOf(lng) < 0;
2527
+ });
2528
+
2529
+ if (!newLngs.length) {
2530
+ if (callback) callback();
2531
+ return Promise.resolve();
2532
+ }
2533
+
2534
+ this.options.preload = preloaded.concat(newLngs);
2535
+ this.loadResources(function (err) {
2536
+ deferred.resolve();
2537
+ if (callback) callback(err);
2538
+ });
2539
+ return deferred;
2540
+ }
2541
+ }, {
2542
+ key: "dir",
2543
+ value: function dir(lng) {
2544
+ if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;
2545
+ if (!lng) return 'rtl';
2546
+ var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];
2547
+ return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';
2548
+ }
2549
+ }, {
2550
+ key: "createInstance",
2551
+ value: function createInstance() {
2552
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2553
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
2554
+ return new I18n(options, callback);
2555
+ }
2556
+ }, {
2557
+ key: "cloneInstance",
2558
+ value: function cloneInstance() {
2559
+ var _this8 = this;
2560
+
2561
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2562
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
2563
+
2564
+ var mergedOptions = _objectSpread({}, this.options, options, {
2565
+ isClone: true
2566
+ });
2567
+
2568
+ var clone = new I18n(mergedOptions);
2569
+ var membersToCopy = ['store', 'services', 'language'];
2570
+ membersToCopy.forEach(function (m) {
2571
+ clone[m] = _this8[m];
2572
+ });
2573
+ clone.services = _objectSpread({}, this.services);
2574
+ clone.services.utils = {
2575
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2576
+ };
2577
+ clone.translator = new Translator(clone.services, clone.options);
2578
+ clone.translator.on('*', function (event) {
2579
+ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
2580
+ args[_key4 - 1] = arguments[_key4];
2581
+ }
2582
+
2583
+ clone.emit.apply(clone, [event].concat(args));
2584
+ });
2585
+ clone.init(mergedOptions, callback);
2586
+ clone.translator.options = clone.options;
2587
+ clone.translator.backendConnector.services.utils = {
2588
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2589
+ };
2590
+ return clone;
2591
+ }
2592
+ }, {
2593
+ key: "toJSON",
2594
+ value: function toJSON() {
2595
+ return {
2596
+ options: this.options,
2597
+ store: this.store,
2598
+ language: this.language,
2599
+ languages: this.languages
2600
+ };
2601
+ }
2602
+ }]);
2603
+
2604
+ return I18n;
2605
+ }(EventEmitter);
2606
+
2607
+ var i18next = new I18n();
2608
+
2609
+ var arr = [];
2610
+ var each = arr.forEach;
2611
+ var slice = arr.slice;
2612
+ function defaults(obj) {
2613
+ each.call(slice.call(arguments, 1), function (source) {
2614
+ if (source) {
2615
+ for (var prop in source) {
2616
+ if (obj[prop] === undefined) obj[prop] = source[prop];
2617
+ }
2618
+ }
2619
+ });
2620
+ return obj;
2621
+ }
2622
+
2623
+ // eslint-disable-next-line no-control-regex
2624
+ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
2625
+
2626
+ var serializeCookie = function serializeCookie(name, val, options) {
2627
+ var opt = options || {};
2628
+ opt.path = opt.path || '/';
2629
+ var value = encodeURIComponent(val);
2630
+ var str = name + '=' + value;
2631
+
2632
+ if (opt.maxAge > 0) {
2633
+ var maxAge = opt.maxAge - 0;
2634
+ if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
2635
+ str += '; Max-Age=' + Math.floor(maxAge);
2636
+ }
2637
+
2638
+ if (opt.domain) {
2639
+ if (!fieldContentRegExp.test(opt.domain)) {
2640
+ throw new TypeError('option domain is invalid');
2641
+ }
2642
+
2643
+ str += '; Domain=' + opt.domain;
2644
+ }
2645
+
2646
+ if (opt.path) {
2647
+ if (!fieldContentRegExp.test(opt.path)) {
2648
+ throw new TypeError('option path is invalid');
2649
+ }
2650
+
2651
+ str += '; Path=' + opt.path;
2652
+ }
2653
+
2654
+ if (opt.expires) {
2655
+ if (typeof opt.expires.toUTCString !== 'function') {
2656
+ throw new TypeError('option expires is invalid');
2657
+ }
2658
+
2659
+ str += '; Expires=' + opt.expires.toUTCString();
2660
+ }
2661
+
2662
+ if (opt.httpOnly) str += '; HttpOnly';
2663
+ if (opt.secure) str += '; Secure';
2664
+
2665
+ if (opt.sameSite) {
2666
+ var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;
2667
+
2668
+ switch (sameSite) {
2669
+ case true:
2670
+ str += '; SameSite=Strict';
2671
+ break;
2672
+
2673
+ case 'lax':
2674
+ str += '; SameSite=Lax';
2675
+ break;
2676
+
2677
+ case 'strict':
2678
+ str += '; SameSite=Strict';
2679
+ break;
2680
+
2681
+ case 'none':
2682
+ str += '; SameSite=None';
2683
+ break;
2684
+
2685
+ default:
2686
+ throw new TypeError('option sameSite is invalid');
2687
+ }
2688
+ }
2689
+
2690
+ return str;
2691
+ };
2692
+
2693
+ var cookie = {
2694
+ create: function create(name, value, minutes, domain) {
2695
+ var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
2696
+ path: '/',
2697
+ sameSite: 'strict'
2698
+ };
2699
+
2700
+ if (minutes) {
2701
+ cookieOptions.expires = new Date();
2702
+ cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
2703
+ }
2704
+
2705
+ if (domain) cookieOptions.domain = domain;
2706
+ document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
2707
+ },
2708
+ read: function read(name) {
2709
+ var nameEQ = name + '=';
2710
+ var ca = document.cookie.split(';');
2711
+
2712
+ for (var i = 0; i < ca.length; i++) {
2713
+ var c = ca[i];
2714
+
2715
+ while (c.charAt(0) === ' ') {
2716
+ c = c.substring(1, c.length);
2717
+ }
2718
+
2719
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
2720
+ }
2721
+
2722
+ return null;
2723
+ },
2724
+ remove: function remove(name) {
2725
+ this.create(name, '', -1);
2726
+ }
2727
+ };
2728
+ var cookie$1 = {
2729
+ name: 'cookie',
2730
+ lookup: function lookup(options) {
2731
+ var found;
2732
+
2733
+ if (options.lookupCookie && typeof document !== 'undefined') {
2734
+ var c = cookie.read(options.lookupCookie);
2735
+ if (c) found = c;
2736
+ }
2737
+
2738
+ return found;
2739
+ },
2740
+ cacheUserLanguage: function cacheUserLanguage(lng, options) {
2741
+ if (options.lookupCookie && typeof document !== 'undefined') {
2742
+ cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);
2743
+ }
2744
+ }
2745
+ };
2746
+
2747
+ var querystring = {
2748
+ name: 'querystring',
2749
+ lookup: function lookup(options) {
2750
+ var found;
2751
+
2752
+ if (typeof window !== 'undefined') {
2753
+ var search = window.location.search;
2754
+
2755
+ if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {
2756
+ search = window.location.hash.substring(window.location.hash.indexOf('?'));
2757
+ }
2758
+
2759
+ var query = search.substring(1);
2760
+ var params = query.split('&');
2761
+
2762
+ for (var i = 0; i < params.length; i++) {
2763
+ var pos = params[i].indexOf('=');
2764
+
2765
+ if (pos > 0) {
2766
+ var key = params[i].substring(0, pos);
2767
+
2768
+ if (key === options.lookupQuerystring) {
2769
+ found = params[i].substring(pos + 1);
2770
+ }
2771
+ }
2772
+ }
2773
+ }
2774
+
2775
+ return found;
2776
+ }
2777
+ };
2778
+
2779
+ var hasLocalStorageSupport = null;
2780
+
2781
+ var localStorageAvailable = function localStorageAvailable() {
2782
+ if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
2783
+
2784
+ try {
2785
+ hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;
2786
+ var testKey = 'i18next.translate.boo';
2787
+ window.localStorage.setItem(testKey, 'foo');
2788
+ window.localStorage.removeItem(testKey);
2789
+ } catch (e) {
2790
+ hasLocalStorageSupport = false;
2791
+ }
2792
+
2793
+ return hasLocalStorageSupport;
2794
+ };
2795
+
2796
+ var localStorage = {
2797
+ name: 'localStorage',
2798
+ lookup: function lookup(options) {
2799
+ var found;
2800
+
2801
+ if (options.lookupLocalStorage && localStorageAvailable()) {
2802
+ var lng = window.localStorage.getItem(options.lookupLocalStorage);
2803
+ if (lng) found = lng;
2804
+ }
2805
+
2806
+ return found;
2807
+ },
2808
+ cacheUserLanguage: function cacheUserLanguage(lng, options) {
2809
+ if (options.lookupLocalStorage && localStorageAvailable()) {
2810
+ window.localStorage.setItem(options.lookupLocalStorage, lng);
2811
+ }
2812
+ }
2813
+ };
2814
+
2815
+ var hasSessionStorageSupport = null;
2816
+
2817
+ var sessionStorageAvailable = function sessionStorageAvailable() {
2818
+ if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;
2819
+
2820
+ try {
2821
+ hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;
2822
+ var testKey = 'i18next.translate.boo';
2823
+ window.sessionStorage.setItem(testKey, 'foo');
2824
+ window.sessionStorage.removeItem(testKey);
2825
+ } catch (e) {
2826
+ hasSessionStorageSupport = false;
2827
+ }
2828
+
2829
+ return hasSessionStorageSupport;
2830
+ };
2831
+
2832
+ var sessionStorage = {
2833
+ name: 'sessionStorage',
2834
+ lookup: function lookup(options) {
2835
+ var found;
2836
+
2837
+ if (options.lookupSessionStorage && sessionStorageAvailable()) {
2838
+ var lng = window.sessionStorage.getItem(options.lookupSessionStorage);
2839
+ if (lng) found = lng;
2840
+ }
2841
+
2842
+ return found;
2843
+ },
2844
+ cacheUserLanguage: function cacheUserLanguage(lng, options) {
2845
+ if (options.lookupSessionStorage && sessionStorageAvailable()) {
2846
+ window.sessionStorage.setItem(options.lookupSessionStorage, lng);
2847
+ }
2848
+ }
2849
+ };
2850
+
2851
+ var navigator$1 = {
2852
+ name: 'navigator',
2853
+ lookup: function lookup(options) {
2854
+ var found = [];
2855
+
2856
+ if (typeof navigator !== 'undefined') {
2857
+ if (navigator.languages) {
2858
+ // chrome only; not an array, so can't use .push.apply instead of iterating
2859
+ for (var i = 0; i < navigator.languages.length; i++) {
2860
+ found.push(navigator.languages[i]);
2861
+ }
2862
+ }
2863
+
2864
+ if (navigator.userLanguage) {
2865
+ found.push(navigator.userLanguage);
2866
+ }
2867
+
2868
+ if (navigator.language) {
2869
+ found.push(navigator.language);
2870
+ }
2871
+ }
2872
+
2873
+ return found.length > 0 ? found : undefined;
2874
+ }
2875
+ };
2876
+
2877
+ var htmlTag = {
2878
+ name: 'htmlTag',
2879
+ lookup: function lookup(options) {
2880
+ var found;
2881
+ var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);
2882
+
2883
+ if (htmlTag && typeof htmlTag.getAttribute === 'function') {
2884
+ found = htmlTag.getAttribute('lang');
2885
+ }
2886
+
2887
+ return found;
2888
+ }
2889
+ };
2890
+
2891
+ var path = {
2892
+ name: 'path',
2893
+ lookup: function lookup(options) {
2894
+ var found;
2895
+
2896
+ if (typeof window !== 'undefined') {
2897
+ var language = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2898
+
2899
+ if (language instanceof Array) {
2900
+ if (typeof options.lookupFromPathIndex === 'number') {
2901
+ if (typeof language[options.lookupFromPathIndex] !== 'string') {
2902
+ return undefined;
2903
+ }
2904
+
2905
+ found = language[options.lookupFromPathIndex].replace('/', '');
2906
+ } else {
2907
+ found = language[0].replace('/', '');
2908
+ }
2909
+ }
2910
+ }
2911
+
2912
+ return found;
2913
+ }
2914
+ };
2915
+
2916
+ var subdomain = {
2917
+ name: 'subdomain',
2918
+ lookup: function lookup(options) {
2919
+ var found;
2920
+
2921
+ if (typeof window !== 'undefined') {
2922
+ var language = window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);
2923
+
2924
+ if (language instanceof Array) {
2925
+ if (typeof options.lookupFromSubdomainIndex === 'number') {
2926
+ found = language[options.lookupFromSubdomainIndex].replace('http://', '').replace('https://', '').replace('.', '');
2927
+ } else {
2928
+ found = language[0].replace('http://', '').replace('https://', '').replace('.', '');
2929
+ }
2930
+ }
2931
+ }
2932
+
2933
+ return found;
2934
+ }
2935
+ };
2936
+
2937
+ function getDefaults() {
2938
+ return {
2939
+ order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],
2940
+ lookupQuerystring: 'lng',
2941
+ lookupCookie: 'i18next',
2942
+ lookupLocalStorage: 'i18nextLng',
2943
+ lookupSessionStorage: 'i18nextLng',
2944
+ // cache user language
2945
+ caches: ['localStorage'],
2946
+ excludeCacheFor: ['cimode'] //cookieMinutes: 10,
2947
+ //cookieDomain: 'myDomain'
2948
+
2949
+ };
2950
+ }
2951
+
2952
+ var Browser = /*#__PURE__*/function () {
2953
+ function Browser(services) {
2954
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2955
+
2956
+ _classCallCheck(this, Browser);
2957
+
2958
+ this.type = 'languageDetector';
2959
+ this.detectors = {};
2960
+ this.init(services, options);
2961
+ }
2962
+
2963
+ _createClass(Browser, [{
2964
+ key: "init",
2965
+ value: function init(services) {
2966
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2967
+ var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
2968
+ this.services = services;
2969
+ this.options = defaults(options, this.options || {}, getDefaults()); // backwards compatibility
2970
+
2971
+ if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;
2972
+ this.i18nOptions = i18nOptions;
2973
+ this.addDetector(cookie$1);
2974
+ this.addDetector(querystring);
2975
+ this.addDetector(localStorage);
2976
+ this.addDetector(sessionStorage);
2977
+ this.addDetector(navigator$1);
2978
+ this.addDetector(htmlTag);
2979
+ this.addDetector(path);
2980
+ this.addDetector(subdomain);
2981
+ }
2982
+ }, {
2983
+ key: "addDetector",
2984
+ value: function addDetector(detector) {
2985
+ this.detectors[detector.name] = detector;
2986
+ }
2987
+ }, {
2988
+ key: "detect",
2989
+ value: function detect(detectionOrder) {
2990
+ var _this = this;
2991
+
2992
+ if (!detectionOrder) detectionOrder = this.options.order;
2993
+ var detected = [];
2994
+ detectionOrder.forEach(function (detectorName) {
2995
+ if (_this.detectors[detectorName]) {
2996
+ var lookup = _this.detectors[detectorName].lookup(_this.options);
2997
+
2998
+ if (lookup && typeof lookup === 'string') lookup = [lookup];
2999
+ if (lookup) detected = detected.concat(lookup);
3000
+ }
3001
+ });
3002
+ if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0
3003
+
3004
+ return detected.length > 0 ? detected[0] : null; // a little backward compatibility
3005
+ }
3006
+ }, {
3007
+ key: "cacheUserLanguage",
3008
+ value: function cacheUserLanguage(lng, caches) {
3009
+ var _this2 = this;
3010
+
3011
+ if (!caches) caches = this.options.caches;
3012
+ if (!caches) return;
3013
+ if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
3014
+ caches.forEach(function (cacheName) {
3015
+ if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
3016
+ });
3017
+ }
3018
+ }]);
3019
+
3020
+ return Browser;
3021
+ }();
3022
+
3023
+ Browser.type = 'languageDetector';
3024
+
3025
+ i18next.use(Browser).init({
3026
+ fallbackLng: 'en',
3027
+ debug: false,
3028
+ resources: {
3029
+ en: {
3030
+ translation: {},
3031
+ },
3032
+ ja: {
3033
+ translation: {
3034
+ 'Pay': '支払う',
3035
+ 'Failed to load Stripe': 'ライブラリの読み込みに失敗しました。',
3036
+ 'Add your payment information': '支払情報を追加',
3037
+ 'Add card': 'カードを追加',
3038
+ 'Add a card': 'カードを追加',
3039
+ 'Add': '追加',
3040
+ 'Card information': 'カード情報',
3041
+ 'Card Number': 'カード番号',
3042
+ 'MM / YY': '月 / 年',
3043
+ 'CVC': 'セキュリティコード(CVC)',
3044
+ 'Country or region': '地域',
3045
+ 'Postal Code': '郵便番号',
3046
+ },
3047
+ },
3048
+ },
3049
+ });
3050
+ const i18n = i18next;
3051
+
3052
+ const stripePaymentSheetCss = ":root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}.stripe-payment-sheet-wrap{display:block;width:100%;background:#fff;padding:32px 16px}.stripe-payment-sheet-wrap *:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", suns-serif;box-sizing:border-box}.stripe-payment-sheet-wrap button{cursor:pointer}.stripe-payment-sheet-wrap .StripeElement{padding:8px 16px;min-height:64px;border-bottom:1px solid var(--color-input-border);border-radius:4px;display:flex;justify-content:center;align-items:center}.stripe-payment-sheet-wrap .StripeElement>.__PrivateStripeElement{width:100%}.stripe-payment-sheet-wrap .stripe-input-box{background-color:#fff;border-radius:2px;filter:drop-shadow(0 0 1px var(--color-input-border))}.stripe-payment-sheet-wrap .stripe-input-column .StripeElement{border-right:1px solid var(--color-input-border)}.stripe-payment-sheet-wrap .stripe-input-column .StripeElement:last-child{border-right:none}.stripe-payment-sheet-wrap .stripe-heading{font-size:24px;font-weight:bold;color:var(--color-heading-text);margin-bottom:24px}.stripe-payment-sheet-wrap .stripe-section-title{font-size:14px;font-weight:bold;color:var(--color-label);margin-bottom:8px}.stripe-payment-sheet-wrap .payment-info label{color:var(--color-label)}.stripe-payment-sheet-wrap .stripe-element-errors{margin-top:8px;font-size:14px;color:var(--color-text-error)}.stripe-payment-sheet-wrap button{display:block;color:var(--color-button-text);background-color:var(--color-primary);width:100%;text-align:center;padding:16px 16px;font-size:18px;border-radius:8px;min-height:42px}.stripe-payment-sheet-wrap button:disabled{color:var(--color-button-text-disabled)}";
3053
+
3054
+ const StripePayment = class {
3055
+ constructor(hostRef) {
3056
+ index.registerInstance(this, hostRef);
3057
+ this.stripeLoaded = index.createEvent(this, "stripeLoaded", 7);
3058
+ this.formSubmit = index.createEvent(this, "formSubmit", 7);
3059
+ this.defaultFormSubmitResult = index.createEvent(this, "defaultFormSubmitResult", 7);
3060
+ /**
3061
+ * Status of the Stripe client initilizing process
3062
+ */
3063
+ this.loadStripeStatus = '';
3064
+ /**
3065
+ * Default submit handle type.
3066
+ * If you want to use `setupIntent`, should update this attribute.
3067
+ */
3068
+ this.intentType = 'payment';
3069
+ /**
3070
+ * If true, show zip code field
3071
+ */
3072
+ this.zip = true;
3073
+ /**
3074
+ * Payment sheet title
3075
+ * By default we recommended to use these string
3076
+ * - 'Add your payment information' -> PaymentSheet / PaymentFlow(Android)
3077
+ * - 'Add a card' -> PaymentFlow(iOS)
3078
+ * These strings will translated automatically by this library.
3079
+ */
3080
+ this.sheetTitle = 'Add your payment information';
3081
+ /**
3082
+ * Submit button label
3083
+ * By default we recommended to use these string
3084
+ * - 'Pay' -> PaymentSheet
3085
+ * - 'Add' -> PaymentFlow(Android)
3086
+ * - 'Add card' -> PaymentFlow(iOS)
3087
+ * - 'Add a card' -> PaymentFlow(iOS)
3088
+ * These strings will translated automatically by this library.
3089
+ *
3090
+ */
3091
+ this.buttonLabel = 'Pay';
3092
+ /**
3093
+ * The progress status of the checkout process
3094
+ */
3095
+ this.progress = '';
3096
+ /**
3097
+ * Error message
3098
+ */
3099
+ this.errorMessage = '';
3100
+ /**
3101
+ * zip code
3102
+ */
3103
+ this.zipCode = '';
3104
+ /**
3105
+ * Overwrite the application name that registered
3106
+ * For wrapper library (like Capacitor)
3107
+ */
3108
+ this.applicationName = 'stripe-pwa-elements';
3109
+ /**
3110
+ * Show the form label
3111
+ */
3112
+ this.showLabel = false;
3113
+ /**
3114
+ * The component will provide a function to call the `stripe.confirmCardPayment`API.
3115
+ * If you want to customize the behavior, should set false.
3116
+ * And listen the 'formSubmit' event on the element
3117
+ */
3118
+ this.shouldUseDefaultFormSubmitAction = true;
3119
+ if (this.publishableKey) {
3120
+ this.initStripe(this.publishableKey, {
3121
+ stripeAccount: this.stripeAccount,
3122
+ });
3123
+ }
3124
+ else {
3125
+ this.loadStripeStatus = 'failure';
3126
+ }
3127
+ }
3128
+ /**
3129
+ * Get Stripe.js, and initialize elements
3130
+ * @param publishableKey
3131
+ * @param options
3132
+ * @example
3133
+ * ```
3134
+ * const stripeElement = document.createElement('stripe-card-element');
3135
+ * customElements
3136
+ * .whenDefined('stripe-card-element')
3137
+ * .then(() => {
3138
+ * tripeElement.initStripe('pk_test_XXXXXXXXX')
3139
+ * })
3140
+ * ```
3141
+ */
3142
+ async initStripe(publishableKey, options = undefined) {
3143
+ this.loadStripeStatus = 'loading';
3144
+ stripe_esm.loadStripe(publishableKey, {
3145
+ stripeAccount: options === null || options === void 0 ? void 0 : options.stripeAccount,
3146
+ })
3147
+ .then(stripe => {
3148
+ this.loadStripeStatus = 'success';
3149
+ stripe.registerAppInfo({
3150
+ name: this.applicationName,
3151
+ });
3152
+ this.stripe = stripe;
3153
+ return;
3154
+ })
3155
+ .catch(e => {
3156
+ console.log(e);
3157
+ this.errorMessage = e.message;
3158
+ this.loadStripeStatus = 'failure';
3159
+ return;
3160
+ })
3161
+ .then(() => {
3162
+ if (!this.stripe) {
3163
+ return;
3164
+ }
3165
+ return this.initElement();
3166
+ })
3167
+ .then(() => {
3168
+ if (!this.stripe) {
3169
+ return;
3170
+ }
3171
+ this.stripeLoadedEventHandler();
3172
+ });
3173
+ }
3174
+ /**
3175
+ * Update the form submit progress
3176
+ * @param progress
3177
+ * @returns
3178
+ * @example
3179
+ * ```
3180
+ * const stripeElement = document.createElement('stripe-card-element');
3181
+ * customElements
3182
+ * .whenDefined('stripe-card-element')
3183
+ * .then(() => {
3184
+ * // You must set the attributes to stop running default form submit action when you want to listen the 'formSubmit' event.
3185
+ * stripeElement.setAttribute('should-use-default-form-submit-action', false)
3186
+ * stripeElement.addEventListener('formSubmit', async props => {
3187
+ * const {
3188
+ * detail: { stripe, cardNumber, event },
3189
+ * } = props;
3190
+ * const result = await stripe.createPaymentMethod({
3191
+ * type: 'card',
3192
+ * card: cardNumber,
3193
+ * });
3194
+ * console.log(result);
3195
+ * stripeElement.updateProgress('success')
3196
+ * });
3197
+ * })
3198
+ */
3199
+ async updateProgress(progress) {
3200
+ this.progress = progress;
3201
+ return this;
3202
+ }
3203
+ /**
3204
+ * Set error message
3205
+ * @param errorMessage string
3206
+ * @returns
3207
+ * @example
3208
+ * ```
3209
+ * const stripeElement = document.createElement('stripe-card-element');
3210
+ * customElements
3211
+ * .whenDefined('stripe-card-element')
3212
+ * .then(() => {
3213
+ * // You must set the attributes to stop running default form submit action when you want to listen the 'formSubmit' event.
3214
+ * stripeElement.setAttribute('should-use-default-form-submit-action', false)
3215
+ * stripeElement.addEventListener('formSubmit', async props => {
3216
+ * try {
3217
+ * throw new Error('debug')
3218
+ * } catch (e) {
3219
+ * stripeElement.setErrorMessage(`Error: ${e.message}`)
3220
+ * stripeElement.updateProgress('failure')
3221
+ * }
3222
+ * });
3223
+ * })
3224
+ */
3225
+ async setErrorMessage(errorMessage) {
3226
+ this.errorMessage = errorMessage;
3227
+ return this;
3228
+ }
3229
+ /**
3230
+ * @param option
3231
+ * @private
3232
+ */
3233
+ async setPaymentRequestOption(option) {
3234
+ this.paymentRequestOption = option;
3235
+ this.createPaymentRequestButton();
3236
+ return this;
3237
+ }
3238
+ stripeLoadedEventHandler() {
3239
+ const event = {
3240
+ stripe: this.stripe,
3241
+ };
3242
+ if (this.stripeDidLoaded) {
3243
+ this.stripeDidLoaded(event);
3244
+ }
3245
+ this.stripeLoaded.emit(event);
3246
+ }
3247
+ async formSubmitEventHandler() {
3248
+ const { cardCVC, cardExpiry, cardNumber, stripe } = this;
3249
+ this.formSubmit.emit({
3250
+ cardCVCElement: cardCVC,
3251
+ cardExpiryElement: cardExpiry,
3252
+ cardNumberElement: cardNumber,
3253
+ stripe,
3254
+ });
3255
+ }
3256
+ async defaultFormSubmitResultHandler(result) {
3257
+ this.defaultFormSubmitResult.emit(result);
3258
+ }
3259
+ componentWillUpdate() {
3260
+ if (!this.publishableKey) {
3261
+ return;
3262
+ }
3263
+ if (['success', 'loading'].includes(this.loadStripeStatus)) {
3264
+ return;
3265
+ }
3266
+ this.initStripe(this.publishableKey, {
3267
+ stripeAccount: this.stripeAccount,
3268
+ });
3269
+ this.createPaymentRequestButton();
3270
+ }
3271
+ /**
3272
+ * Default form submit action (just call a confirmCardPayment).
3273
+ * If you don't want use it, please set `should-use-default-form-submit-action="false"`
3274
+ * @param event
3275
+ * @param param1
3276
+ */
3277
+ async defaultFormSubmitAction(event, { stripe, cardNumberElement, intentClientSecret }) {
3278
+ event.preventDefault();
3279
+ try {
3280
+ const { intentType } = this;
3281
+ const result = await (() => {
3282
+ if (intentType === 'payment') {
3283
+ return stripe.confirmCardPayment(intentClientSecret, {
3284
+ payment_method: {
3285
+ card: cardNumberElement,
3286
+ },
3287
+ });
3288
+ }
3289
+ return stripe.confirmCardSetup(intentClientSecret, {
3290
+ payment_method: {
3291
+ card: cardNumberElement,
3292
+ },
3293
+ });
3294
+ })();
3295
+ this.defaultFormSubmitResultHandler(result);
3296
+ }
3297
+ catch (e) {
3298
+ this.defaultFormSubmitResultHandler(e);
3299
+ throw e;
3300
+ }
3301
+ }
3302
+ /**
3303
+ * Initialize Component using Stripe Element
3304
+ */
3305
+ async initElement() {
3306
+ const elements = this.stripe.elements();
3307
+ const handleCardError = ({ error }) => {
3308
+ if (error) {
3309
+ this.errorMessage = error.message;
3310
+ }
3311
+ else {
3312
+ this.errorMessage = '';
3313
+ }
3314
+ };
3315
+ this.cardNumber = elements.create('cardNumber', {
3316
+ placeholder: i18n.t('Card Number'),
3317
+ });
3318
+ const cardNumberElement = await waitForElm(this.el, '#card-number');
3319
+ this.cardNumber.mount(cardNumberElement);
3320
+ this.cardNumber.on('change', handleCardError);
3321
+ this.cardExpiry = elements.create('cardExpiry');
3322
+ const cardExpiryElement = await waitForElm(this.el, '#card-expiry');
3323
+ this.cardExpiry.mount(cardExpiryElement);
3324
+ this.cardExpiry.on('change', handleCardError);
3325
+ this.cardCVC = elements.create('cardCvc');
3326
+ const cardCVCElement = await waitForElm(this.el, '#card-cvc');
3327
+ this.cardCVC.mount(cardCVCElement);
3328
+ this.cardCVC.on('change', handleCardError);
3329
+ document.getElementById('stripe-card-element').addEventListener('submit', async (e) => {
3330
+ const { cardCVC, cardExpiry, cardNumber, stripe, intentClientSecret } = this;
3331
+ const submitEventProps = {
3332
+ cardCVCElement: cardCVC,
3333
+ cardExpiryElement: cardExpiry,
3334
+ cardNumberElement: cardNumber,
3335
+ stripe,
3336
+ intentClientSecret,
3337
+ zipCode: this.zipCode,
3338
+ };
3339
+ this.progress = 'loading';
3340
+ try {
3341
+ if (this.handleSubmit) {
3342
+ await this.handleSubmit(e, submitEventProps);
3343
+ }
3344
+ else if (this.shouldUseDefaultFormSubmitAction === true && intentClientSecret) {
3345
+ await this.defaultFormSubmitAction(e, submitEventProps);
3346
+ }
3347
+ else {
3348
+ e.preventDefault();
3349
+ }
3350
+ await this.formSubmitEventHandler();
3351
+ if (this.handleSubmit || this.shouldUseDefaultFormSubmitAction === true) {
3352
+ this.progress = 'success';
3353
+ }
3354
+ }
3355
+ catch (e) {
3356
+ this.errorMessage = e.message;
3357
+ this.progress = 'failure';
3358
+ }
3359
+ });
3360
+ }
3361
+ componentDidLoad() {
3362
+ this.el.classList.add(checkPlatform());
3363
+ }
3364
+ disconnectedCallback() {
3365
+ if (this.cardNumber) {
3366
+ this.cardNumber.unmount();
3367
+ }
3368
+ if (this.cardExpiry) {
3369
+ this.cardExpiry.unmount();
3370
+ }
3371
+ if (this.cardCVC) {
3372
+ this.cardCVC.unmount();
3373
+ }
3374
+ }
3375
+ /**
3376
+ * Create payment request button
3377
+ * It's just proxy of stripe-payment-request-button
3378
+ */
3379
+ createPaymentRequestButton() {
3380
+ const { showPaymentRequestButton, paymentRequestOption } = this;
3381
+ if (!showPaymentRequestButton || !paymentRequestOption) {
3382
+ return null;
3383
+ }
3384
+ if (!document) {
3385
+ return null;
3386
+ }
3387
+ const targetElement = document.getElementById('stripe-payment-request-button');
3388
+ const stripePaymentRequestElement = document.createElement('stripe-payment-request-button');
3389
+ targetElement.appendChild(stripePaymentRequestElement);
3390
+ const { paymentRequestPaymentMethodHandler, paymentRequestShippingOptionChangeHandler, paymentRequestShippingAddressChangeHandler } = paymentRequestOption;
3391
+ customElements.whenDefined('stripe-payment-request-button').then(() => {
3392
+ stripePaymentRequestElement.setPaymentRequestOption(paymentRequestOption);
3393
+ if (paymentRequestPaymentMethodHandler) {
3394
+ stripePaymentRequestElement.setPaymentMethodEventHandler(paymentRequestPaymentMethodHandler);
3395
+ }
3396
+ if (paymentRequestShippingOptionChangeHandler) {
3397
+ stripePaymentRequestElement.setPaymentRequestShippingOptionEventHandler(paymentRequestShippingOptionChangeHandler);
3398
+ }
3399
+ if (paymentRequestShippingAddressChangeHandler) {
3400
+ stripePaymentRequestElement.setPaymentRequestShippingAddressEventHandler(paymentRequestShippingAddressChangeHandler);
3401
+ }
3402
+ return stripePaymentRequestElement.initStripe(this.publishableKey);
3403
+ });
3404
+ }
3405
+ render() {
3406
+ const { errorMessage } = this;
3407
+ if (this.loadStripeStatus === 'failure') {
3408
+ return index.h("p", null, i18n.t('Failed to load Stripe'));
3409
+ }
3410
+ const disabled = this.progress === 'loading';
3411
+ return (index.h("div", { class: "stripe-payment-sheet-wrap" }, index.h("form", { id: "stripe-card-element" }, index.h("div", { class: "stripe-heading" }, i18n.t(this.sheetTitle)), index.h("div", { id: "stripe-payment-request-button" }), index.h("div", null, index.h("div", { class: "stripe-section-title" }, i18n.t('Card information'))), index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, i18n.t('Card Number')) : null, index.h("div", { id: "card-number" }))), index.h("div", { class: "stripe-input-column", style: { display: 'flex' } }, index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, i18n.t('MM / YY')) : null, index.h("div", { id: "card-expiry" })), index.h("label", { style: { width: '50%' } }, this.showLabel ? index.h("lenged", null, i18n.t('CVC')) : null, index.h("div", { id: "card-cvc" }))), index.h("div", { id: "card-errors", class: "element-errors" }, errorMessage))), this.zip ? (index.h("div", { style: { marginTop: '1.5rem' } }, index.h("div", { class: "stripe-section-title" }, i18n.t('Country or region')))) : null, this.zip ? (index.h("div", { class: "payment-info card visible" }, index.h("fieldset", { class: "stripe-input-box" }, index.h("div", null, index.h("label", null, this.showLabel ? index.h("lenged", null, i18n.t('Postal Code')) : null, index.h("input", { id: "zip", name: "zip", type: "text", inputmode: "numeric", class: "stripe-input-box StripeElement", style: { width: '100%' }, placeholder: i18n.t('Postal Code'), value: this.zipCode, onInput: e => {
3412
+ this.zipCode = e.target.value;
3413
+ } })))))) : null, index.h("div", { style: { marginTop: '32px' } }, index.h("button", { type: "submit", disabled: disabled }, this.progress === 'loading' ? i18n.t('Loading') : i18n.t(this.buttonLabel))))));
3414
+ }
3415
+ get el() { return index.getElement(this); }
3416
+ };
3417
+ StripePayment.style = stripePaymentSheetCss;
3418
+
3419
+ const stripeElementModalCss = "*:where(:not(iframe,canvas,img,svg,video):not(svg *)){all:unset;display:revert;background:none;border:none;font-family:\"Roboto\", suns-serif;box-sizing:border-box}button{cursor:pointer}:root{--color-label:#565656;--color-placeholder:#acacac;--color-heading-text:#333;--color-text-error:#ef4444;--color-input-border:#e4e4e6;--color-button-text:rgba(255, 255, 255, 0.95);--color-button-text-disabled:rgba(255, 255, 255, 0.4);--color-primary:#0074d4}:host{display:block}.modal-row{display:none}.modal-row.open{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:1ch;background:rgba(0, 0, 0, 0.3)}.modal-child{padding:1.5rem;background-color:#fff;width:100%}.modal-close-button-wrap{padding-left:8px}.modal-close-button-wrap .modal-close-button{width:32px;display:block;fill:var(--color-label);cursor:pointer}";
3420
+
3421
+ const StripeSheet = class {
3422
+ constructor(hostRef) {
3423
+ index.registerInstance(this, hostRef);
3424
+ this.close = index.createEvent(this, "close", 7);
3425
+ /**
3426
+ * If true, the modal display close button
3427
+ */
3428
+ this.showCloseButton = true;
3429
+ /**
3430
+ * Modal state.
3431
+ * If true, the modal will open
3432
+ */
3433
+ this.open = false;
3434
+ }
3435
+ /**
3436
+ * Toggle modal state
3437
+ */
3438
+ async toggleModal() {
3439
+ this.open = !this.open;
3440
+ if (this.open === false) {
3441
+ this.close.emit();
3442
+ }
3443
+ }
3444
+ /**
3445
+ * Open the modal
3446
+ */
3447
+ async openModal() {
3448
+ this.open = true;
3449
+ }
3450
+ /**
3451
+ * Close the modal
3452
+ */
3453
+ async closeModal() {
3454
+ this.open = false;
3455
+ this.close.emit();
3456
+ }
3457
+ componentDidLoad() {
3458
+ this.el.classList.add(checkPlatform());
3459
+ }
3460
+ render() {
3461
+ const { open, showCloseButton } = this;
3462
+ return (index.h(index.Host, null, index.h("div", { class: `modal-row${open ? ' open' : ''}`, onClick: () => this.closeModal() }, index.h("div", { class: "modal-child", onClick: e => e.stopPropagation() }, showCloseButton ? (index.h("div", { class: "modal-close-button-wrap" }, index.h("ion-icon", { name: "close", size: "large", class: "modal-close-button", onClick: () => this.closeModal() }))) : null, index.h("slot", null)))));
3463
+ }
3464
+ get el() { return index.getElement(this); }
3465
+ };
3466
+ StripeSheet.style = stripeElementModalCss;
3467
+
3468
+ exports.stripe_payment = StripePayment;
3469
+ exports.stripe_sheet = StripeSheet;