@foxy.io/elements 1.18.0-beta.5 → 1.18.0-beta.6

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 (234) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-api-browser.js +3 -3
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  12. package/dist/cdn/foxy-coupon-card.js +1 -1
  13. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  14. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  15. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  16. package/dist/cdn/foxy-coupon-form.js +1 -1
  17. package/dist/cdn/foxy-custom-field-card.js +1 -1
  18. package/dist/cdn/foxy-custom-field-form.js +1 -1
  19. package/dist/cdn/foxy-customer-api.js +1 -1
  20. package/dist/cdn/foxy-customer-card.js +1 -1
  21. package/dist/cdn/foxy-customer-form.js +1 -1
  22. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  23. package/dist/cdn/foxy-customer-portal.js +1 -1
  24. package/dist/cdn/foxy-customer.js +4 -4
  25. package/dist/cdn/foxy-customers-table.js +1 -1
  26. package/dist/cdn/foxy-discount-builder.js +1 -1
  27. package/dist/cdn/foxy-discount-card.js +1 -1
  28. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  29. package/dist/cdn/foxy-donation.js +1 -1
  30. package/dist/cdn/foxy-email-template-form.js +1 -1
  31. package/dist/cdn/foxy-error-entry-card.js +1 -1
  32. package/dist/cdn/foxy-form-dialog.js +1 -1
  33. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  34. package/dist/cdn/foxy-gift-card-card.js +1 -1
  35. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  36. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -0
  37. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  38. package/dist/cdn/foxy-gift-card-form.js +1 -1
  39. package/dist/cdn/foxy-i18n.js +1 -1
  40. package/dist/cdn/foxy-item-card.js +1 -1
  41. package/dist/cdn/foxy-item-category-card.js +1 -0
  42. package/dist/cdn/foxy-item-category-form.js +1 -0
  43. package/dist/cdn/foxy-item-form.js +1 -1
  44. package/dist/cdn/foxy-item-option-card.js +1 -1
  45. package/dist/cdn/foxy-item-option-form.js +1 -1
  46. package/dist/cdn/foxy-items-form.js +1 -1
  47. package/dist/cdn/foxy-nucleon-element.js +1 -1
  48. package/dist/cdn/foxy-pagination.js +1 -1
  49. package/dist/cdn/foxy-payment-card.js +1 -1
  50. package/dist/cdn/foxy-payment-method-card.js +1 -1
  51. package/dist/cdn/foxy-query-builder.js +1 -1
  52. package/dist/cdn/foxy-report-form.js +2 -2
  53. package/dist/cdn/foxy-reports-table.js +5 -5
  54. package/dist/cdn/foxy-shipment-card.js +1 -1
  55. package/dist/cdn/foxy-sign-in-form.js +1 -1
  56. package/dist/cdn/foxy-spinner.js +1 -1
  57. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  58. package/dist/cdn/foxy-subscription-card.js +1 -1
  59. package/dist/cdn/foxy-subscription-form.js +5 -5
  60. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  61. package/dist/cdn/foxy-table.js +1 -1
  62. package/dist/cdn/foxy-tax-card.js +1 -1
  63. package/dist/cdn/foxy-tax-form.js +1 -1
  64. package/dist/cdn/foxy-template-config-form.js +1 -1
  65. package/dist/cdn/foxy-template-form.js +1 -1
  66. package/dist/cdn/foxy-transaction-card.js +1 -1
  67. package/dist/cdn/foxy-transaction.js +1 -1
  68. package/dist/cdn/foxy-transactions-table.js +1 -1
  69. package/dist/cdn/foxy-user-form.js +1 -1
  70. package/dist/cdn/foxy-users-table.js +1 -1
  71. package/dist/cdn/foxy-webhook-card.js +1 -1
  72. package/dist/cdn/foxy-webhook-form.js +1 -1
  73. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  74. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  75. package/dist/cdn/{shared-628c7355.js → shared-12abadda.js} +1 -1
  76. package/dist/cdn/{shared-87176207.js → shared-12e9933a.js} +1 -1
  77. package/dist/cdn/shared-146635ed.js +1 -0
  78. package/dist/cdn/{shared-977dcc25.js → shared-1765d84b.js} +1 -1
  79. package/dist/cdn/{shared-d071c963.js → shared-1c05004b.js} +1 -1
  80. package/dist/cdn/{shared-edc7150d.js → shared-1e264485.js} +1 -1
  81. package/dist/cdn/{shared-19ae2188.js → shared-23e21265.js} +1 -1
  82. package/dist/cdn/shared-27200366.js +1 -0
  83. package/dist/cdn/{shared-81b7c484.js → shared-2af8c996.js} +5 -5
  84. package/dist/cdn/{shared-f48ff40a.js → shared-2b54d9fe.js} +1 -1
  85. package/dist/cdn/shared-36ed123a.js +11 -0
  86. package/dist/cdn/{shared-9be1a70f.js → shared-3ddbe8c9.js} +1 -1
  87. package/dist/cdn/{shared-f2608c7d.js → shared-4181eb12.js} +1 -1
  88. package/dist/cdn/shared-43dff1c8.js +1 -0
  89. package/dist/cdn/{shared-023c287a.js → shared-4ba52733.js} +1 -1
  90. package/dist/cdn/{shared-296f4621.js → shared-4ca7363a.js} +1 -1
  91. package/dist/cdn/shared-4d28c698.js +1 -0
  92. package/dist/cdn/{shared-c37600c8.js → shared-525aabce.js} +1 -1
  93. package/dist/cdn/{shared-6629d6b0.js → shared-55b49058.js} +1 -1
  94. package/dist/cdn/shared-565feb2f.js +1 -0
  95. package/dist/cdn/{shared-8a86a620.js → shared-5c3d4435.js} +1 -1
  96. package/dist/cdn/shared-5f82e90e.js +1 -0
  97. package/dist/cdn/{shared-833a8b4e.js → shared-64e3f8da.js} +1 -1
  98. package/dist/cdn/{shared-1009388a.js → shared-6534863a.js} +1 -1
  99. package/dist/cdn/{shared-63e71a69.js → shared-6f83a8cf.js} +1 -1
  100. package/dist/cdn/{shared-56f2ae96.js → shared-75c7193c.js} +1 -1
  101. package/dist/cdn/{shared-b4d0adff.js → shared-78dba0d5.js} +1 -1
  102. package/dist/cdn/shared-79d6676d.js +1 -0
  103. package/dist/cdn/shared-83344a27.js +1 -0
  104. package/dist/cdn/{shared-240700a9.js → shared-84b5d8f0.js} +1 -1
  105. package/dist/cdn/{shared-d4d44ca4.js → shared-85cd6cfb.js} +1 -1
  106. package/dist/cdn/{shared-3a7cf739.js → shared-86d0d927.js} +1 -1
  107. package/dist/cdn/{shared-91ad37aa.js → shared-946f88a0.js} +12 -22
  108. package/dist/cdn/shared-94e2d173.js +1 -0
  109. package/dist/cdn/{shared-1971bbbd.js → shared-9943c9c2.js} +1 -1
  110. package/dist/cdn/{shared-2e0927c2.js → shared-9b401cca.js} +1 -1
  111. package/dist/cdn/{shared-2a472b2d.js → shared-a639ff32.js} +1 -1
  112. package/dist/cdn/{shared-cbb340fa.js → shared-a6c41415.js} +1 -1
  113. package/dist/cdn/{shared-e66740a4.js → shared-aa1a0a7c.js} +1 -1
  114. package/dist/cdn/shared-b160a8b2.js +1 -0
  115. package/dist/cdn/{shared-41655ecf.js → shared-b5179f8e.js} +1 -1
  116. package/dist/cdn/{shared-07834676.js → shared-b886c58b.js} +1 -1
  117. package/dist/cdn/shared-ba11b8bd.js +1 -0
  118. package/dist/cdn/{shared-408341aa.js → shared-bbf4b58e.js} +1 -1
  119. package/dist/cdn/shared-bc72765e.js +1 -0
  120. package/dist/cdn/{shared-4c0520f6.js → shared-bfca826a.js} +1 -1
  121. package/dist/cdn/{shared-cbbd7f8c.js → shared-c6ed1e9d.js} +1 -1
  122. package/dist/cdn/shared-c7bd91d8.js +29 -0
  123. package/dist/cdn/{shared-09d39b25.js → shared-cd5789ea.js} +1 -1
  124. package/dist/cdn/{shared-403fd4e3.js → shared-d0e0fe52.js} +1 -1
  125. package/dist/cdn/{shared-ea418c18.js → shared-d44a2a31.js} +1 -1
  126. package/dist/cdn/shared-d4d52840.js +1 -0
  127. package/dist/cdn/{shared-d8b553fa.js → shared-d6ba6d5e.js} +1 -1
  128. package/dist/cdn/{shared-ca0f14c1.js → shared-e34d2ef1.js} +1 -1
  129. package/dist/cdn/{shared-44f45339.js → shared-e7b5cc83.js} +1 -1
  130. package/dist/cdn/{shared-b15671a5.js → shared-fe555bf4.js} +1 -1
  131. package/dist/cdn/translations/gift-card-code-form/en.json +25 -22
  132. package/dist/cdn/translations/gift-card-code-log-card/en.json +10 -0
  133. package/dist/cdn/translations/gift-card-form/en.json +34 -2
  134. package/dist/cdn/translations/item-category-form/en.json +196 -0
  135. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +1 -0
  136. package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
  137. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +1 -1
  138. package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
  139. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +1 -1
  140. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  141. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +17 -0
  142. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +57 -0
  143. package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -0
  144. package/dist/elements/internal/InternalSelectControl/index.d.ts +5 -0
  145. package/dist/elements/internal/InternalSelectControl/index.js +7 -0
  146. package/dist/elements/internal/InternalSelectControl/index.js.map +1 -0
  147. package/dist/elements/internal/InternalSelectControl/types.d.ts +6 -0
  148. package/dist/elements/internal/InternalSelectControl/types.js +2 -0
  149. package/dist/elements/internal/InternalSelectControl/types.js.map +1 -0
  150. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +1 -0
  151. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  152. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +4 -2
  153. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +26 -6
  154. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  155. package/dist/elements/public/GiftCardCodeForm/index.d.ts +3 -1
  156. package/dist/elements/public/GiftCardCodeForm/index.js +3 -1
  157. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
  158. package/dist/elements/public/GiftCardCodeForm/internal/{InternalGiftCardCodeFormTransactionControl/InternalGiftCardCodeFormTransactionControl.d.ts → InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.d.ts} +1 -1
  159. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js +23 -0
  160. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/InternalGiftCardCodeFormItemControl.js.map +1 -0
  161. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.d.ts +6 -0
  162. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js +8 -0
  163. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormItemControl/index.js.map +1 -0
  164. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +12 -0
  165. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +108 -0
  166. package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -0
  167. package/dist/elements/public/GiftCardCodeLogCard/index.d.ts +6 -0
  168. package/dist/elements/public/GiftCardCodeLogCard/index.js +8 -0
  169. package/dist/elements/public/GiftCardCodeLogCard/index.js.map +1 -0
  170. package/dist/elements/public/GiftCardCodeLogCard/types.d.ts +3 -0
  171. package/dist/elements/public/GiftCardCodeLogCard/types.js +2 -0
  172. package/dist/elements/public/GiftCardCodeLogCard/types.js.map +1 -0
  173. package/dist/elements/public/GiftCardForm/GiftCardForm.js +4 -10
  174. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  175. package/dist/elements/public/ItemCard/ItemCard.js +8 -6
  176. package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
  177. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +6 -0
  178. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +11 -0
  179. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -0
  180. package/dist/elements/public/ItemCategoryCard/index.d.ts +2 -0
  181. package/dist/elements/public/ItemCategoryCard/index.js +4 -0
  182. package/dist/elements/public/ItemCategoryCard/index.js.map +1 -0
  183. package/dist/elements/public/ItemCategoryCard/types.d.ts +3 -0
  184. package/dist/elements/public/ItemCategoryCard/types.js +2 -0
  185. package/dist/elements/public/ItemCategoryCard/types.js.map +1 -0
  186. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +31 -0
  187. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +309 -0
  188. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -0
  189. package/dist/elements/public/ItemCategoryForm/index.d.ts +10 -0
  190. package/dist/elements/public/ItemCategoryForm/index.js +12 -0
  191. package/dist/elements/public/ItemCategoryForm/index.js.map +1 -0
  192. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +8 -0
  193. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +52 -0
  194. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +1 -0
  195. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +6 -0
  196. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +8 -0
  197. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +1 -0
  198. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +11 -0
  199. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +85 -0
  200. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +1 -0
  201. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +5 -0
  202. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +7 -0
  203. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +1 -0
  204. package/dist/elements/public/ItemCategoryForm/types.d.ts +3 -0
  205. package/dist/elements/public/ItemCategoryForm/types.js +2 -0
  206. package/dist/elements/public/ItemCategoryForm/types.js.map +1 -0
  207. package/dist/elements/public/NucleonElement/API.js +1 -1
  208. package/dist/elements/public/NucleonElement/API.js.map +1 -1
  209. package/dist/elements/public/index.d.ts +3 -0
  210. package/dist/elements/public/index.defined.d.ts +3 -0
  211. package/dist/elements/public/index.defined.js +3 -0
  212. package/dist/elements/public/index.defined.js.map +1 -1
  213. package/dist/elements/public/index.js +3 -0
  214. package/dist/elements/public/index.js.map +1 -1
  215. package/dist/mixins/themeable.js +16 -40
  216. package/dist/mixins/themeable.js.map +1 -1
  217. package/package.json +1 -1
  218. package/dist/cdn/shared-1c660ed1.js +0 -1
  219. package/dist/cdn/shared-27ef5935.js +0 -1
  220. package/dist/cdn/shared-3368abe5.js +0 -1
  221. package/dist/cdn/shared-4b5b7eb5.js +0 -1
  222. package/dist/cdn/shared-85bcfcde.js +0 -1
  223. package/dist/cdn/shared-8ec9793b.js +0 -1
  224. package/dist/cdn/shared-9b392ba8.js +0 -1
  225. package/dist/cdn/shared-b4865438.js +0 -29
  226. package/dist/cdn/shared-b778d103.js +0 -1
  227. package/dist/cdn/shared-d988a664.js +0 -1
  228. package/dist/cdn/shared-ebb63c77.js +0 -1
  229. package/dist/cdn/shared-f4056083.js +0 -1
  230. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormTransactionControl/InternalGiftCardCodeFormTransactionControl.js +0 -50
  231. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormTransactionControl/InternalGiftCardCodeFormTransactionControl.js.map +0 -1
  232. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormTransactionControl/index.d.ts +0 -5
  233. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormTransactionControl/index.js +0 -7
  234. package/dist/elements/public/GiftCardCodeForm/internal/InternalGiftCardCodeFormTransactionControl/index.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{I as e,_ as t}from"./shared-ca0f14c1.js";import{F as a}from"./shared-09d39b25.js";import{E as s,T as i}from"./shared-ea418c18.js";import"./shared-f48ff40a.js";import"./shared-1009388a.js";import"./shared-07834676.js";import"./shared-cbbd7f8c.js";import"./shared-19ae2188.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-7f33a83a.js";import{h as u,P as c}from"./shared-833a8b4e.js";import"./shared-63e71a69.js";import{p as m}from"./shared-8ec9793b.js";import{a as p,y as v}from"./shared-b4865438.js";import{T as g,U as b,V as _,W as y,X as f,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-3a7cf739.js";import{s as z}from"./shared-11c2efc8.js";import{i as q}from"./shared-4c0520f6.js";var L={raise:g,send:b,sendParent:_,sendUpdate:y,log:f,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:a,name:s,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)a[s]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");a.getAttribute(s)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
