@foxy.io/elements 1.24.0-beta.3 → 1.24.0-beta.5

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 (228) 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-api-browser.js +1 -1
  6. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  8. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  9. package/dist/cdn/foxy-attribute-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-form.js +1 -1
  11. package/dist/cdn/foxy-cancellation-form.js +1 -1
  12. package/dist/cdn/foxy-cart-card.js +1 -1
  13. package/dist/cdn/foxy-cart-form.js +1 -1
  14. package/dist/cdn/foxy-client-card.js +1 -1
  15. package/dist/cdn/foxy-client-form.js +1 -1
  16. package/dist/cdn/foxy-collection-page.js +1 -1
  17. package/dist/cdn/foxy-collection-pages.js +1 -1
  18. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  19. package/dist/cdn/foxy-coupon-card.js +1 -1
  20. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  21. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  22. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-form.js +1 -1
  24. package/dist/cdn/foxy-custom-field-card.js +1 -1
  25. package/dist/cdn/foxy-custom-field-form.js +1 -1
  26. package/dist/cdn/foxy-customer-api.js +1 -1
  27. package/dist/cdn/foxy-customer-card.js +1 -1
  28. package/dist/cdn/foxy-customer-form.js +1 -1
  29. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  30. package/dist/cdn/foxy-customer-portal.js +2 -2
  31. package/dist/cdn/foxy-customer.js +1 -1
  32. package/dist/cdn/foxy-customers-table.js +1 -1
  33. package/dist/cdn/foxy-discount-builder.js +1 -1
  34. package/dist/cdn/foxy-discount-card.js +1 -1
  35. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  36. package/dist/cdn/foxy-donation.js +1 -1
  37. package/dist/cdn/foxy-downloadable-card.js +1 -1
  38. package/dist/cdn/foxy-downloadable-form.js +1 -1
  39. package/dist/cdn/foxy-email-template-card.js +1 -1
  40. package/dist/cdn/foxy-email-template-form.js +1 -1
  41. package/dist/cdn/foxy-error-entry-card.js +1 -1
  42. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  43. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  44. package/dist/cdn/foxy-form-dialog.js +1 -1
  45. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  46. package/dist/cdn/foxy-gift-card-card.js +1 -1
  47. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  48. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  49. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-form.js +1 -1
  51. package/dist/cdn/foxy-i18n-editor.js +2 -2
  52. package/dist/cdn/foxy-i18n.js +1 -1
  53. package/dist/cdn/foxy-integration-card.js +1 -1
  54. package/dist/cdn/foxy-integration-form.js +1 -1
  55. package/dist/cdn/foxy-item-card.js +1 -1
  56. package/dist/cdn/foxy-item-category-card.js +1 -1
  57. package/dist/cdn/foxy-item-category-form.js +1 -1
  58. package/dist/cdn/foxy-item-form.js +1 -1
  59. package/dist/cdn/foxy-item-option-card.js +1 -1
  60. package/dist/cdn/foxy-item-option-form.js +1 -1
  61. package/dist/cdn/foxy-items-form.js +1 -1
  62. package/dist/cdn/foxy-nucleon-element.js +1 -1
  63. package/dist/cdn/foxy-pagination.js +1 -1
  64. package/dist/cdn/foxy-passkey-card.js +1 -1
  65. package/dist/cdn/foxy-passkey-form.js +1 -1
  66. package/dist/cdn/foxy-payment-card.js +1 -1
  67. package/dist/cdn/foxy-payment-method-card.js +1 -1
  68. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  69. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  70. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  71. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  72. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  73. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  74. package/dist/cdn/foxy-payments-api.js +1 -1
  75. package/dist/cdn/foxy-query-builder.js +1 -1
  76. package/dist/cdn/foxy-report-form.js +4 -4
  77. package/dist/cdn/foxy-reports-table.js +1 -1
  78. package/dist/cdn/foxy-shipment-card.js +1 -1
  79. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  80. package/dist/cdn/foxy-sign-in-form.js +1 -1
  81. package/dist/cdn/foxy-spinner.js +2 -2
  82. package/dist/cdn/foxy-store-card.js +1 -1
  83. package/dist/cdn/foxy-store-form.js +1 -1
  84. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  85. package/dist/cdn/foxy-subscription-card.js +1 -1
  86. package/dist/cdn/foxy-subscription-form.js +2 -2
  87. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  88. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  89. package/dist/cdn/foxy-table.js +1 -1
  90. package/dist/cdn/foxy-tax-card.js +1 -1
  91. package/dist/cdn/foxy-tax-form.js +1 -1
  92. package/dist/cdn/foxy-template-config-form.js +1 -1
  93. package/dist/cdn/foxy-template-form.js +1 -1
  94. package/dist/cdn/foxy-template-set-card.js +1 -1
  95. package/dist/cdn/foxy-template-set-form.js +1 -1
  96. package/dist/cdn/foxy-transaction-card.js +1 -1
  97. package/dist/cdn/foxy-transaction.js +1 -1
  98. package/dist/cdn/foxy-transactions-table.js +1 -1
  99. package/dist/cdn/foxy-user-card.js +1 -1
  100. package/dist/cdn/foxy-user-form.js +1 -1
  101. package/dist/cdn/foxy-users-table.js +1 -1
  102. package/dist/cdn/foxy-webhook-card.js +1 -1
  103. package/dist/cdn/foxy-webhook-form.js +1 -1
  104. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  105. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  106. package/dist/cdn/{shared-9caffb4d.js → shared-017ab35f.js} +1 -1
  107. package/dist/cdn/{shared-e6828dbf.js → shared-0689b25a.js} +5 -5
  108. package/dist/cdn/shared-0dabe195.js +15 -0
  109. package/dist/cdn/{shared-1b060170.js → shared-125d1a00.js} +1 -1
  110. package/dist/cdn/shared-13cc4ed4.js +9 -0
  111. package/dist/cdn/{shared-ff992ead.js → shared-15fe0f50.js} +1 -1
  112. package/dist/cdn/{shared-379b37e6.js → shared-19c9fe00.js} +7 -11
  113. package/dist/cdn/shared-1b2e0709.js +1 -0
  114. package/dist/cdn/shared-1e43b4db.js +1 -0
  115. package/dist/cdn/{shared-c7f2f1ab.js → shared-1fd59009.js} +1 -1
  116. package/dist/cdn/{shared-31651a9c.js → shared-2fa6a5a0.js} +1 -1
  117. package/dist/cdn/{shared-65318cc1.js → shared-3164d0c3.js} +1 -1
  118. package/dist/cdn/{shared-e10052d0.js → shared-31a891e8.js} +3 -3
  119. package/dist/cdn/{shared-b3ac59eb.js → shared-403af08d.js} +2 -2
  120. package/dist/cdn/{shared-a92ae606.js → shared-421e46e9.js} +1 -1
  121. package/dist/cdn/{shared-dccf0420.js → shared-42adf053.js} +1 -1
  122. package/dist/cdn/{shared-77a4d8e8.js → shared-46f3f71c.js} +1 -1
  123. package/dist/cdn/{shared-e84fa0ea.js → shared-4966b3e4.js} +1 -1
  124. package/dist/cdn/{shared-b48a83b0.js → shared-4a0298cb.js} +1 -1
  125. package/dist/cdn/{shared-17d0db7f.js → shared-4bd1efd7.js} +3 -3
  126. package/dist/cdn/{shared-51d28e6d.js → shared-527abf31.js} +1 -1
  127. package/dist/cdn/{shared-fe54babe.js → shared-53532131.js} +1 -1
  128. package/dist/cdn/{shared-9c626d58.js → shared-5616a12f.js} +1 -1
  129. package/dist/cdn/{shared-c97e0d6e.js → shared-57922341.js} +1 -1
  130. package/dist/cdn/shared-619bcf83.js +1 -0
  131. package/dist/cdn/{shared-ba658670.js → shared-6273b7e1.js} +1 -1
  132. package/dist/cdn/{shared-4904bca4.js → shared-639dda4b.js} +1 -1
  133. package/dist/cdn/{shared-d14c2060.js → shared-6b0498b2.js} +3 -3
  134. package/dist/cdn/{shared-6f84ac3e.js → shared-6b3be508.js} +1 -1
  135. package/dist/cdn/{shared-c6c6ba69.js → shared-6dffe67d.js} +1 -1
  136. package/dist/cdn/{shared-4c956a8e.js → shared-72a13fda.js} +1 -1
  137. package/dist/cdn/{shared-4b67d699.js → shared-763a6797.js} +1 -1
  138. package/dist/cdn/shared-7680d300.js +122 -0
  139. package/dist/cdn/shared-79d01877.js +1 -0
  140. package/dist/cdn/{shared-6abdfcf2.js → shared-7bf6e728.js} +1 -1
  141. package/dist/cdn/{shared-69a21b9d.js → shared-7d4e0011.js} +1 -1
  142. package/dist/cdn/shared-7e887e5b.js +1 -0
  143. package/dist/cdn/{shared-8474bc4a.js → shared-7ead930c.js} +1 -1
  144. package/dist/cdn/shared-7f33a83a.js +12 -12
  145. package/dist/cdn/{shared-6dc64a17.js → shared-8128b5e3.js} +1 -1
  146. package/dist/cdn/{shared-984fcdf5.js → shared-8134d8a7.js} +3 -3
  147. package/dist/cdn/{shared-c4240bc6.js → shared-8465a37a.js} +1 -1
  148. package/dist/cdn/{shared-e7c3b7b6.js → shared-848813a4.js} +1 -1
  149. package/dist/cdn/shared-8528906b.js +1 -0
  150. package/dist/cdn/{shared-a3c73e91.js → shared-897ab5e6.js} +1 -1
  151. package/dist/cdn/{shared-4bbd600d.js → shared-8fbab85c.js} +1 -1
  152. package/dist/cdn/{shared-4dc58b73.js → shared-90be9ac7.js} +1 -1
  153. package/dist/cdn/{shared-0a248c0d.js → shared-91eb066c.js} +1 -1
  154. package/dist/cdn/{shared-1d28220a.js → shared-9765be8f.js} +1 -1
  155. package/dist/cdn/{shared-e6997950.js → shared-9bdd5400.js} +1 -1
  156. package/dist/cdn/{shared-dfe2602a.js → shared-a134d313.js} +1 -1
  157. package/dist/cdn/shared-a6517170.js +1 -0
  158. package/dist/cdn/shared-a7475f62.js +212 -0
  159. package/dist/cdn/shared-a88c5cf1.js +29 -0
  160. package/dist/cdn/{shared-479ad951.js → shared-a96a2154.js} +1 -1
  161. package/dist/cdn/shared-aa22ee61.js +1 -0
  162. package/dist/cdn/shared-aa569a99.js +804 -0
  163. package/dist/cdn/{shared-e8e92fe3.js → shared-ad0256d0.js} +2 -2
  164. package/dist/cdn/{shared-25f64060.js → shared-b334c8b6.js} +1 -1
  165. package/dist/cdn/{shared-1d08a5ad.js → shared-bbbb8894.js} +1 -1
  166. package/dist/cdn/{shared-bafcab47.js → shared-bf2113a4.js} +3 -3
  167. package/dist/cdn/{shared-88e36564.js → shared-c541c9e9.js} +26 -27
  168. package/dist/cdn/{shared-36725fe3.js → shared-c758220c.js} +1 -1
  169. package/dist/cdn/{shared-4674063d.js → shared-c97f7178.js} +27 -27
  170. package/dist/cdn/shared-d2222c8d.js +1 -0
  171. package/dist/cdn/{shared-64f98a0f.js → shared-db06114b.js} +7 -2
  172. package/dist/cdn/{shared-665d6cc4.js → shared-e5786b8b.js} +1 -1
  173. package/dist/cdn/shared-e640e9fa.js +1 -0
  174. package/dist/cdn/{shared-7995407d.js → shared-eb232194.js} +3 -3
  175. package/dist/cdn/{shared-bdb51db9.js → shared-f4822b9e.js} +1 -1
  176. package/dist/cdn/{shared-db21f6db.js → shared-fa5f0117.js} +2 -2
  177. package/dist/cdn/shared-fc77174e.js +1 -0
  178. package/dist/cdn/shared-fec6fd04.js +1 -0
  179. package/dist/cdn/translations/address-form/en.json +577 -0
  180. package/dist/cdn/translations/customer/en.json +577 -0
  181. package/dist/cdn/translations/customer-portal/en.json +579 -1
  182. package/dist/cdn/translations/error-entry-card/en.json +4 -0
  183. package/dist/cdn/translations/webhook-form/en.json +1 -1
  184. package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js +2 -1
  185. package/dist/elements/internal/InternalRadioGroupControl/InternalRadioGroupControl.js.map +1 -1
  186. package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -1
  187. package/dist/elements/public/AddressForm/AddressForm.js +53 -17
  188. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  189. package/dist/elements/public/AddressForm/countries.d.ts +1 -1
  190. package/dist/elements/public/AddressForm/countries.js +554 -251
  191. package/dist/elements/public/AddressForm/countries.js.map +1 -1
  192. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.d.ts +0 -1
  193. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js +34 -30
  194. package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js.map +1 -1
  195. package/dist/elements/public/ErrorEntryCard/ResourceViewer.js +9 -0
  196. package/dist/elements/public/ErrorEntryCard/ResourceViewer.js.map +1 -1
  197. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +3 -0
  198. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
  199. package/dist/elements/public/WebhookForm/WebhookForm.d.ts +2 -0
  200. package/dist/elements/public/WebhookForm/WebhookForm.js +7 -0
  201. package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
  202. package/package.json +10 -10
  203. package/dist/cdn/shared-09d4fbb8.js +0 -29
  204. package/dist/cdn/shared-1eac92fa.js +0 -1
  205. package/dist/cdn/shared-307262a1.js +0 -15
  206. package/dist/cdn/shared-332f2997.js +0 -1
  207. package/dist/cdn/shared-39f3b48d.js +0 -1
  208. package/dist/cdn/shared-432c5183.js +0 -9
  209. package/dist/cdn/shared-4dee79d4.js +0 -1
  210. package/dist/cdn/shared-53061389.js +0 -1
  211. package/dist/cdn/shared-59042137.js +0 -201
  212. package/dist/cdn/shared-65ba8b39.js +0 -1
  213. package/dist/cdn/shared-7f5618ba.js +0 -1
  214. package/dist/cdn/shared-92f27a38.js +0 -1
  215. package/dist/cdn/shared-b0f534ef.js +0 -1
  216. package/dist/cdn/shared-be24dd36.js +0 -804
  217. package/dist/cdn/shared-bf62a65b.js +0 -1
  218. package/dist/cdn/shared-c2d3b32b.js +0 -1
  219. package/dist/cdn/shared-cf269a17.js +0 -1
  220. package/dist/cdn/shared-fef9ecc1.js +0 -122
  221. package/dist/elements/public/AddressForm/regions.d.ts +0 -1
  222. package/dist/elements/public/AddressForm/regions.js +0 -67
  223. package/dist/elements/public/AddressForm/regions.js.map +0 -1
  224. /package/dist/cdn/{shared-64657919.js → shared-343d1fd7.js} +0 -0
  225. /package/dist/cdn/{shared-d6276c83.js → shared-3ab0306f.js} +0 -0
  226. /package/dist/cdn/{shared-e6f3e9f0.js → shared-bb05cfed.js} +0 -0
  227. /package/dist/cdn/{shared-99065f2a.js → shared-d7be11de.js} +0 -0
  228. /package/dist/cdn/{shared-0479553e.js → shared-f9180815.js} +0 -0
