@foxy.io/elements 1.38.0-beta.1 → 1.38.0-beta.3

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 (221) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +2 -2
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-api.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +11 -11
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +2 -2
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +3 -3
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-nucleon-element.js +1 -1
  71. package/dist/cdn/foxy-pagination.js +1 -1
  72. package/dist/cdn/foxy-passkey-card.js +1 -1
  73. package/dist/cdn/foxy-passkey-form.js +1 -1
  74. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  75. package/dist/cdn/foxy-payment-card.js +1 -1
  76. package/dist/cdn/foxy-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  83. package/dist/cdn/foxy-payments-api.js +1 -1
  84. package/dist/cdn/foxy-query-builder.js +1 -1
  85. package/dist/cdn/foxy-report-form.js +1 -1
  86. package/dist/cdn/foxy-reports-table.js +1 -1
  87. package/dist/cdn/foxy-shipment-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  92. package/dist/cdn/foxy-sign-in-form.js +1 -1
  93. package/dist/cdn/foxy-spinner.js +2 -2
  94. package/dist/cdn/foxy-store-card.js +1 -1
  95. package/dist/cdn/foxy-store-form.js +1 -1
  96. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +7 -7
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-aa45d4ec.js → shared-0164a1bb.js} +1 -1
  122. package/dist/cdn/{shared-57c3f0e4.js → shared-01fc874a.js} +1 -1
  123. package/dist/cdn/{shared-d54b3216.js → shared-0881a17c.js} +1 -1
  124. package/dist/cdn/{shared-893ead61.js → shared-099c2c3a.js} +1 -1
  125. package/dist/cdn/{shared-2db8d17c.js → shared-0a177e2c.js} +1 -1
  126. package/dist/cdn/shared-0aedd809.js +1 -0
  127. package/dist/cdn/{shared-8e36bcc1.js → shared-0ba8919d.js} +1 -1
  128. package/dist/cdn/{shared-dc6eb904.js → shared-1643e28d.js} +1 -1
  129. package/dist/cdn/{shared-6555fd71.js → shared-17b9f264.js} +1 -1
  130. package/dist/cdn/{shared-322ae633.js → shared-188614a4.js} +1 -1
  131. package/dist/cdn/{shared-82e82908.js → shared-1d0839af.js} +1 -1
  132. package/dist/cdn/{shared-d8cab6ab.js → shared-234b03f8.js} +2 -2
  133. package/dist/cdn/{shared-3691a26f.js → shared-243e3357.js} +1 -1
  134. package/dist/cdn/{shared-f6e9eda6.js → shared-25b175fb.js} +1 -1
  135. package/dist/cdn/{shared-17a61265.js → shared-2aa23b5f.js} +1 -1
  136. package/dist/cdn/{shared-812c706e.js → shared-3d276862.js} +1 -1
  137. package/dist/cdn/{shared-f61e5463.js → shared-3ff5c3d1.js} +2 -2
  138. package/dist/cdn/{shared-cba2b787.js → shared-4070a0d5.js} +1 -1
  139. package/dist/cdn/{shared-efecf1ca.js → shared-424970b6.js} +1 -1
  140. package/dist/cdn/{shared-569db166.js → shared-427529a8.js} +1 -1
  141. package/dist/cdn/shared-4a38cb3e.js +1 -0
  142. package/dist/cdn/{shared-bd941702.js → shared-516205e7.js} +1 -1
  143. package/dist/cdn/{shared-7e9fdf64.js → shared-5592ec6e.js} +1 -1
  144. package/dist/cdn/{shared-49e0541d.js → shared-58202132.js} +4 -4
  145. package/dist/cdn/{shared-ccc91a5f.js → shared-58400227.js} +1 -1
  146. package/dist/cdn/{shared-eeb2bd18.js → shared-5afb584d.js} +1 -1
  147. package/dist/cdn/shared-5e4a03d1.js +1 -0
  148. package/dist/cdn/{shared-fcdb896f.js → shared-5ef40e86.js} +1 -1
  149. package/dist/cdn/{shared-aab278b5.js → shared-5f157a83.js} +1 -1
  150. package/dist/cdn/{shared-c27ee44e.js → shared-62d05dde.js} +1 -1
  151. package/dist/cdn/{shared-3a446f14.js → shared-64ed7d2b.js} +1 -1
  152. package/dist/cdn/{shared-c2efc54e.js → shared-673d668a.js} +1 -1
  153. package/dist/cdn/{shared-1137b243.js → shared-6d8a44c7.js} +1 -1
  154. package/dist/cdn/{shared-2550f6d9.js → shared-704cd73c.js} +1 -1
  155. package/dist/cdn/{shared-58e7f6b1.js → shared-71f2c754.js} +1 -1
  156. package/dist/cdn/{shared-299543b6.js → shared-745bd2f4.js} +1 -1
  157. package/dist/cdn/{shared-019348d7.js → shared-7594e563.js} +1 -1
  158. package/dist/cdn/{shared-12a553c2.js → shared-7f7549aa.js} +1 -1
  159. package/dist/cdn/{shared-13d65f57.js → shared-844ab7a4.js} +1 -1
  160. package/dist/cdn/{shared-9f07fab6.js → shared-8650b26e.js} +1 -1
  161. package/dist/cdn/{shared-fcf6424c.js → shared-9127e26b.js} +1 -1
  162. package/dist/cdn/{shared-498ce88a.js → shared-9380d4fb.js} +1 -1
  163. package/dist/cdn/{shared-604261a0.js → shared-939a75a1.js} +1 -1
  164. package/dist/cdn/{shared-71f3226f.js → shared-93e5feba.js} +1 -1
  165. package/dist/cdn/{shared-4bcfe691.js → shared-988e3176.js} +1 -1
  166. package/dist/cdn/shared-994c7754.js +1 -0
  167. package/dist/cdn/{shared-9ca85d1e.js → shared-99a8889a.js} +1 -1
  168. package/dist/cdn/{shared-5a08dbb0.js → shared-9bd0911a.js} +1 -1
  169. package/dist/cdn/{shared-f2c4875b.js → shared-9ce51b25.js} +1 -1
  170. package/dist/cdn/{shared-dea71762.js → shared-9e6a97dd.js} +1 -1
  171. package/dist/cdn/{shared-85323ced.js → shared-a271467a.js} +1 -1
  172. package/dist/cdn/{shared-41aa53e0.js → shared-b3985d0a.js} +1 -1
  173. package/dist/cdn/{shared-6960ab99.js → shared-b3d72cd9.js} +1 -1
  174. package/dist/cdn/{shared-d4d11fb8.js → shared-b72066f8.js} +1 -1
  175. package/dist/cdn/{shared-2762e106.js → shared-b7a745ad.js} +1 -1
  176. package/dist/cdn/{shared-7d797451.js → shared-beba68ab.js} +1 -1
  177. package/dist/cdn/{shared-25a19cbe.js → shared-c0159ceb.js} +1 -1
  178. package/dist/cdn/{shared-166204e5.js → shared-c23fa7d5.js} +2 -2
  179. package/dist/cdn/{shared-1da49e3d.js → shared-c6624d27.js} +2 -2
  180. package/dist/cdn/{shared-6ef0392a.js → shared-c6f0f6b1.js} +1 -1
  181. package/dist/cdn/{shared-d1195c27.js → shared-cb58dfcd.js} +1 -1
  182. package/dist/cdn/{shared-a2693527.js → shared-cbd8c028.js} +1 -1
  183. package/dist/cdn/{shared-34119bbf.js → shared-d0fb346b.js} +1 -1
  184. package/dist/cdn/{shared-d199f862.js → shared-d1bf9a87.js} +2 -2
  185. package/dist/cdn/{shared-a2a27012.js → shared-d4e728a4.js} +1 -1
  186. package/dist/cdn/{shared-e6cd721f.js → shared-d5588203.js} +1 -1
  187. package/dist/cdn/{shared-3a3dc0d9.js → shared-d5961db8.js} +1 -1
  188. package/dist/cdn/{shared-f438f0f4.js → shared-d793edcb.js} +1 -1
  189. package/dist/cdn/{shared-59e22bc6.js → shared-d7dcb404.js} +1 -1
  190. package/dist/cdn/{shared-2bcdd0c6.js → shared-d888c826.js} +1 -1
  191. package/dist/cdn/{shared-1ba78e12.js → shared-daa5a8b2.js} +1 -1
  192. package/dist/cdn/{shared-674ba44d.js → shared-de7d816d.js} +1 -1
  193. package/dist/cdn/{shared-f3209496.js → shared-e18a194d.js} +1 -1
  194. package/dist/cdn/{shared-e1a6c036.js → shared-e3147d1a.js} +1 -1
  195. package/dist/cdn/{shared-aa211938.js → shared-e3b504c0.js} +1 -1
  196. package/dist/cdn/{shared-641786b2.js → shared-eb963ba3.js} +1 -1
  197. package/dist/cdn/{shared-56ba2d28.js → shared-ef4ad461.js} +1 -1
  198. package/dist/cdn/shared-f83207fb.js +1 -0
  199. package/dist/cdn/{shared-7c863df2.js → shared-fa5aa1c3.js} +1 -1
  200. package/dist/cdn/shared-ff8eb8a3.js +1 -0
  201. package/dist/cdn/translations/admin-subscription-form/en.json +4 -4
  202. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +4 -0
  203. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +34 -13
  204. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  205. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js +23 -40
  206. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/InternalAdminSubscriptionFormLinkControl.js.map +1 -1
  207. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.d.ts +0 -1
  208. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js +0 -1
  209. package/dist/elements/public/AdminSubscriptionForm/internal/InternalAdminSubscriptionFormLinkControl/index.js.map +1 -1
  210. package/dist/elements/public/StoreForm/StoreForm.js +2 -2
  211. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  212. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +14 -10
  213. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  214. package/dist/mixins/themeable.js +0 -12
  215. package/dist/mixins/themeable.js.map +1 -1
  216. package/package.json +1 -1
  217. package/dist/cdn/shared-1aff7995.js +0 -1
  218. package/dist/cdn/shared-882a0fda.js +0 -1
  219. package/dist/cdn/shared-9cf15285.js +0 -1
  220. package/dist/cdn/shared-a1f85307.js +0 -1
  221. package/dist/cdn/shared-d1dfac4d.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-d54b3216.js";import"./shared-8e36bcc1.js";import"./shared-13d65f57.js";import{h as e}from"./shared-f2c4875b.js";import{T as t}from"./shared-a2693527.js";import{D as i}from"./shared-f61e5463.js";const n=e`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