1
+ import{I as e,_ as t}from"./shared-e34d2ef1.js";import{F as a}from"./shared-cd5789ea.js";import{E as s,T as i}from"./shared-d44a2a31.js";import"./shared-2b54d9fe.js";import"./shared-6534863a.js";import"./shared-b886c58b.js";import"./shared-c6ed1e9d.js";import"./shared-23e21265.js";import{d as r,P as n,A as o,L as l,c as d,h}from"./shared-7f33a83a.js";import{h as u,P as c}from"./shared-64e3f8da.js";import"./shared-6f83a8cf.js";import{p as m}from"./shared-5f82e90e.js";import{T as p,a as v}from"./shared-83344a27.js";import{T as g,U as b,V as _,W as f,X as y,Y as x,Z as w,$ as E,b as T,a0 as $,a1 as A,a2 as S,a3 as k,a4 as V,a5 as C,a6 as I,m as M,a7 as j}from"./shared-86d0d927.js";import{s as z}from"./shared-11c2efc8.js";import{i as q}from"./shared-bfca826a.js";var L={raise:g,send:b,sendParent:_,sendUpdate:f,log:y,cancel:x,start:w,stop:E,assign:T,after:$,done:A,respond:S,forwardTo:k,escalate:V,choose:C,pure:I};const F=r((e=>t=>{const{element:a,name:s,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof n)a[s]!==e&&t.setValue(e);else{if(!(t instanceof o))throw new Error("live directive can only be used on attributes or properties");a.getAttribute(s)!==e&&t.setValue(e)}}));class O extends CustomEvent{constructor(e){super("change",{detail:e})}}const P=u`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {
@@ -0,0 +1 @@
1
+ import{_ as e,I as t}from"./shared-e34d2ef1.js";import{L as s,c as i,h as a}from"./shared-7f33a83a.js";import{A as o}from"./shared-565feb2f.js";import{C as n}from"./shared-84b5d8f0.js";import{T as l,R as d}from"./shared-c7bd91d8.js";import{F as r}from"./shared-86d0d927.js";import{T as h}from"./shared-83344a27.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class m extends CustomEvent{constructor(){super("show")}}let p,v=e=>e;class b extends(l(d(s))){static get styles(){return[super.styles,i(p||(p=v`:host{position:relative;z-index:200}`))]}}let _,y,f,g,w,x,$,D=e=>e;const k=h(n(l(t(s))));class E extends k{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.alert=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&E.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},alert:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,i(_||(_=D`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=E.dialogWindows.get(this))||void 0===e||e.remove(),E.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(E.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof r&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))})),null==s||s.appendChild(e),E.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return a(y||(y=D``));const t=E.openDialogs[0]===this,s=E.openDialogs[1]===this,i=E.openDialogs[2]===this,o=!t&&!s&&!i;return a(f||(f=D` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="flex-1 overflow-y-auto overflow-x-hidden overscroll-contain"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform origin-bottom ease-in-out transition duration-500 relative h-full ml-auto sm-origin-center sm-max-w-modal":!0,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":i&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":o&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?a(g||(g=D` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):a(w||(w=D`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?a(x||(x=D` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):a($||($=D`<div></div>`)),null==e?void 0:e())}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(E.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new E.HideEvent(!!e))}async show(e){this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...E.openDialogs]);const t=this.renderRoot.querySelector("#close-button");null==t||t.focus(),this.dispatchEvent(new E.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){E.openDialogs.length=0,E.openDialogs.push(...e),await Promise.all([Promise.all(E.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{this.renderRoot.querySelector("#backdrop").addEventListener("transitionend",e,{once:!0}),this.__visible=E.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}E.dialogWindowsHost="#foxy-dialog-windows-host, body",E.dialogWindows=new WeakMap,E.openDialogs=[],E.ShowEvent=m,E.HideEvent=u,customElements.define("foxy-dialog-window",b);export{E as D};
@@ -0,0 +1 @@
1
+ import{c as e,g as t,b as n,d as o,e as i,_ as r}from"./shared-e34d2ef1.js";import{t as a}from"./shared-c7bd91d8.js";function s(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach((function(t){l(e,t,n[t])}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function g(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var h=e((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),d=t(h);function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&b(e,t)}var w={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},x=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.init(t,n)}return g(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||w,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,o){return o&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,c({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),S=function(){function e(){p(this,e),this.observers={}}return g(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var r=[].concat(this.observers["*"]);r.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function L(){var e,t,n=new Promise((function(n,o){e=n,t=o}));return n.resolve=e,n.reject=t,n}function O(e){return null==e?"":""+e}function R(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function j(e,t,n){function o(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var r="string"!=typeof t?[].concat(t):t.split(".");r.length>1;){if(i())return{};var a=o(r.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:o(r.shift())}}function P(e,t,n){var o=j(e,t,Object);o.obj[o.k]=n}function _(e,t){var n=j(e,t),o=n.obj,i=n.k;if(o)return o[i]}function C(e,t,n){var o=_(e,n);return void 0!==o?o:_(t,n)}function N(e,t,n){for(var o in t)"__proto__"!==o&&"constructor"!==o&&(o in e?"string"==typeof e[o]||e[o]instanceof String||"string"==typeof t[o]||t[o]instanceof String?n&&(e[o]=t[o]):N(e[o],t[o],n):e[o]=t[o]);return e}function E(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var T={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function F(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return T[e]})):e}var I="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return p(this,t),n=y(this,m(t).call(this)),I&&S.call(v(n)),n.data=e||{},n.options=o,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return k(t,S),g(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,r=[e,t];return n&&"string"!=typeof n&&(r=r.concat(n)),n&&"string"==typeof n&&(r=r.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=e.split(".")),_(this.data,r)}},{key:"addResource",value:function(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},r=this.options.keySeparator;void 0===r&&(r=".");var a=[e,t];n&&(a=a.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(o=t,t=(a=e.split("."))[1]),this.addNamespaces(t),P(this.data,a,o),i.silent||this.emit("added",e,t,n,o)}},{key:"addResources",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});o.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(o=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=_(this.data,a)||{};o?N(s,n,i):s=c({},s,n),P(this.data,a,s),r.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?c({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(),M={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,o,i){var r=this;return e.forEach((function(e){r.processors[e]&&(t=r.processors[e].process(t,n,o,i))})),t}},q={},H=function(e){function t(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,t),n=y(this,m(t).call(this)),I&&S.call(v(n)),R(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,v(n)),n.options=o,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=x.create("translator"),n}return k(t,S),g(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:i};var a=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(o)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,n,o){var i=this;if("object"!==u(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,l=a.namespaces,p=l[l.length-1],f=n.lng||this.language,g=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(g){var h=n.nsSeparator||this.options.nsSeparator;return p+h+s}return s}var d=this.resolve(e,n),v=d&&d.res,y=d&&d.usedKey||s,m=d&&d.exactUsedKey||s,b=Object.prototype.toString.apply(v),k=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(x&&v&&S&&k.indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(r){var L="[object Array]"===b,O=L?[]:{},R=L?m:y;for(var j in v)if(Object.prototype.hasOwnProperty.call(v,j)){var P="".concat(R).concat(r).concat(j);O[j]=this.translate(P,c({},n,{joinArrays:!1,ns:l})),O[j]===P&&(O[j]=v[j])}v=O}}else if(x&&"string"==typeof w&&"[object Array]"===b)(v=v.join(w))&&(v=this.extendTranslation(v,e,n,o));else{var _=!1,C=!1,N=void 0!==n.count&&"string"!=typeof n.count,E=t.hasDefaultValue(n),T=N?this.pluralResolver.getSuffix(f,n.count):"",F=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(v)&&E&&(_=!0,v=F),this.isValidLookup(v)||(C=!0,v=s);var I=E&&F!==v&&this.options.updateMissing;if(C||_||I){if(this.logger.log(I?"updateKey":"missingKey",f,p,s,I?F:v),r){var A=this.resolve(s,c({},n,{keySeparator:!1}));A&&A.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.")}var M=[],q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&q&&q[0])for(var H=0;H<q.length;H++)M.push(q[H]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(n.lng||this.language):M.push(n.lng||this.language);var U=function(e,t,o){i.options.missingKeyHandler?i.options.missingKeyHandler(e,p,t,I?o:v,I,n):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,p,t,I?o:v,I,n),i.emit("missingKey",e,p,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?M.forEach((function(e){i.pluralResolver.getSuffixes(e).forEach((function(t){U([e],s+t,n["defaultValue".concat(t)]||F)}))})):U(M,s,F))}v=this.extendTranslation(v,e,n,d,o),C&&v===s&&this.options.appendNamespaceToMissingKey&&(v="".concat(p,":").concat(s)),C&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,o,i){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(c({},n,{interpolation:c({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=c({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),s){var p=e.match(this.interpolator.nestingRegexp);a<(p&&p.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return i&&i[0]===o[0]&&!n.context?(r.logger.warn("It seems you are nesting recursively key: ".concat(o[0]," in key: ").concat(t[0])),null):r.translate.apply(r,o.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,g="string"==typeof f?[f]:f;return null!=e&&g&&g.length&&!1!==n.applyPostProcessor&&(e=M.handle(g,e,t,this.options&&this.options.postProcessPassResolved?c({i18nResolved:o},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,o,i,r,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,g=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(r=e,!q["".concat(g[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(r)&&(q["".concat(g[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(g.join(", "),'" won\'t get resolved as namespace "').concat(r,'" 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!!!")),g.forEach((function(n){if(!a.isValidLookup(t)){i=n;var r,u,c=l,g=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(g,l,n,e,s);else p&&(r=a.pluralResolver.getSuffix(n,s.count)),p&&f&&g.push(c+r),f&&g.push(c+="".concat(a.options.contextSeparator).concat(s.context)),p&&g.push(c+=r);for(;u=g.pop();)a.isValidLookup(t)||(o=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:r}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,o):this.resourceStore.getResource(e,t,n,o)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}();function U(e){return e.charAt(0).toUpperCase()+e.slice(1)}var V=function(){function e(t){p(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=x.create("languageUtils")}return g(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=U(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=U(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=U(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return 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.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var o=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(o)||(t=o)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var o=n.getLanguagePartFromCode(e);if(n.isSupportedCode(o))return t=o;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(o))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,o=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):"string"==typeof e&&r(this.formatLanguageCode(e)),o.forEach((function(e){i.indexOf(e)<0&&r(n.formatLanguageCode(e))})),i}}]),e}(),D=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{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","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"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],K={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function B(){var e={};return D.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:K[t.fc]}}))})),e}var z=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,e),this.languageUtils=t,this.options=n,this.logger=x.create("pluralResolver"),this.rules=B()}return g(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,o=this.getRule(e);if(o){var i=o.noAbs?o.plurals(t):o.plurals(Math.abs(t)),r=o.numbers[i];this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]&&(2===r?r="plural":1===r&&(r=""));var a=function(){return n.options.prepend&&r.toString()?n.options.prepend+r.toString():r.toString()};return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?"_plural_".concat(r.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===o.numbers.length&&1===o.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.logger=x.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return g(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:F,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?E(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?E(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?E(t.nestingPrefix):t.nestingPrefixEscaped||E("$t("),this.nestingSuffix=t.nestingSuffix?E(t.nestingSuffix):t.nestingSuffixEscaped||E(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,o){var i,r,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var i=C(t,u,e);return s.alwaysFormat?s.format(i,void 0,n):i}var r=e.split(s.formatSeparator),a=r.shift().trim(),l=r.join(s.formatSeparator).trim();return s.format(C(t,u,a),l,n,o)};this.resetRegExp();var p=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;i=t.regex.exec(e);){if(void 0===(r=c(i[1].trim())))if("function"==typeof p){var n=p(e,i,o);r="string"==typeof n?n:""}else{if(f){r=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),r=""}else"string"==typeof r||s.useRawValueToEscape||(r=O(r));if(e=e.replace(i[0],t.safeValue(r)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,o,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=c({},r);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var o=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(o[1]);e=o[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=c({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var p=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=p.shift(),u=p,l=!0}if((o=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof o)return o;"string"!=typeof o&&(o=O(o)),o||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),o=""),l&&(o=u.reduce((function(e,t){return i.format(e,t,r.lng,r)}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}]),e}();var X=function(e){function t(e,n,o){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return p(this,t),i=y(this,m(t).call(this)),I&&S.call(v(i)),i.backend=e,i.store=n,i.services=o,i.languageUtils=o.languageUtils,i.options=r,i.logger=x.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,r.backend,r),i}return k(t,S),g(t,[{key:"queueLoad",value:function(e,t,n,o){var i=this,r=[],a=[],s=[],u=[];return e.forEach((function(e){var o=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,o=!1,a.indexOf(s)<0&&a.push(s),r.indexOf(s)<0&&r.push(s),u.indexOf(t)<0&&u.push(t)))})),o||s.push(e)})),(r.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:o}),{toLoad:r,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var o=e.split("|"),i=o[0],r=o[1];t&&this.emit("failedLoading",i,r,t),n&&this.store.addResourceBundle(i,r,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var o,s,u,l,c,p;o=n.loaded,s=r,l=j(o,[i],Object),c=l.obj,p=l.k,c[p]=c[p]||[],u&&(c[p]=c[p].concat(s)),u||c[p].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&i<5?setTimeout((function(){o.read.call(o,e,t,n,i+1,2*r,a)}),r):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var r=this.queueLoad(e,t,o,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=e.split("|"),i=o[0],r=o[1];this.read(i,r,"read",void 0,void 0,(function(o,a){o&&t.logger.warn("".concat(n,"loading namespace ").concat(r," for language ").concat(i," failed"),o),!o&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(r," for language ").concat(i),a),t.loaded(e,o,a)}))}},{key:"saveMissing",value:function(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" 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!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,o,null,c({},r,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,o))}}]),t}();function W(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===u(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===u(e[2])||"object"===u(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,o){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function G(){}var Y=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(p(this,t),e=y(this,m(t).call(this)),I&&S.call(v(e)),e.options=J(n),e.services={},e.logger=x,e.modules={external:[]},o&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,o),y(e,v(e));setTimeout((function(){e.init(n,o)}),0)}return e}return k(t,S),g(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=c({},W(),this.options,J(t)),this.format=this.options.interpolation.format,n||(n=G),!this.options.isClone){this.modules.logger?x.init(o(this.modules.logger),this.options):x.init(null,this.options);var i=new V(this.options);this.store=new A(this.options.resources,this.options);var r=this.services;r.logger=x,r.resourceStore=this.store,r.languageUtils=i,r.pluralResolver=new z(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r.interpolator=new $(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},r.backendConnector=new X(o(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.on("*",(function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];e.emit.apply(e,[t].concat(o))})),this.modules.languageDetector&&(r.languageDetector=o(this.modules.languageDetector),r.languageDetector.init(r,this.options.detection,this.options)),this.modules.i18nFormat&&(r.i18nFormat=o(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new H(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];e.emit.apply(e,[t].concat(o))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var l=L(),p=function(){var t=function(t,o){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(o),n(t,o)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),l}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,o=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return o();var r=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(r,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(e,t,n){var o=L();return e||(e=this.languages),t||(t=this.options.ns),n||(n=G),this.services.backendConnector.reload(e,t,(function(e){o.resolve(),n(e)})),o}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&M.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var o=L();this.emit("languageChanging",e);var i=function(e){var i="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);i&&(n.language||(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i)),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(e){!function(e,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,o.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var i;if("object"!==u(o)){for(var r=arguments.length,a=new Array(r>2?r-2:0),s=2;s<r;s++)a[s-2]=arguments[s];i=n.options.overloadTranslationOptionHandler([t,o].concat(a))}else i=c({},o);return i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,n.t(t,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===o.toLowerCase())return!0;var a=function(e,n){var o=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===o||2===o};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(o,e)||(!this.services.backendConnector.backend||!(!a(o,e)||i&&!a(r,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,o=L();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){o.resolve(),t&&t(e)})),o):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=L();"string"==typeof e&&(e=[e]);var o=this.options.preload||[],i=e.filter((function(e){return o.indexOf(e)<0}));return i.length?(this.options.preload=o.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["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"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,i=c({},this.options,n,{isClone:!0}),r=new t(i),a=["store","services","language"];return a.forEach((function(t){r[t]=e[t]})),r.services=c({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r.translator=new H(r.services,r.options),r.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];r.emit.apply(r,[e].concat(n))})),r.init(i,o),r.translator.options=r.options,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}}]),t}());function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}var Z=[],ee=Z.forEach,te=Z.slice;function ne(e){return ee.call(te.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}function oe(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":Q(XMLHttpRequest))}var ie,re,ae,se=e((function(e,t){var r;if("function"==typeof fetch&&(void 0!==n&&n.fetch?r=n.fetch:"undefined"!=typeof window&&window.fetch&&(r=window.fetch)),void 0!==o&&("undefined"==typeof window||void 0===window.document)){var a=r||i;a.default&&(a=a.default),t.default=a,e.exports=t.default}})),ue=s({__proto__:null,default:se},[se]);function le(e){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},le(e)}"function"==typeof fetch&&("undefined"!=typeof global&&global.fetch?ie=global.fetch:"undefined"!=typeof window&&window.fetch&&(ie=window.fetch)),oe&&("undefined"!=typeof global&&global.XMLHttpRequest?re=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(re=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?ae=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(ae=window.ActiveXObject)),ie||!ue||re||ae||(ie=se||ue),"function"!=typeof ie&&(ie=void 0);var ce=function(e,t){if(t&&"object"===le(t)){var n="";for(var o in t)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(t[o]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},pe=function(e,t,n,o){return"function"==typeof n&&(o=n,n=void 0),o=o||function(){},ie?function(e,t,n,o){e.queryStringParams&&(t=ce(t,e.queryStringParams));var i=ne({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);n&&(i["Content-Type"]="application/json"),ie(t,ne({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},"function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions)).then((function(e){if(!e.ok)return o(e.statusText||"Error",{status:e.status});e.text().then((function(t){o(null,{status:e.status,data:t})})).catch(o)})).catch(o)}(e,t,n,o):oe||"function"==typeof ActiveXObject?function(e,t,n,o){n&&"object"===le(n)&&(n=ce("",n).slice(1)),e.queryStringParams&&(t=ce(t,e.queryStringParams));try{var i;(i=re?new re:new ae("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var r=e.customHeaders;if(r="function"==typeof r?r():r)for(var a in r)i.setRequestHeader(a,r[a]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}}(e,t,n,o):void 0};function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var he=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,n||"")},request:pe,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},de=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};fe(this,e),this.services=t,this.options=n,this.allOptions=o,this.type="backend",this.init(t,n,o)}var t,n,o;return t=e,n=[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=ne(n,this.options||{},he()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval((function(){return t.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,o,i){var r,a=this,s=this.options.loadPath;"function"==typeof this.options.loadPath&&(s=this.options.loadPath(e,n)),(s=function(e){return!!e&&"function"==typeof e.then}(r=s)?r:Promise.resolve(r)).then((function(r){var s=a.services.interpolator.interpolate(r,{lng:e.join("+"),ns:n.join("+")});a.loadUrl(s,i,t,o)}))}},{key:"loadUrl",value:function(e,t,n,o){var i=this;this.options.request(this.options,e,void 0,(function(r,a){if(a&&(a.status>=500&&a.status<600||!a.status))return t("failed loading "+e+"; status code: "+a.status,!0);if(a&&a.status>=400&&a.status<500)return t("failed loading "+e+"; status code: "+a.status,!1);if(!a&&r&&r.message&&r.message.indexOf("Failed to fetch")>-1)return t("failed loading "+e+": "+r.message,!0);if(r)return t(r,!1);var s,u;try{s="string"==typeof a.data?i.options.parse(a.data,n,o):a.data}catch(t){u="failed parsing "+e+" to json"}if(u)return t(u,!1);t(null,s)}))}},{key:"create",value:function(e,t,n,o,i){var r=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var a=this.options.parsePayload(t,n,o),s=0,u=[],l=[];e.forEach((function(n){var o=r.options.addPath;"function"==typeof r.options.addPath&&(o=r.options.addPath(n,t));var c=r.services.interpolator.interpolate(o,{lng:n,ns:t});r.options.request(r.options,c,a,(function(t,n){s+=1,u.push(t),l.push(n),s===e.length&&i&&i(u,l)}))}))}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,o=t.languageUtils,i=t.logger,r=n.language;if(!r||"cimode"!==r.toLowerCase()){var a=[],s=function(e){o.toResolveHierarchy(e).forEach((function(e){a.indexOf(e)<0&&a.push(e)}))};s(r),this.allOptions.preload&&this.allOptions.preload.forEach((function(e){return s(e)})),a.forEach((function(t){e.allOptions.ns.forEach((function(e){n.read(t,e,"read",null,null,(function(o,r){o&&i.warn("loading namespace ".concat(e," for language ").concat(t," failed"),o),!o&&r&&i.log("loaded namespace ".concat(e," for language ").concat(t),r),n.loaded("".concat(t,"|").concat(e),o,r)}))}))}))}}}],n&&ge(t.prototype,n),o&&ge(t,o),e}();de.type="backend";let ve="";try{ve="https://static.www.foxycart.com/beta/foxy-elements/0.3.0"}catch(e){}class ye extends a{constructor(e="global"){super(),this.__lang=this._i18n.options.fallbackLng[0],this.__ns=this._i18n.options.fallbackNS[0],this.ns=e,this._whenI18nReady.then((()=>this.requestUpdate()))}static get properties(){return r(r({},super.properties),{},{lang:{type:String,noAccessor:!0},ns:{type:String,noAccessor:!0}})}get lang(){return this.__lang}set lang(e){e&&"undefined"!==e&&(this.__lang=e,this._i18n.loadLanguages(e).then((()=>{this.__lang===e&&this.requestUpdate()})))}get ns(){return this.__ns}set ns(e){this.__ns=e,this._i18n.loadNamespaces(e).then((()=>{this.__ns===e&&this.requestUpdate()}))}static __initI18N(){return this.__i18n=Y.createInstance(),this.__i18n.use(de),this.__whenI18NReady=this.__i18n.init({ns:["global"],supportedLngs:["nl","en","es","sv","fi","fr","de","zh","no","it","pl","se"],interpolation:{format:ye.__f},fallbackLng:"en",fallbackNS:"global",defaultNS:"global",detection:{order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{loadPath:`${ve}/translations/{{ns}}/{{lng}}.json`}}),this.__whenI18NReady.then((()=>this.__isI18NReady=!0)),this.__i18n}get _i18n(){var e;return null!==(e=ye.__i18n)&&void 0!==e?e:ye.__initI18N()}get _whenI18nReady(){return ye.__whenI18NReady}get _isI18nReady(){return ye.__isI18NReady}get _t(){const e=[this.__ns,this._i18n.options.fallbackNS];return this._i18n.getFixedT(this.__lang,e)}}ye.__fLowercase=e=>e.toLowerCase(),ye.__fList=e=>e.map(((e,t,n)=>{if(0===t)return e;return`${t===n.length-1?" $t(and) ":","} ${e}`})).join(""),ye.__f=(...e)=>{var t,n;const o=e[0];return(null!==(n=null===(t=e[1])||void 0===t?void 0:t.split(" "))&&void 0!==n?n:[]).reduce(((e,t)=>{switch(t){case"lowercase":return ye.__fLowercase(e);case"list":return ye.__fList(e);default:return e}}),o)},ye.__isI18NReady=!1;const me=(e,t="")=>class extends e{constructor(){super(...arguments),this.lang="",this.ns=t,this.t=(e,t)=>{const n=customElements.get("foxy-i18n");if(!n)return e;const o=[...this.ns.split(" ").reverse().map((e=>e.trim())).filter((e=>e.length>0)).reverse().map(((t,n,o)=>`${t}:${[...o.slice(n+1),e].join(".")}`)),`shared:${e}`];return n.i18next.t(o,r({lng:this.lang},t)).toString()}}static get inferredProperties(){return[...super.inferredProperties,"lang","ns"]}static get properties(){return r(r({},super.properties),{},{lang:{type:String},ns:{type:String}})}static get defaultNS(){return t}connectedCallback(){super.connectedCallback();const e=customElements.get("foxy-i18n");this.__untrackTranslations=null==e?void 0:e.onTranslationChange((()=>this.requestUpdate()))}updated(e){super.updated(e);const t=customElements.get("foxy-i18n");t&&(e.has("lang")&&t.i18next.loadLanguages(this.lang),e.has("ns")&&t.i18next.loadNamespaces(this.ns.split(" ")))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__untrackTranslations)||void 0===e||e.call(this)}applyInferredProperties(e){if(super.applyInferredProperties(e),null===this.infer)return;const n=e.get("lang"),o=e.get("ns");this.lang=null!=n?n:"",this.ns=o?`${o} ${this.infer}`.trim():t}};export{me as T,ye as a,Y as i};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-ca0f14c1.js";import{h as t}from"./shared-7f33a83a.js";import{B as r}from"./shared-3a7cf739.js";import{i as s}from"./shared-d3bf9ac0.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=r.False,this.disabled=!1,this.disabledControls=r.False,this.hidden=!1,this.hiddenControls=r.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return e(e({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}}})}get readonlySelector(){return this.readonly?r.True:this.readonlyControls}get disabledSelector(){return this.disabled?r.True:this.disabledControls}get hiddenSelector(){return this.hidden?r.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(t=!1){const r=t?{}:e({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,r){const l=null!=e?e:"default",d=this.templates[l];if(!d)return t(o||(o=n`<slot name="${0}"></slot>`),s(e));return t(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=r?r:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(t,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(e){if(super.applyInferredProperties(e),null===this.infer)return;const t=e.get("disabledSelector"),s=e.get("disabled"),o=e.get("readonlySelector"),i=e.get("readonly"),n=e.get("hiddenSelector"),l=e.get("hidden"),d=e.get("templates"),a=e.get("mode"),h=r.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=e=>{var t;return null!==(t=this.infer?null==e?void 0:e.zoom(this.infer):e)&&void 0!==t?t:r.False};this.disabledControls=u(t),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
1
+ import{_ as e}from"./shared-e34d2ef1.js";import{h as t}from"./shared-7f33a83a.js";import{B as r}from"./shared-86d0d927.js";import{i as s}from"./shared-d3bf9ac0.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=r.False,this.disabled=!1,this.disabledControls=r.False,this.hidden=!1,this.hiddenControls=r.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return e(e({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:e=>new r(null!=e?e:"")}}})}get readonlySelector(){return this.readonly?r.True:this.readonlyControls}get disabledSelector(){return this.disabled?r.True:this.disabledControls}get hiddenSelector(){return this.hidden?r.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(t=!1){const r=t?{}:e({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,r){const l=null!=e?e:"default",d=this.templates[l];if(!d)return t(o||(o=n`<slot name="${0}"></slot>`),s(e));return t(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=r?r:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(t,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(e){if(super.applyInferredProperties(e),null===this.infer)return;const t=e.get("disabledSelector"),s=e.get("disabled"),o=e.get("readonlySelector"),i=e.get("readonly"),n=e.get("hiddenSelector"),l=e.get("hidden"),d=e.get("templates"),a=e.get("mode"),h=r.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=e=>{var t;return null!==(t=this.infer?null==e?void 0:e.zoom(this.infer):e)&&void 0!==t?t:r.False};this.disabledControls=u(t),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
@@ -1 +1 @@
1
- import{I as e,_ as t}from"./shared-ca0f14c1.js";import{L as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-3a7cf739.js";import{A as u}from"./shared-9b392ba8.js";import{U as _}from"./shared-7684cb05.js";import{i as d}from"./shared-4c0520f6.js";function c(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,u,_,d,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(_=null===(u=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===u?void 0:u.self)||void 0===_?void 0:_.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),u=new URL(e);return a.searchParams.set("offset",o.length.toString()),u.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:u.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}class l extends(e(s)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=d(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new u(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=l.Rumour(this.group),i=[...this.related,this.parent];return r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){this.__destroyRumour();const e=await this._fetch(this.href);return l.Rumour(this.group).share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return l.Rumour(this.group).share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){this.__destroyRumour();const e=await this._fetch(this.href,{method:"DELETE"}),t=l.Rumour(this.group),s=[...this.related,this.parent];return t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{e.changed&&(this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue())})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__createRumour(){const e=l.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new l.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=c(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}l.UpdateEvent=_,l.Rumour=i((()=>new h)),l.API=u;export{l as N,c as s};
1
+ import{I as e,_ as t}from"./shared-e34d2ef1.js";import{L as s}from"./shared-7f33a83a.js";import{t as r,m as i,a as n,b as o,R as h,F as a}from"./shared-86d0d927.js";import{A as u}from"./shared-565feb2f.js";import{U as _}from"./shared-7684cb05.js";import{i as d}from"./shared-bfca826a.js";function c(e,t){let s=null;return r(t).forEach((function(){var t,r,i,n,o,h,a,u,_,d,c;if(null===(i=null===(r=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===r?void 0:r.self)||void 0===i?void 0:i.href){const t=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,r=new URL(null===(_=null===(u=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===u?void 0:u.self)||void 0===_?void 0:_.href);if(r.searchParams.delete("zoom"),e===t||e===r.toString())return s=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(d=this.node)||void 0===d?void 0:d._links)&&void 0!==c?c:{}).some((([t,r])=>{var i,n;if(r.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(e),u=new URL(e);return a.searchParams.set("offset",o.length.toString()),u.searchParams.set("offset",h.toString()),s=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:u.toString()},prev:{href:e},next:{href:a.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(s,{status:s?200:404})}class l extends(e(s)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__href="",this.__group="",this.__fetchEventQueue=[],this.__service=d(n.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:o({errors:e=>{const s=this.constructor.v8n,r=t(t({},e.data),e.edits);return s.map((e=>e(r))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:s}=this.__service.state.context;return t(t({},e),s)}get data(){return this.__service.state.context.data}set data(e){var t;this.__service.send({type:"SET_DATA",data:e}),this.__href=null!==(t=null==e?void 0:e._links.self.href)&&void 0!==t?t:""}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){return this.__href}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.__service.send({type:"SET_DATA",data:null})}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(){this.__service.send({type:"SUBMIT"})}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}connectedCallback(){super.connectedCallback(),this.href&&this.refresh(),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue()}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected")}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new u(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.parent,{body:t,method:"POST"}),r=l.Rumour(this.group),i=[...this.related,this.parent];return r.share({data:s,related:i,source:s._links.self.href}),this.__createRumour(),s}async _sendGet(){this.__destroyRumour();const e=await this._fetch(this.href);return l.Rumour(this.group).share({data:e,source:this.href}),this.__createRumour(),e}async _sendPatch(e){this.__destroyRumour();const t=JSON.stringify(e),s=await this._fetch(this.href,{body:t,method:"PATCH"});return l.Rumour(this.group).share({data:s,source:this.href,related:this.related}),this.__createRumour(),s}async _sendDelete(){this.__destroyRumour();const e=await this._fetch(this.href,{method:"DELETE"}),t=l.Rumour(this.group),s=[...this.related,this.parent];return t.share({data:null,source:this.href,related:s}),this.__createRumour(),e}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{e.changed&&(this.requestUpdate(),this.dispatchEvent(new _),e.matches("busy")||this.__processFetchEventQueue())})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new _)})),this.__service.start()}__createRumour(){const e=l.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this)}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data;if(!s)return;const r=e(s);r!==s&&this.__service.send({data:r,type:"SET_DATA"})}catch(e){if(!(e instanceof h.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new l.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=c(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof a&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.in("busy")||this.__processFetchEventQueue())))}}l.UpdateEvent=_,l.Rumour=i((()=>new h)),l.API=u;export{l as N,c as s};
@@ -1,4 +1,4 @@
1
- import{S as t,i as e,e as n,f as r,r as i,h as o,j as a,c as s,a as c,g as u,d as l}from"./shared-ca0f14c1.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
1
+ import{S as t,i as e,a as n,f as r,r as i,h as o,j as a,c as s,b as c,g as u,e as l}from"./shared-e34d2ef1.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-ca0f14c1.js";import{a as t,E as s,T as i,C as n}from"./shared-ea418c18.js";import{T as r}from"./shared-07834676.js";import{O as o,I as a}from"./shared-63e71a69.js";import{h as l,D as d,t as A,P as h}from"./shared-833a8b4e.js";import{F as c,P as m,a as u}from"./shared-09d39b25.js";import{z as p,w as g,y as v}from"./shared-b4865438.js";import{c as _,L as y,h as b}from"./shared-7f33a83a.js";import{D as f}from"./shared-b4d0adff.js";class x extends CustomEvent{constructor(e){super("change",{detail:e})}}class w extends x{}const E=l`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{a as e,E as t,T as i,C as s}from"./shared-d44a2a31.js";import{T as o}from"./shared-b886c58b.js";import{O as n,I as l}from"./shared-6f83a8cf.js";import{h as A,D as r,t as a,P as d}from"./shared-64e3f8da.js";import{F as h,P as u,a as m}from"./shared-cd5789ea.js";import"./shared-c7bd91d8.js";const c=A`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -76,23 +76,23 @@ import{_ as e}from"./shared-ca0f14c1.js";import{a as t,E as s,T as i,C as n}from
76
76
  }
77
77
  </style>
78
78
  </template>
79
- </dom-module>`;document.head.appendChild(E.content);
79
+ </dom-module>`;document.head.appendChild(c.content);
80
80
  /**
81
81
  @license
82
82
  Copyright (c) 2017 Vaadin Ltd.
83
83
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
84
84
  */
85
- const k=e=>class extends e{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("click",(e=>this._onClick(e))),this._observer=new c(this,(e=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(e,t,s,i){if(!i&&e){this.setAttribute("aria-orientation",t||"vertical"),this.items.forEach((e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation"),e.updateStyles()})),this._setFocusable(s);const i=e[s];e.forEach((e=>e.selected=e===i)),i&&!i.disabled&&this._scrollToItem(s)}}get focused(){return this.getRootNode().activeElement}_filterItems(e){return e.filter((e=>e._hasVaadinItemMixin))}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let s;t&&!t.disabled&&(s=this.items.indexOf(t))>=0&&(this.selected=s)}_searchKey(e,t){this._searchReset=d.debounce(this._searchReset,A.after(500),(()=>this._searchBuf="")),this._searchBuf+=t.toLowerCase();this.items.some((e=>0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=t.toLowerCase());const s=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(s,1,(e=>!(e.disabled||this._isItemHidden(e))&&0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key.replace(/^Arrow/,""),s=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(t)&&1===t.length){const e=this._searchKey(s,t);return void(e>=0&&this._focus(e))}let i,n;const r=this._isRTL?-1:1;this._vertical&&"Up"===t||!this._vertical&&"Left"===t?(n=-r,i=s-r):this._vertical&&"Down"===t||!this._vertical&&"Right"===t?(n=r,i=s+r):"Home"===t?(n=1,i=0):"End"===t&&(n=-1,i=this.items.length-1),i=this._getAvailableIndex(i,n,(e=>!(e.disabled||this._isItemHidden(e)))),i>=0&&(this._focus(i),e.preventDefault())}_getAvailableIndex(e,t,s){const i=this.items.length;for(let n=0;"number"==typeof e&&n<i;n++,e+=t||1){e<0?e=i-1:e>=i&&(e=0);if(s(this.items[e]))return e}return-1}_isItemHidden(e){return"none"===getComputedStyle(e).display}_setFocusable(e){e=this._getAvailableIndex(e,1,(e=>!e.disabled));const t=this.items[e]||this.items[0];this.items.forEach((e=>e.tabIndex=e===t?0:-1))}_focus(e){const t=this.items[e];this.items.forEach((e=>e.focused=e===t)),this._setFocusable(e),this._scrollToItem(e),t.focus()}focus(){this._observer&&this._observer.flush();const e=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);e&&e.focus()}get _scrollerElement(){}_scrollToItem(e){const t=this.items[e];if(!t)return;const s=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],i=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||t).getBoundingClientRect(),r=(this.items[e-1]||t).getBoundingClientRect();let o=0;!this._isRTL&&n[s[1]]>=i[s[1]]||this._isRTL&&n[s[1]]<=i[s[1]]?o=n[s[1]]-i[s[1]]:(!this._isRTL&&r[s[0]]<=i[s[0]]||this._isRTL&&r[s[0]]>=i[s[0]])&&(o=r[s[0]]-i[s[0]]),this._scroll(o)}get _vertical(){return"horizontal"!==this.orientation}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else{const s=t.detectScrollType(),i=t.getNormalizedScrollLeft(s,this.getAttribute("dir")||"ltr",this._scrollerElement)+e;t.setNormalizedScrollLeft(s,this.getAttribute("dir")||"ltr",this._scrollerElement,i)}}}
85
+ const p=t=>class extends t{static get properties(){return{_hasVaadinListMixin:{value:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}ready(){super.ready(),this.addEventListener("keydown",(e=>this._onKeydown(e))),this.addEventListener("click",(e=>this._onClick(e))),this._observer=new h(this,(e=>{this._setItems(this._filterItems(Array.from(this.children)))}))}_enhanceItems(e,t,i,s){if(!s&&e){this.setAttribute("aria-orientation",t||"vertical"),this.items.forEach((e=>{t?e.setAttribute("orientation",t):e.removeAttribute("orientation"),e.updateStyles()})),this._setFocusable(i);const s=e[i];e.forEach((e=>e.selected=e===s)),s&&!s.disabled&&this._scrollToItem(i)}}get focused(){return this.getRootNode().activeElement}_filterItems(e){return e.filter((e=>e._hasVaadinItemMixin))}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const t=this._filterItems(e.composedPath())[0];let i;t&&!t.disabled&&(i=this.items.indexOf(t))>=0&&(this.selected=i)}_searchKey(e,t){this._searchReset=r.debounce(this._searchReset,a.after(500),(()=>this._searchBuf="")),this._searchBuf+=t.toLowerCase();this.items.some((e=>0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))||(this._searchBuf=t.toLowerCase());const i=1===this._searchBuf.length?e+1:e;return this._getAvailableIndex(i,1,(e=>!(e.disabled||this._isItemHidden(e))&&0===e.textContent.replace(/[^a-zA-Z0-9]/g,"").toLowerCase().indexOf(this._searchBuf)))}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}_onKeydown(e){if(e.metaKey||e.ctrlKey)return;const t=e.key.replace(/^Arrow/,""),i=this.items.indexOf(this.focused);if(/[a-zA-Z0-9]/.test(t)&&1===t.length){const e=this._searchKey(i,t);return void(e>=0&&this._focus(e))}let s,o;const n=this._isRTL?-1:1;this._vertical&&"Up"===t||!this._vertical&&"Left"===t?(o=-n,s=i-n):this._vertical&&"Down"===t||!this._vertical&&"Right"===t?(o=n,s=i+n):"Home"===t?(o=1,s=0):"End"===t&&(o=-1,s=this.items.length-1),s=this._getAvailableIndex(s,o,(e=>!(e.disabled||this._isItemHidden(e)))),s>=0&&(this._focus(s),e.preventDefault())}_getAvailableIndex(e,t,i){const s=this.items.length;for(let o=0;"number"==typeof e&&o<s;o++,e+=t||1){e<0?e=s-1:e>=s&&(e=0);if(i(this.items[e]))return e}return-1}_isItemHidden(e){return"none"===getComputedStyle(e).display}_setFocusable(e){e=this._getAvailableIndex(e,1,(e=>!e.disabled));const t=this.items[e]||this.items[0];this.items.forEach((e=>e.tabIndex=e===t?0:-1))}_focus(e){const t=this.items[e];this.items.forEach((e=>e.focused=e===t)),this._setFocusable(e),this._scrollToItem(e),t.focus()}focus(){this._observer&&this._observer.flush();const e=this.querySelector('[tabindex="0"]')||(this.items?this.items[0]:null);e&&e.focus()}get _scrollerElement(){}_scrollToItem(e){const t=this.items[e];if(!t)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[e+1]||t).getBoundingClientRect(),n=(this.items[e-1]||t).getBoundingClientRect();let l=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?l=o[i[1]]-s[i[1]]:(!this._isRTL&&n[i[0]]<=s[i[0]]||this._isRTL&&n[i[0]]>=s[i[0]])&&(l=n[i[0]]-s[i[0]]),this._scroll(l)}get _vertical(){return"horizontal"!==this.orientation}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const i=e.detectScrollType(),s=e.getNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement)+t;e.setNormalizedScrollLeft(i,this.getAttribute("dir")||"ltr",this._scrollerElement,s)}}}
86
86
  /**
87
87
  @license
88
88
  Copyright (c) 2019 Vaadin Ltd.
89
89
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
90
- */,C=e=>class extends(k(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,s,i){if(e&&t){if(i){const t=i.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],s=t&&!t.disabled?this.items.indexOf(t):-1;s<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(s)?this.selectedValues=this.selectedValues.filter((e=>e!==s)):this.selectedValues=this.selectedValues.concat(s))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
90
+ */,v=e=>class extends(p(e)){static get properties(){return{multiple:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_multipleChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}}}static get observers(){return["_enhanceMultipleItems(items, multiple, selected, selectedValues, selectedValues.*)"]}ready(){this.addEventListener("click",(e=>this._onMultipleClick(e))),super.ready()}_enhanceMultipleItems(e,t,i,s){if(e&&t){if(s){const t=s.map((t=>e[t]));e.forEach((e=>e.selected=-1!==t.indexOf(e)))}this._scrollToLastSelectedItem()}}_scrollToLastSelectedItem(){const e=this.selectedValues.slice(-1)[0];e&&!e.disabled&&this._scrollToItem(e)}_onMultipleClick(e){const t=this._filterItems(e.composedPath())[0],i=t&&!t.disabled?this.items.indexOf(t):-1;i<0||!this.multiple||(e.preventDefault(),-1!==this.selectedValues.indexOf(i)?this.selectedValues=this.selectedValues.filter((e=>e!==i)):this.selectedValues=this.selectedValues.concat(i))}_multipleChanged(e,t){!e&&t&&(this.selectedValues=[],this.items.forEach((e=>e.selected=!1))),e&&!t&&void 0!==this.selected&&(this.push("selectedValues",this.selected),this.selected=void 0)}}
91
91
  /**
92
92
  @license
93
93
  Copyright (c) 2017 Vaadin Ltd.
94
94
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
95
- */;class I extends(s(C(i(h)))){static get template(){return l`
95
+ */;class _ extends(t(v(i(d)))){static get template(){return A`
96
96
  <style>
97
97
  :host {
98
98
  display: flex;
@@ -112,7 +112,7 @@ This program is available under Apache License Version 2.0, available at https:/
112
112
  <div part="items">
113
113
  <slot></slot>
114
114
  </div>
115
- `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof h||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(I.is,I);const B=l`<dom-module id="lumo-select" theme-for="vaadin-select">
115
+ `}static get is(){return"vaadin-list-box"}static get version(){return"1.4.0"}static get properties(){return{orientation:{readOnly:!0}}}constructor(){super(),this.focused}ready(){super.ready(),this.setAttribute("role","list"),setTimeout(this._checkImport.bind(this),2e3)}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}_checkImport(){var e=this.querySelector("vaadin-item");!e||e instanceof d||console.warn("Make sure you have imported the vaadin-item element.")}}customElements.define(_.is,_);const g=A`<dom-module id="lumo-select" theme-for="vaadin-select">
116
116
  <template>
117
117
  <style include="lumo-field-button">
118
118
  :host {
@@ -239,7 +239,7 @@ This program is available under Apache License Version 2.0, available at https:/
239
239
  }
240
240
  </style>
241
241
  </template>
242
- </dom-module>`;document.head.appendChild(B.content),
242
+ </dom-module>`;document.head.appendChild(g.content),
243
243
  /**
244
244
  @license
245
245
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -250,25 +250,25 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
250
250
  part of the polymer project is also subject to an additional IP rights grant
251
251
  found at http://polymer.github.io/PATENTS.txt
252
252
  */
253
- m({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});
253
+ u({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});
254
254
  /**
255
255
  @license
256
256
  Copyright (c) 2017 Vaadin Ltd.
257
257
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
258
258
  */
259
- const S=document.createElement("template");S.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(S.content);class T extends o{static get is(){return"vaadin-select-overlay"}}
259
+ const f=document.createElement("template");f.innerHTML='<dom-module id="vaadin-select-overlay-styles" theme-for="vaadin-select-overlay">\n <template>\n <style>\n :host {\n align-items: flex-start;\n justify-content: flex-start;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(f.content);class y extends n{static get is(){return"vaadin-select-overlay"}}
260
260
  /**
261
261
  @license
262
262
  Copyright (c) 2017 Vaadin Ltd.
263
263
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
264
264
  */
265
- let L;customElements.define(T.is,T);class R extends r{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!L){L=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=L.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return L}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(R.is,R);
265
+ let b;customElements.define(y.is,y);class E extends o{static get is(){return"vaadin-select-text-field"}static get template(){if(super.template.content.querySelector('slot[name="input"]'))return super.template;if(!b){b=super.template.cloneNode(!0);const e=document.createElement("slot");e.setAttribute("name","value");const t=b.content.querySelector("input");t.parentElement.replaceChild(e,t),e.appendChild(t)}return b}get focusElement(){return this.shadowRoot.querySelector("[part=input-field]")}get inputElement(){return this.shadowRoot.querySelector("input")}}customElements.define(E.is,E);
266
266
  /**
267
267
  @license
268
268
  Copyright (c) 2017 Vaadin Ltd.
269
269
  This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
270
270
  */
271
- const M=document.createElement("template");M.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(M.content);class Q extends(s(n(i(u(a,h))))){static get template(){return l`
271
+ const w=document.createElement("template");w.innerHTML="<custom-style>\n <style>\n @font-face {\n font-family: \"vaadin-select-icons\";\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAASEAAsAAAAABDgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIGKmNtYXAAAAFoAAAAVAAAAFQXVtKHZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHwAAAB8CohkJ2hlYWQAAAJAAAAANgAAADYOavgEaGhlYQAAAngAAAAkAAAAJAarA8ZobXR4AAACnAAAABQAAAAUCAABP2xvY2EAAAKwAAAADAAAAAwAKABSbWF4cAAAArwAAAAgAAAAIAAHABduYW1lAAAC3AAAAYYAAAGGmUoJ+3Bvc3QAAARkAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QADwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkA//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQE/AUAC6QIVABQAAAEwFx4BFxYxMDc+ATc2MTAjKgEjIgE/ISJPIiEhIk8iIUNCoEJDAhUhIk8iISEiTyIhAAEAAAABAABvL5bdXw889QALBAAAAAAA1jHaeQAAAADWMdp5AAAAAALpAhUAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAukAAQAAAAAAAAAAAAAAAAAAAAUEAAAAAAAAAAAAAAAAAAAABAABPwAAAAAACgAUAB4APgABAAAABQAVAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEABwAAAAEAAAAAAAIABwBgAAEAAAAAAAMABwA2AAEAAAAAAAQABwB1AAEAAAAAAAUACwAVAAEAAAAAAAYABwBLAAEAAAAAAAoAGgCKAAMAAQQJAAEADgAHAAMAAQQJAAIADgBnAAMAAQQJAAMADgA9AAMAAQQJAAQADgB8AAMAAQQJAAUAFgAgAAMAAQQJAAYADgBSAAMAAQQJAAoANACkaWNvbW9vbgBpAGMAbwBtAG8AbwBuVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwaWNvbW9vbgBpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuUmVndWxhcgBSAGUAZwB1AGwAYQByaWNvbW9vbgBpAGMAbwBtAG8AbwBuRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n</custom-style>",document.head.appendChild(w.content);class x extends(t(s(i(m(l,d))))){static get template(){return A`
272
272
  <style>
273
273
  :host {
274
274
  display: inline-block;
@@ -301,14 +301,4 @@ const M=document.createElement("template");M.innerHTML="<custom-style>\n <style
301
301
  <vaadin-select-overlay opened="{{opened}}" with-backdrop="[[_phone]]" phone\$="[[_phone]]" theme\$="[[theme]]"></vaadin-select-overlay>
302
302
 
303
303
  <iron-media-query query="[[_phoneMediaQuery]]" query-matches="{{_phone}}"></iron-media-query>
304
- `}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new c(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,s,i){e!==t?this._contentTemplate=void 0:s!==i&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,s){if(s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(s.setProperties({owner:this,renderer:t}),this.render(),s.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,s=void 0!==t?t:-1,i=this._menuElement._searchKey(s,e.key);i>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[i].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,s){t&&t.setAttribute("aria-expanded",e),s&&s.focusElement&&s.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),s=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?s:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,s,i)=>void 0===t&&s.value===e?i:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),s=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",s?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(Q.is,Q);let D,q,O=e=>e;p("vaadin-list-box",_(D||(D=O`
305
- [part='items'] ::slotted(vaadin-item.dropdown-divisor){
306
- color:var(--lumo-contrast-40pct);
307
- box-shadow:0 1px var(--lumo-contrast-10pct);
308
- border-radius:0;
309
- }
310
-
311
- [part='items'] ::slotted(vaadin-item.dropdown-sub-item){
312
- margin-left:var(--lumo-space-l);
313
- }
314
- `)));class $ extends y{constructor(){super(),this.disabled=!1,this.label="",this.value=null,this.items=null,this.getText=e=>e,this.__unexistentValue=`@foxy.io/elements#dropdown-${Math.random().toFixed(16).substr(2)}`,this.__renderedItems={},this.__list=document.createElement("vaadin-list-box")}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},getText:{type:Object,attribute:!1},items:{type:Array},label:{type:String},value:{type:String}})}static get styles(){return g.styles}render(){return b(q||(q=O` <vaadin-select class="w-full ${0}" data-testid="select" .label="${0}" .value="${0}" .disabled="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> `),this.label?"-mt-m":"",this.label,null===this.value?this.__unexistentValue:this.value,this.disabled,this.__renderItems.bind(this),this.__handleChange)}__renderItems(e){var t;let s=e.querySelector("vaadin-list-box");null===s&&(e.appendChild(this.__list),s=this.__list);for(const e of Object.values(this.__renderedItems))e.dataset.keep="";const i=null!==(t=this.items)&&void 0!==t?t:[];for(let e=0;e<i.length;++e)if("string"==typeof i[e])this.__addOrKeepItem(i[e],i[e],s).classList.add("dropdown-item");else if(Array.isArray(i[e])){const t=this.__addOrKeepItem(i[e][0],i[e][0],s);t.classList.add("dropdown-item","dropdown-divisor"),t.disabled=!0;for(const t of i[e][1])this.__addOrKeepItem(i[e][0]+": "+t,t,s).classList.add("dropdown-sub-item")}for(const e of Object.values(this.__renderedItems)){const t=e;t.dataset.keep||(e.remove(),delete this.__renderedItems[t.dataset.trackId])}}__addOrKeepItem(e,t,s){let i;return this.__renderedItems[e]?i=this.__renderedItems[e]:(i=document.createElement("vaadin-item"),this.__renderedItems[e]=i,i.value=e,s.appendChild(i)),i.dataset.keep="true",i.dataset.trackId=e,i.textContent=this.getText(t),i}__handleChange(e){const t=e.target.value,s=t===this.__unexistentValue?null:t;this.dispatchEvent(new f(s))}}let P,j,H=e=>e;class V extends y{constructor(){super(...arguments),this.variant=null}static get styles(){return[g.styles,_(P||(P=H`@keyframes blink{from{opacity:.5}to{opacity:1}}.animated{animation:blink .5s infinite alternate}:host{display:inline-block;min-width:4rem}`))]}static get properties(){return e(e({},super.properties),{},{variant:{type:String}})}render(){const e="error"===this.variant?"bg-error-10":"bg-contrast-10",t=null===this.variant?"animated":"";return b(j||(j=H` <div class="relative"> <span class="opacity-0"><slot></slot></span> <div class="${0} ${0} rounded my-xs absolute inset-0"></div> </div> `),e,t)}}let N,z,K,F=e=>e;class G extends v{constructor(){super(...arguments),this.key=""}static get scopedElements(){return{"x-skeleton":V}}static get properties(){return e(e({},super.properties),{},{key:{type:String,reflect:!0},opts:{type:Object}})}static get styles(){return[super.styles,_(N||(N=F`:host{display:inline-block}`))]}get whenReady(){return this._whenI18nReady.then((()=>this.updateComplete))}render(){return this._isI18nReady?b(z||(z=F`${0}<slot></slot>`),this._t(this.key,this.opts)):b(K||(K=F`<x-skeleton class="block">${0}<slot></slot></x-skeleton>`),this.key)}}function W(...e){return e.filter((e=>!!e))}let U,Y,J,Z,X=e=>e;class ee extends v{constructor(){super(...arguments),this.disabled=!1,this.value=[]}static get scopedElements(){return{"x-i18n":G}}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},value:{type:Array}})}render(){const e=ee._allDays.map((e=>{try{return e.toLocaleString(this.lang,{minimumIntegerDigits:2})}catch(t){return e.toString()}}));return b(U||(U=X` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs" style="max-width:364px;font-feature-settings:'tnum' 1"> ${0} </div> ${0} </div> `),ee._allDays.map(((t,s)=>b(Y||(Y=X` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(t),e[s],this.disabled,this.value.includes(t),(e=>this._handleChange(e,t))))),W(this.value.length>0&&b(J||(J=X` <p class="text-s text-tertiary leading-s"> <x-i18n key="monthday-picker.hint" .opts="${0}" .lang="${0}"> </x-i18n> ${0} </p> `),{days:this.value},this.lang,W([29,30,31].some((e=>this.value.includes(e)))&&b(Z||(Z=X`<x-i18n key="monthday-picker.warning" .lang="${0}"></x-i18n>`),this.lang)))))}_getLabelClass(e){let t="flex items-center justify-center m-xs p-s rounded text-m font-medium transition duration-200 sm-p-0 sm-h-m sm-w-l ";return this.value.includes(e)||(t+="bg-contrast-5 "),this._isI18nReady&&!this.disabled?(t+="cursor-pointer ",t+=this.value.includes(e)?"text-base ":"hover-bg-primary-10 ",e<29?(t+="focus-within-shadow-outline ",t+=this.value.includes(e)?"bg-primary":"text-body"):(t+="focus-within-shadow-outline-error ",t+=this.value.includes(e)?"bg-error":"text-error")):(t+="text-transparent ",this.value.includes(e)&&(t+=e<29?"bg-primary-50":"bg-error-10")),t}_handleChange(e,t){e.stopPropagation(),this._toggle(t),this._sendChange()}_sendChange(){this.dispatchEvent(new x(this.value))}_toggle(e){const t=this.value.indexOf(e);this.value=-1===t?[...this.value,e]:this.value.filter(((e,s)=>s!==t))}}ee._allDays=Array.from(new Array(31),((e,t)=>t+1));const te=document.createElement("template");function se(e,t,s="long"){const i=new Date;for(;i.getDay()!==e;)i.setDate(i.getDate()+1);return i.toLocaleDateString(t,{weekday:s})}te.innerHTML='<dom-module id="lumo-badge">\n <template>\n <style>\n [theme~="badge"] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0.4em calc(0.5em + var(--lumo-border-radius-s) / 4);\n color: var(--lumo-primary-text-color);\n background-color: var(--lumo-primary-color-10pct);\n border-radius: var(--lumo-border-radius-s);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-s);\n line-height: 1;\n font-weight: 500;\n text-transform: initial;\n letter-spacing: initial;\n min-width: calc(var(--lumo-line-height-xs) * 1em + 0.45em);\n }\n\n /* Ensure proper vertical alignment */\n [theme~="badge"]::before {\n display: inline-block;\n content: "\\2003";\n width: 0;\n }\n\n [theme~="badge"][theme~="small"] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n }\n\n /* Colors */\n\n [theme~="badge"][theme~="success"] {\n color: var(--lumo-success-text-color);\n background-color: var(--lumo-success-color-10pct);\n }\n\n [theme~="badge"][theme~="error"] {\n color: var(--lumo-error-text-color);\n background-color: var(--lumo-error-color-10pct);\n }\n\n [theme~="badge"][theme~="contrast"] {\n color: var(--lumo-contrast-80pct);\n background-color: var(--lumo-contrast-5pct);\n }\n\n /* Primary */\n\n [theme~="badge"][theme~="primary"] {\n color: var(--lumo-primary-contrast-color);\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="success"][theme~="primary"] {\n color: var(--lumo-success-contrast-color);\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"][theme~="primary"] {\n color: var(--lumo-error-contrast-color);\n background-color: var(--lumo-error-color);\n }\n\n [theme~="badge"][theme~="contrast"][theme~="primary"] {\n color: var(--lumo-base-color);\n background-color: var(--lumo-contrast);\n }\n\n /* Links */\n\n [theme~="badge"][href]:hover {\n text-decoration: none;\n }\n\n /* Icon */\n\n [theme~="badge"] iron-icon {\n margin: -0.25em 0;\n --iron-icon-width: 1.5em;\n --iron-icon-height: 1.5em;\n }\n\n [theme~="badge"] iron-icon:first-child {\n margin-left: -0.375em;\n }\n\n [theme~="badge"] iron-icon:last-child {\n margin-right: -0.375em;\n }\n\n [theme~="badge"][icon] {\n min-width: 0;\n padding: 0;\n font-size: 1rem;\n --iron-icon-width: var(--lumo-icon-size-m);\n --iron-icon-height: var(--lumo-icon-size-m);\n }\n\n [theme~="badge"][icon][theme~="small"] {\n --iron-icon-width: var(--lumo-icon-size-s);\n --iron-icon-height: var(--lumo-icon-size-s);\n }\n\n /* Empty */\n\n [theme~="badge"]:not([icon]):empty {\n min-width: 0;\n width: 1em;\n height: 1em;\n padding: 0;\n border-radius: 50%;\n background-color: var(--lumo-primary-color);\n }\n\n [theme~="badge"][theme~="small"]:not([icon]):empty {\n width: 0.75em;\n height: 0.75em;\n }\n\n [theme~="badge"][theme~="contrast"]:not([icon]):empty {\n background-color: var(--lumo-contrast);\n }\n\n [theme~="badge"][theme~="success"]:not([icon]):empty {\n background-color: var(--lumo-success-color);\n }\n\n [theme~="badge"][theme~="error"]:not([icon]):empty {\n background-color: var(--lumo-error-color);\n }\n\n /* Pill */\n\n [theme~="badge"][theme~="pill"] {\n --lumo-border-radius-s: 1em;\n }\n\n /* RTL specific styles */\n\n [dir="rtl"][theme~="badge"] iron-icon:first-child {\n margin-right: -0.375em;\n margin-left: 0;\n }\n\n [dir="rtl"][theme~="badge"] iron-icon:last-child {\n margin-left: -0.375em;\n margin-right: 0;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(te.content);let ie,ne,re,oe=e=>e;class ae extends ee{render(){return b(ie||(ie=oe` <div class="space-y-s"> <div class="flex flex-wrap -mx-xs -mb-xs text-m uppercase"> ${0} </div> ${0} </div> `),ae._allDays.map((e=>b(ne||(ne=oe` <label class="${0}"> ${0} <input type="checkbox" class="sr-only" ?disabled="${0}" ?checked="${0}" @change="${0}"> </label> `),this._getLabelClass(e),se(e,this.lang,"short"),this.disabled||!this._isI18nReady,this.value.includes(e),(t=>this._handleChange(t,e))))),W(this.value.length>0&&b(re||(re=oe` <p class="text-s text-tertiary leading-s"> <x-i18n key="weekday-picker.hint" .lang="${0}" .opts="${0}"> </x-i18n> </p> `),this.lang,{days:this.value})))}_getLabelClass(e){let t="flex items-center justify-center m-xs h-m w-xl rounded font-medium transition duration-200 ";return this._isI18nReady&&!this.disabled?(t+="cursor-pointer focus-within-shadow-outline ",t+=this.value.includes(e)?"text-base bg-primary":"bg-contrast-5 hover-bg-contrast-10 text-body"):(t+="text-transparent ",t+=this.value.includes(e)?"bg-primary-50":"bg-contrast-5"),t}_sendChange(){this.dispatchEvent(new w(this.value))}}ae._allDays=new Array(7).fill(0).map(((e,t)=>t));export{$ as D,G as I,ee as M,V as S,ae as W,Q as a,W as c,se as t};
304
+ `}static get is(){return"vaadin-select"}static get version(){return"2.4.3"}static get properties(){return{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,observer:"_openedChanged"},renderer:Function,errorMessage:{type:String,value:""},label:{type:String},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},required:{type:Boolean,reflectToAttribute:!0,observer:"_requiredChanged"},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String},helperText:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_overlayElement:Object,_inputElement:Object,_toggleElement:Object,_items:Object,_contentTemplate:Object,_oldTemplate:Object,_oldRenderer:Object}}static get observers(){return["_updateSelectedItem(value, _items)","_updateAriaExpanded(opened, _toggleElement, _inputElement)","_templateOrRendererChanged(_contentTemplate, renderer, _overlayElement)"]}constructor(){super(),this._boundSetPosition=this._setPosition.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this._boundSetPosition)}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-select-overlay"),this._valueElement=this.shadowRoot.querySelector('[part="value"]'),this._toggleElement=this.shadowRoot.querySelector('[part="toggle-button"]'),this._nativeInput=this.focusElement.shadowRoot.querySelector("input"),this._nativeInput.setAttribute("aria-hidden",!0),this._nativeInput.setAttribute("tabindex",-1),this._nativeInput.style.pointerEvents="none",this.focusElement.addEventListener("click",(e=>{const t=Array.from(e.composedPath()).some((e=>e.nodeType===Node.ELEMENT_NODE&&"helper"===e.getAttribute("slot")));this.opened=!this.readonly&&!t})),this.focusElement.addEventListener("keydown",(e=>this._onKeyDown(e))),this._observer=new h(this,(e=>this._setTemplateFromNodes(e.addedNodes))),this._observer.flush()}_setTemplateFromNodes(e){const t=Array.from(e).filter((e=>e.localName&&"template"===e.localName))[0]||this._contentTemplate;this._overlayElement.template=this._contentTemplate=t,this._setForwardHostProps()}_setForwardHostProps(){if(this._overlayElement.content){const e=this._overlayElement._instance&&this._overlayElement._instance.forwardHostProp;this._overlayElement._instance&&(this._overlayElement._instance.forwardHostProp=(...t)=>{e.apply(this._overlayElement._instance,t),setTimeout((()=>{this._updateValueSlot()}))},this._assignMenuElement())}}render(){this._overlayElement&&(this._overlayElement.render(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_removeNewRendererOrTemplate(e,t,i,s){e!==t?this._contentTemplate=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(e,t,i){if(i){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for select content");this._oldTemplate=e,this._oldRenderer=t,t&&(i.setProperties({owner:this,renderer:t}),this.render(),i.content.firstChild&&this._assignMenuElement())}}_assignMenuElement(){this._menuElement=Array.from(this._overlayElement.content.children).filter((e=>"style"!==e.localName))[0],this._menuElement&&(this._menuElement.addEventListener("items-changed",(e=>{this._items=this._menuElement.items,this._items.forEach((e=>e.setAttribute("role","option")))})),this._menuElement.addEventListener("selected-changed",(e=>this._updateValueSlot())),this._menuElement.addEventListener("keydown",(e=>this._onKeyDownInside(e))),this._menuElement.addEventListener("click",(e=>{this.__userInteraction=!0,this.opened=!1}),!0),this._menuElement.setAttribute("role","listbox"))}get focusElement(){return this._inputElement||(this._inputElement=this.shadowRoot.querySelector("vaadin-select-text-field"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}notifyResize(){super.notifyResize(),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}_requiredChanged(e){this.setAttribute("aria-required",e)}_valueChanged(e,t){""===e?this.focusElement.removeAttribute("has-value"):this.focusElement.setAttribute("has-value",""),""===e&&void 0===t||this.validate()}_onKeyDown(e){if(!this.readonly&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key))e.preventDefault(),this.opened=!0;else if(/[a-zA-Z0-9]/.test(e.key)&&1===e.key.length){const t=this._menuElement.selected,i=void 0!==t?t:-1,s=this._menuElement._searchKey(i,e.key);s>=0&&(this.__userInteraction=!0,this._updateSelectedItem(this._items[s].value,this._items))}}_onKeyDownInside(e){/^(Tab)$/.test(e.key)&&(this.opened=!1)}_openedChanged(e,t){if(e){if(!this._overlayElement||!this._menuElement||!this._toggleElement||!this.focusElement||this.disabled||this.readonly)return void(this.opened=!1);this._openedWithFocusRing=this.hasAttribute("focus-ring")||this.focusElement.hasAttribute("focus-ring"),this._menuElement.focus(),this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0)}else t&&(this.focusElement.focus(),this._openedWithFocusRing&&this.focusElement.setAttribute("focus-ring",""),this.validate(),window.removeEventListener("scroll",this._boundSetPosition,!0))}_hasContent(e){return!!e&&Boolean(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()||e.children.length)}_attachSelectedItem(e){if(!e)return;let t;e.hasAttribute("label")?(t=document.createElement("vaadin-item"),t.textContent=e.getAttribute("label")):t=e.cloneNode(!0),t._sourceItem=e,t.removeAttribute("tabindex"),t.removeAttribute("role"),this._valueElement.appendChild(t),t.selected=!0}_updateAriaExpanded(e,t,i){t&&t.setAttribute("aria-expanded",e),i&&i.focusElement&&i.focusElement.setAttribute("aria-expanded",e)}_updateValueSlot(){this.opened=!1,this._valueElement.innerHTML="";const e=this._items[this._menuElement.selected],t=this._hasContent(e),i=this._inputElement.shadowRoot.querySelector('slot[name="input"]')?"input":"value";this._valueElement.slot=t?i:"",t&&window.ShadyDOM&&window.ShadyDOM.flush(),this._attachSelectedItem(e),!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__userInteraction&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__userInteraction=!1),delete this._selectedChanging)}_updateSelectedItem(e,t){t&&(this._menuElement.selected=t.reduce(((t,i,s)=>void 0===t&&i.value===e?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this._updateValueSlot(),delete this._valueChanging))}_setFocused(e){super._setFocused(this.opened||e),this.focusElement._setFocused(this.hasAttribute("focused")),!this.hasAttribute("focused")&&this.validate()}_setPosition(){const e=this._inputElement.shadowRoot.querySelector('[part~="input-field"]').getBoundingClientRect(),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.top>(t-e.height)/2;"rtl"===this.getAttribute("dir")?this._overlayElement.style.right=document.documentElement.clientWidth-e.right+"px":this._overlayElement.style.left=e.left+"px",i?(this._overlayElement.setAttribute("bottom-aligned",""),this._overlayElement.style.removeProperty("top"),this._overlayElement.style.bottom=t-e.bottom+"px"):(this._overlayElement.removeAttribute("bottom-aligned"),this._overlayElement.style.removeProperty("bottom"),this._overlayElement.style.top=e.top+"px"),this._overlayElement.updateStyles({"--vaadin-select-text-field-width":e.width+"px"})}validate(){return!(this.invalid=!(this.disabled||!this.required||this.value))}}customElements.define(x.is,x);export{x as S};
@@ -0,0 +1 @@
1
+ import"./shared-0479553e.js";import"./shared-5f82e90e.js";import{I as e,_ as r}from"./shared-e34d2ef1.js";import{C as t}from"./shared-84b5d8f0.js";import{T as s}from"./shared-83344a27.js";import{L as n,h as o,f as i}from"./shared-7f33a83a.js";import{T as a}from"./shared-c7bd91d8.js";import{N as l}from"./shared-85cd6cfb.js";let d,p,f,u,h=e=>e;class m extends(t(s(a(e(n))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return r(r({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,r){return"nucleon"===e&&r instanceof l?r:super.inferFromElement(e,r)}applyInferredProperties(e){var r,t;super.applyInferredProperties(e),this.disabled=!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))||super.disabled,this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null}updated(e){if(super.updated(e),"string"==typeof this.infer){const e=o(d||(d=h` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);i(e,this)}}renderControl(){return o(p||(p=h``))}render(){return this.hidden?o(f||(f=h``)):o(u||(u=h` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",m);export{m as I};
@@ -1,4 +1,4 @@
1
- import{E as e,C as t,T as o}from"./shared-ea418c18.js";import{h as i,G as r,P as a}from"./shared-833a8b4e.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
1
+ import{E as e,C as t,T as o}from"./shared-d44a2a31.js";import{h as i,G as r,P as a}from"./shared-64e3f8da.js";const s=i`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
2
2
  <template>
3
3
  <style include="lumo-checkbox-style lumo-checkbox-effects">
4
4
  /* IE11 only */
@@ -1 +1 @@
1
- import{L as r,h as s}from"./shared-7f33a83a.js";import{w as e}from"./shared-b4865438.js";let t,o=r=>r;class n extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded-t-l rounded-b-l p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}function a(r){const[s,e,t]=r.split("-").map((r=>parseInt(r,10)));return[s,e,t].some((r=>"number"!=typeof r||isNaN(r)))?null:new Date(s,e-1,t)}export{n as W,a as p};
1
+ import{L as r,h as s}from"./shared-7f33a83a.js";import{t as e}from"./shared-c7bd91d8.js";let t,o=r=>r;class n extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded-t-l rounded-b-l p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}function a(r){const[s,e,t]=r.split("-").map((r=>parseInt(r,10)));return[s,e,t].some((r=>"number"!=typeof r||isNaN(r)))?null:new Date(s,e-1,t)}export{n as W,a as p};
@@ -1 +1 @@
1
- import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-8ec9793b.js";import{I as e}from"./shared-f4056083.js";import"./shared-44f45339.js";import"./shared-09d39b25.js";import{I as t,_ as r}from"./shared-ca0f14c1.js";import{L as i,h as s}from"./shared-7f33a83a.js";import{T as o}from"./shared-b4865438.js";import{c as n}from"./shared-4e709717.js";let a,l=e=>e;class c extends(o(t(i))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return s(a||(a=l` <details class="w-full border border-contrast-10 rounded-t-l rounded-b-l" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-bold text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t-l":!0,"rounded-b-l":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",c);let d,f,m,h,p=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return s(d||(d=p` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),t,n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!t}),(t=>{const r=t.currentTarget,i=this.__dialog;i.header="header_update",i.href=e.href,i.show(r)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const t=new URL(this.first);t.searchParams.set("limit",String(this.limit)),e=t.toString()}catch(t){e=this.first}return s(f||(f=p` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?s(m||(m=p` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":s(h||(h=p` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const t=this.__dialog,r=e.currentTarget;t.header="header_create",t.href="",t.show(r)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;return(null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==this.item&&(this.__cachedCardRenderer={item:this.item,render:new Function("ctx",`return ctx.html\`<${this.item} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${this.item}>\``)}),this.__cachedCardRenderer.render}});
1
+ import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-5f82e90e.js";import{I as e}from"./shared-94e2d173.js";import"./shared-e7b5cc83.js";import"./shared-cd5789ea.js";import{I as t,_ as r}from"./shared-e34d2ef1.js";import{L as i,h as s}from"./shared-7f33a83a.js";import{T as o}from"./shared-c7bd91d8.js";import{c as n}from"./shared-4e709717.js";let a,c=e=>e;class l extends(o(t(i))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return s(a||(a=c` <details class="w-full border border-contrast-10 rounded-t-l rounded-b-l" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-bold text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t-l":!0,"rounded-b-l":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",l);let d,m,f,h,p=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const t=this.disabledSelector.matches("card",!0);return s(d||(d=p` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),t,n({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!t}),(t=>{const r=t.currentTarget,i=this.__dialog;i.header="header_update",i.href=e.href,i.show(r)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const t=new URL(this.first);t.searchParams.set("limit",String(this.limit)),e=t.toString()}catch(t){e=this.first}return s(m||(m=p` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?s(f||(f=p` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":s(h||(h=p` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const t=this.__dialog,r=e.currentTarget;t.header="header_create",t.href="",t.show(r)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;return(null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==this.item&&(this.__cachedCardRenderer={item:this.item,render:new Function("ctx",`return ctx.html\`<${this.item} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${this.item}>\``)}),this.__cachedCardRenderer.render}});
@@ -1,4 +1,4 @@
1
- import{E as t,C as e,T as o}from"./shared-ea418c18.js";import{h as r,G as i,P as a,b as s}from"./shared-833a8b4e.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
1
+ import{E as t,C as e,T as o}from"./shared-d44a2a31.js";import{h as r,G as i,P as a,b as s}from"./shared-64e3f8da.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-8ec9793b.js";import{I as e}from"./shared-f4056083.js";import{h as t,c as i}from"./shared-7f33a83a.js";import{Q as n}from"./shared-3a7cf739.js";import"./shared-cbb340fa.js";import{_ as r}from"./shared-ca0f14c1.js";import"./shared-977dcc25.js";import"./foxy-spinner.js";import{C as s}from"./shared-240700a9.js";import{T as a}from"./shared-b4865438.js";import{N as o}from"./shared-d4d44ca4.js";import{c as l}from"./shared-4e709717.js";let d,c=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="primary error"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(d||(d=c` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,f=e=>e;customElements.define("foxy-internal-create-control",class extends e{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=f` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let p,y,u=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{static get styles(){return[super.styles,i(p||(p=u`.max-w-0{max-width:0}`))]}renderControl(){return t(y||(y=u` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_created"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_modified"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> </tbody> </table> `),JSON.stringify({value:n(this,"nucleon.form.date_created")}),JSON.stringify({value:n(this,"nucleon.form.date_modified")}))}});let h,v,x,_=e=>e;const b=s(a(o));class g extends b{renderBody(){return this.data?t(h||(h=_` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):t(v||(v=_`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(x||(x=_` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),l({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),l({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}}customElements.define("foxy-internal-form",g);export{g as I};
1
+ import"./shared-5f82e90e.js";import{I as e}from"./shared-94e2d173.js";import{h as t,c as i}from"./shared-7f33a83a.js";import{Q as n}from"./shared-86d0d927.js";import"./shared-a6c41415.js";import{_ as r}from"./shared-e34d2ef1.js";import"./shared-1765d84b.js";import"./foxy-spinner.js";import{C as s}from"./shared-84b5d8f0.js";import{T as a}from"./shared-c7bd91d8.js";import{N as o}from"./shared-85cd6cfb.js";import{c as l}from"./shared-4e709717.js";let d,c=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="primary error"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(d||(d=c` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let m,f=e=>e;customElements.define("foxy-internal-create-control",class extends e{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return r(r({},super.properties),{},{theme:{type:String}})}renderControl(){return t(m||(m=f` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let p,y,u=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{static get styles(){return[super.styles,i(p||(p=u`.max-w-0{max-width:0}`))]}renderControl(){return t(y||(y=u` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_created"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n infer="" key="date_modified"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" infer="" key="date"> </foxy-i18n> </td> </tr> </tbody> </table> `),JSON.stringify({value:n(this,"nucleon.form.date_created")}),JSON.stringify({value:n(this,"nucleon.form.date_modified")}))}});let h,v,x,_=e=>e;const b=s(a(o));class g extends b{renderBody(){return this.data?t(h||(h=_` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):t(v||(v=_`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(x||(x=_` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),l({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),l({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}}customElements.define("foxy-internal-form",g);export{g as I};
@@ -0,0 +1 @@
1
+ import"./shared-6534863a.js";import"./shared-b886c58b.js";import"./shared-c6ed1e9d.js";import{I as e}from"./shared-4ca7363a.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as a}from"./shared-7f33a83a.js";let s,t=e=>e;customElements.define("foxy-internal-integer-control",class extends e{renderControl(){return a(s||(s=t` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> </vaadin-integer-field> `),r(this._errorMessage),this.placeholder,this.helperText,this.label,this.disabled,this.readonly,this._checkValidity,String(this._value),(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:0}set _value(e){super._value=e}});
@@ -1 +1 @@
1
- import{L as t,c as e,h as s}from"./shared-7f33a83a.js";import{w as a}from"./shared-b4865438.js";let d,i,r,l=t=>t;class o extends t{constructor(){super(...arguments),this.items=[],this.disabled=!1}static get properties(){return{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}}}static get styles(){return[a.styles,e(d||(d=l`.max-w-0{max-width:0}`))]}render(){const t=this.disabled?"text-disabled":"text-body",e=this.disabled?"text-disabled":"text-secondary",a="max-w-0 truncate py-s";return s(i||(i=l` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> `),this.items.map((({name:d,value:i})=>s(r||(r=l` <tr> <td class="${0} ${0} w-1-3 pr-m" title="${0}">${0}</td> <td class="${0} ${0} w-2-3" title="${0}">${0}</td> </tr> `),a,e,d,d,a,t,i,i))))}}export{o as P};
1
+ import{L as t,c as e,h as s}from"./shared-7f33a83a.js";import{t as a}from"./shared-c7bd91d8.js";let d,i,r,l=t=>t;class o extends t{constructor(){super(...arguments),this.items=[],this.disabled=!1}static get properties(){return{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}}}static get styles(){return[a.styles,e(d||(d=l`.max-w-0{max-width:0}`))]}render(){const t=this.disabled?"text-disabled":"text-body",e=this.disabled?"text-disabled":"text-secondary",a="max-w-0 truncate py-s";return s(i||(i=l` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> `),this.items.map((({name:d,value:i})=>s(r||(r=l` <tr> <td class="${0} ${0} w-1-3 pr-m" title="${0}">${0}</td> <td class="${0} ${0} w-2-3" title="${0}">${0}</td> </tr> `),a,e,d,d,a,t,i,i))))}}export{o as P};