@@ -1 +1 @@
1
- import{_ as e}from"./shared-307262a1.js";import{L as t,c as s,h as i}from"./shared-7f33a83a.js";import{A as a}from"./shared-1d08a5ad.js";import{C as o}from"./shared-c7f2f1ab.js";import{T as n,R as l,a as d}from"./shared-09d4fbb8.js";import{I as r}from"./shared-4b67d699.js";import{F as h}from"./shared-64657919.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class p extends CustomEvent{constructor(){super("show")}}let m,v=e=>e;class b extends(o(n(l(d(r(t)))))){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{}})}static get styles(){return[super.styles,s(m||(m=v`:host{position:relative;z-index:200}`))]}}let _,g,y,f,w,x,$,C=e=>e;const D=d(o(n(r(t))));class k extends D{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.group="",this.alert=!1,this.wide=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&k.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},group:{},alert:{type:Boolean},wide:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,s(_||(_=C`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}.max-h-alert{max-height:calc(100vh - var(--lumo-size-l) - var(--lumo-space-m) * 2)}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=k.dialogWindows.get(this))||void 0===e||e.remove(),k.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(k.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof h&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new a(this).fetch(e.request)))})),null==s||s.appendChild(e),k.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(g||(g=C``));const t=k.openDialogs[0]===this,s=k.openDialogs[1]===this,a=k.openDialogs[2]===this,o=!t&&!s&&!a;return i(y||(y=C` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div tabindex="0" role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="${0}"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform ease-in-out transition duration-500 relative h-full ml-auto":!0,"origin-bottom sm-origin-center":!0,"focus-outline-none":!0,"sm-max-w-modal":!this.wide,"sm-max-w-modal-wide":this.wide,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":a&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":o&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible,"flex-1":this.alert}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(f||(f=C` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(w||(w=C`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(x||(x=C` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i($||($=C`<div></div>`)),c({"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain":!0,"max-h-alert":this.alert}),null==e?void 0:e())}updated(e){super.updated(e);const t=k.dialogWindows.get(this);t&&(t.disabledControls=this.disabledControls,t.disabled=this.disabled,t.readonlyControls=this.readonlyControls,t.readonly=this.readonly,t.hiddenControls=this.hiddenControls,t.hidden=this.hidden,t.group=this.group,t.lang=this.lang,t.ns=this.ns)}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(k.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new k.HideEvent(!!e))}async show(e){var t;this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...k.openDialogs]),null===(t=this.renderRoot.querySelector('[role="dialog"]'))||void 0===t||t.focus(),this.dispatchEvent(new k.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){k.openDialogs.length=0,k.openDialogs.push(...e),await Promise.all([Promise.all(k.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{this.renderRoot.querySelector("#backdrop").addEventListener("transitionend",e,{once:!0}),this.__visible=k.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}k.dialogWindowsHost="#foxy-dialog-windows-host, body",k.dialogWindows=new WeakMap,k.openDialogs=[],k.ShowEvent=p,k.HideEvent=u,customElements.define("foxy-dialog-window",b);export{k as D};
1
+ import{_ as e}from"./shared-0dabe195.js";import{c as t,L as s,h as i}from"./shared-7f33a83a.js";import{A as a}from"./shared-bbbb8894.js";import{C as o}from"./shared-1fd59009.js";import{T as n,R as l,a as d}from"./shared-a88c5cf1.js";import{I as r}from"./shared-763a6797.js";import{F as h}from"./shared-343d1fd7.js";import{c}from"./shared-4e709717.js";class u extends CustomEvent{constructor(e=!1){super("hide",{detail:{cancelled:e}})}}class p extends CustomEvent{constructor(){super("show")}}let m,v=e=>e;class b extends(o(n(l(d(r(s)))))){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{}})}static get styles(){return[super.styles,t(m||(m=v`:host{position:relative;z-index:200}`))]}}let _,g,y,f,w,x,$,C=e=>e;const D=d(o(n(r(s))));class k extends D{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.header="",this.group="",this.alert=!1,this.wide=!1,this.__handleKeyDown=e=>{"Escape"===e.key&&k.openDialogs[0]===this&&this.closable&&this.hide(this.editable)},this.__connected=!1,this.__visible=!1}static get properties(){return e(e({},super.properties),{},{__connected:{attribute:!1},__visible:{attribute:!1},centered:{type:Boolean},closable:{type:Boolean},editable:{type:Boolean},header:{type:String},group:{},alert:{type:Boolean},wide:{type:Boolean},open:{type:Boolean,noAccessor:!0}})}static get styles(){return[super.styles,t(_||(_=C`.grid-cols-header{grid-template-columns:1fr auto 1fr}.scale-85{--tw-scale-x:0.85;--tw-scale-y:0.85}.max-h-alert{max-height:calc(100vh - var(--lumo-size-l) - var(--lumo-space-m) * 2)}`))]}get open(){return this.__visible&&this.__connected}set open(e){e===this.open||(e?this.show():this.hide(this.editable))}connectedCallback(){super.connectedCallback(),addEventListener("keydown",this.__handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),removeEventListener("keydown",this.__handleKeyDown),null===(e=k.dialogWindows.get(this))||void 0===e||e.remove(),k.dialogWindows.delete(this)}createRenderRoot(){const e=new b,t=document.querySelectorAll(k.dialogWindowsHost),s=Array.from(t).pop();return e.addEventListener("fetch",(e=>{e instanceof h&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new a(this).fetch(e.request)))})),null==s||s.appendChild(e),k.dialogWindows.set(this,e),e.shadowRoot}render(e){if(!this.__connected)return i(g||(g=C``));const t=k.openDialogs[0]===this,s=k.openDialogs[1]===this,a=k.openDialogs[2]===this,o=!t&&!s&&!a;return i(y||(y=C` <div class="${0}"> <div id="backdrop" class="${0}" tabindex="-1" @click="${0}"></div> <div tabindex="0" role="dialog" aria-labelledby="dialog-title" class="${0}"> <div class="${0}"> <div class="h-l grid grid-cols-header text-m font-lumo font-medium border-b border-contrast-10"> ${0} <h1 id="dialog-title" class="truncate self-center text-center"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </h1> ${0} </div> <div class="${0}"> <div class="p-m relative">${0}</div> </div> </div> </div> </div> `),c({"z-50 fixed inset-0":!0,"pointer-events-none":!this.__visible}),c({"select-none ease-in-out transition duration-500 absolute inset-0 bg-shade-50 focus-outline-none":!0,"opacity-100":this.__visible,"opacity-0":!this.__visible}),(()=>this.closable&&this.hide(this.editable)),c({"transform ease-in-out transition duration-500 relative h-full ml-auto":!0,"origin-bottom sm-origin-center":!0,"focus-outline-none":!0,"sm-max-w-modal":!this.wide,"sm-max-w-modal-wide":this.wide,"flex justify-center items-end sm-items-center mr-auto":this.alert,"translate-y-full sm-translate-y-0":!this.__visible,"sm-translate-x-full":!this.alert&&!this.__visible,"sm-opacity-0 sm-scale-110":this.alert&&!this.__visible,"translate-y-0 translate-x-0":t&&this.__visible,"scale-95 -translate-y-s sm-translate-y-0":s&&this.__visible,"scale-90 -translate-y-m sm-translate-y-0":a&&this.__visible,"opacity-0 scale-85 -translate-y-l sm-translate-y-0":o&&this.__visible}),c({"overflow-hidden flex flex-col bg-base rounded-t-l sm-rounded-b-l":!0,"absolute inset-0 mt-xl sm-m-xl":!this.alert,"shadow-xxl":this.__visible,"flex-1":this.alert}),this.closable&&!this.hiddenSelector.matches("close-button",!0)?i(f||(f=C` <vaadin-button id="close-button" theme="tertiary-inline" class="mr-auto m-s px-s" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("close-button",!0),(()=>this.hide(this.editable)),this.lang,this.editable?"cancel":"close",this.ns):i(w||(w=C`<div></div>`)),this.ns,this.lang,this.header,this.editable&&!this.hiddenSelector.matches("save-button",!0)?i(x||(x=C` <vaadin-button data-testid="save-button" ?disabled="${0}" theme="primary" class="ml-auto h-auto min-h-0 min-w-0 m-xs px-m" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="save"></foxy-i18n> </vaadin-button> `),this.disabledSelector.matches("save-button",!0),this.save,this.ns,this.lang):i($||($=C`<div></div>`)),c({"flex-1 overflow-y-auto overflow-x-hidden overscroll-contain":!0,"max-h-alert":this.alert}),null==e?void 0:e())}updated(e){super.updated(e);const t=k.dialogWindows.get(this);t&&(t.disabledControls=this.disabledControls,t.disabled=this.disabled,t.readonlyControls=this.readonlyControls,t.readonly=this.readonly,t.hiddenControls=this.hiddenControls,t.hidden=this.hidden,t.group=this.group,t.lang=this.lang,t.ns=this.ns)}async hide(e=!1){var t;null===(t=this.__returnFocusTo)||void 0===t||t.focus(),await this.__setOpenDialogs(k.openDialogs.filter((e=>e!==this))),await this.__setConnected(!1),this.dispatchEvent(new k.HideEvent(!!e))}async show(e){var t;this.__returnFocusTo=e,await this.__setConnected(!0),await this.__setOpenDialogs([this,...k.openDialogs]),null===(t=this.renderRoot.querySelector('[role="dialog"]'))||void 0===t||t.focus(),this.dispatchEvent(new k.ShowEvent)}async save(){await this.hide(!1)}async __setOpenDialogs(e){k.openDialogs.length=0,k.openDialogs.push(...e),await Promise.all([Promise.all(k.openDialogs.map((e=>e.requestUpdate()))),new Promise((e=>{this.renderRoot.querySelector("#backdrop").addEventListener("transitionend",e,{once:!0}),this.__visible=k.openDialogs.includes(this)}))])}async __setConnected(e){this.__connected=e,await this.updateComplete.then((()=>this.getBoundingClientRect()))}}k.dialogWindowsHost="#foxy-dialog-windows-host, body",k.dialogWindows=new WeakMap,k.openDialogs=[],k.ShowEvent=p,k.HideEvent=u,customElements.define("foxy-dialog-window",b);export{k as D};
@@ -1,4 +1,4 @@
1
- import{f as e,M as t,c as s,n as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-59042137.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-09d4fbb8.js";
1
+ import{f as e,M as t,n as s,c as i,d as n,g as r,V as o,j as l,k as a,l as h,u as c,m as d,o as u,w as _,p,E as f,G as m,q as y,r as g,s as b,D as C,t as v,v as x,x as w,P as S,y as P,z as E,e as I,A as O,h as A}from"./shared-a7475f62.js";import{l as k,b as N,s as T,c as M,u as D,d as R,f as F}from"./shared-a88c5cf1.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -16,7 +16,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
16
16
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
17
17
  Code distributed by Google as part of the polymer project is also
18
18
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
19
- */class H{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function j(e){return z(function(e){let t=new H;t.start=0,t.end=e.length;let s=t;for(let i=0,n=e.length;i<n;i++)if(e[i]===U){s.rules||(s.rules=[]);let e=s,t=e.rules[e.rules.length-1]||null;s=new H,s.start=i+1,s.parent=e,s.previous=t,e.rules.push(s)}else e[i]===q&&(s.end=i+1,s=s.parent||t);return t}(e=e.replace(J.comments,"").replace(J.port,"")),e)}function z(e,t){let s=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=s.trim(),e.parent){let i=e.previous?e.previous.end:e.parent.start;s=t.substring(i,e.start-1),s=function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let e=arguments[1],t=6-e.length;for(;t--;)e="0"+e;return"\\"+e}))}(s),s=s.replace(J.multipleSpaces," "),s=s.substring(s.lastIndexOf(";")+1);let n=e.parsedSelector=e.selector=s.trim();e.atRule=0===n.indexOf(K),e.atRule?0===n.indexOf(Y)?e.type=$.MEDIA_RULE:n.match(J.keyframesRule)&&(e.type=$.KEYFRAMES_RULE,e.keyframesName=e.selector.split(J.multipleSpaces).pop()):0===n.indexOf(V)?e.type=$.MIXIN_RULE:e.type=$.STYLE_RULE}let i=e.rules;if(i)for(let e,s=0,n=i.length;s<n&&(e=i[s]);s++)z(e,t);return e}function B(e,t,s=""){let i="";if(e.cssText||e.rules){let s=e.rules;if(s&&!function(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(V)}(s))for(let e,n=0,r=s.length;n<r&&(e=s[n]);n++)i=B(e,t,i);else i=t?e.cssText:function(e){return function(e){return e.replace(J.mixinApply,"").replace(J.varApply,"")}(e=function(e){return e.replace(J.customProp,"").replace(J.mixinProp,"")}(e))}(e.cssText),i=i.trim(),i&&(i=" "+i+"\n")}return i&&(e.selector&&(s+=e.selector+" "+U+"\n"),s+=i,e.selector&&(s+=q+"\n\n")),s}const $={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},U="{",q="}",J={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},V="--",Y="@media",K="@",G=new Set;function X(e){const t=e.textContent;if(!G.has(t)){G.add(t);const e=document.createElement("style");e.setAttribute("shady-unscoped",""),e.textContent=t,document.head.appendChild(e)}}function W(e){return e.hasAttribute("shady-unscoped")}
19
+ */class H{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function j(e){return z(function(e){let t=new H;t.start=0,t.end=e.length;let s=t;for(let i=0,n=e.length;i<n;i++)if(e[i]===U){s.rules||(s.rules=[]);let e=s,t=e.rules[e.rules.length-1]||null;s=new H,s.start=i+1,s.parent=e,s.previous=t,e.rules.push(s)}else e[i]===q&&(s.end=i+1,s=s.parent||t);return t}(e=e.replace(J.comments,"").replace(J.port,"")),e)}function z(e,t){let s=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=s.trim(),e.parent){let i=e.previous?e.previous.end:e.parent.start;s=t.substring(i,e.start-1),s=function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let e=arguments[1],t=6-e.length;for(;t--;)e="0"+e;return"\\"+e}))}(s),s=s.replace(J.multipleSpaces," "),s=s.substring(s.lastIndexOf(";")+1);let n=e.parsedSelector=e.selector=s.trim();e.atRule=0===n.indexOf(K),e.atRule?0===n.indexOf(Y)?e.type=$.MEDIA_RULE:n.match(J.keyframesRule)&&(e.type=$.KEYFRAMES_RULE,e.keyframesName=e.selector.split(J.multipleSpaces).pop()):0===n.indexOf(V)?e.type=$.MIXIN_RULE:e.type=$.STYLE_RULE}let i=e.rules;if(i)for(let e,s=0,n=i.length;s<n&&(e=i[s]);s++)z(e,t);return e}function B(e,t,s=""){let i="";if(e.cssText||e.rules){let s=e.rules;if(s&&!function(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(V)}(s))for(let e,n=0,r=s.length;n<r&&(e=s[n]);n++)i=B(e,t,i);else i=t?e.cssText:function(e){return e=function(e){return e.replace(J.customProp,"").replace(J.mixinProp,"")}(e),function(e){return e.replace(J.mixinApply,"").replace(J.varApply,"")}(e)}(e.cssText),i=i.trim(),i&&(i=" "+i+"\n")}return i&&(e.selector&&(s+=e.selector+" "+U+"\n"),s+=i,e.selector&&(s+=q+"\n\n")),s}const $={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},U="{",q="}",J={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},V="--",Y="@media",K="@",G=new Set,X="shady-unscoped";function W(e){const t=e.textContent;if(!G.has(t)){G.add(t);const e=document.createElement("style");e.setAttribute("shady-unscoped",""),e.textContent=t,document.head.appendChild(e)}}function Q(e){return e.hasAttribute(X)}
20
20
  /**
21
21
  @license
22
22
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -25,7 +25,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
25
25
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
26
26
  Code distributed by Google as part of the polymer project is also
27
27
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
28
- */function Q(e,t){return e?("string"==typeof e&&(e=j(e)),t&&ee(e,t),B(e,i)):""}function Z(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=j(e.textContent)),e.__cssRules||null}function ee(e,s,i,n){if(!e)return;let r=!1,o=e.type;if(n&&o===$.MEDIA_RULE){let s=e.selector.match(t);s&&(window.matchMedia(s[1]).matches||(r=!0))}o===$.STYLE_RULE?s(e):i&&o===$.KEYFRAMES_RULE?i(e):o===$.MIXIN_RULE&&(r=!0);let l=e.rules;if(l&&!r)for(let e,t=0,r=l.length;t<r&&(e=l[t]);t++)ee(e,s,i,n)}function te(e,t){let s=e.indexOf("var(");if(-1===s)return t(e,"","","");let i=function(e,t){let s=0;for(let i=t,n=e.length;i<n;i++)if("("===e[i])s++;else if(")"===e[i]&&0==--s)return i;return-1}(e,s+3),n=e.substring(s+4,i),r=e.substring(0,s),o=te(e.substring(i+1),t),l=n.indexOf(",");return-1===l?t(r,n.trim(),"",o):t(r,n.substring(0,l).trim(),n.substring(l+1).trim(),o)}window.ShadyDOM&&window.ShadyDOM.wrap;function se(e){if(void 0!==s)return s;if(void 0===e.__cssBuild){const t=e.getAttribute("css-build");if(t)e.__cssBuild=t;else{const t=function(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){const e=t.textContent.trim().split(":");if("css-build"===e[0])return e[1]}return""}(e);""!==t&&function(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}
28
+ */function Z(e,t){return e?("string"==typeof e&&(e=j(e)),t&&te(e,t),B(e,s)):""}function ee(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=j(e.textContent)),e.__cssRules||null}function te(e,s,i,n){if(!e)return;let r=!1,o=e.type;if(n&&o===$.MEDIA_RULE){let s=e.selector.match(t);s&&(window.matchMedia(s[1]).matches||(r=!0))}o===$.STYLE_RULE?s(e):i&&o===$.KEYFRAMES_RULE?i(e):o===$.MIXIN_RULE&&(r=!0);let l=e.rules;if(l&&!r)for(let e,t=0,r=l.length;t<r&&(e=l[t]);t++)te(e,s,i,n)}function se(e,t){let s=e.indexOf("var(");if(-1===s)return t(e,"","","");let i=function(e,t){let s=0;for(let i=t,n=e.length;i<n;i++)if("("===e[i])s++;else if(")"===e[i]&&0==--s)return i;return-1}(e,s+3),n=e.substring(s+4,i),r=e.substring(0,s),o=se(e.substring(i+1),t),l=n.indexOf(",");return-1===l?t(r,n.trim(),"",o):t(r,n.substring(0,l).trim(),n.substring(l+1).trim(),o)}window.ShadyDOM&&window.ShadyDOM.wrap;const ie="css-build";function ne(e){if(void 0!==n)return n;if(void 0===e.__cssBuild){const t=e.getAttribute(ie);if(t)e.__cssBuild=t;else{const t=function(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){const e=t.textContent.trim().split(":");if(e[0]===ie)return e[1]}return""}(e);""!==t&&function(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}
29
29
  /**
30
30
  @license
31
31
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -34,7 +34,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
34
34
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
35
35
  Code distributed by Google as part of the polymer project is also
36
36
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
37
- */(e),e.__cssBuild=t}}return e.__cssBuild||""}function ie(e){return""!==se(e)}const ne=/;\s*/m,re=/^\s*(initial)|(inherit)\s*$/,oe=/\s*!important/;class le{constructor(){this._map={}}set(e,t){e=e.trim(),this._map[e]={properties:t,dependants:{}}}get(e){return e=e.trim(),this._map[e]||null}}let ae=null;class he{constructor(){this._currentElement=null,this._measureElement=null,this._map=new le}detectMixin(e){return r(e)}gatherStyles(e){const t=function(e){const t=[],s=e.querySelectorAll("style");for(let e=0;e<s.length;e++){const i=s[e];W(i)?n||(X(i),i.parentNode.removeChild(i)):(t.push(i.textContent),i.parentNode.removeChild(i))}return t.join("").trim()}(e.content);if(t){const s=document.createElement("style");return s.textContent=t,e.content.insertBefore(s,e.content.firstChild),s}return null}transformTemplate(e,t){void 0===e._gatheredStyle&&(e._gatheredStyle=this.gatherStyles(e));const s=e._gatheredStyle;return s?this.transformStyle(s,t):null}transformStyle(e,t=""){let s=Z(e);return this.transformRules(s,t),e.textContent=Q(s),s}transformCustomStyle(e){let t=Z(e);return ee(t,(e=>{":root"===e.selector&&(e.selector="html"),this.transformRule(e)})),e.textContent=Q(t),t}transformRules(e,t){this._currentElement=t,ee(e,(e=>{this.transformRule(e)})),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(o,((e,s,i,n)=>this._produceCssProperties(e,s,i,n,t))),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const s={};let i=!1;return ee(t,(t=>{i=i||t===e,i||t.selector===e.selector&&Object.assign(s,this._cssTextToMap(t.parsedCssText))})),s}_consumeCssProperties(e,t){let s=null;for(;s=l.exec(e);){let i=s[0],n=s[1],r=s.index,o=r+i.indexOf("@apply"),a=r+i.length,h=e.slice(0,o),c=e.slice(a),d=t?this._fallbacksFromPreviousRules(t):{};Object.assign(d,this._cssTextToMap(h));let u=this._atApplyToCssProperties(n,d);e=`${h}${u}${c}`,l.lastIndex=r+u.length}return e}_atApplyToCssProperties(e,t){e=e.replace(ne,"");let s=[],i=this._map.get(e);if(i||(this._map.set(e,{}),i=this._map.get(e)),i){let n,r,o;this._currentElement&&(i.dependants[this._currentElement]=!0);const l=i.properties;for(n in l)o=t&&t[n],r=[n,": var(",e,"_-_",n],o&&r.push(",",o.replace(oe,"")),r.push(")"),oe.test(l[n])&&r.push(" !important"),s.push(r.join(""))}return s.join("; ")}_replaceInitialOrInherit(e,t){let s=re.exec(t);return s&&(t=s[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let s,i,n=e.split(";"),r={};for(let e,o,l=0;l<n.length;l++)e=n[l],e&&(o=e.split(":"),o.length>1&&(s=o[0].trim(),i=o.slice(1).join(":"),t&&(i=this._replaceInitialOrInherit(s,i)),r[s]=i));return r}_invalidateMixinEntry(e){if(ae)for(let t in e.dependants)t!==this._currentElement&&ae(t)}_produceCssProperties(e,t,s,i,n){if(s&&te(s,((e,t)=>{t&&this._map.get(t)&&(i=`@apply ${t};`)})),!i)return e;let r=this._consumeCssProperties(""+i,n),o=e.slice(0,e.indexOf("--")),l=this._cssTextToMap(r,!0),a=l,h=this._map.get(t),c=h&&h.properties;c?a=Object.assign(Object.create(c),l):this._map.set(t,a);let d,u,_=[],p=!1;for(d in a)u=l[d],void 0===u&&(u="initial"),c&&!(d in c)&&(p=!0),_.push(`${t}_-_${d}: ${u}`);return p&&this._invalidateMixinEntry(h),h&&(h.properties=a),s&&(o=`${e};${o}`),`${o}${_.join("; ")};`}}he.prototype.detectMixin=he.prototype.detectMixin,he.prototype.transformStyle=he.prototype.transformStyle,he.prototype.transformCustomStyle=he.prototype.transformCustomStyle,he.prototype.transformRules=he.prototype.transformRules,he.prototype.transformRule=he.prototype.transformRule,he.prototype.transformTemplate=he.prototype.transformTemplate,he.prototype._separator="_-_",Object.defineProperty(he.prototype,"invalidCallback",{get:()=>ae,set(e){ae=e}});
37
+ */(e),e.__cssBuild=t}}return e.__cssBuild||""}function re(e){return""!==ne(e)}const oe=/;\s*/m,le=/^\s*(initial)|(inherit)\s*$/,ae=/\s*!important/,he="_-_";class ce{constructor(){this._map={}}set(e,t){e=e.trim(),this._map[e]={properties:t,dependants:{}}}get(e){return e=e.trim(),this._map[e]||null}}let de=null;class ue{constructor(){this._currentElement=null,this._measureElement=null,this._map=new ce}detectMixin(e){return r(e)}gatherStyles(e){const t=function(e){const t=[],s=e.querySelectorAll("style");for(let e=0;e<s.length;e++){const n=s[e];Q(n)?i||(W(n),n.parentNode.removeChild(n)):(t.push(n.textContent),n.parentNode.removeChild(n))}return t.join("").trim()}(e.content);if(t){const s=document.createElement("style");return s.textContent=t,e.content.insertBefore(s,e.content.firstChild),s}return null}transformTemplate(e,t){void 0===e._gatheredStyle&&(e._gatheredStyle=this.gatherStyles(e));const s=e._gatheredStyle;return s?this.transformStyle(s,t):null}transformStyle(e,t=""){let s=ee(e);return this.transformRules(s,t),e.textContent=Z(s),s}transformCustomStyle(e){let t=ee(e);return te(t,(e=>{":root"===e.selector&&(e.selector="html"),this.transformRule(e)})),e.textContent=Z(t),t}transformRules(e,t){this._currentElement=t,te(e,(e=>{this.transformRule(e)})),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(o,((e,s,i,n)=>this._produceCssProperties(e,s,i,n,t))),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const s={};let i=!1;return te(t,(t=>{i=i||t===e,i||t.selector===e.selector&&Object.assign(s,this._cssTextToMap(t.parsedCssText))})),s}_consumeCssProperties(e,t){let s=null;for(;s=l.exec(e);){let i=s[0],n=s[1],r=s.index,o=r+i.indexOf("@apply"),a=r+i.length,h=e.slice(0,o),c=e.slice(a),d=t?this._fallbacksFromPreviousRules(t):{};Object.assign(d,this._cssTextToMap(h));let u=this._atApplyToCssProperties(n,d);e=`${h}${u}${c}`,l.lastIndex=r+u.length}return e}_atApplyToCssProperties(e,t){e=e.replace(oe,"");let s=[],i=this._map.get(e);if(i||(this._map.set(e,{}),i=this._map.get(e)),i){let n,r,o;this._currentElement&&(i.dependants[this._currentElement]=!0);const l=i.properties;for(n in l)o=t&&t[n],r=[n,": var(",e,he,n],o&&r.push(",",o.replace(ae,"")),r.push(")"),ae.test(l[n])&&r.push(" !important"),s.push(r.join(""))}return s.join("; ")}_replaceInitialOrInherit(e,t){let s=le.exec(t);return s&&(t=s[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let s,i,n=e.split(";"),r={};for(let e,o,l=0;l<n.length;l++)e=n[l],e&&(o=e.split(":"),o.length>1&&(s=o[0].trim(),i=o.slice(1).join(":"),t&&(i=this._replaceInitialOrInherit(s,i)),r[s]=i));return r}_invalidateMixinEntry(e){if(de)for(let t in e.dependants)t!==this._currentElement&&de(t)}_produceCssProperties(e,t,s,i,n){if(s&&se(s,((e,t)=>{t&&this._map.get(t)&&(i=`@apply ${t};`)})),!i)return e;let r=this._consumeCssProperties(""+i,n),o=e.slice(0,e.indexOf("--")),l=this._cssTextToMap(r,!0),a=l,h=this._map.get(t),c=h&&h.properties;c?a=Object.assign(Object.create(c),l):this._map.set(t,a);let d,u,_=[],p=!1;for(d in a)u=l[d],void 0===u&&(u="initial"),c&&!(d in c)&&(p=!0),_.push(`${t}${he}${d}: ${u}`);return p&&this._invalidateMixinEntry(h),h&&(h.properties=a),s&&(o=`${e};${o}`),`${o}${_.join("; ")};`}}ue.prototype.detectMixin=ue.prototype.detectMixin,ue.prototype.transformStyle=ue.prototype.transformStyle,ue.prototype.transformCustomStyle=ue.prototype.transformCustomStyle,ue.prototype.transformRules=ue.prototype.transformRules,ue.prototype.transformRule=ue.prototype.transformRule,ue.prototype.transformTemplate=ue.prototype.transformTemplate,ue.prototype._separator=he,Object.defineProperty(ue.prototype,"invalidCallback",{get:()=>de,set(e){de=e}});
38
38
  /**
39
39
  @license
40
40
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -44,7 +44,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
44
44
  Code distributed by Google as part of the polymer project is also
45
45
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
46
46
  */
47
- const ce={},de="_applyShimCurrentVersion",ue="_applyShimNextVersion",_e="_applyShimValidatingVersion",pe=Promise.resolve();
47
+ const _e={},pe="_applyShimCurrentVersion",fe="_applyShimNextVersion",me="_applyShimValidatingVersion",ye=Promise.resolve();
48
48
  /**
49
49
  @license
50
50
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -53,7 +53,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
53
53
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
54
54
  Code distributed by Google as part of the polymer project is also
55
55
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
56
- */function fe(e){let t=ce[e];t&&function(e){e[de]=e[de]||0,e[_e]=e[_e]||0,e[ue]=(e[ue]||0)+1}(t)}function me(e){return e[de]===e[ue]}
56
+ */function ge(e){let t=_e[e];t&&function(e){e[pe]=e[pe]||0,e[me]=e[me]||0,e[fe]=(e[fe]||0)+1}(t)}function be(e){return e[pe]===e[fe]}
57
57
  /**
58
58
  @license
59
59
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -63,7 +63,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
63
63
  Code distributed by Google as part of the polymer project is also
64
64
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
65
65
  */
66
- const ye=new he;class ge{constructor(){this.customStyleInterface=null,ye.invalidCallback=fe}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{ye.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(e,t){if(this.ensure(),ie(e))return;ce[t]=e;let s=ye.transformTemplate(e,t);e._styleAst=s}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t<e.length;t++){let s=e[t],i=this.customStyleInterface.getStyleForCustomStyle(s);i&&ye.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(e,t){if(this.ensure(),t&&c(e,t),e.shadowRoot){this.styleElement(e);let t=e.shadowRoot.children||e.shadowRoot.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}else{let t=e.children||e.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}}styleElement(e){this.ensure();let{is:t}=function(e){let t=e.localName,s="",i="";return t?t.indexOf("-")>-1?s=t:(i=t,s=e.getAttribute&&e.getAttribute("is")||""):(s=e.is,i=e.extends),{is:s,typeExtension:i}}(e),s=ce[t];if((!s||!ie(s))&&s&&!me(s)){(function(e){return!me(e)&&e[_e]===e[ue]})(s)||(this.prepareTemplate(s,t),function(e){e[_e]=e[ue],e._validating||(e._validating=!0,pe.then((function(){e[de]=e[ue],e._validating=!1})))}(s));let i=e.shadowRoot;if(i){let e=i.querySelector("style");e&&(e.__cssRules=s._styleAst,e.textContent=Q(s._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const e=new ge;let t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(t,s,i){e.flushCustomStyles(),e.prepareTemplate(t,s)},prepareTemplateStyles(e,t,s){window.ShadyCSS.prepareTemplate(e,t,s)},prepareTemplateDom(e,t){},styleSubtree(t,s){e.flushCustomStyles(),e.styleSubtree(t,s)},styleElement(t){e.flushCustomStyles(),e.styleElement(t)},styleDocument(t){e.flushCustomStyles(),e.styleDocument(t)},getComputedStyleValue:(e,t)=>a(e,t),flushCustomStyles(){e.flushCustomStyles()},nativeCss:i,nativeShadow:n,cssBuild:s,disableRuntime:h},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=ye;
66
+ const Ce=new ue;class ve{constructor(){this.customStyleInterface=null,Ce.invalidCallback=ge}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{Ce.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(e,t){if(this.ensure(),re(e))return;_e[t]=e;let s=Ce.transformTemplate(e,t);e._styleAst=s}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t<e.length;t++){let s=e[t],i=this.customStyleInterface.getStyleForCustomStyle(s);i&&Ce.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(e,t){if(this.ensure(),t&&c(e,t),e.shadowRoot){this.styleElement(e);let t=e.shadowRoot.children||e.shadowRoot.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}else{let t=e.children||e.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}}styleElement(e){this.ensure();let{is:t}=function(e){let t=e.localName,s="",i="";return t?t.indexOf("-")>-1?s=t:(i=t,s=e.getAttribute&&e.getAttribute("is")||""):(s=e.is,i=e.extends),{is:s,typeExtension:i}}(e),s=_e[t];if((!s||!re(s))&&s&&!be(s)){(function(e){return!be(e)&&e[me]===e[fe]})(s)||(this.prepareTemplate(s,t),function(e){e[me]=e[fe],e._validating||(e._validating=!0,ye.then((function(){e[pe]=e[fe],e._validating=!1})))}(s));let i=e.shadowRoot;if(i){let e=i.querySelector("style");e&&(e.__cssRules=s._styleAst,e.textContent=Z(s._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const e=new ve;let t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(t,s,i){e.flushCustomStyles(),e.prepareTemplate(t,s)},prepareTemplateStyles(e,t,s){window.ShadyCSS.prepareTemplate(e,t,s)},prepareTemplateDom(e,t){},styleSubtree(t,s){e.flushCustomStyles(),e.styleSubtree(t,s)},styleElement(t){e.flushCustomStyles(),e.styleElement(t)},styleDocument(t){e.flushCustomStyles(),e.styleDocument(t)},getComputedStyleValue:(e,t)=>a(e,t),flushCustomStyles(){e.flushCustomStyles()},nativeCss:s,nativeShadow:i,cssBuild:n,disableRuntime:h},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=Ce;
67
67
  /**
68
68
  * @fileoverview
69
69
  * @suppress {checkPrototypalTypes}
@@ -75,7 +75,7 @@ const ye=new he;class ge{constructor(){this.customStyleInterface=null,ye.invalid
75
75
  * Google as part of the polymer project is also subject to an additional IP
76
76
  * rights grant found at http://polymer.github.io/PATENTS.txt
77
77
  */
78
- const be=/:host\(:dir\((ltr|rtl)\)\)/g,Ce=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,ve=/:dir\((?:ltr|rtl)\)/,xe=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),we=[];let Se=null,Pe="";function Ee(){Pe=document.documentElement.getAttribute("dir")}function Ie(e){if(!e.__autoDirOptOut){e.setAttribute("dir",Pe)}}function Oe(){Ee(),Pe=document.documentElement.getAttribute("dir");for(let e=0;e<we.length;e++)Ie(we[e])}const Ae=d((e=>{xe||Se||(Ee(),Se=new MutationObserver(Oe),Se.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=u(e);class s extends t{static _processStyleText(e,s){return e=t._processStyleText.call(this,e,s),!xe&&ve.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(be,':host([dir="$1"])'),t=t.replace(Ce,':host([dir="$2"]) $1'),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(Se&&Se.takeRecords().length&&Oe(),we.push(this),Ie(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=we.indexOf(this);e>-1&&we.splice(e,1)}}}return s.__activateDir=!1,s}));
78
+ const xe=/:host\(:dir\((ltr|rtl)\)\)/g,we=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,Se=/:dir\((?:ltr|rtl)\)/,Pe=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),Ee=[];let Ie=null,Oe="";function Ae(){Oe=document.documentElement.getAttribute("dir")}function ke(e){if(!e.__autoDirOptOut){e.setAttribute("dir",Oe)}}function Ne(){Ae(),Oe=document.documentElement.getAttribute("dir");for(let e=0;e<Ee.length;e++)ke(Ee[e])}const Te=d((e=>{Pe||Ie||(Ae(),Ie=new MutationObserver(Ne),Ie.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const t=u(e);class s extends t{static _processStyleText(e,s){return e=t._processStyleText.call(this,e,s),!Pe&&Se.test(e)&&(e=this._replaceDirInCssText(e),this.__activateDir=!0),e}static _replaceDirInCssText(e){let t=e;return t=t.replace(xe,':host([dir="$1"])'),t=t.replace(we,':host([dir="$2"]) $1'),t}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(Ie&&Ie.takeRecords().length&&Ne(),Ee.push(this),ke(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const e=Ee.indexOf(this);e>-1&&Ee.splice(e,1)}}}return s.__activateDir=!1,s}));
79
79
  /**
80
80
  @license
81
81
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -84,7 +84,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
84
84
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
85
85
  Code distributed by Google as part of the polymer project is also
86
86
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
87
- */function ke(){document.body.removeAttribute("unresolved")}
87
+ */function Me(){document.body.removeAttribute("unresolved")}
88
88
  /**
89
89
  @license
90
90
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -94,7 +94,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
94
94
  Code distributed by Google as part of the polymer project is also
95
95
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
96
96
  */
97
- function Ne(e,t,s){return{index:e,removed:t,addedCount:s}}"interactive"===document.readyState||"complete"===document.readyState?ke():window.addEventListener("DOMContentLoaded",ke);function Te(e,t,s,i,n,r){let o,l=0,a=0,h=Math.min(s-t,r-n);if(0==t&&0==n&&(l=function(e,t,s){for(let i=0;i<s;i++)if(!De(e[i],t[i]))return i;return s}(e,i,h)),s==e.length&&r==i.length&&(a=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&De(e[--i],t[--n]);)r++;return r}(e,i,h-l)),n+=l,r-=a,(s-=a)-(t+=l)==0&&r-n==0)return[];if(t==s){for(o=Ne(t,[],0);n<r;)o.removed.push(i[n++]);return[o]}if(n==r)return[Ne(t,[],s-t)];let c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s],n=[];for(;t>0||s>0;){if(0==t){n.push(2),s--;continue}if(0==s){n.push(3),t--;continue}let r,o=e[t-1][s-1],l=e[t-1][s],a=e[t][s-1];r=l<a?l<o?l:o:a<o?a:o,r==o?(o==i?n.push(0):(n.push(1),i=o),t--,s--):r==l?(n.push(3),t--,i=l):(n.push(2),s--,i=a)}return n.reverse(),n}(function(e,t,s,i,n,r){let o=r-n+1,l=s-t+1,a=new Array(o);for(let e=0;e<o;e++)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;e++)a[0][e]=e;for(let s=1;s<o;s++)for(let r=1;r<l;r++)if(De(e[t+r-1],i[n+s-1]))a[s][r]=a[s-1][r-1];else{let e=a[s-1][r]+1,t=a[s][r-1]+1;a[s][r]=e<t?e:t}return a}(e,t,s,i,n,r));o=void 0;let d=[],u=t,_=n;for(let e=0;e<c.length;e++)switch(c[e]){case 0:o&&(d.push(o),o=void 0),u++,_++;break;case 1:o||(o=Ne(u,[],0)),o.addedCount++,u++,o.removed.push(i[_]),_++;break;case 2:o||(o=Ne(u,[],0)),o.addedCount++,u++;break;case 3:o||(o=Ne(u,[],0)),o.removed.push(i[_]),_++}return o&&d.push(o),d}function Me(e,t){return Te(e,0,e.length,t,0,t.length)}function De(e,t){return e===t}
97
+ function De(e,t,s){return{index:e,removed:t,addedCount:s}}"interactive"===document.readyState||"complete"===document.readyState?Me():window.addEventListener("DOMContentLoaded",Me);const Re=0,Fe=1,Le=2,He=3;function je(e,t,s,i,n,r){let o,l=0,a=0,h=Math.min(s-t,r-n);if(0==t&&0==n&&(l=function(e,t,s){for(let i=0;i<s;i++)if(!Be(e[i],t[i]))return i;return s}(e,i,h)),s==e.length&&r==i.length&&(a=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&Be(e[--i],t[--n]);)r++;return r}(e,i,h-l)),n+=l,r-=a,(s-=a)-(t+=l)==0&&r-n==0)return[];if(t==s){for(o=De(t,[],0);n<r;)o.removed.push(i[n++]);return[o]}if(n==r)return[De(t,[],s-t)];let c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s],n=[];for(;t>0||s>0;){if(0==t){n.push(Le),s--;continue}if(0==s){n.push(He),t--;continue}let r,o=e[t-1][s-1],l=e[t-1][s],a=e[t][s-1];r=l<a?l<o?l:o:a<o?a:o,r==o?(o==i?n.push(Re):(n.push(Fe),i=o),t--,s--):r==l?(n.push(He),t--,i=l):(n.push(Le),s--,i=a)}return n.reverse(),n}(function(e,t,s,i,n,r){let o=r-n+1,l=s-t+1,a=new Array(o);for(let e=0;e<o;e++)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;e++)a[0][e]=e;for(let s=1;s<o;s++)for(let r=1;r<l;r++)if(Be(e[t+r-1],i[n+s-1]))a[s][r]=a[s-1][r-1];else{let e=a[s-1][r]+1,t=a[s][r-1]+1;a[s][r]=e<t?e:t}return a}(e,t,s,i,n,r));o=void 0;let d=[],u=t,_=n;for(let e=0;e<c.length;e++)switch(c[e]){case Re:o&&(d.push(o),o=void 0),u++,_++;break;case Fe:o||(o=De(u,[],0)),o.addedCount++,u++,o.removed.push(i[_]),_++;break;case Le:o||(o=De(u,[],0)),o.addedCount++,u++;break;case He:o||(o=De(u,[],0)),o.removed.push(i[_]),_++}return o&&d.push(o),d}function ze(e,t){return je(e,0,e.length,t,0,t.length)}function Be(e,t){return e===t}
98
98
  /**
99
99
  @license
100
100
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -103,7 +103,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
103
103
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
104
104
  Code distributed by Google as part of the polymer project is also
105
105
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
106
- */function Re(e){return"slot"===e.localName}let Fe=class{static getFlattenedNodes(e){const t=_(e);return Re(e)?(e=e,t.assignedNodes({flatten:!0})):Array.from(t.childNodes).map((e=>Re(e)?_(e=e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Re(this._target)?this._listenSlots([this._target]):_(this._target).children&&(this._listenSlots(_(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Re(this._target)?this._unlistenSlots([this._target]):_(this._target).children&&(this._unlistenSlots(_(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,p.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let s=e[t];s.addedNodes&&this._listenSlots(s.addedNodes),s.removedNodes&&this._unlistenSlots(s.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),s=Me(t,this._effectiveNodes);for(let t,i=0;i<s.length&&(t=s[i]);i++)for(let s,i=0;i<t.removed.length&&(s=t.removed[i]);i++)e.removedNodes.push(s);for(let i,n=0;n<s.length&&(i=s[n]);n++)for(let s=i.index;s<i.index+i.addedCount;s++)e.addedNodes.push(t[s]);this._effectiveNodes=t;let i=!1;return(e.addedNodes.length||e.removedNodes.length)&&(i=!0,this.callback.call(this._target,e)),i}_listenSlots(e){for(let t=0;t<e.length;t++){let s=e[t];Re(s)&&s.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let s=e[t];Re(s)&&s.removeEventListener("slotchange",this._boundSchedule)}}};
106
+ */function $e(e){return"slot"===e.localName}let Ue=class{static getFlattenedNodes(e){const t=_(e);return $e(e)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map((e=>$e(e)?_(e).assignedNodes({flatten:!0}):[e])).reduce(((e,t)=>e.concat(t)),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){$e(this._target)?this._listenSlots([this._target]):_(this._target).children&&(this._listenSlots(_(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(e=>{this._processMutations(e)})):(this._nativeChildrenObserver=new MutationObserver((e=>{this._processMutations(e)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){$e(this._target)?this._unlistenSlots([this._target]):_(this._target).children&&(this._unlistenSlots(_(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,p.run((()=>this.flush())))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let s=e[t];s.addedNodes&&this._listenSlots(s.addedNodes),s.removedNodes&&this._unlistenSlots(s.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),s=ze(t,this._effectiveNodes);for(let t,i=0;i<s.length&&(t=s[i]);i++)for(let s,i=0;i<t.removed.length&&(s=t.removed[i]);i++)e.removedNodes.push(s);for(let i,n=0;n<s.length&&(i=s[n]);n++)for(let s=i.index;s<i.index+i.addedCount;s++)e.addedNodes.push(t[s]);this._effectiveNodes=t;let i=!1;return(e.addedNodes.length||e.removedNodes.length)&&(i=!0,this.callback.call(this._target,e)),i}_listenSlots(e){for(let t=0;t<e.length;t++){let s=e[t];$e(s)&&s.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let s=e[t];$e(s)&&s.removeEventListener("slotchange",this._boundSchedule)}}};
107
107
  /**
108
108
  @license
109
109
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -112,7 +112,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
112
112
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
113
113
  Code distributed by Google as part of the polymer project is also
114
114
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
115
- */const Le=Element.prototype,He=Le.matches||Le.matchesSelector||Le.mozMatchesSelector||Le.msMatchesSelector||Le.oMatchesSelector||Le.webkitMatchesSelector,je=function(e,t){return He.call(e,t)};class ze{constructor(e){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(e),this.node=e}observeNodes(e){return new Fe(this.node,e)}unobserveNodes(e){e.disconnect()}notifyObserver(){}deepContains(e){if(_(this.node).contains(e))return!0;let t=e,s=e.ownerDocument;for(;t&&t!==s&&t!==this.node;)t=_(t).parentNode||_(t).host;return t===this.node}getOwnerRoot(){return _(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?_(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let e=[],t=_(this.node).assignedSlot;for(;t;)e.push(t),t=_(t).assignedSlot;return e}importNode(e,t){let s=this.node instanceof Document?this.node:this.node.ownerDocument;return _(s).importNode(e,t)}getEffectiveChildNodes(){return Fe.getFlattenedNodes(this.node)}queryDistributedElements(e){let t=this.getEffectiveChildNodes(),s=[];for(let i,n=0,r=t.length;n<r&&(i=t[n]);n++)i.nodeType===Node.ELEMENT_NODE&&je(i,e)&&s.push(i);return s}get activeElement(){let e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}function Be(e,t){for(let s=0;s<t.length;s++){let i=t[s];Object.defineProperty(e,i,{get:function(){return this.node[i]},configurable:!0})}}class $e{constructor(e){this.event=e}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}ze.prototype.cloneNode,ze.prototype.appendChild,ze.prototype.insertBefore,ze.prototype.removeChild,ze.prototype.replaceChild,ze.prototype.setAttribute,ze.prototype.removeAttribute,ze.prototype.querySelector,ze.prototype.querySelectorAll,ze.prototype.parentNode,ze.prototype.firstChild,ze.prototype.lastChild,ze.prototype.nextSibling,ze.prototype.previousSibling,ze.prototype.firstElementChild,ze.prototype.lastElementChild,ze.prototype.nextElementSibling,ze.prototype.previousElementSibling,ze.prototype.childNodes,ze.prototype.children,ze.prototype.classList,ze.prototype.textContent,ze.prototype.innerHTML;let Ue=ze;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(ze.prototype).forEach((t=>{"activeElement"!=t&&(e.prototype[t]=ze.prototype[t])})),Be(e.prototype,["classList"]),Ue=e,Object.defineProperties($e.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&qe(e).getOwnerRoot(),s=this.path;for(let e=0;e<s.length;e++){const i=s[e];if(qe(i).getOwnerRoot()===t)return i}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(e,t){for(let s=0;s<t.length;s++){let i=t[s];e[i]=function(){return this.node[i].apply(this.node,arguments)}}}(ze.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),Be(ze.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),function(e,t){for(let s=0;s<t.length;s++){let i=t[s];Object.defineProperty(e,i,{get:function(){return this.node[i]},set:function(e){this.node[i]=e},configurable:!0})}}(ze.prototype,["textContent","innerHTML","className"]);const qe=function(e){if((e=e||document)instanceof Ue)return e;if(e instanceof $e)return e;let t=e.__domApi;return t||(t=e instanceof Event?new $e(e):new Ue(e),e.__domApi=t),t},Je=window.ShadyDOM,Ve=window.ShadyCSS;
115
+ */const qe=Element.prototype,Je=qe.matches||qe.matchesSelector||qe.mozMatchesSelector||qe.msMatchesSelector||qe.oMatchesSelector||qe.webkitMatchesSelector,Ve=function(e,t){return Je.call(e,t)};class Ye{constructor(e){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(e),this.node=e}observeNodes(e){return new Ue(this.node,e)}unobserveNodes(e){e.disconnect()}notifyObserver(){}deepContains(e){if(_(this.node).contains(e))return!0;let t=e,s=e.ownerDocument;for(;t&&t!==s&&t!==this.node;)t=_(t).parentNode||_(t).host;return t===this.node}getOwnerRoot(){return _(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?_(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let e=[],t=_(this.node).assignedSlot;for(;t;)e.push(t),t=_(t).assignedSlot;return e}importNode(e,t){let s=this.node instanceof Document?this.node:this.node.ownerDocument;return _(s).importNode(e,t)}getEffectiveChildNodes(){return Ue.getFlattenedNodes(this.node)}queryDistributedElements(e){let t=this.getEffectiveChildNodes(),s=[];for(let i,n=0,r=t.length;n<r&&(i=t[n]);n++)i.nodeType===Node.ELEMENT_NODE&&Ve(i,e)&&s.push(i);return s}get activeElement(){let e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}function Ke(e,t){for(let s=0;s<t.length;s++){let i=t[s];Object.defineProperty(e,i,{get:function(){return this.node[i]},configurable:!0})}}class Ge{constructor(e){this.event=e}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}Ye.prototype.cloneNode,Ye.prototype.appendChild,Ye.prototype.insertBefore,Ye.prototype.removeChild,Ye.prototype.replaceChild,Ye.prototype.setAttribute,Ye.prototype.removeAttribute,Ye.prototype.querySelector,Ye.prototype.querySelectorAll,Ye.prototype.parentNode,Ye.prototype.firstChild,Ye.prototype.lastChild,Ye.prototype.nextSibling,Ye.prototype.previousSibling,Ye.prototype.firstElementChild,Ye.prototype.lastElementChild,Ye.prototype.nextElementSibling,Ye.prototype.previousElementSibling,Ye.prototype.childNodes,Ye.prototype.children,Ye.prototype.classList,Ye.prototype.textContent,Ye.prototype.innerHTML;let Xe=Ye;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(Ye.prototype).forEach((t=>{"activeElement"!=t&&(e.prototype[t]=Ye.prototype[t])})),Ke(e.prototype,["classList"]),Xe=e,Object.defineProperties(Ge.prototype,{localTarget:{get(){const e=this.event.currentTarget,t=e&&We(e).getOwnerRoot(),s=this.path;for(let e=0;e<s.length;e++){const i=s[e];if(We(i).getOwnerRoot()===t)return i}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(e,t){for(let s=0;s<t.length;s++){let i=t[s];e[i]=function(){return this.node[i].apply(this.node,arguments)}}}(Ye.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll","attachShadow"]),Ke(Ye.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList","shadowRoot"]),function(e,t){for(let s=0;s<t.length;s++){let i=t[s];Object.defineProperty(e,i,{get:function(){return this.node[i]},set:function(e){this.node[i]=e},configurable:!0})}}(Ye.prototype,["textContent","innerHTML","className"]);const We=function(e){if((e=e||document)instanceof Xe)return e;if(e instanceof Ge)return e;let t=e.__domApi;return t||(t=e instanceof Event?new Ge(e):new Xe(e),e.__domApi=t),t},Qe=window.ShadyDOM,Ze=window.ShadyCSS;
116
116
  /**
117
117
  @license
118
118
  Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
@@ -121,7 +121,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
121
121
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
122
122
  Code distributed by Google as part of the polymer project is also
123
123
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
124
- */function Ye(e,t){return _(e).getRootNode()===t}
124
+ */function et(e,t){return _(e).getRootNode()===t}
125
125
  /**
126
126
  * @fileoverview
127
127
  * @suppress {checkPrototypalTypes}
@@ -133,7 +133,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
133
133
  * Google as part of the polymer project is also subject to an additional IP
134
134
  * rights grant found at http://polymer.github.io/PATENTS.txt
135
135
  */
136
- const Ke=e=>{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},Ge=d((e=>{const t=f(e);let s=Ke(t);return class extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return s.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,s,i){"disable-upgrade"==e?this.__isUpgradeDisabled&&null==s&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,_(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,s,i)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));let Xe=window.ShadyCSS;const We=d((e=>{const t=m(f(e)),s=y?t:Ae(t),i=Ke(s),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class r extends s{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,s){(this.__dataAttributes&&this.__dataAttributes[e]||"disable-upgrade"===e)&&this.attributeChangedCallback(e,t,s,null)}setAttribute(e,t){if(k&&!this._legacyForceObservedAttributes){const s=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,s,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(k&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return k&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],g(this.prototype)),this.__observedAttributes):i.call(this).concat("disable-upgrade")}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,s,i){t!==s&&("disable-upgrade"==e?this.__isUpgradeDisabled&&null==s&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,_(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,s,i),this.attributeChanged(e,t,s)))}attributeChanged(e,t,s){}_initializeProperties(){if(N&&this.hasAttribute("disable-upgrade"))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),k&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,s=e.length;t<s;t++){const s=e[t];this.__attributeReaction(s.name,null,s.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(e){return this._serializeValue(e)}deserialize(e,t){return this._deserializeValue(e,t)}reflectPropertyToAttribute(e,t,s){this._propertyToAttribute(e,t,s)}serializeValueToAttribute(e,t,s){this._valueToNodeAttribute(s||this,e,t)}extend(e,t){if(!e||!t)return e||t;let s=Object.getOwnPropertyNames(t);for(let i,n=0;n<s.length&&(i=s[n]);n++){let s=Object.getOwnPropertyDescriptor(t,i);s&&Object.defineProperty(e,i,s)}return e}mixin(e,t){for(let s in t)e[s]=t[s];return e}chainObject(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}instanceTemplate(e){let t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}fire(e,t,s){s=s||{},t=null==t?{}:t;let i=new Event(e,{bubbles:void 0===s.bubbles||s.bubbles,cancelable:Boolean(s.cancelable),composed:void 0===s.composed||s.composed});i.detail=t;let n=s.node||this;return _(n).dispatchEvent(i),i}listen(e,t,s){e=e||this;let i=this.__boundListeners||(this.__boundListeners=new WeakMap),n=i.get(e);n||(n={},i.set(e,n));let r=t+s;n[r]||(n[r]=this._addMethodEventListenerToNode(e,t,s,this))}unlisten(e,t,s){e=e||this;let i=this.__boundListeners&&this.__boundListeners.get(e),n=t+s,r=i&&i[n];r&&(this._removeEventListenerFromNode(e,t,r),i[n]=null)}setScrollDirection(e,t){b(t||this,n[e]||"auto")}$$(e){return this.root.querySelector(e)}get domHost(){let e=_(this).getRootNode();return e instanceof DocumentFragment?e.host:e}distributeContent(){const e=qe(this);window.ShadyDOM&&e.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return qe(this).getEffectiveChildNodes()}queryDistributedElements(e){return qe(this).queryDistributedElements(e)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let e=this.getEffectiveChildNodes(),t=[];for(let s,i=0;s=e[i];i++)s.nodeType!==Node.COMMENT_NODE&&t.push(s.textContent);return t.join("")}queryEffectiveChildren(e){let t=this.queryDistributedElements(e);return t&&t[0]}queryAllEffectiveChildren(e){return this.queryDistributedElements(e)}getContentChildNodes(e){let t=this.root.querySelector(e||"slot");return t?qe(t).getDistributedNodes():[]}getContentChildren(e){return this.getContentChildNodes(e).filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(e){const t=this;return t!==e&&_(t).contains(e)&&_(t).getRootNode()===_(e).getRootNode()}isLocalDescendant(e){return this.root===_(e).getRootNode()}scopeSubtree(e,t=!1){return function(e,t=!1){if(!Je||!Ve)return null;if(!Je.handlesDynamicScoping)return null;const s=Ve.ScopingShim;if(!s)return null;const i=s.scopeForNode(e),n=_(e).getRootNode(),r=e=>{if(!Ye(e,n))return;const t=Array.from(Je.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e<t.length;e++){const r=t[e];if(!Ye(r,n))continue;const o=s.currentScopeForNode(r);o!==i&&(""!==o&&s.unscopeNode(r,o),s.scopeNode(r,i))}};if(r(e),t){const t=new MutationObserver((e=>{for(let t=0;t<e.length;t++){const s=e[t];for(let e=0;e<s.addedNodes.length;e++){const t=s.addedNodes[e];t.nodeType===Node.ELEMENT_NODE&&r(t)}}}));return t.observe(e,{childList:!0,subtree:!0}),t}return null}(e,t)}getComputedStyleValue(e){return Xe.getComputedStyleValue(this,e)}debounce(e,t,s){return this._debouncers=this._debouncers||{},this._debouncers[e]=C.debounce(this._debouncers[e],s>0?v.after(s):p,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?v.run(e.bind(this),t):~p.run(e.bind(this))}cancelAsync(e){e<0?p.cancel(~e):v.cancel(e)}create(e,t){let s=document.createElement(e);if(t)if(s.setProperties)s.setProperties(t);else for(let e in t)s[e]=t[e];return s}elementMatches(e,t){return je(t||this,e)}toggleAttribute(e,t){let s=this;return 3===arguments.length&&(s=arguments[2]),1==arguments.length&&(t=!s.hasAttribute(e)),t?(_(s).setAttribute(e,""),!0):(_(s).removeAttribute(e),!1)}toggleClass(e,t,s){s=s||this,1==arguments.length&&(t=!s.classList.contains(e)),t?s.classList.add(e):s.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,s,i){i=i||this,this.transform("translate3d("+e+","+t+","+s+")",i)}arrayDelete(e,t){let s;if(Array.isArray(e)){if(s=e.indexOf(t),s>=0)return e.splice(s,1)}else{if(s=x(this,e).indexOf(t),s>=0)return this.splice(e,s,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return r.prototype.is="",r})),Qe={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Ze={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},et=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},Ze);
136
+ const tt="disable-upgrade",st=e=>{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},it=d((e=>{const t=f(e);let s=st(t);return class extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return s.call(this).concat(tt)}_initializeProperties(){this.hasAttribute(tt)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,s,i){e==tt?this.__isUpgradeDisabled&&null==s&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,_(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,s,i)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}})),nt="disable-upgrade";let rt=window.ShadyCSS;const ot=d((e=>{const t=m(f(e)),s=y?t:Te(t),i=st(s),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class r extends s{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,s){(this.__dataAttributes&&this.__dataAttributes[e]||e===nt)&&this.attributeChangedCallback(e,t,s,null)}setAttribute(e,t){if(k&&!this._legacyForceObservedAttributes){const s=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,s,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(k&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return k&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],g(this.prototype)),this.__observedAttributes):i.call(this).concat(nt)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,s,i){t!==s&&(e==nt?this.__isUpgradeDisabled&&null==s&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,_(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,s,i),this.attributeChanged(e,t,s)))}attributeChanged(e,t,s){}_initializeProperties(){if(N&&this.hasAttribute(nt))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),k&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,s=e.length;t<s;t++){const s=e[t];this.__attributeReaction(s.name,null,s.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(e){return this._serializeValue(e)}deserialize(e,t){return this._deserializeValue(e,t)}reflectPropertyToAttribute(e,t,s){this._propertyToAttribute(e,t,s)}serializeValueToAttribute(e,t,s){this._valueToNodeAttribute(s||this,e,t)}extend(e,t){if(!e||!t)return e||t;let s=Object.getOwnPropertyNames(t);for(let i,n=0;n<s.length&&(i=s[n]);n++){let s=Object.getOwnPropertyDescriptor(t,i);s&&Object.defineProperty(e,i,s)}return e}mixin(e,t){for(let s in t)e[s]=t[s];return e}chainObject(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}instanceTemplate(e){let t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}fire(e,t,s){s=s||{},t=null==t?{}:t;let i=new Event(e,{bubbles:void 0===s.bubbles||s.bubbles,cancelable:Boolean(s.cancelable),composed:void 0===s.composed||s.composed});i.detail=t;let n=s.node||this;return _(n).dispatchEvent(i),i}listen(e,t,s){e=e||this;let i=this.__boundListeners||(this.__boundListeners=new WeakMap),n=i.get(e);n||(n={},i.set(e,n));let r=t+s;n[r]||(n[r]=this._addMethodEventListenerToNode(e,t,s,this))}unlisten(e,t,s){e=e||this;let i=this.__boundListeners&&this.__boundListeners.get(e),n=t+s,r=i&&i[n];r&&(this._removeEventListenerFromNode(e,t,r),i[n]=null)}setScrollDirection(e,t){b(t||this,n[e]||"auto")}$$(e){return this.root.querySelector(e)}get domHost(){let e=_(this).getRootNode();return e instanceof DocumentFragment?e.host:e}distributeContent(){const e=We(this);window.ShadyDOM&&e.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return We(this).getEffectiveChildNodes()}queryDistributedElements(e){return We(this).queryDistributedElements(e)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let e=this.getEffectiveChildNodes(),t=[];for(let s,i=0;s=e[i];i++)s.nodeType!==Node.COMMENT_NODE&&t.push(s.textContent);return t.join("")}queryEffectiveChildren(e){let t=this.queryDistributedElements(e);return t&&t[0]}queryAllEffectiveChildren(e){return this.queryDistributedElements(e)}getContentChildNodes(e){let t=this.root.querySelector(e||"slot");return t?We(t).getDistributedNodes():[]}getContentChildren(e){return this.getContentChildNodes(e).filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(e){const t=this;return t!==e&&_(t).contains(e)&&_(t).getRootNode()===_(e).getRootNode()}isLocalDescendant(e){return this.root===_(e).getRootNode()}scopeSubtree(e,t=!1){return function(e,t=!1){if(!Qe||!Ze)return null;if(!Qe.handlesDynamicScoping)return null;const s=Ze.ScopingShim;if(!s)return null;const i=s.scopeForNode(e),n=_(e).getRootNode(),r=e=>{if(!et(e,n))return;const t=Array.from(Qe.nativeMethods.querySelectorAll.call(e,"*"));t.push(e);for(let e=0;e<t.length;e++){const r=t[e];if(!et(r,n))continue;const o=s.currentScopeForNode(r);o!==i&&(""!==o&&s.unscopeNode(r,o),s.scopeNode(r,i))}};if(r(e),t){const t=new MutationObserver((e=>{for(let t=0;t<e.length;t++){const s=e[t];for(let e=0;e<s.addedNodes.length;e++){const t=s.addedNodes[e];t.nodeType===Node.ELEMENT_NODE&&r(t)}}}));return t.observe(e,{childList:!0,subtree:!0}),t}return null}(e,t)}getComputedStyleValue(e){return rt.getComputedStyleValue(this,e)}debounce(e,t,s){return this._debouncers=this._debouncers||{},this._debouncers[e]=C.debounce(this._debouncers[e],s>0?v.after(s):p,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?v.run(e.bind(this),t):~p.run(e.bind(this))}cancelAsync(e){e<0?p.cancel(~e):v.cancel(e)}create(e,t){let s=document.createElement(e);if(t)if(s.setProperties)s.setProperties(t);else for(let e in t)s[e]=t[e];return s}elementMatches(e,t){return Ve(t||this,e)}toggleAttribute(e,t){let s=this;return 3===arguments.length&&(s=arguments[2]),1==arguments.length&&(t=!s.hasAttribute(e)),t?(_(s).setAttribute(e,""),!0):(_(s).removeAttribute(e),!1)}toggleClass(e,t,s){s=s||this,1==arguments.length&&(t=!s.classList.contains(e)),t?s.classList.add(e):s.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,s,i){i=i||this,this.transform("translate3d("+e+","+t+","+s+")",i)}arrayDelete(e,t){let s;if(Array.isArray(e)){if(s=e.indexOf(t),s>=0)return e.splice(s,1)}else{if(s=x(this,e).indexOf(t),s>=0)return this.splice(e,s,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return r.prototype.is="",r})),lt={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},at={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},ht=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},at);
137
137
  /**
138
138
  @license
139
139
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -142,7 +142,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
142
142
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
143
143
  Code distributed by Google as part of the polymer project is also
144
144
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
145
- */function tt(e,t){return ot({},We(t),e)}function st(e,t,s,i){!function(e,t,s){const i=e._noAccessors,n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;r++){let o=n[r];if(!(o in s))if(i)t[o]=e[o];else{let s=Object.getOwnPropertyDescriptor(e,o);s&&(s.configurable=!0,Object.defineProperty(t,o,s))}}}(t,e,i);for(let e in Qe)t[e]&&(s[e]=s[e]||[],s[e].push(t[e]))}function it(e,t,s){t=t||[];for(let i=e.length-1;i>=0;i--){let n=e[i];n?Array.isArray(n)?it(n,t):t.indexOf(n)<0&&(!s||s.indexOf(n)<0)&&t.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return t}function nt(e,t){for(const s in t){const i=e[s],n=t[s];e[s]=!("value"in n)&&i&&"value"in i?Object.assign({value:i.value},n):n}}const rt=We(HTMLElement);function ot(e,t,s){let i;const n={};class r extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(i)for(let e,t=0;t<i.length;t++)e=i[t],e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}else t._finalizeClass.call(this)}static get properties(){const t={};if(i)for(let e=0;e<i.length;e++)nt(t,i[e].properties);return nt(t,e.properties),t}static get observers(){let t=[];if(i)for(let e,s=0;s<i.length;s++)e=i[s],e.observers&&(t=t.concat(e.observers));return e.observers&&(t=t.concat(e.observers)),t}created(){super.created();const e=n.created;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}_registered(){const e=r.prototype;if(!e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))){e.__hasRegisterFinished=!0,super._registered(),N&&o(e);const t=Object.getPrototypeOf(this);let s=n.beforeRegister;if(s)for(let e=0;e<s.length;e++)s[e].call(t);if(s=n.registered,s)for(let e=0;e<s.length;e++)s[e].call(t)}}_applyListeners(){super._applyListeners();const e=n.listeners;if(e)for(let t=0;t<e.length;t++){const s=e[t];if(s)for(let e in s)this._addMethodEventListenerToNode(this,e,s[e])}}_ensureAttributes(){const e=n.hostAttributes;if(e)for(let t=e.length-1;t>=0;t--){const s=e[t];for(let e in s)this._ensureAttribute(e,s[e])}super._ensureAttributes()}ready(){super.ready();let e=n.ready;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attached(){super.attached();let e=n.attached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}detached(){super.detached();let e=n.detached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attributeChanged(e,t,s){super.attributeChanged();let i=n.attributeChanged;if(i)for(let n=0;n<i.length;n++)i[n].call(this,e,t,s)}}if(s){Array.isArray(s)||(s=[s]);let e=t.prototype.behaviors;i=it(s,null,e),r.prototype.behaviors=e?e.concat(s):i}const o=t=>{i&&function(e,t,s){for(let i=0;i<t.length;i++)st(e,t[i],s,et)}(t,i,n),st(t,e,n,Ze)};return N||o(r.prototype),r.generatedFrom=e,r}const lt=function(e){let t;return t="function"==typeof e?e:lt.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};
145
+ */function ct(e,t){return ft({},ot(t),e)}function dt(e,t,s,i){!function(e,t,s){const i=e._noAccessors,n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;r++){let o=n[r];if(!(o in s))if(i)t[o]=e[o];else{let s=Object.getOwnPropertyDescriptor(e,o);s&&(s.configurable=!0,Object.defineProperty(t,o,s))}}}(t,e,i);for(let e in lt)t[e]&&(s[e]=s[e]||[],s[e].push(t[e]))}function ut(e,t,s){t=t||[];for(let i=e.length-1;i>=0;i--){let n=e[i];n?Array.isArray(n)?ut(n,t):t.indexOf(n)<0&&(!s||s.indexOf(n)<0)&&t.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return t}function _t(e,t){for(const s in t){const i=e[s],n=t[s];e[s]=!("value"in n)&&i&&"value"in i?Object.assign({value:i.value},n):n}}const pt=ot(HTMLElement);function ft(e,t,s){let i;const n={};class r extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(i)for(let e,t=0;t<i.length;t++)e=i[t],e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}else t._finalizeClass.call(this)}static get properties(){const t={};if(i)for(let e=0;e<i.length;e++)_t(t,i[e].properties);return _t(t,e.properties),t}static get observers(){let t=[];if(i)for(let e,s=0;s<i.length;s++)e=i[s],e.observers&&(t=t.concat(e.observers));return e.observers&&(t=t.concat(e.observers)),t}created(){super.created();const e=n.created;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}_registered(){const e=r.prototype;if(!e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))){e.__hasRegisterFinished=!0,super._registered(),N&&o(e);const t=Object.getPrototypeOf(this);let s=n.beforeRegister;if(s)for(let e=0;e<s.length;e++)s[e].call(t);if(s=n.registered,s)for(let e=0;e<s.length;e++)s[e].call(t)}}_applyListeners(){super._applyListeners();const e=n.listeners;if(e)for(let t=0;t<e.length;t++){const s=e[t];if(s)for(let e in s)this._addMethodEventListenerToNode(this,e,s[e])}}_ensureAttributes(){const e=n.hostAttributes;if(e)for(let t=e.length-1;t>=0;t--){const s=e[t];for(let e in s)this._ensureAttribute(e,s[e])}super._ensureAttributes()}ready(){super.ready();let e=n.ready;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attached(){super.attached();let e=n.attached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}detached(){super.detached();let e=n.detached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attributeChanged(e,t,s){super.attributeChanged();let i=n.attributeChanged;if(i)for(let n=0;n<i.length;n++)i[n].call(this,e,t,s)}}if(s){Array.isArray(s)||(s=[s]);let e=t.prototype.behaviors;i=ut(s,null,e),r.prototype.behaviors=e?e.concat(s):i}const o=t=>{i&&function(e,t,s){for(let i=0;i<t.length;i++)dt(e,t[i],s,ht)}(t,i,n),dt(t,e,n,at)};return N||o(r.prototype),r.generatedFrom=e,r}const mt=function(e){let t;return t="function"==typeof e?e:mt.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};
146
146
  /**
147
147
  @license
148
148
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -161,7 +161,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
161
161
  Code distributed by Google as part of the polymer project is also
162
162
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
163
163
  */
164
- function at(e,t,s,i,n){let r;n&&(r="object"==typeof s&&null!==s,r&&(i=e.__dataTemp[t]));let o=i!==s&&(i==i||s==s);return r&&o&&(e.__dataTemp[t]=s),o}lt.Class=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let s=t?t(rt):rt;return s=ot(e,s,e.behaviors),s.is=s.prototype.is=e.is,s};const ht=d((e=>class extends e{_shouldPropertyChange(e,t,s){return at(this,e,t,s,!0)}})),ct=d((e=>class extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,s){return at(this,e,t,s,this.mutableData)}}));ht._mutablePropertyChange=at;
164
+ function yt(e,t,s,i,n){let r;n&&(r="object"==typeof s&&null!==s,r&&(i=e.__dataTemp[t]));let o=i!==s&&(i==i||s==s);return r&&o&&(e.__dataTemp[t]=s),o}mt.Class=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let s=t?t(pt):pt;return s=ft(e,s,e.behaviors),s.is=s.prototype.is=e.is,s};const gt=d((e=>class extends e{_shouldPropertyChange(e,t,s){return yt(this,e,t,s,!0)}})),bt=d((e=>class extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,s){return yt(this,e,t,s,this.mutableData)}}));gt._mutablePropertyChange=yt;
165
165
  /**
166
166
  @license
167
167
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -171,7 +171,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
171
171
  Code distributed by Google as part of the polymer project is also
172
172
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
173
173
  */
174
- let dt=null;function ut(){return dt}ut.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:ut,writable:!0}});const _t=w(ut),pt=ht(_t);const ft=w(class{});function mt(e,t){for(let s=0;s<t.length;s++){let i=t[s];if(Boolean(e)!=Boolean(i.__hideTemplateChildren__))if(i.nodeType===Node.TEXT_NODE)e?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if("slot"===i.localName)if(e)i.__polymerReplaced__=document.createComment("hidden-slot"),_(_(i).parentNode).replaceChild(i.__polymerReplaced__,i);else{const e=i.__polymerReplaced__;e&&_(_(e).parentNode).replaceChild(i,e)}else i.style&&(e?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=e,i._showHideChildren&&i._showHideChildren(e)}}class yt extends ft{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let e=this.root.firstChild;e;e=e.nextSibling)t.push(e),e.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let s=this.__templatizeOptions;(e&&s.instanceProps||!s.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let e in this.__hostProps)this._setPendingProperty(e,this.__dataHost["_host_"+e]);for(let t in e)this._setPendingProperty(t,e[t])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,s){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,(e=>{e.model=this,s(e)}));else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(e,t,s)}}_showHideChildren(e){mt(e,this.children)}_setUnmanagedPropertyToNode(e,t,s){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=s:super._setUnmanagedPropertyToNode(e,t,s)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}yt.prototype.__dataHost,yt.prototype.__templatizeOptions,yt.prototype._methodHost,yt.prototype.__templatizeOwner,yt.prototype.__hostProps;const gt=ht(yt);function bt(e){let t=e.__dataHost;return t&&t._methodHost||t}function Ct(e,t,s){let i=s.mutableData?gt:yt;St.mixin&&(i=St.mixin(i));let n=class extends i{};return n.prototype.__templatizeOptions=s,n.prototype._bindTemplate(e),function(e,t,s,i){let n=s.hostProps||{};for(let t in i.instanceProps){delete n[t];let s=i.notifyInstanceProp;s&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:wt(t,s)})}if(i.forwardHostProp&&t.__dataHost)for(let t in n)s.hasHostProps||(s.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,s){e.__dataHost._setPendingPropertyOrPath("_host_"+t,s[t],!0,!0)}})}(n,e,t,s),n}function vt(e,t,s,i){let n=s.forwardHostProp;if(n&&t.hasHostProps){const r="template"==e.localName;let o=t.templatizeTemplateClass;if(!o){if(r){let e=s.mutableData?pt:_t;class i extends e{}o=t.templatizeTemplateClass=i}else{const s=e.constructor;class i extends s{}o=t.templatizeTemplateClass=i}let l=t.hostProps;for(let e in l)o.prototype._addPropertyEffect("_host_"+e,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:xt(e,n)}),o.prototype._createNotifyingProperty("_host_"+e);M&&i&&function(e,t,s){const i=s.constructor._properties,{propertyEffects:n}=e,{instanceProps:r}=t;for(let e in n)if(!(i[e]||r&&r[e])){const t=n[e];for(let s=0;s<t.length;s++){const{part:i}=t[s].info;if(!i.signature||!i.signature.static){console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(t,s,i)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),r)!function(e,t){dt=e,Object.setPrototypeOf(e,t.prototype),new t,dt=null}(e,o),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,o.prototype);const s=t.hostProps;for(let t in s)if(t="_host_"+t,t in e){const s=e[t];delete e[t],e.__data[t]=s}}}}function xt(e,t){return function(e,s,i){t.call(e.__templatizeOwner,s.substring("_host_".length),i[s])}}function wt(e,t){return function(e,s,i){t.call(e.__templatizeOwner,e,s,i[s])}}function St(e,t,s){if(T&&!bt(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(s=s||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let i=(t?t.constructor:yt)._parseTemplate(e),n=i.templatizeInstanceClass;n||(n=Ct(e,i,s),i.templatizeInstanceClass=n);const r=bt(e);vt(e,i,s,r);let o=class extends n{};return o.prototype._methodHost=r,o.prototype.__dataHost=e,o.prototype.__templatizeOwner=t,o.prototype.__hostProps=i.hostProps,o=o,o}function Pt(e,t){let s;for(;t;)if(s=t.__dataHost?t:t.__templatizeInstance){if(s.__dataHost==e)return s;t=s.__dataHost}else t=_(t).parentNode;return null}
174
+ let Ct=null;function vt(){return Ct}vt.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:vt,writable:!0}});const xt=w(vt),wt=gt(xt);const St=w(class{});function Pt(e,t){for(let s=0;s<t.length;s++){let i=t[s];if(Boolean(e)!=Boolean(i.__hideTemplateChildren__))if(i.nodeType===Node.TEXT_NODE)e?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if("slot"===i.localName)if(e)i.__polymerReplaced__=document.createComment("hidden-slot"),_(_(i).parentNode).replaceChild(i.__polymerReplaced__,i);else{const e=i.__polymerReplaced__;e&&_(_(e).parentNode).replaceChild(i,e)}else i.style&&(e?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=e,i._showHideChildren&&i._showHideChildren(e)}}class Et extends St{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let e=this.root.firstChild;e;e=e.nextSibling)t.push(e),e.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let s=this.__templatizeOptions;(e&&s.instanceProps||!s.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let e in this.__hostProps)this._setPendingProperty(e,this.__dataHost["_host_"+e]);for(let t in e)this._setPendingProperty(t,e[t])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,s){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,(e=>{e.model=this,s(e)}));else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(e,t,s)}}_showHideChildren(e){Pt(e,this.children)}_setUnmanagedPropertyToNode(e,t,s){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=s:super._setUnmanagedPropertyToNode(e,t,s)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}Et.prototype.__dataHost,Et.prototype.__templatizeOptions,Et.prototype._methodHost,Et.prototype.__templatizeOwner,Et.prototype.__hostProps;const It=gt(Et);function Ot(e){let t=e.__dataHost;return t&&t._methodHost||t}function At(e,t,s){let i=s.mutableData?It:Et;Mt.mixin&&(i=Mt.mixin(i));let n=class extends i{};return n.prototype.__templatizeOptions=s,n.prototype._bindTemplate(e),function(e,t,s,i){let n=s.hostProps||{};for(let t in i.instanceProps){delete n[t];let s=i.notifyInstanceProp;s&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Tt(t,s)})}if(i.forwardHostProp&&t.__dataHost)for(let t in n)s.hasHostProps||(s.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,s){e.__dataHost._setPendingPropertyOrPath("_host_"+t,s[t],!0,!0)}})}(n,e,t,s),n}function kt(e,t,s,i){let n=s.forwardHostProp;if(n&&t.hasHostProps){const r="template"==e.localName;let o=t.templatizeTemplateClass;if(!o){if(r){let e=s.mutableData?wt:xt;class i extends e{}o=t.templatizeTemplateClass=i}else{const s=e.constructor;class i extends s{}o=t.templatizeTemplateClass=i}let l=t.hostProps;for(let e in l)o.prototype._addPropertyEffect("_host_"+e,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Nt(e,n)}),o.prototype._createNotifyingProperty("_host_"+e);M&&i&&function(e,t,s){const i=s.constructor._properties,{propertyEffects:n}=e,{instanceProps:r}=t;for(let e in n)if(!(i[e]||r&&r[e])){const t=n[e];for(let s=0;s<t.length;s++){const{part:i}=t[s].info;if(!i.signature||!i.signature.static){console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(t,s,i)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),r)!function(e,t){Ct=e,Object.setPrototypeOf(e,t.prototype),new t,Ct=null}(e,o),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,o.prototype);const s=t.hostProps;for(let t in s)if(t="_host_"+t,t in e){const s=e[t];delete e[t],e.__data[t]=s}}}}function Nt(e,t){return function(e,s,i){t.call(e.__templatizeOwner,s.substring(6),i[s])}}function Tt(e,t){return function(e,s,i){t.call(e.__templatizeOwner,e,s,i[s])}}function Mt(e,t,s){if(T&&!Ot(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(s=s||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let i=(t?t.constructor:Et)._parseTemplate(e),n=i.templatizeInstanceClass;n||(n=At(e,i,s),i.templatizeInstanceClass=n);const r=Ot(e);kt(e,i,s,r);let o=class extends n{};return o.prototype._methodHost=r,o.prototype.__dataHost=e,o.prototype.__templatizeOwner=t,o.prototype.__hostProps=i.hostProps,o}function Dt(e,t){let s;for(;t;)if(s=t.__dataHost?t:t.__templatizeInstance){if(s.__dataHost==e)return s;t=s.__dataHost}else t=_(t).parentNode;return null}
175
175
  /**
176
176
  @license
177
177
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -180,7 +180,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
180
180
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
181
181
  Code distributed by Google as part of the polymer project is also
182
182
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
183
- */let Et=!1;function It(){if(N&&!D){if(!Et){Et=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}
183
+ */let Rt=!1;function Ft(){if(N&&!D){if(!Rt){Rt=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}
184
184
  /**
185
185
  @license
186
186
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -189,7 +189,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
189
189
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
190
190
  Code distributed by Google as part of the polymer project is also
191
191
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
192
- */const Ot=m(ct(w(HTMLElement)));customElements.define("dom-bind",class extends Ot{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),T)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,s,i){this.mutableData=!0}connectedCallback(){It()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){_(_(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}render(){let e;if(!this.__children){if(e=e||this.querySelector("template"),!e){let t=new MutationObserver((()=>{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a <template> child");t.disconnect(),this.render()}));return void t.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(let e=this.root.firstChild;e;e=e.nextSibling)this.__children[this.__children.length]=e;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});
192
+ */const Lt=m(bt(w(HTMLElement)));customElements.define("dom-bind",class extends Lt{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),T)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,s,i){this.mutableData=!0}connectedCallback(){Ft()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){_(_(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}render(){let e;if(!this.__children){if(e=e||this.querySelector("template"),!e){let t=new MutationObserver((()=>{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a <template> child");t.disconnect(),this.render()}));return void t.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(let e=this.root.firstChild;e;e=e.nextSibling)this.__children[this.__children.length]=e;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});
193
193
  /**
194
194
  @license
195
195
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -199,7 +199,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
199
199
  Code distributed by Google as part of the polymer project is also
200
200
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
201
201
  */
202
- const At=ct(S);class kt extends At{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!R,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e)}connectedCallback(){if(super.connectedCallback(),It()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=_(_(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e)}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let e=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");e.disconnect(),this.__render()}));return e.observe(this,{childList:!0}),!1}let s={};s[this.as]=!0,s[this.indexAs]=!0,s[this.itemsIndexAs]=!0,this.__ctor=St(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:s,forwardHostProp:function(e,t){let s=this.__instances;for(let i,n=0;n<s.length&&(i=s[n]);n++)i.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,s){if(P(this.as,t)){let i=e[this.itemsIndexAs];t==this.as&&(this.items[i]=s);let n=E(this.as,`${JSCompiler_renameProperty("items",this)}.${i}`,t);this.notifyPath(n,s)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if("string"==typeof e){let t=e,s=this.__getMethodHost();return function(){return s[t].apply(s,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths){let t=this.__observePaths;for(let s=0;s<t.length;s++)0===e.indexOf(t[s])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||("items"===e.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=C.debounce(this.__renderDebouncer,t>0?v.after(t):p,e.bind(this)),I(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),L()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),s=this.__calculateLimit(t.length);this.__updateInstances(e,s,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>this.__continueChunking()))),this._setRenderedItemCount(this.__instances.length),R&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let s=0;s<e.length;s++)t[s]=s;return this.__filterFn&&(t=t.filter(((t,s,i)=>this.__filterFn(e[t],s,i)))),this.__sortFn&&t.sort(((t,s)=>this.__sortFn(e[t],e[s]))),t}__calculateLimit(e){let t=e;const s=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),i=Math.max(t-s,0),this.__chunkCount=i||1):(i=Math.min(Math.max(e-s,0),this.__chunkCount),t=Math.min(s+i,e)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,s){const i=this.__itemsIdxToInstIdx={};let n;for(n=0;n<t;n++){let t=this.__instances[n],r=s[n],o=e[r];i[r]=n,t?(t._setPendingProperty(this.as,o),t._setPendingProperty(this.indexAs,n),t._setPendingProperty(this.itemsIndexAs,r),t._flushProperties()):this.__insertInstance(o,n,r)}for(let e=this.__instances.length-1;e>=n;e--)this.__detachAndRemoveInstance(e)}__detachInstance(e){let t=this.__instances[e];const s=_(t.root);for(let e=0;e<t.children.length;e++){let i=t.children[e];s.appendChild(i)}return t}__attachInstance(e,t){let s=this.__instances[e];t.insertBefore(s.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,s){let i={};return i[this.as]=e,i[this.indexAs]=t,i[this.itemsIndexAs]=s,new this.__ctor(i)}__insertInstance(e,t,s){const i=this.__stampInstance(e,t,s);let n=this.__instances[t+1],r=n?n.children[0]:this;return _(_(this).parentNode).insertBefore(i.root,r),this.__instances[t]=i,i}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let s=e.slice(6),i=s.indexOf("."),n=i<0?s:s.substring(0,i);if(n==parseInt(n,10)){let e=i<0?"":s.substring(i+1);this.__handleObservedPaths(e);let r=this.__itemsIdxToInstIdx[n],o=this.__instances[r];if(o){let s=this.as+(e?"."+e:"");o._setPendingPropertyOrPath(s,t,!1,!0),o._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return Pt(this.template,e)}}customElements.define(kt.is,kt);
202
+ const Ht=bt(S);class jt extends Ht{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!R,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),Ft()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=_(_(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let e=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");e.disconnect(),this.__render()}));return e.observe(this,{childList:!0}),!1}let s={};s[this.as]=!0,s[this.indexAs]=!0,s[this.itemsIndexAs]=!0,this.__ctor=Mt(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:s,forwardHostProp:function(e,t){let s=this.__instances;for(let i,n=0;n<s.length&&(i=s[n]);n++)i.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,s){if(P(this.as,t)){let i=e[this.itemsIndexAs];t==this.as&&(this.items[i]=s);let n=E(this.as,`${JSCompiler_renameProperty("items",this)}.${i}`,t);this.notifyPath(n,s)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if("string"==typeof e){let t=e,s=this.__getMethodHost();return function(){return s[t].apply(s,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths){let t=this.__observePaths;for(let s=0;s<t.length;s++)0===e.indexOf(t[s])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||("items"===e.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=C.debounce(this.__renderDebouncer,t>0?v.after(t):p,e.bind(this)),I(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),L()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),s=this.__calculateLimit(t.length);this.__updateInstances(e,s,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),R&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let s=0;s<e.length;s++)t[s]=s;return this.__filterFn&&(t=t.filter(((t,s,i)=>this.__filterFn(e[t],s,i)))),this.__sortFn&&t.sort(((t,s)=>this.__sortFn(e[t],e[s]))),t}__calculateLimit(e){let t=e;const s=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),i=Math.max(t-s,0),this.__chunkCount=i||1):(i=Math.min(Math.max(e-s,0),this.__chunkCount),t=Math.min(s+i,e)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,s){const i=this.__itemsIdxToInstIdx={};let n;for(n=0;n<t;n++){let t=this.__instances[n],r=s[n],o=e[r];i[r]=n,t?(t._setPendingProperty(this.as,o),t._setPendingProperty(this.indexAs,n),t._setPendingProperty(this.itemsIndexAs,r),t._flushProperties()):this.__insertInstance(o,n,r)}for(let e=this.__instances.length-1;e>=n;e--)this.__detachAndRemoveInstance(e)}__detachInstance(e){let t=this.__instances[e];const s=_(t.root);for(let e=0;e<t.children.length;e++){let i=t.children[e];s.appendChild(i)}return t}__attachInstance(e,t){let s=this.__instances[e];t.insertBefore(s.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,s){let i={};return i[this.as]=e,i[this.indexAs]=t,i[this.itemsIndexAs]=s,new this.__ctor(i)}__insertInstance(e,t,s){const i=this.__stampInstance(e,t,s);let n=this.__instances[t+1],r=n?n.children[0]:this;return _(_(this).parentNode).insertBefore(i.root,r),this.__instances[t]=i,i}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let s=e.slice(6),i=s.indexOf("."),n=i<0?s:s.substring(0,i);if(n==parseInt(n,10)){let e=i<0?"":s.substring(i+1);this.__handleObservedPaths(e);let r=this.__itemsIdxToInstIdx[n],o=this.__instances[r];if(o){let s=this.as+(e?"."+e:"");o._setPendingPropertyOrPath(s,t,!1,!0),o._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return Dt(this.template,e)}}customElements.define(jt.is,jt);
203
203
  /**
204
204
  @license
205
205
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -209,7 +209,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
209
209
  Code distributed by Google as part of the polymer project is also
210
210
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
211
211
  */
212
- class Nt extends S{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=C.debounce(this.__renderDebouncer,p,(()=>this.__render())),I(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const e=_(this).parentNode;e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||_(e).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),It()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const e=this;let t=e._templateInfo?e:_(e).querySelector("template");if(!t){let e=new MutationObserver((()=>{if(!_(this).querySelector("template"))throw new Error("dom-if requires a <template> child");e.disconnect(),this.__render()}));return e.observe(this,{childList:!0}),!1}this.__template=t}return!0}__ensureInstance(){let e=_(this).parentNode;if(this.__hasInstance()){let t=this.__getInstanceNodes();if(t&&t.length){if(_(this).previousSibling!==t[t.length-1])for(let s,i=0;i<t.length&&(s=t[i]);i++)_(e).insertBefore(s,this)}}else{if(!e)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(e)}return!0}render(){L()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),R&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(e){}__teardownInstance(){}_showHideChildren(){}}const Tt=F?class extends Nt{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(e){const t=this.__dataHost||this;if(T&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const s=t._bindTemplate(this.__template,!0);s.runEffects=(e,t,s)=>{let i=this.__syncInfo;if(this.if)i&&(this.__syncInfo=null,this._showHideChildren(),t=Object.assign(i.changedProps,t)),e(t,s);else if(this.__instance)if(i||(i=this.__syncInfo={runEffects:e,changedProps:{}}),s)for(const e in t){const t=O(e);i.changedProps[t]=this.__dataHost[t]}else Object.assign(i.changedProps,t)},this.__instance=t._stampTemplate(this.__template,s),_(e).insertBefore(this.__instance,this)}__syncHostProperties(){const e=this.__syncInfo;e&&(this.__syncInfo=null,e.runEffects(e.changedProps,!1))}__teardownInstance(){const e=this.__dataHost||this;this.__instance&&(e._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,mt(e,this.__instance.templateInfo.childNodes)),e||this.__syncHostProperties()}}:class extends Nt{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(e){this.__ctor||(this.__ctor=St(this.__template,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[O(e)]=!0))}})),this.__instance=new this.__ctor,_(e).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let e=this.__instance.children;if(e&&e.length){let t=_(e[0]).parentNode;if(t){t=_(t);for(let s,i=0;i<e.length&&(s=e[i]);i++)t.removeChild(s)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let e=this.__invalidProps;if(e){this.__invalidProps=null;for(let t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__instance._flushProperties()}}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,this.__instance._showHideChildren(e)),e||this.__syncHostProperties()}};customElements.define(Tt.is,Tt);
212
+ class zt extends S{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=C.debounce(this.__renderDebouncer,p,(()=>this.__render())),I(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const e=_(this).parentNode;e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||_(e).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Ft()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const e=this;let t=e._templateInfo?e:_(e).querySelector("template");if(!t){let e=new MutationObserver((()=>{if(!_(this).querySelector("template"))throw new Error("dom-if requires a <template> child");e.disconnect(),this.__render()}));return e.observe(this,{childList:!0}),!1}this.__template=t}return!0}__ensureInstance(){let e=_(this).parentNode;if(this.__hasInstance()){let t=this.__getInstanceNodes();if(t&&t.length){if(_(this).previousSibling!==t[t.length-1])for(let s,i=0;i<t.length&&(s=t[i]);i++)_(e).insertBefore(s,this)}}else{if(!e)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(e)}return!0}render(){L()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),R&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(e){}__teardownInstance(){}_showHideChildren(){}}const Bt=F?class extends zt{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(e){const t=this.__dataHost||this;if(T&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const s=t._bindTemplate(this.__template,!0);s.runEffects=(e,t,s)=>{let i=this.__syncInfo;if(this.if)i&&(this.__syncInfo=null,this._showHideChildren(),t=Object.assign(i.changedProps,t)),e(t,s);else if(this.__instance)if(i||(i=this.__syncInfo={runEffects:e,changedProps:{}}),s)for(const e in t){const t=O(e);i.changedProps[t]=this.__dataHost[t]}else Object.assign(i.changedProps,t)},this.__instance=t._stampTemplate(this.__template,s),_(e).insertBefore(this.__instance,this)}__syncHostProperties(){const e=this.__syncInfo;e&&(this.__syncInfo=null,e.runEffects(e.changedProps,!1))}__teardownInstance(){const e=this.__dataHost||this;this.__instance&&(e._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,Pt(e,this.__instance.templateInfo.childNodes)),e||this.__syncHostProperties()}}:class extends zt{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(e){this.__ctor||(this.__ctor=Mt(this.__template,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[O(e)]=!0))}})),this.__instance=new this.__ctor,_(e).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let e=this.__instance.children;if(e&&e.length){let t=_(e[0]).parentNode;if(t){t=_(t);for(let s,i=0;i<e.length&&(s=e[i]);i++)t.removeChild(s)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let e=this.__invalidProps;if(e){this.__invalidProps=null;for(let t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__instance._flushProperties()}}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,this.__instance._showHideChildren(e)),e||this.__syncHostProperties()}};customElements.define(Bt.is,Bt);
213
213
  /**
214
214
  @license
215
215
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -219,7 +219,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
219
219
  Code distributed by Google as part of the polymer project is also
220
220
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
221
221
  */
222
- let Mt,Dt=d((e=>{let t=f(e);return class extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(e,t){let s=t.path;if(s==JSCompiler_renameProperty("items",this)){let s=t.base||[],i=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),i){let e=Me(s,i);this.__applySplices(e)}this.__lastItems=s,this.__lastMulti=e}else if(t.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(t.value.indexSplices);else{let e=s.slice(`${JSCompiler_renameProperty("items",this)}.`.length),t=parseInt(e,10);e.indexOf(".")<0&&e==t&&this.__deselectChangedIdx(t)}}__applySplices(e){let t=this.__selectedMap;for(let s=0;s<e.length;s++){let i=e[s];t.forEach(((e,s)=>{e<i.index||(e>=i.index+i.removed.length?t.set(s,e+i.addedCount-i.removed.length):t.set(s,-1))}));for(let e=0;e<i.addedCount;e++){let s=i.index+e;t.has(this.items[s])&&t.set(this.items[s],s)}}this.__updateLinks();let s=0;t.forEach(((e,i)=>{e<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),s,1):this.selected=this.selectedItem=null,t.delete(i)):s++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let e=0;this.__selectedMap.forEach((t=>{t>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${t}`,`${JSCompiler_renameProperty("selected",this)}.${e++}`)}))}else this.__selectedMap.forEach((e=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${e}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${e}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(e){return this.__selectedMap.has(e)}isIndexSelected(e){return this.isSelected(this.items[e])}__deselectChangedIdx(e){let t=this.__selectedIndexForItemIndex(e);if(t>=0){let e=0;this.__selectedMap.forEach(((s,i)=>{t==e++&&this.deselect(i)}))}}__selectedIndexForItemIndex(e){let t=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${e}`];if(t)return parseInt(t.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(e){let t=this.__selectedMap.get(e);if(t>=0){let s;this.__selectedMap.delete(e),this.multi&&(s=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),s,1):this.selected=this.selectedItem=null}}deselectIndex(e){this.deselect(this.items[e])}select(e){this.selectIndex(this.items.indexOf(e))}selectIndex(e){let t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),t):this.selected=this.selectedItem=t)}}}))(S);class Rt extends Dt{static get is(){return"array-selector"}static get template(){return null}}customElements.define(Rt.is,Rt),Mt=ht._mutablePropertyChange;const Ft={properties:{mutableData:Boolean},_shouldPropertyChange(e,t,s){return Mt(this,e,t,s,this.mutableData)}},Lt=We(HTMLElement).prototype,Ht=A`
222
+ let $t,Ut=d((e=>{let t=f(e);return class extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(e,t){let s=t.path;if(s==JSCompiler_renameProperty("items",this)){let s=t.base||[],i=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),i){let e=ze(s,i);this.__applySplices(e)}this.__lastItems=s,this.__lastMulti=e}else if(t.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(t.value.indexSplices);else{let e=s.slice(`${JSCompiler_renameProperty("items",this)}.`.length),t=parseInt(e,10);e.indexOf(".")<0&&e==t&&this.__deselectChangedIdx(t)}}__applySplices(e){let t=this.__selectedMap;for(let s=0;s<e.length;s++){let i=e[s];t.forEach(((e,s)=>{e<i.index||(e>=i.index+i.removed.length?t.set(s,e+i.addedCount-i.removed.length):t.set(s,-1))}));for(let e=0;e<i.addedCount;e++){let s=i.index+e;t.has(this.items[s])&&t.set(this.items[s],s)}}this.__updateLinks();let s=0;t.forEach(((e,i)=>{e<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),s,1):this.selected=this.selectedItem=null,t.delete(i)):s++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let e=0;this.__selectedMap.forEach((t=>{t>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${t}`,`${JSCompiler_renameProperty("selected",this)}.${e++}`)}))}else this.__selectedMap.forEach((e=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${e}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${e}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(e){return this.__selectedMap.has(e)}isIndexSelected(e){return this.isSelected(this.items[e])}__deselectChangedIdx(e){let t=this.__selectedIndexForItemIndex(e);if(t>=0){let e=0;this.__selectedMap.forEach(((s,i)=>{t==e++&&this.deselect(i)}))}}__selectedIndexForItemIndex(e){let t=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${e}`];if(t)return parseInt(t.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(e){let t=this.__selectedMap.get(e);if(t>=0){let s;this.__selectedMap.delete(e),this.multi&&(s=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),s,1):this.selected=this.selectedItem=null}}deselectIndex(e){this.deselect(this.items[e])}select(e){this.selectIndex(this.items.indexOf(e))}selectIndex(e){let t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),t):this.selected=this.selectedItem=t)}}}))(S);class qt extends Ut{static get is(){return"array-selector"}static get template(){return null}}customElements.define(qt.is,qt),$t=gt._mutablePropertyChange;const Jt={properties:{mutableData:Boolean},_shouldPropertyChange(e,t,s){return $t(this,e,t,s,this.mutableData)}},Vt=ot(HTMLElement).prototype,Yt=A`
223
223
  <custom-style>
224
224
  <style is="custom-style">
225
225
  [hidden] {
@@ -580,7 +580,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
580
580
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
581
581
  Code distributed by Google as part of the polymer project is also
582
582
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
583
- */Ht.setAttribute("style","display: none;"),document.head.appendChild(Ht.content);var jt=document.createElement("style");jt.textContent="[hidden] { display: none !important; }",document.head.appendChild(jt);
583
+ */Yt.setAttribute("style","display: none;"),document.head.appendChild(Yt.content);var Kt=document.createElement("style");Kt.textContent="[hidden] { display: none !important; }",document.head.appendChild(Kt);
584
584
  /**
585
585
  @license
586
586
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -591,7 +591,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
591
591
  part of the polymer project is also subject to an additional IP rights grant
592
592
  found at http://polymer.github.io/PATENTS.txt
593
593
  */
594
- class zt{constructor(e){zt[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}get value(){var e=this.type,t=this.key;if(e&&t)return zt.types[e]&&zt.types[e][t]}set value(e){var t=this.type,s=this.key;t&&s&&(t=zt.types[t]=zt.types[t]||{},null==e?delete t[s]:t[s]=e)}get list(){if(this.type){var e=zt.types[this.type];return e?Object.keys(e).map((function(e){return Bt[this.type][e]}),this):[]}}byKey(e){return this.key=e,this.value}}zt[" "]=function(){},zt.types={};var Bt=zt.types;lt({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,s){var i=new zt({type:e,key:t});return void 0!==s&&s!==i.value?i.value=s:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new zt({type:this.type,key:e}).value}}),
594
+ class Gt{constructor(e){Gt[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}get value(){var e=this.type,t=this.key;if(e&&t)return Gt.types[e]&&Gt.types[e][t]}set value(e){var t=this.type,s=this.key;t&&s&&(t=Gt.types[t]=Gt.types[t]||{},null==e?delete t[s]:t[s]=e)}get list(){if(this.type){var e=Gt.types[this.type];return e?Object.keys(e).map((function(e){return Xt[this.type][e]}),this):[]}}byKey(e){return this.key=e,this.value}}Gt[" "]=function(){},Gt.types={};var Xt=Gt.types;mt({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,s){var i=new Gt({type:e,key:t});return void 0!==s&&s!==i.value?i.value=s:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new Gt({type:this.type,key:e}).value}}),
595
595
  /**
596
596
  @license
597
597
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -602,7 +602,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
602
602
  part of the polymer project is also subject to an additional IP rights grant
603
603
  found at http://polymer.github.io/PATENTS.txt
604
604
  */
605
- lt({_template:A`
605
+ mt({_template:A`
606
606
  <style>
607
607
  :host {
608
608
  @apply --layout-inline;
@@ -623,7 +623,7 @@ lt({_template:A`
623
623
  display: none;
624
624
  }
625
625
  </style>
626
- `,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Lt.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&qe(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,qe(this.root).appendChild(this._img))}}),
626
+ `,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Vt.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&We(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,We(this.root).appendChild(this._img))}}),
627
627
  /**
628
628
  @license
629
629
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -634,4 +634,4 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
634
634
  part of the polymer project is also subject to an additional IP rights grant
635
635
  found at http://polymer.github.io/PATENTS.txt
636
636
  */
637
- lt({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new zt({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var s=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(s){var i=qe(e.root||e);return i.insertBefore(s,i.childNodes[0]),e._svgIcon=s}return null},removeIcon:function(e){e._svgIcon&&(qe(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return qe(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,s){if(e){var i=e.cloneNode(!0),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+t+" "+t,o="pointer-events: none; display: block; width: 100%; height: 100%;";return s&&i.hasAttribute("mirror-in-rtl")&&(o+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),n.setAttribute("viewBox",r),n.setAttribute("preserveAspectRatio","xMidYMid meet"),n.setAttribute("focusable","false"),n.style.cssText=o,n.appendChild(i).removeAttribute("id"),n}return null}});export{Ge as D,Fe as F,Ft as O,lt as P,tt as a,qe as d,L as f,Pt as m,St as t};
637
+ mt({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new Gt({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var s=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(s){var i=We(e.root||e);return i.insertBefore(s,i.childNodes[0]),e._svgIcon=s}return null},removeIcon:function(e){e._svgIcon&&(We(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return We(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,s){if(e){var i=e.cloneNode(!0),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+t+" "+t,o="pointer-events: none; display: block; width: 100%; height: 100%;";return s&&i.hasAttribute("mirror-in-rtl")&&(o+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),n.setAttribute("viewBox",r),n.setAttribute("preserveAspectRatio","xMidYMid meet"),n.setAttribute("focusable","false"),n.style.cssText=o,n.appendChild(i).removeAttribute("id"),n}return null}});export{it as D,Ue as F,Jt as O,mt as P,ct as a,We as d,L as f,Dt as m,Mt as t};
@@ -0,0 +1 @@
1
+ import{c as e,am as t,_ as r}from"./shared-0dabe195.js";import{h as n,L as s}from"./shared-7f33a83a.js";import{A as o}from"./shared-7e887e5b.js";import"./shared-e640e9fa.js";import{C as i}from"./shared-1fd59009.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-763a6797.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var r=function(e){var t=e.path,r=e.domain,n=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==r?"":";domain="+r,null==n?"":";expires="+n.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,n){return[encodeURIComponent(e),"=",encodeURIComponent(t),r(n)].join("")}})),c=e((function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},n=new RegExp("\\s*;\\s*");return e.split(n).forEach((function(e){var n=r(e.split("="),2),s=n[0],o=n[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),f=e((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),r=Object.keys(t).sort();return e<r.length?r[e]:null}},{key:"removeItem",value:function(e,t){var r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),n=l.formatCookie(e,"",r);this._setCookie(n)}},{key:"setItem",value:function(e,t,r){var n=Object.assign(Object.assign({},this._defaultOptions),r),s=l.formatCookie(e,t,n);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&r(t.prototype,n),o&&r(t,o),e}();t.CookieStorage=n;var s={defineProperty:function(e,t,r){return e.setItem(t.toString(),String(r.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,r){if("string"==typeof t&&t in e)return e[t];var n=e.getItem(t.toString());return null!==n?n:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],r=0;r<e.length;r++){var n=e.key(r);null!==n&&t.push(n)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,r,n){return e.setItem(t.toString(),String(r)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return f.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class h extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),r=super.getItem("fx.customer.start"),n=super.getItem("fx.customer.jwt");if(null===e||null===t||null===r||null===n)return null;const s={session_token:e,date_created:r,expires_in:parseInt(t),jwt:n},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,r){if(e!==o.SESSION)return super.setItem(e,t,r);{const e=JSON.parse(t),r=1e3*e.expires_in,n=new Date(new Date(e.date_created).getTime()+r);super.setItem("fx.customer",e.session_token,{expires:n}),super.setItem("fx.customer.jwt",e.jwt,{expires:n}),super.setItem("fx.customer.start",e.date_created,{expires:n}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:n}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:n})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new h;let m,g=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const r=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:n=>{"foxy://customer-api/session"===r.request.url&&e.requestUpdate(),401===n.status&&e.requestUpdate(),t.respondWith(Promise.resolve(n))}});e.dispatchEvent(r)&&r.respondWith(e.__handleRequest(r.request))}}static get properties(){return r(r({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return n(m||(m=g` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let n,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),n=200,s=r({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;n=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:n})}async __handleVirtualAuthSessionGet(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},type:"password",credential:{email:"",password:""}}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverGet(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},email:""}))}async __handleRequest(e){const t=e.url,r=e.method;try{if("foxy://customer-api/session"===t){if("DELETE"===r)return this.__handleVirtualAuthSessionDelete();if("POST"===r)return this.__handleVirtualAuthSessionPost(e);if("GET"===r)return this.__handleVirtualAuthSessionGet(e)}if("foxy://customer-api/recover"===t){if("POST"===r)return this.__handleVirtualAuthRecoverPost(e);if("GET"===r)return this.__handleVirtualAuthRecoverGet(e)}const n=await this.api.fetch(e);return 401===n.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),n}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{};export{_ as C};