1
+ import"./shared-0881a17c.js";import"./shared-0ba8919d.js";import"./shared-844ab7a4.js";import{h as e}from"./shared-9ce51b25.js";import{T as t}from"./shared-cbd8c028.js";import{D as i}from"./shared-3ff5c3d1.js";const n=e`<dom-module id="lumo-number-field" theme-for="vaadin-number-field">
2
2
  <template>
3
3
  <style include="lumo-field-button">
4
4
  :host {
@@ -1 +1 @@
1
- import{an as a,ao as r}from"./shared-d1195c27.js";var e=function(){try{var r=a(Object,"defineProperty");return r({},"",{}),r}catch(a){}}();function t(a,r,t){"__proto__"==r&&e?e(a,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[r]=t}var o=Object.prototype.hasOwnProperty;function n(a,e,n){var c=a[e];o.call(a,e)&&r(c,n)&&(void 0!==n||e in a)||t(a,e,n)}export{n as a,t as b,e as d};
1
+ import{an as a,ao as r}from"./shared-cb58dfcd.js";var e=function(){try{var r=a(Object,"defineProperty");return r({},"",{}),r}catch(a){}}();function t(a,r,t){"__proto__"==r&&e?e(a,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[r]=t}var o=Object.prototype.hasOwnProperty;function n(a,e,n){var c=a[e];o.call(a,e)&&r(c,n)&&(void 0!==n||e in a)||t(a,e,n)}export{n as a,t as b,e as d};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./shared-6960ab99.js";import{_ as r}from"./shared-d1195c27.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
1
+ import{a as e}from"./shared-b3d72cd9.js";import{_ as r}from"./shared-cb58dfcd.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
2
2
  </textarea> </div> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),!this.label&&!this.helperText,this.label,this.helperText,t,r,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,r)=>String(r)),((e,r)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),r<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",r<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",r+1))),this.placeholder,o,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const r=e.currentTarget;this._value=r.value}),!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
@@ -1 +1 @@
1
- import"./shared-8e36bcc1.js";import"./shared-d54b3216.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-0ba8919d.js";import"./shared-0881a17c.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1 +1 @@
1
- import"./shared-25a19cbe.js";import"./shared-5a08dbb0.js";import{_ as t}from"./shared-d1195c27.js";import{h as e}from"./shared-ba5c42c7.js";import{D as s}from"./shared-2550f6d9.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
1
+ import"./shared-c0159ceb.js";import"./shared-9bd0911a.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as e}from"./shared-ba5c42c7.js";import{D as s}from"./shared-704cd73c.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
@@ -1 +1 @@
1
- import{C as t}from"./shared-eeb2bd18.js";import{R as e}from"./shared-f61e5463.js";import{I as s}from"./shared-f438f0f4.js";import{h as i}from"./shared-ba5c42c7.js";let r,d,a,l=t=>t;const o=e(t(s));class n extends o{constructor(){super(...arguments),this.__renderTitle=t=>i(r||(r=l` <div data-testid="title"> ${0} <div class="font-medium truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(d||(d=l` <div data-testid="subtitle"> ${0} <div class="text-secondary truncate text-s sm-text-m"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}renderBody(t){const e=this.hiddenSelector;return i(a||(a=l` <div class="relative text-body text-m font-lumo leading-xs sm-h-auto sm-flex sm-items-center sm-justify-between"> ${0} ${0} </div> `),e.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),e.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle))}}export{n as T};
1
+ import{C as t}from"./shared-5afb584d.js";import{R as e}from"./shared-3ff5c3d1.js";import{I as s}from"./shared-d793edcb.js";import{h as i}from"./shared-ba5c42c7.js";let r,d,a,l=t=>t;const o=e(t(s));class n extends o{constructor(){super(...arguments),this.__renderTitle=t=>i(r||(r=l` <div data-testid="title"> ${0} <div class="font-medium truncate"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("title:after")),this.__renderSubtitle=t=>i(d||(d=l` <div data-testid="subtitle"> ${0} <div class="text-secondary truncate text-s sm-text-m"> ${0}&ZeroWidthSpace; </div> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),this.data?null==t?void 0:t(this.data):"",this.renderTemplateOrSlot("subtitle:after"))}renderBody(t){const e=this.hiddenSelector;return i(a||(a=l` <div class="relative text-body text-m font-lumo leading-xs sm-h-auto sm-flex sm-items-center sm-justify-between"> ${0} ${0} </div> `),e.matches("title",!0)?"":this.__renderTitle(null==t?void 0:t.title),e.matches("subtitle",!0)?"":this.__renderSubtitle(null==t?void 0:t.subtitle))}}export{n as T};
@@ -1,4 +1,4 @@
1
- import"./shared-d54b3216.js";import"./shared-8e36bcc1.js";import{h as A}from"./shared-f2c4875b.js";import{T as e}from"./shared-a2693527.js";import{D as t}from"./shared-f61e5463.js";const s=A`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
1
+ import"./shared-0881a17c.js";import"./shared-0ba8919d.js";import{h as A}from"./shared-9ce51b25.js";import{T as e}from"./shared-cbd8c028.js";import{D as t}from"./shared-3ff5c3d1.js";const s=A`<dom-module id="lumo-password-field" theme-for="vaadin-password-field">
2
2
  <template>
3
3
  <style>
4
4
  [part="reveal-button"]::before {
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{O as e}from"./shared-1ba78e12.js";import"./shared-3a446f14.js";import{h as t,P as i,D as s,t as o,a as l,m as n,A as r,y as a,v as h,x as d}from"./shared-f2c4875b.js";import"./shared-d54b3216.js";import{T as c,D as u,E as _}from"./shared-efecf1ca.js";import{I as m}from"./shared-651c44fa.js";import"./shared-13d65f57.js";import"./shared-a2693527.js";import{C as p}from"./shared-25a19cbe.js";import{t as f,m as g,F as v,f as y,d as b,P as I,O as x,D as S,a as w}from"./shared-893ead61.js";import{I as P,a as C}from"./shared-166204e5.js";import{I as V}from"./shared-dea71762.js";
1
+ import"./shared-0ba8919d.js";import{O as e}from"./shared-daa5a8b2.js";import"./shared-64ed7d2b.js";import{h as t,P as i,D as s,t as o,a as l,m as n,A as r,y as a,v as h,x as d}from"./shared-9ce51b25.js";import"./shared-0881a17c.js";import{T as c,D as u,E as _}from"./shared-424970b6.js";import{I as m}from"./shared-651c44fa.js";import"./shared-844ab7a4.js";import"./shared-cbd8c028.js";import{C as p}from"./shared-c0159ceb.js";import{t as f,m as g,F as v,f as y,d as b,P as I,O as x,D as S,a as w}from"./shared-099c2c3a.js";import{I as P,a as C}from"./shared-c23fa7d5.js";import{I as V}from"./shared-9e6a97dd.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-57c3f0e4.js";import{a as e}from"./shared-6960ab99.js";import"./shared-5a08dbb0.js";import{_ as t}from"./shared-d1195c27.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,n,c,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(n||(n=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(c||(c=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
1
+ import"./shared-01fc874a.js";import{a as e}from"./shared-b3d72cd9.js";import"./shared-9bd0911a.js";import{_ as t}from"./shared-cb58dfcd.js";import{h as s,s as i}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,a,o,h,c,n,d=e=>e;customElements.define("foxy-internal-switch-control",class extends e{constructor(){super(...arguments),this.helperTextAsToolip=!1,this.falseAlias=null,this.trueAlias=null,this.invert=!1}static get properties(){return t(t({},super.properties),{},{helperTextAsToolip:{type:Boolean,attribute:"helper-text-as-tooltip"},falseAlias:{attribute:"false-alias"},trueAlias:{attribute:"true-alias"},invert:{type:Boolean}})}renderControl(){const e=this.invert?!this._value:!!this._value;return s(r||(r=d` <div class="flex items-start gap-s leading-xs text-m"> <div class="flex-1"> <label class="text-m text-body" for="input">${0}</label> ${0} <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> ${0} ${0} </div> `),this.label,this.helperTextAsToolip?"":s(a||(a=d`<p class="text-xs text-secondary">${0}</p>`),this.helperText),this.disabled||this.readonly,this._errorMessage,this.readonly?s(o||(o=d`<p class="text-secondary">${0}</p>`),e?this.t("checked"):this.t("unchecked")):s(h||(h=d` <div style="height:calc(1em * var(--lumo-line-height-xs))" class="flex items-center"> <div style="border-radius:var(--lumo-size-xl);width:calc((1em * var(--lumo-line-height-xs)) - 3px + var(--lumo-space-m))" class="${0}" @click="${0}"> <div style="margin:1.5px;width:calc((1em * var(--lumo-line-height-xs)) - 6px);height:calc((1em * var(--lumo-line-height-xs)) - 6px)" class="${0}"></div> <input class="opacity-0 absolute inset-0 focus-outline-none" type="checkbox" id="input" switch ?disabled="${0}" ?readonly="${0}" ?checked="${0}" @change="${0}"> </div> </div> `),l({"cursor-pointer group transition-colors relative":!0,"flex flex-shrink-0 items-center":!0,"bg-success":!this.disabled&&e,"bg-contrast-20 hover-bg-contrast-30":!this.disabled&&!e,"bg-contrast-10":this.disabled,"focus-within-ring-2 focus-within-ring-primary-50":!0}),(()=>this._value=!this._value),l({"transition-all transform block rounded-full":!0,"translate-x-m":e,"translate-x-0":!e,"bg-base":this.disabled,"bg-tint":!this.disabled}),this.disabled,this.readonly,e,(e=>{const t=e.currentTarget;this._value=this.invert?!t.checked:t.checked})),this.helperTextAsToolip&&this.helperText?s(c||(c=d` <div class="transition-colors text-tertiary flex-shrink-0 cursor-pointer hover-text-body" id="trigger"> ${0} </div> <vcf-tooltip for="trigger" style="--lumo-base-color:black;max-width:30rem" class="mt-s" theme="light" position="bottom"> <span class="text-s" style="color:#fff">${0}</span> </vcf-tooltip> `),i(n||(n=d`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: calc(1em * var(--lumo-line-height-xs)); height: calc(1em * var(--lumo-line-height-xs)); margin-right: -0.12em"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),this.helperText):"")}get _value(){const e=super._value;return!(!this.trueAlias||e!==this.trueAlias)||(!this.falseAlias||e!==this.falseAlias)&&!!e}set _value(e){this.trueAlias&&!0===e?super._value=this.trueAlias:this.falseAlias&&!1===e?super._value=this.falseAlias:super._value=e}});
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{h as t,P as e}from"./shared-f2c4875b.js";import{F as i,t as o}from"./shared-893ead61.js";import{T as n,a,E as s}from"./shared-efecf1ca.js";import"./shared-6ef0392a.js";import{O as r}from"./shared-1ba78e12.js";import"./shared-25a19cbe.js";import"./shared-a2a27012.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-5a08dbb0.js";import{a as l}from"./shared-6960ab99.js";import"./shared-9f07fab6.js";import{x as d}from"./shared-f61e5463.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-d1195c27.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
1
+ import"./shared-0ba8919d.js";import{h as t,P as e}from"./shared-9ce51b25.js";import{F as i,t as o}from"./shared-099c2c3a.js";import{T as n,a,E as s}from"./shared-424970b6.js";import"./shared-c6f0f6b1.js";import{O as r}from"./shared-daa5a8b2.js";import"./shared-c0159ceb.js";import"./shared-d4e728a4.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-9bd0911a.js";import{a as l}from"./shared-b3d72cd9.js";import"./shared-8650b26e.js";import{x as d}from"./shared-3ff5c3d1.js";import{c,h,r as u}from"./shared-ba5c42c7.js";import{_ as m}from"./shared-cb58dfcd.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -0,0 +1 @@
1
+ import"./foxy-spinner.js";import{I as e}from"./shared-d793edcb.js";customElements.define("foxy-internal-card",e);
@@ -1 +1 @@
1
- import{A as e,aF as t,aG as s}from"./shared-d1195c27.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,r){function o(e){try{h(n.next(e))}catch(e){r(e)}}function a(e){try{h(n.throw(e))}catch(e){r(e)}}function h(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}h((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}signUp(t){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(t);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(t)});if(!n.ok){if(400===n.status)throw new e.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new e.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new e.AuthError({code:"UNAVAILABLE"});throw new e.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}get usesTemporaryPassword(){const e=this.storage.getItem(i.SESSION);return!!e&&!!JSON.parse(e).force_password_reset}set usesTemporaryPassword(e){i.v8n.boolean.check(e);const t=this.storage.getItem(i.SESSION);if(t){const s=JSON.parse(t);s.force_password_reset=e,this.storage.setItem(i.SESSION,JSON.stringify(s))}}__fetch(e,t){var r;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(r=this.storage.getItem(i.SESSION))&&void 0!==r?r:"null");const o=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):o.headers.set("Authorization",`Bearer ${n.session_token}`)}o.headers.set("Content-Type","application/json"),o.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${o.method} ${o.url}`);const a=yield s.fetch(o);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{signUpParams:t().schema({verification:t().schema({token:t().string(),type:t().passesAnyOf(t().exact("hcaptcha"))}),first_name:t().optional(t().string().maxLength(50)),last_name:t().optional(t().string().maxLength(50)),password:t().string().maxLength(50),email:t().string().maxLength(100)}),credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),boolean:t().boolean(),email:t().string()});let r=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function o(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(r,(function(e,t,n){(n=o[n]||o[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/o[t]}o.nanosecond=o.ns=1e-6,o["µs"]=o["μs"]=o.us=o.microsecond=.001,o.millisecond=o.ms=1,o.second=o.sec=o.s=1e3*o.ms,o.minute=o.min=o.m=60*o.s,o.hour=o.hr=o.h=60*o.m,o.day=o.d=24*o.h,o.week=o.wk=o.w=7*o.d,o.month=o.b=30.4375*o.d,o.year=o.yr=o.y=365.25*o.d;var a=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]])}return s};class h{constructor(e){var{url:t}=e,s=a(e,["url"]);this.onsubmit=null,this.__tokenizationRequests=[],this.__iframeMessageHandler=e=>{var t,s;const n=JSON.parse(e.data);switch(n.type){case"tokenization_response":{const e=this.__tokenizationRequests.find((e=>e.id===n.id));n.token?null==e||e.resolve(n.token):null==e||e.reject(),this.__tokenizationRequests=this.__tokenizationRequests.filter((e=>e.id!==n.id));break}case"submit":null===(t=this.onsubmit)||void 0===t||t.call(this);break;case"resize":this.__iframe&&(this.__iframe.style.height=n.height);break;case"ready":this.configure(this.__config),null===(s=this.__mountingTask)||void 0===s||s.resolve()}},this.__iframeLoadHandler=e=>{if(this.__channel){const t=e.currentTarget.contentWindow;if(!t)throw new Error("Content window is not available.");t.postMessage("connect","*",[this.__channel.port2])}},this.__mountingTask=null,this.__channel=null,this.__iframe=null,this.__config=s,this.__url=t}configure(e){var t;this.__config=e;const s=Object.assign({type:"config"},e);null===(t=this.__channel)||void 0===t||t.port1.postMessage(JSON.stringify(s))}tokenize(){return new Promise(((e,t)=>{if(this.__channel){const s=this._createId();this.__tokenizationRequests.push({id:s,reject:t,resolve:e}),this.__channel.port1.postMessage(JSON.stringify({id:s,type:"tokenization_request"}))}else t()}))}unmount(){var e,t,s,n,i,r;null===(e=this.__channel)||void 0===e||e.port1.removeEventListener("message",this.__iframeMessageHandler),null===(t=this.__channel)||void 0===t||t.port1.close(),null===(s=this.__channel)||void 0===s||s.port2.close(),this.__channel=null,null===(n=this.__iframe)||void 0===n||n.removeEventListener("load",this.__iframeLoadHandler),null===(i=this.__iframe)||void 0===i||i.remove(),this.__iframe=null,null===(r=this.__mountingTask)||void 0===r||r.reject(),this.__mountingTask=null}mount(e){return this.unmount(),this.__channel=this._createMessageChannel(),this.__channel.port1.addEventListener("message",this.__iframeMessageHandler),this.__channel.port1.start(),this.__iframe=this._createIframe(e),this.__iframe.addEventListener("load",this.__iframeLoadHandler),this.__iframe.style.transition="height 0.15s ease",this.__iframe.style.margin="-2px",this.__iframe.style.height="100px",this.__iframe.style.width="calc(100% + 4px)",this.__iframe.src=this.__url,e.append(this.__iframe),new Promise(((e,t)=>{this.__mountingTask={reject:t,resolve:e}}))}clear(){var e;null===(e=this.__channel)||void 0===e||e.port1.postMessage(JSON.stringify({type:"clear"}))}_createMessageChannel(){return new MessageChannel}_createIframe(e){return e.ownerDocument.createElement("iframe")}_createId(){return`${Date.now()}${Math.random().toFixed(6).slice(2)}`}}export{i as A,h as P,o as p};
1
+ import{A as e,aF as t,aG as s}from"./shared-cb58dfcd.js";var n=function(e,t,s,n){return new(s||(s=Promise))((function(i,r){function o(e){try{h(n.next(e))}catch(e){r(e)}}function a(e){try{h(n.throw(e))}catch(e){r(e)}}function h(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}h((n=n.apply(e,t||[])).next())}))};class i extends e{constructor(e){super(Object.assign(Object.assign({},e),{fetch:(...e)=>this.__fetch(...e)}))}signIn(t){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(t);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(t),method:"POST"});if(!s.ok){const t=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new e.AuthError({code:t})}{const e=yield s.json(),t=Object.assign(Object.assign({},e),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}}))}signUp(t){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(t);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(t)});if(!n.ok){if(400===n.status)throw new e.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new e.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new e.AuthError({code:"UNAVAILABLE"});throw new e.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(t){return n(this,void 0,void 0,(function*(){i.v8n.email.check(t.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(t),method:"POST"})).ok)throw new e.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new e.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}get usesTemporaryPassword(){const e=this.storage.getItem(i.SESSION);return!!e&&!!JSON.parse(e).force_password_reset}set usesTemporaryPassword(e){i.v8n.boolean.check(e);const t=this.storage.getItem(i.SESSION);if(t){const s=JSON.parse(t);s.force_password_reset=e,this.storage.setItem(i.SESSION,JSON.stringify(s))}}__fetch(e,t){var r;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(r=this.storage.getItem(i.SESSION))&&void 0!==r?r:"null");const o=new s.Request(e,t);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):o.headers.set("Authorization",`Bearer ${n.session_token}`)}o.headers.set("Content-Type","application/json"),o.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${o.method} ${o.url}`);const a=yield s.fetch(o);if(n&&a.ok){const e=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},e.v8n,{signUpParams:t().schema({verification:t().schema({token:t().string(),type:t().passesAnyOf(t().exact("hcaptcha"))}),first_name:t().optional(t().string().maxLength(50)),last_name:t().optional(t().string().maxLength(50)),password:t().string().maxLength(50),email:t().string().maxLength(100)}),credentials:t().schema({email:t().string(),newPassword:t().optional(t().string()),password:t().string()}),boolean:t().boolean(),email:t().string()});let r=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function o(e="",t="ms"){var s=null;return(e=e.replace(/(\d),(\d)/g,"$1$2")).replace(r,(function(e,t,n){(n=o[n]||o[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(t,10)*n)})),s&&s/o[t]}o.nanosecond=o.ns=1e-6,o["µs"]=o["μs"]=o.us=o.microsecond=.001,o.millisecond=o.ms=1,o.second=o.sec=o.s=1e3*o.ms,o.minute=o.min=o.m=60*o.s,o.hour=o.hr=o.h=60*o.m,o.day=o.d=24*o.h,o.week=o.wk=o.w=7*o.d,o.month=o.b=30.4375*o.d,o.year=o.yr=o.y=365.25*o.d;var a=function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(s[n[i]]=e[n[i]])}return s};class h{constructor(e){var{url:t}=e,s=a(e,["url"]);this.onsubmit=null,this.__tokenizationRequests=[],this.__iframeMessageHandler=e=>{var t,s;const n=JSON.parse(e.data);switch(n.type){case"tokenization_response":{const e=this.__tokenizationRequests.find((e=>e.id===n.id));n.token?null==e||e.resolve(n.token):null==e||e.reject(),this.__tokenizationRequests=this.__tokenizationRequests.filter((e=>e.id!==n.id));break}case"submit":null===(t=this.onsubmit)||void 0===t||t.call(this);break;case"resize":this.__iframe&&(this.__iframe.style.height=n.height);break;case"ready":this.configure(this.__config),null===(s=this.__mountingTask)||void 0===s||s.resolve()}},this.__iframeLoadHandler=e=>{if(this.__channel){const t=e.currentTarget.contentWindow;if(!t)throw new Error("Content window is not available.");t.postMessage("connect","*",[this.__channel.port2])}},this.__mountingTask=null,this.__channel=null,this.__iframe=null,this.__config=s,this.__url=t}configure(e){var t;this.__config=e;const s=Object.assign({type:"config"},e);null===(t=this.__channel)||void 0===t||t.port1.postMessage(JSON.stringify(s))}tokenize(){return new Promise(((e,t)=>{if(this.__channel){const s=this._createId();this.__tokenizationRequests.push({id:s,reject:t,resolve:e}),this.__channel.port1.postMessage(JSON.stringify({id:s,type:"tokenization_request"}))}else t()}))}unmount(){var e,t,s,n,i,r;null===(e=this.__channel)||void 0===e||e.port1.removeEventListener("message",this.__iframeMessageHandler),null===(t=this.__channel)||void 0===t||t.port1.close(),null===(s=this.__channel)||void 0===s||s.port2.close(),this.__channel=null,null===(n=this.__iframe)||void 0===n||n.removeEventListener("load",this.__iframeLoadHandler),null===(i=this.__iframe)||void 0===i||i.remove(),this.__iframe=null,null===(r=this.__mountingTask)||void 0===r||r.reject(),this.__mountingTask=null}mount(e){return this.unmount(),this.__channel=this._createMessageChannel(),this.__channel.port1.addEventListener("message",this.__iframeMessageHandler),this.__channel.port1.start(),this.__iframe=this._createIframe(e),this.__iframe.addEventListener("load",this.__iframeLoadHandler),this.__iframe.style.transition="height 0.15s ease",this.__iframe.style.margin="-2px",this.__iframe.style.height="100px",this.__iframe.style.width="calc(100% + 4px)",this.__iframe.src=this.__url,e.append(this.__iframe),new Promise(((e,t)=>{this.__mountingTask={reject:t,resolve:e}}))}clear(){var e;null===(e=this.__channel)||void 0===e||e.port1.postMessage(JSON.stringify({type:"clear"}))}_createMessageChannel(){return new MessageChannel}_createIframe(e){return e.ownerDocument.createElement("iframe")}_createId(){return`${Date.now()}${Math.random().toFixed(6).slice(2)}`}}export{i as A,h as P,o as p};
@@ -1 +1 @@
1
- import{A as e,_ as t}from"./shared-d1195c27.js";import{h as n,L as r}from"./shared-ba5c42c7.js";import{i as s,a as i}from"./shared-f61e5463.js";import{F as a}from"./shared-343d1fd7.js";import{I as o}from"./shared-17a61265.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},i=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:i});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(i)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,n,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(i=null==r?void 0:r.year)&&void 0!==i?i:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(i(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=a,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
1
+ import{A as e,_ as t}from"./shared-cb58dfcd.js";import{h as n,L as r}from"./shared-ba5c42c7.js";import{i as s,a as i}from"./shared-3ff5c3d1.js";import{F as a}from"./shared-343d1fd7.js";import{I as o}from"./shared-2aa23b5f.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},i=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:i});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(i)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,n,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(i=null==r?void 0:r.year)&&void 0!==i?i:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(i(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=a,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
@@ -1,4 +1,4 @@
1
- import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-f61e5463.js";
1
+ import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-3ff5c3d1.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{d as e}from"./shared-893ead61.js";import{u as i}from"./shared-f61e5463.js";
1
+ import{d as e}from"./shared-099c2c3a.js";import{u as i}from"./shared-3ff5c3d1.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-25a19cbe.js";import{b as r}from"./shared-6960ab99.js";import"./foxy-form-dialog.js";import"./shared-5a08dbb0.js";import{_ as e}from"./shared-d1195c27.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
1
+ import"./shared-c0159ceb.js";import{b as r}from"./shared-b3d72cd9.js";import"./foxy-form-dialog.js";import"./shared-9bd0911a.js";import{_ as e}from"./shared-cb58dfcd.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
@@ -1 +1 @@
1
- import{_ as e}from"./shared-d1195c27.js";import{B as t}from"./shared-25a19cbe.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-f61e5463.js";import{I as o}from"./shared-bd941702.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
1
+ import{_ as e}from"./shared-cb58dfcd.js";import{B as t}from"./shared-c0159ceb.js";import{c as r,h as s}from"./shared-ba5c42c7.js";import{y as n}from"./shared-3ff5c3d1.js";import{I as o}from"./shared-516205e7.js";let i,a,c,l=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":t,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,r(i||(i=l`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return e(e({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return s(a||(a=l` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?s(c||(c=l` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
@@ -1 +1 @@
1
- import{_ as e,l as t,B as r}from"./shared-d1195c27.js";import{a as s,T as i,w as n}from"./shared-f61e5463.js";import{s as o}from"./shared-1aff7995.js";import"./shared-25a19cbe.js";import"./shared-5a08dbb0.js";import"./shared-5212ef4f.js";import{C as l}from"./shared-eeb2bd18.js";import{h as a,r as d,L as h}from"./shared-ba5c42c7.js";import{I as c}from"./shared-17a61265.js";import{N as u}from"./shared-d1dfac4d.js";import"./shared-9f07fab6.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as p}from"./shared-bab2ea2c.js";import{c as f}from"./shared-4e709717.js";let y,m,x,_,v=e=>e;class b extends(l(s(i(c(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof u?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=a(y||(y=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);d(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return a(m||(m=v``))}render(){return this.hidden?a(x||(x=v``)):a(_||(_=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",b);class g extends b{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);return this.jsonPath?t(JSON.parse(null!=r?r:this.jsonTemplate),this.jsonPath):r},this.setValue=e=>{var t,r,s,i,n,l,a,d,h;const[c,...u]=this.property.split(".");if(u.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[c])&&void 0!==r?r:{};if(this.jsonPath){const t=JSON.parse(null!==(i=null===(s=this.nucleon)||void 0===s?void 0:s.form[c])&&void 0!==i?i:this.jsonTemplate);o(t,this.jsonPath,e),o(l,u,JSON.stringify(t))}else o(l,u,e);null===(n=this.nucleon)||void 0===n||n.edit({[c]:l})}else if(this.jsonPath){const t=JSON.parse(null!==(a=null===(l=this.nucleon)||void 0===l?void 0:l.form[c])&&void 0!==a?a:this.jsonTemplate);o(t,this.jsonPath,e),null===(d=this.nucleon)||void 0===d||d.edit({[c]:JSON.stringify(t)})}else null===(h=this.nucleon)||void 0===h||h.edit({[c]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",g);let $,j=e=>e;customElements.define("foxy-internal-timestamps-control",class extends b{renderControl(){return a($||($=j` <p class="font-lumo text-s leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:t(this,"nucleon.data.date_created")},{value:t(this,"nucleon.data.date_modified")})}});let S,k=e=>e;customElements.define("foxy-internal-submit-control",class extends b{constructor(){super(...arguments),this.theme="primary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(S||(S=k` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let P,T=e=>e;customElements.define("foxy-internal-delete-control",class extends b{constructor(){super(...arguments),this.theme="error"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(P||(P=T` <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 E,V=e=>e;customElements.define("foxy-internal-undo-control",class extends b{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(E||(E=V` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let O,A,C,N,q,w,U,J,I,H,L,K,W=e=>e;const B=l(i(u));class D extends B{constructor(){super(...arguments),this.status=null}static get properties(){return e(e({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return e(e({},this.data),{},{context:this.data?"existing":"new",id:this.data?p(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerCopyIdValue(){var e;return this.data&&null!==(e=p(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new r(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return a(O||(O=W``));const e=this.data,t=e?this.renderHeaderActions(e):null;return a(A||(A=W` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?a(C||(C=W` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":a(N||(N=W` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":a(q||(q=W` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?a(w||(w=W` <foxy-i18n infer="header" class="text-m text-secondary" key="${0}" .options="${0}"> </foxy-i18n> ${0} `),this.headerSubtitleKey,this.headerSubtitleOptions,t?a(U||(U=W`<div class="mt-xs flex gap-m">${0}</div>`),t):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return a(J||(J=W` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return a(I||(I=W` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),f({"space-y-m":!0,"transition-all filter":!0,"opacity-30 blur-sm pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),f({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?a(H||(H=W` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return a(L||(L=W` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:t}){if(!this.hiddenSelector.matches("status",!0))return a(K||(K=W` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,t,(()=>this.status=null))}}D.generalErrorPrefix="error:",customElements.define("foxy-internal-form",D);export{D as I,g as a,b};
1
+ import{_ as e,l as t,B as r}from"./shared-cb58dfcd.js";import{a as s,T as i,w as n}from"./shared-3ff5c3d1.js";import{s as o}from"./shared-0aedd809.js";import"./shared-c0159ceb.js";import"./shared-9bd0911a.js";import"./shared-5212ef4f.js";import{C as l}from"./shared-5afb584d.js";import{h as a,r as d,L as h}from"./shared-ba5c42c7.js";import{I as c}from"./shared-2aa23b5f.js";import{N as u}from"./shared-f83207fb.js";import"./shared-8650b26e.js";import"./foxy-copy-to-clipboard.js";import"./foxy-spinner.js";import{g as p}from"./shared-bab2ea2c.js";import{c as f}from"./shared-4e709717.js";let y,m,x,_,v=e=>e;class b extends(l(s(i(c(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof u?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=a(y||(y=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);d(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return a(m||(m=v``))}render(){return this.hidden?a(x||(x=v``)):a(_||(_=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",b);class g extends b{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);return this.jsonPath?t(JSON.parse(null!=r?r:this.jsonTemplate),this.jsonPath):r},this.setValue=e=>{var t,r,s,i,n,l,a,d,h;const[c,...u]=this.property.split(".");if(u.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[c])&&void 0!==r?r:{};if(this.jsonPath){const t=JSON.parse(null!==(i=null===(s=this.nucleon)||void 0===s?void 0:s.form[c])&&void 0!==i?i:this.jsonTemplate);o(t,this.jsonPath,e),o(l,u,JSON.stringify(t))}else o(l,u,e);null===(n=this.nucleon)||void 0===n||n.edit({[c]:l})}else if(this.jsonPath){const t=JSON.parse(null!==(a=null===(l=this.nucleon)||void 0===l?void 0:l.form[c])&&void 0!==a?a:this.jsonTemplate);o(t,this.jsonPath,e),null===(d=this.nucleon)||void 0===d||d.edit({[c]:JSON.stringify(t)})}else null===(h=this.nucleon)||void 0===h||h.edit({[c]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",g);let $,j=e=>e;customElements.define("foxy-internal-timestamps-control",class extends b{renderControl(){return a($||($=j` <p class="font-lumo text-s leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>&bull;<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:t(this,"nucleon.data.date_created")},{value:t(this,"nucleon.data.date_modified")})}});let S,k=e=>e;customElements.define("foxy-internal-submit-control",class extends b{constructor(){super(...arguments),this.theme="primary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(S||(S=k` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}});let P,T=e=>e;customElements.define("foxy-internal-delete-control",class extends b{constructor(){super(...arguments),this.theme="error"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(P||(P=T` <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 E,V=e=>e;customElements.define("foxy-internal-undo-control",class extends b{constructor(){super(...arguments),this.theme="secondary"}static get properties(){return e(e({},super.properties),{},{theme:{type:String}})}renderControl(){return a(E||(E=V` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="caption"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.undo()}))}});let O,A,C,N,q,w,U,J,I,H,L,K,W=e=>e;const B=l(i(u));class D extends B{constructor(){super(...arguments),this.status=null}static get properties(){return e(e({},super.properties),{},{status:{type:Object}})}renderHeaderActions(e){return null}get headerTitleKey(){return"title"}get headerTitleOptions(){return e(e({},this.data),{},{context:this.data?"existing":"new",id:this.data?p(this.data._links.self.href):null})}get headerSubtitleKey(){return"subtitle"}get headerSubtitleOptions(){var e;return null!==(e=this.data)&&void 0!==e?e:{}}get headerCopyIdValue(){var e;return this.data&&null!==(e=p(this.data._links.self.href))&&void 0!==e?e:""}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("create"),this.href||e.unshift("delete","timestamps","submit"),this.in({idle:{snapshot:"dirty"}})||e.unshift("undo","submit"),new r(e.join(" ").trim())}renderHeader(){if(this.hiddenSelector.matches("header",!0))return a(O||(O=W``));const e=this.data,t=e?this.renderHeaderActions(e):null;return a(A||(A=W` <div> ${0} <h2> <span class="flex items-center gap-s leading-xs text-xl font-medium break-all"> <foxy-i18n options="${0}" infer="header" key="${0}"> </foxy-i18n> ${0} </span> ${0} </h2> ${0} </div> `),this.renderTemplateOrSlot("header:before"),JSON.stringify(this.headerTitleOptions),this.headerTitleKey,e?a(C||(C=W` ${0} ${0} `),this.hiddenSelector.matches("header:copy-id",!0)?"":a(N||(N=W` <foxy-copy-to-clipboard infer="header copy-id" class="text-m" text="${0}"> </foxy-copy-to-clipboard> `),this.headerCopyIdValue),this.hiddenSelector.matches("header:copy-json",!0)?"":a(q||(q=W` <foxy-copy-to-clipboard infer="header copy-json" class="text-m" icon="icons:code" text="${0}"> </foxy-copy-to-clipboard> `),JSON.stringify(e,null,2))):"",e?a(w||(w=W` <foxy-i18n infer="header" class="text-m text-secondary" key="${0}" .options="${0}"> </foxy-i18n> ${0} `),this.headerSubtitleKey,this.headerSubtitleOptions,t?a(U||(U=W`<div class="mt-xs flex gap-m">${0}</div>`),t):""):"",this.renderTemplateOrSlot("header:after"))}renderBody(){return a(J||(J=W` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> <div class="w-full"></div> <foxy-internal-undo-control infer="undo"> </foxy-internal-undo-control> <foxy-internal-submit-control infer="submit"> </foxy-internal-submit-control> <foxy-internal-submit-control infer="create" theme="primary success"> </foxy-internal-submit-control> </div> `),["delete","undo","submit","create"].every((e=>this.hiddenSelector.matches(e,!0))))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return a(I||(I=W` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),f({"space-y-m":!0,"transition-all filter":!0,"opacity-30 blur-sm pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),f({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?a(H||(H=W` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return a(L||(L=W` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:t}){if(!this.hiddenSelector.matches("status",!0))return a(K||(K=W` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,t,(()=>this.status=null))}}D.generalErrorPrefix="error:",customElements.define("foxy-internal-form",D);export{D as I,g as a,b};
@@ -1 +1 @@
1
- import"./shared-a6b2bd14.js";import"./shared-c27ee44e.js";import"./shared-3691a26f.js";import"./shared-569db166.js";import{b as e,I as t}from"./shared-6960ab99.js";import"./shared-5a08dbb0.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-d1195c27.js";import{S as a,a as l}from"./shared-f61e5463.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends e{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(t,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
1
+ import"./shared-a6b2bd14.js";import"./shared-62d05dde.js";import"./shared-243e3357.js";import"./shared-427529a8.js";import{b as e,I as t}from"./shared-b3d72cd9.js";import"./shared-9bd0911a.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-cb58dfcd.js";import{S as a,a as l}from"./shared-3ff5c3d1.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends e{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(t,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import"./shared-3a446f14.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-f2c4875b.js";import{C as n}from"./shared-25a19cbe.js";import"./shared-d54b3216.js";import"./shared-13d65f57.js";import{T as l}from"./shared-a2693527.js";import"./shared-34119bbf.js";import{T as d,D as h,E as u}from"./shared-efecf1ca.js";import{O as c}from"./shared-1ba78e12.js";import{D as p,t as m,f as _,a as f}from"./shared-893ead61.js";import{I as v,a as g}from"./shared-166204e5.js";import{a as y}from"./shared-d8cab6ab.js";import{I as b}from"./shared-dea71762.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
1
+ import"./shared-0ba8919d.js";import"./shared-64ed7d2b.js";import{h as e,G as t,P as a,D as i,t as s,b as o,s as r}from"./shared-9ce51b25.js";import{C as n}from"./shared-c0159ceb.js";import"./shared-0881a17c.js";import"./shared-844ab7a4.js";import{T as l}from"./shared-cbd8c028.js";import"./shared-d0fb346b.js";import{T as d,D as h,E as u}from"./shared-424970b6.js";import{O as c}from"./shared-daa5a8b2.js";import{D as p,t as m,f as _,a as f}from"./shared-099c2c3a.js";import{I as v,a as g}from"./shared-c23fa7d5.js";import{a as y}from"./shared-234b03f8.js";import{I as b}from"./shared-9e6a97dd.js";const D=e`<dom-module id="lumo-date-picker-overlay" theme-for="vaadin-date-picker-overlay">
2
2
  <template>
3
3
  <style include="lumo-menu-overlay">
4
4
  [part="overlay"] {
@@ -1 +1 @@
1
- import"./shared-8e36bcc1.js";const n=document.createElement("template");n.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(n.content);
1
+ import"./shared-0ba8919d.js";const n=document.createElement("template");n.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(n.content);
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{h as t,G as e,P as o,b as i}from"./shared-f2c4875b.js";import{E as r,T as s}from"./shared-efecf1ca.js";
1
+ import"./shared-0ba8919d.js";import{h as t,G as e,P as o,b as i}from"./shared-9ce51b25.js";import{E as r,T as s}from"./shared-424970b6.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 Vaadin Ltd.
@@ -1,4 +1,4 @@
1
- import{P as e}from"./shared-893ead61.js";import{h as t}from"./shared-f2c4875b.js";
1
+ import{P as e}from"./shared-099c2c3a.js";import{h as t}from"./shared-9ce51b25.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -28,4 +28,4 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
28
28
  part of the polymer project is also subject to an additional IP rights grant
29
29
  found at http://polymer.github.io/PATENTS.txt
30
30
  */
31
- var i={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},s={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},r={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},a=/[a-z0-9*]/,o=/U\+/,d=/^arrow/,c=/^space(bar)?/,y=/^escape$/;function u(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||c.test(i)?n="space":y.test(i)?n="esc":1==i.length?t&&!a.test(i)||(n=i):n=d.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function h(e,t){return e.key?u(e.key,t):e.detail&&e.detail.key?u(e.detail.key,t):(n=e.keyIdentifier,r="",n&&(n in i?r=i[n]:o.test(n)?(n=parseInt(n.replace("U+","0x"),16),r=String.fromCharCode(n).toLowerCase()):r=n.toLowerCase()),r||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):s[e]),t}(e.keyCode)||"");var n,r}function l(e,t){return h(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function v(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var n=t.split(":"),i=n[0],s=n[1];return i in r?(e[r[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=s||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const f={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=v(t),i=0;i<n.length;++i)if(l(n[i],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(e,t){v(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,n,i;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],i=e[2],t.removeEventListener(n,i)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1];if(l(i,t)&&(this._triggerKeyHandler(i,s,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var i=Object.create(e);i.keyboardEvent=n;var s=new CustomEvent(e.event,{detail:i,cancelable:!0});this[t].call(this,s),s.defaultPrevented&&n.preventDefault()}};export{n as I,f as a};
31
+ var i={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},s={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},r={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},a=/[a-z0-9*]/,o=/U\+/,d=/^arrow/,c=/^space(bar)?/,y=/^escape$/;function u(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||c.test(i)?n="space":y.test(i)?n="esc":1==i.length?t&&!a.test(i)||(n=i):n=d.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function h(e,t){return e.key?u(e.key,t):e.detail&&e.detail.key?u(e.detail.key,t):(n=e.keyIdentifier,r="",n&&(n in i?r=i[n]:o.test(n)?(n=parseInt(n.replace("U+","0x"),16),r=String.fromCharCode(n).toLowerCase()):r=n.toLowerCase()),r||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):s[e]),t}(e.keyCode)||"");var n,r}function l(e,t){return h(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function v(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var n=t.split(":"),i=n[0],s=n[1];return i in r?(e[r[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=s||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const p={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=v(t),i=0;i<n.length;++i)if(l(n[i],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(e,t){v(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,n,i;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],i=e[2],t.removeEventListener(n,i)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1];if(l(i,t)&&(this._triggerKeyHandler(i,s,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var i=Object.create(e);i.keyboardEvent=n;var s=new CustomEvent(e.event,{detail:i,cancelable:!0});this[t].call(this,s),s.defaultPrevented&&n.preventDefault()}};export{n as I,p as a};
@@ -1,4 +1,4 @@
1
- import{C as e}from"./shared-6ef0392a.js";import"./shared-8e36bcc1.js";import"./shared-59e22bc6.js";import{h as t,P as r}from"./shared-f2c4875b.js";import{F as o}from"./shared-893ead61.js";import{T as a,D as s}from"./shared-efecf1ca.js";import{a as l}from"./shared-6960ab99.js";import"./shared-5a08dbb0.js";import{_ as i}from"./shared-d1195c27.js";import{i as h}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";const n=t`<dom-module id="lumo-checkbox-group" theme-for="vaadin-checkbox-group">
1
+ import{C as e}from"./shared-c6f0f6b1.js";import"./shared-0ba8919d.js";import"./shared-d7dcb404.js";import{h as t,P as r}from"./shared-9ce51b25.js";import{F as o}from"./shared-099c2c3a.js";import{T as a,D as s}from"./shared-424970b6.js";import{a as l}from"./shared-b3d72cd9.js";import"./shared-9bd0911a.js";import{_ as i}from"./shared-cb58dfcd.js";import{i as h}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";const n=t`<dom-module id="lumo-checkbox-group" theme-for="vaadin-checkbox-group">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {
@@ -147,4 +147,4 @@ class c extends(a(s(r))){static get template(){return t`
147
147
  <div part="error-message" aria-live="assertive" aria-hidden\$="[[_getErrorMessageAriaHidden(invalid, errorMessage)]]">[[errorMessage]]</div>
148
148
 
149
149
  </div>
150
- `}static get is(){return"vaadin-checkbox-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},label:{type:String,value:"",observer:"_labelChanged"},value:{type:Array,value:()=>[],notify:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},required:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_hasSlottedHelper:Boolean}}static get observers(){return["_updateValue(value, value.splices)"]}ready(){super.ready(),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{this._checkboxes.some((t=>e.relatedTarget===t||t.shadowRoot.contains(e.relatedTarget)))||(this.validate(),this._setFocused(!1))}));const e=e=>{this._changeSelectedCheckbox(e.target)};this._observer=new o(this,(t=>{const r=this._filterCheckboxes(t.addedNodes);r.forEach((t=>{t.addEventListener("checked-changed",e),this.disabled&&(t.disabled=!0),t.checked?this._addCheckboxToValue(t.value):this.value.indexOf(t.value)>-1&&(t.checked=!0)})),this._filterCheckboxes(t.removedNodes).forEach((t=>{t.removeEventListener("checked-changed",e),t.checked&&this._removeCheckboxFromValue(t.value)})),this._setOrToggleHasHelperAttribute();r.every((e=>{const{value:t}=e;return e.hasAttribute("value")||t&&"on"!==t}))||console.warn("Please add value attribute to all checkboxes in checkbox group")}))}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=!(this.required&&0===this.value.length);return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}get _checkboxes(){return this._filterCheckboxes(this.querySelectorAll("*"))}_filterCheckboxes(t){return Array.from(t).filter((t=>t instanceof e))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._checkboxes.forEach((t=>t.disabled=e))}_addCheckboxToValue(e){-1===this.value.indexOf(e)&&(this.value=this.value.concat(e))}_removeCheckboxFromValue(e){this.value=this.value.filter((t=>t!==e))}_changeSelectedCheckbox(e){this._updatingValue||(e.checked?this._addCheckboxToValue(e.value):this._removeCheckboxFromValue(e.value))}_updateValue(e,t){0===e.length&&void 0===this._oldValue||(e.length?this.setAttribute("has-value",""):this.removeAttribute("has-value"),this._oldValue=e,this._updatingValue=!0,this._checkboxes.forEach((t=>{t.checked=e.indexOf(t.value)>-1})),this._updatingValue=!1,this.validate())}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_getErrorMessageAriaHidden(e,t){return(!t||!e).toString()}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getHelperTextAriaHidden(e,t){return(!(e||t)).toString()}}customElements.define(c.is,c);let u,p,v=e=>e;customElements.define("foxy-internal-checkbox-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return i(i({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return d(u||(u=v` <vaadin-checkbox-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}"> ${0} </vaadin-checkbox-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,this.options.map((e=>d(p||(p=v` <vaadin-checkbox value="${0}" @change="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-checkbox> `),e.value,(e=>{const t=e.currentTarget.closest("vaadin-checkbox-group").querySelectorAll("vaadin-checkbox");this._value=Array.from(t).reduce(((e,t)=>t.checked?[...e,t.value]:e),[])}),e.label))))}});
150
+ `}static get is(){return"vaadin-checkbox-group"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0,observer:"_disabledChanged"},label:{type:String,value:"",observer:"_labelChanged"},value:{type:Array,value:()=>[],notify:!0},errorMessage:{type:String,value:"",observer:"_errorMessageChanged"},helperText:{type:String,value:"",observer:"_helperTextChanged"},required:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_hasSlottedHelper:Boolean}}static get observers(){return["_updateValue(value, value.splices)"]}ready(){super.ready(),this.addEventListener("focusin",(()=>this._setFocused(this._containsFocus()))),this.addEventListener("focusout",(e=>{this._checkboxes.some((t=>e.relatedTarget===t||t.shadowRoot.contains(e.relatedTarget)))||(this.validate(),this._setFocused(!1))}));const e=e=>{this._changeSelectedCheckbox(e.target)};this._observer=new o(this,(t=>{const r=this._filterCheckboxes(t.addedNodes);r.forEach((t=>{t.addEventListener("checked-changed",e),this.disabled&&(t.disabled=!0),t.checked?this._addCheckboxToValue(t.value):this.value.indexOf(t.value)>-1&&(t.checked=!0)})),this._filterCheckboxes(t.removedNodes).forEach((t=>{t.removeEventListener("checked-changed",e),t.checked&&this._removeCheckboxFromValue(t.value)})),this._setOrToggleHasHelperAttribute();r.every((e=>{const{value:t}=e;return e.hasAttribute("value")||t&&"on"!==t}))||console.warn("Please add value attribute to all checkboxes in checkbox group")}))}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}validate(){const e=!(this.required&&0===this.value.length);return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}get _checkboxes(){return this._filterCheckboxes(this.querySelectorAll("*"))}_filterCheckboxes(t){return Array.from(t).filter((t=>t instanceof e))}_disabledChanged(e){this.setAttribute("aria-disabled",e),this._checkboxes.forEach((t=>t.disabled=e))}_addCheckboxToValue(e){-1===this.value.indexOf(e)&&(this.value=this.value.concat(e))}_removeCheckboxFromValue(e){this.value=this.value.filter((t=>t!==e))}_changeSelectedCheckbox(e){this._updatingValue||(e.checked?this._addCheckboxToValue(e.value):this._removeCheckboxFromValue(e.value))}_updateValue(e,t){0===e.length&&void 0===this._oldValue||(e.length?this.setAttribute("has-value",""):this.removeAttribute("has-value"),this._oldValue=e,this._updatingValue=!0,this._checkboxes.forEach((t=>{t.checked=e.indexOf(t.value)>-1})),this._updatingValue=!1,this.validate())}_labelChanged(e){this._setOrToggleAttribute("has-label",!!e)}_errorMessageChanged(e){this._setOrToggleAttribute("has-error-message",!!e)}_helperTextChanged(e){this._setOrToggleAttribute("has-helper",!!e)}_setOrToggleAttribute(e,t){e&&(t?this.setAttribute(e,"boolean"==typeof t?"":t):this.removeAttribute(e))}_getErrorMessageAriaHidden(e,t){return(!t||!e).toString()}_containsFocus(){const e=this.getRootNode(),t=void 0!==e._activeElement?e._activeElement:e.activeElement;return this.contains(t)}_setFocused(e){e?this.setAttribute("focused",""):this.removeAttribute("focused")}_setOrToggleHasHelperAttribute(){const e=this.shadowRoot.querySelector('[name="helper"]').assignedNodes();this._hasSlottedHelper=e.filter((e=>3!==e.nodeType)).length>0,this._setOrToggleAttribute("has-helper",this._hasSlottedHelper?"slotted":!!this.helperText)}_getHelperTextAriaHidden(e,t){return(!(e||t)).toString()}}customElements.define(c.is,c);let u,p,b=e=>e;customElements.define("foxy-internal-checkbox-group-control",class extends l{constructor(){super(...arguments),this.options=[],this.theme=null}static get properties(){return i(i({},super.properties),{},{options:{type:Array},theme:{type:String}})}renderControl(){var e;return d(u||(u=b` <vaadin-checkbox-group error-message="${0}" helper-text="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" .checkValidity="${0}" .value="${0}"> ${0} </vaadin-checkbox-group> `),h(this._errorMessage),this.helperText,this.label,h(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,this._checkValidity,this._value,this.options.map((e=>d(p||(p=b` <vaadin-checkbox value="${0}" @change="${0}"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </vaadin-checkbox> `),e.value,(e=>{const t=e.currentTarget.closest("vaadin-checkbox-group").querySelectorAll("vaadin-checkbox");this._value=Array.from(t).reduce(((e,t)=>t.checked?[...e,t.value]:e),[])}),e.label))))}});
@@ -1,4 +1,4 @@
1
- import"./shared-8e36bcc1.js";import{h as e,G as t,P as o}from"./shared-f2c4875b.js";import{E as i,T as r}from"./shared-efecf1ca.js";import{C as a}from"./shared-25a19cbe.js";const s=e`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
1
+ import"./shared-0ba8919d.js";import{h as e,G as t,P as o}from"./shared-9ce51b25.js";import{E as i,T as r}from"./shared-424970b6.js";import{C as a}from"./shared-c0159ceb.js";const s=e`<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 */