@zanichelli/zanichelli-it-frontend-kit 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/types/components/menubar/menu/menu.d.ts +2 -2
  2. package/dist/types/components/menubar/menubar.d.ts +4 -1
  3. package/dist/types/components/menubar/mobile-menubar/mobile-menubar.d.ts +4 -3
  4. package/dist/types/components.d.ts +8 -8
  5. package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js +4170 -0
  6. package/dist/zanichelli-it-frontend-kit/index-BQ_orCyU.js.map +1 -0
  7. package/dist/zanichelli-it-frontend-kit/index.esm.js +10 -0
  8. package/dist/zanichelli-it-frontend-kit/index.esm.js.map +1 -1
  9. package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js +46 -0
  10. package/dist/zanichelli-it-frontend-kit/menu-Cd2leC2L.js.map +1 -0
  11. package/dist/{collection/utils/utils.js → zanichelli-it-frontend-kit/utils-CaxAWyZI.js} +7 -3
  12. package/dist/zanichelli-it-frontend-kit/utils-CaxAWyZI.js.map +1 -0
  13. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.css +993 -1
  14. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js +49 -1
  15. package/dist/zanichelli-it-frontend-kit/zanichelli-it-frontend-kit.esm.js.map +1 -1
  16. package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.esm.js.map +1 -0
  17. package/dist/{components/zanit-menubar.js → zanichelli-it-frontend-kit/zanit-menubar.entry.js} +36 -60
  18. package/dist/zanichelli-it-frontend-kit/zanit-menubar.entry.js.map +1 -0
  19. package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.esm.js.map +1 -0
  20. package/dist/{components/p-CWNmI_TK.js → zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js} +31 -96
  21. package/dist/zanichelli-it-frontend-kit/zanit-mobile-menubar.entry.js.map +1 -0
  22. package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.esm.js.map +1 -0
  23. package/dist/{components/p-Cphl7FvH.js → zanichelli-it-frontend-kit/zanit-search-form.entry.js} +13 -53
  24. package/dist/zanichelli-it-frontend-kit/zanit-search-form.entry.js.map +1 -0
  25. package/package.json +1 -1
  26. package/www/build/index-BQ_orCyU.js +4170 -0
  27. package/www/build/index-BQ_orCyU.js.map +1 -0
  28. package/www/build/index.esm.js +10 -0
  29. package/www/build/index.esm.js.map +1 -1
  30. package/www/build/menu-Cd2leC2L.js +46 -0
  31. package/www/build/menu-Cd2leC2L.js.map +1 -0
  32. package/www/build/utils-CaxAWyZI.js +21 -0
  33. package/www/build/utils-CaxAWyZI.js.map +1 -0
  34. package/www/build/zanichelli-it-frontend-kit.css +993 -1
  35. package/www/build/zanichelli-it-frontend-kit.esm.js +49 -1
  36. package/www/build/zanichelli-it-frontend-kit.esm.js.map +1 -1
  37. package/www/build/zanit-menubar.entry.esm.js.map +1 -0
  38. package/{dist/collection/components/menubar/menubar.js → www/build/zanit-menubar.entry.js} +46 -177
  39. package/www/build/zanit-menubar.entry.js.map +1 -0
  40. package/www/build/zanit-mobile-menubar.entry.esm.js.map +1 -0
  41. package/www/build/zanit-mobile-menubar.entry.js +159 -0
  42. package/www/build/zanit-mobile-menubar.entry.js.map +1 -0
  43. package/www/build/zanit-search-form.entry.esm.js.map +1 -0
  44. package/{dist/collection/components/menubar/search-form/search-form.js → www/build/zanit-search-form.entry.js} +23 -101
  45. package/www/build/zanit-search-form.entry.js.map +1 -0
  46. package/www/index.html +185 -37
  47. package/dist/cjs/index-C45Wd3rZ.js +0 -1535
  48. package/dist/cjs/index-C45Wd3rZ.js.map +0 -1
  49. package/dist/cjs/index.cjs.js +0 -5
  50. package/dist/cjs/index.cjs.js.map +0 -1
  51. package/dist/cjs/loader.cjs.js +0 -15
  52. package/dist/cjs/loader.cjs.js.map +0 -1
  53. package/dist/cjs/zanichelli-it-frontend-kit.cjs.js +0 -27
  54. package/dist/cjs/zanichelli-it-frontend-kit.cjs.js.map +0 -1
  55. package/dist/cjs/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.cjs.js.map +0 -1
  56. package/dist/cjs/zanit-menubar_3.cjs.entry.js +0 -648
  57. package/dist/cjs/zanit-menubar_3.cjs.entry.js.map +0 -1
  58. package/dist/collection/collection-manifest.json +0 -14
  59. package/dist/collection/components/menubar/menu/menu.css +0 -98
  60. package/dist/collection/components/menubar/menu/menu.js +0 -34
  61. package/dist/collection/components/menubar/menu/menu.js.map +0 -1
  62. package/dist/collection/components/menubar/menubar.css +0 -171
  63. package/dist/collection/components/menubar/menubar.js.map +0 -1
  64. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.css +0 -114
  65. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js +0 -280
  66. package/dist/collection/components/menubar/mobile-menubar/mobile-menubar.js.map +0 -1
  67. package/dist/collection/components/menubar/search-form/search-form.css +0 -147
  68. package/dist/collection/components/menubar/search-form/search-form.js.map +0 -1
  69. package/dist/collection/index.js +0 -11
  70. package/dist/collection/index.js.map +0 -1
  71. package/dist/collection/utils/types.js +0 -2
  72. package/dist/collection/utils/types.js.map +0 -1
  73. package/dist/collection/utils/utils.js.map +0 -1
  74. package/dist/components/index.js +0 -1293
  75. package/dist/components/index.js.map +0 -1
  76. package/dist/components/p-CWNmI_TK.js.map +0 -1
  77. package/dist/components/p-Cphl7FvH.js.map +0 -1
  78. package/dist/components/zanit-menubar.js.map +0 -1
  79. package/dist/components/zanit-mobile-menubar.js +0 -9
  80. package/dist/components/zanit-mobile-menubar.js.map +0 -1
  81. package/dist/components/zanit-search-form.js +0 -9
  82. package/dist/components/zanit-search-form.js.map +0 -1
  83. package/dist/esm/index-BGwuI2U_.js +0 -1507
  84. package/dist/esm/index-BGwuI2U_.js.map +0 -1
  85. package/dist/esm/index.js +0 -4
  86. package/dist/esm/index.js.map +0 -1
  87. package/dist/esm/loader.js +0 -13
  88. package/dist/esm/loader.js.map +0 -1
  89. package/dist/esm/zanichelli-it-frontend-kit.js +0 -23
  90. package/dist/esm/zanichelli-it-frontend-kit.js.map +0 -1
  91. package/dist/esm/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.js.map +0 -1
  92. package/dist/esm/zanit-menubar_3.entry.js +0 -644
  93. package/dist/esm/zanit-menubar_3.entry.js.map +0 -1
  94. package/dist/index.cjs.js +0 -1
  95. package/dist/index.js +0 -1
  96. package/dist/zanichelli-it-frontend-kit/p-BGwuI2U_.js +0 -3
  97. package/dist/zanichelli-it-frontend-kit/p-BGwuI2U_.js.map +0 -1
  98. package/dist/zanichelli-it-frontend-kit/p-b064a657.entry.js +0 -2
  99. package/dist/zanichelli-it-frontend-kit/p-b064a657.entry.js.map +0 -1
  100. package/dist/zanichelli-it-frontend-kit/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
  101. package/www/build/p-984b8fa6.css +0 -1
  102. package/www/build/p-BGwuI2U_.js +0 -3
  103. package/www/build/p-BGwuI2U_.js.map +0 -1
  104. package/www/build/p-b064a657.entry.js +0 -2
  105. package/www/build/p-b064a657.entry.js.map +0 -1
  106. package/www/build/p-ff7fd122.js +0 -2
  107. package/www/build/zanit-menubar.zanit-mobile-menubar.zanit-search-form.entry.esm.js.map +0 -1
@@ -1,1507 +0,0 @@
1
- const NAMESPACE = 'zanichelli-it-frontend-kit';
2
- const BUILD = /* zanichelli-it-frontend-kit */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
3
-
4
- const globalScripts = () => {};
5
- const globalStyles = ":root{--font-md:500}.title-1,.title-2,.title-3,.title-4,.title-5,.title-6,.title-1-rg,.title-2-rg,.title-3-rg,.title-4-rg,.title-5-rg,.title-6-rg,.title-1-lt,.title-2-lt,.title-3-lt,.title-4-lt,.title-5-lt,.title-6-lt,.title-1-sb,.title-2-sb,.title-3-sb,.title-4-sb,.title-5-sb,.title-6-sb,.title-1-bd,.title-2-bd,.title-3-bd,.title-4-bd,.title-5-bd,.title-6-bd,.title-1-md,.title-2-md,.title-3-md,.title-4-md,.title-5-md,.title-6-md{font-family:var(--font-family-serif);font-weight:var(--font-rg)}.title-1-lt,.title-2-lt,.title-3-lt,.title-4-lt,.title-5-lt,.title-6-lt,.heading-1-lt,.heading-2-lt,.heading-3-lt,.heading-4-lt,.body-1-lt,.body-2-lt,.body-3-lt,.body-4-lt,.body-5-lt,.body-6-lt,.body-7-lt,.interactive-1-lt,.interactive-2-lt{font-weight:var(--font-lt)}.title-1-md,.title-2-md,.title-3-md,.title-4-md,.title-5-md,.title-6-md,.heading-1-md,.heading-2-md,.heading-3-md,.heading-4-md,.body-1-md,.body-2-md,.body-3-md,.body-4-md,.body-5-md,.body-6-md,.body-7-md,.interactive-1-md,.interactive-2-md{font-weight:var(--font-md)}.title-1-rg,.title-2-rg,.title-3-rg,.title-4-rg,.title-5-rg,.title-6-rg,.heading-1-rg,.heading-2-rg,.heading-3-rg,.heading-4-rg,.body-1-rg,.body-2-rg,.body-3-rg,.body-4-rg,.body-5-rg,.body-6-rg,.body-7-rg,.interactive-1-rg,.interactive-2-rg{font-weight:var(--font-rg)}.title-1-sb,.title-2-sb,.title-3-sb,.title-4-sb,.title-5-sb,.title-6-sb,.heading-1-sb,.heading-2-sb,.heading-3-sb,.heading-4-sb,.body-2-sb,.body-3-sb,.body-4-sb,.body-5-sb,.body-6-sb,.body-7-sb,.interactive-1-sb,.interactive-2-sb{font-weight:var(--font-sb)}.title-1-bd,.title-2-bd,.title-3-bd,.title-4-bd,.title-5-bd,.title-6-bd,.heading-1-bd,.heading-2-bd,.heading-3-bd,.heading-4-bd,.body-1-bd,.body-2-bd,.body-3-bd,.body-4-bd,.body-5-bd,.body-6-bd,.body-7-bd,.interactive-1-bd,.interactive-2-bd{font-weight:var(--font-bd)}.font-lt{font-weight:var(--font-lt)}.font-rg{font-weight:var(--font-rg)}.font-md{font-weight:var(--font-md)}.font-sb{font-weight:var(--font-sb)}.font-bd{font-weight:var(--font-bd)}.font-it{font-style:italic}.font-serif{font-family:var(--font-family-serif)}.font-sans{font-family:var(--font-family-sans)}.title-1,.title-1-sb,.title-1-bd,.title-1-rg,.title-1-lt,.title-1-md{font-size:4.5rem;line-height:5rem;}.title-2,.title-2-sb,.title-2-bd,.title-2-rg,.title-2-lt,.title-2-md{font-size:3rem;line-height:3.25rem;}.title-3,.title-3-sb,.title-3-bd,.title-3-rg,.title-3-lt,.title-3-md{font-size:2rem;line-height:2.75rem;}.title-4,.title-4-sb,.title-4-bd,.title-4-rg,.title-4-lt,.title-4-md{font-size:1.75rem;line-height:2rem;}.title-5,.title-5-sb,.title-5-bd,.title-5-rg,.title-5-lt,.title-5-md{font-size:1.5rem;line-height:1.75rem;}.title-6,.title-6-sb,.title-6-bd,.title-6-rg,.title-6-lt,.title-6-md{font-size:1.25rem;line-height:1.75rem;}.heading-1,.heading-1-sb,.heading-1-bd,.heading-1-rg,.heading-1-lt,.heading-1-md{font-size:2rem;line-height:2.75rem;}.heading-2,.heading-2-sb,.heading-2-bd,.heading-2-rg,.heading-2-lt,.heading-2-md{font-size:1.75rem;line-height:2rem;}.heading-3,.heading-3-sb,.heading-3-bd,.heading-3-rg,.heading-3-lt,.heading-3-md{font-size:1.5rem;line-height:1.75rem;}.heading-4,.heading-4-sb,.heading-4-bd,.heading-4-rg,.heading-4-lt,.heading-4-md{font-size:1.125rem;line-height:1.375rem;}.body-1,.body-1-sb,.body-1-bd,.body-1-rg,.body-1-lt,.body-1-md{font-size:1.5rem;line-height:2rem;}.body-2,.body-2-sb,.body-2-bd,.body-2-rg,.body-2-lt,.body-2-md{font-size:1.25rem;line-height:1.75rem;}.body-3,.body-3-sb,.body-3-bd,.body-3-rg,.body-3-lt,.body-3-md{font-size:1.125rem;line-height:1.5rem;}.body-4,.body-4-sb,.body-4-bd,.body-4-rg,.body-4-lt,.body-4-md{font-size:1rem;line-height:1.5rem;}.body-5,.body-5-sb,.body-5-bd,.body-5-rg,.body-5-lt,.body-5-md{font-size:0.875rem;line-height:1.125rem;}.body-6,.body-6-sb,.body-6-bd,.body-6-rg,.body-6-lt,.body-6-md{font-size:0.75rem;line-height:1rem;}.body-7,.body-7-sb,.body-7-bd,.body-7-rg,.body-7-lt,.body-7-md{font-size:0.625rem;line-height:0.875rem;}.interactive-1,.interactive-1-sb,.interactive-1-bd,.interactive-1-rg,.interactive-1-lt,.interactive-1-md{font-size:1rem;line-height:1.5rem;}.interactive-2,.interactive-2-sb,.interactive-2-bd,.interactive-2-rg,.interactive-2-lt,.interactive-2-md{font-size:0.875rem;line-height:1.125rem;}@media (width < 768px){.mobile-title-1,.mobile-title-1-sb,.mobile-title-1-bd,.mobile-title-1-rg,.mobile-title-1-lt,.mobile-title-1-md{font-size:4.5rem;line-height:5rem;}.mobile-title-2,.mobile-title-2-sb,.mobile-title-2-bd,.mobile-title-2-rg,.mobile-title-2-lt,.mobile-title-2-md{font-size:3rem;line-height:3.25rem;}.mobile-title-3,.mobile-title-3-sb,.mobile-title-3-bd,.mobile-title-3-rg,.mobile-title-3-lt,.mobile-title-3-md{font-size:2rem;line-height:2.75rem;}.mobile-title-4,.mobile-title-4-sb,.mobile-title-4-bd,.mobile-title-4-rg,.mobile-title-4-lt,.mobile-title-4-md{font-size:1.75rem;line-height:2rem;}.mobile-title-5,.mobile-title-5-sb,.mobile-title-5-bd,.mobile-title-5-rg,.mobile-title-5-lt,.mobile-title-5-md{font-size:1.5rem;line-height:1.75rem;}.mobile-title-6,.mobile-title-6-sb,.mobile-title-6-bd,.mobile-title-6-rg,.mobile-title-6-lt,.mobile-title-6-md{font-size:1.25rem;line-height:1.75rem;}.mobile-heading-1,.mobile-heading-1-sb,.mobile-heading-1-bd,.mobile-heading-1-rg,.mobile-heading-1-lt,.mobile-heading-1-md{font-size:2rem;line-height:2.75rem;}.mobile-heading-2,.mobile-heading-2-sb,.mobile-heading-2-bd,.mobile-heading-2-rg,.mobile-heading-2-lt,.mobile-heading-2-md{font-size:1.75rem;line-height:2rem;}.mobile-heading-3,.mobile-heading-3-sb,.mobile-heading-3-bd,.mobile-heading-3-rg,.mobile-heading-3-lt,.mobile-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.mobile-heading-4,.mobile-heading-4-sb,.mobile-heading-4-bd,.mobile-heading-4-rg,.mobile-heading-4-lt,.mobile-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.mobile-body-1,.mobile-body-1-sb,.mobile-body-1-bd,.mobile-body-1-rg,.mobile-body-1-lt,.mobile-body-1-md{font-size:1.5rem;line-height:2rem;}.mobile-body-2,.mobile-body-2-sb,.mobile-body-2-bd,.mobile-body-2-rg,.mobile-body-2-lt,.mobile-body-2-md{font-size:1.25rem;line-height:1.75rem;}.mobile-body-3,.mobile-body-3-sb,.mobile-body-3-bd,.mobile-body-3-rg,.mobile-body-3-lt,.mobile-body-3-md{font-size:1.125rem;line-height:1.5rem;}.mobile-body-4,.mobile-body-4-sb,.mobile-body-4-bd,.mobile-body-4-rg,.mobile-body-4-lt,.mobile-body-4-md{font-size:1rem;line-height:1.5rem;}.mobile-body-5,.mobile-body-5-sb,.mobile-body-5-bd,.mobile-body-5-rg,.mobile-body-5-lt,.mobile-body-5-md{font-size:0.875rem;line-height:1.125rem;}.mobile-body-6,.mobile-body-6-sb,.mobile-body-6-bd,.mobile-body-6-rg,.mobile-body-6-lt,.mobile-body-6-md{font-size:0.75rem;line-height:1rem;}.mobile-body-7,.mobile-body-7-sb,.mobile-body-7-bd,.mobile-body-7-rg,.mobile-body-7-lt,.mobile-body-7-md{font-size:0.625rem;line-height:0.875rem;}.mobile-interactive-1,.mobile-interactive-1-sb,.mobile-interactive-1-bd,.mobile-interactive-1-rg,.mobile-interactive-1-lt,.mobile-interactive-1-md{font-size:1rem;line-height:1.5rem;}.mobile-interactive-2,.mobile-interactive-2-sb,.mobile-interactive-2-bd,.mobile-interactive-2-rg,.mobile-interactive-2-lt,.mobile-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}@media (width >= 768px) and (width < 1152px){.tablet-title-1,.tablet-title-1-sb,.tablet-title-1-bd,.tablet-title-1-rg,.tablet-title-1-lt,.tablet-title-1-md{font-size:4.5rem;line-height:5rem;}.tablet-title-2,.tablet-title-2-sb,.tablet-title-2-bd,.tablet-title-2-rg,.tablet-title-2-lt,.tablet-title-2-md{font-size:3rem;line-height:3.25rem;}.tablet-title-3,.tablet-title-3-sb,.tablet-title-3-bd,.tablet-title-3-rg,.tablet-title-3-lt,.tablet-title-3-md{font-size:2rem;line-height:2.75rem;}.tablet-title-4,.tablet-title-4-sb,.tablet-title-4-bd,.tablet-title-4-rg,.tablet-title-4-lt,.tablet-title-4-md{font-size:1.75rem;line-height:2rem;}.tablet-title-5,.tablet-title-5-sb,.tablet-title-5-bd,.tablet-title-5-rg,.tablet-title-5-lt,.tablet-title-5-md{font-size:1.5rem;line-height:1.75rem;}.tablet-title-6,.tablet-title-6-sb,.tablet-title-6-bd,.tablet-title-6-rg,.tablet-title-6-lt,.tablet-title-6-md{font-size:1.25rem;line-height:1.75rem;}.tablet-heading-1,.tablet-heading-1-sb,.tablet-heading-1-bd,.tablet-heading-1-rg,.tablet-heading-1-lt,.tablet-heading-1-md{font-size:2rem;line-height:2.75rem;}.tablet-heading-2,.tablet-heading-2-sb,.tablet-heading-2-bd,.tablet-heading-2-rg,.tablet-heading-2-lt,.tablet-heading-2-md{font-size:1.75rem;line-height:2rem;}.tablet-heading-3,.tablet-heading-3-sb,.tablet-heading-3-bd,.tablet-heading-3-rg,.tablet-heading-3-lt,.tablet-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.tablet-heading-4,.tablet-heading-4-sb,.tablet-heading-4-bd,.tablet-heading-4-rg,.tablet-heading-4-lt,.tablet-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.tablet-body-1,.tablet-body-1-sb,.tablet-body-1-bd,.tablet-body-1-rg,.tablet-body-1-lt,.tablet-body-1-md{font-size:1.5rem;line-height:2rem;}.tablet-body-2,.tablet-body-2-sb,.tablet-body-2-bd,.tablet-body-2-rg,.tablet-body-2-lt,.tablet-body-2-md{font-size:1.25rem;line-height:1.75rem;}.tablet-body-3,.tablet-body-3-sb,.tablet-body-3-bd,.tablet-body-3-rg,.tablet-body-3-lt,.tablet-body-3-md{font-size:1.125rem;line-height:1.5rem;}.tablet-body-4,.tablet-body-4-sb,.tablet-body-4-bd,.tablet-body-4-rg,.tablet-body-4-lt,.tablet-body-4-md{font-size:1rem;line-height:1.5rem;}.tablet-body-5,.tablet-body-5-sb,.tablet-body-5-bd,.tablet-body-5-rg,.tablet-body-5-lt,.tablet-body-5-md{font-size:0.875rem;line-height:1.125rem;}.tablet-body-6,.tablet-body-6-sb,.tablet-body-6-bd,.tablet-body-6-rg,.tablet-body-6-lt,.tablet-body-6-md{font-size:0.75rem;line-height:1rem;}.tablet-body-7,.tablet-body-7-sb,.tablet-body-7-bd,.tablet-body-7-rg,.tablet-body-7-lt,.tablet-body-7-md{font-size:0.625rem;line-height:0.875rem;}.tablet-interactive-1,.tablet-interactive-1-sb,.tablet-interactive-1-bd,.tablet-interactive-1-rg,.tablet-interactive-1-lt,.tablet-interactive-1-md{font-size:1rem;line-height:1.5rem;}.tablet-interactive-2,.tablet-interactive-2-sb,.tablet-interactive-2-bd,.tablet-interactive-2-rg,.tablet-interactive-2-lt,.tablet-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}@media (width >= 1152px){.desktop-title-1,.desktop-title-1-sb,.desktop-title-1-bd,.desktop-title-1-rg,.desktop-title-1-lt,.desktop-title-1-md{font-size:4.5rem;line-height:5rem;}.desktop-title-2,.desktop-title-2-sb,.desktop-title-2-bd,.desktop-title-2-rg,.desktop-title-2-lt,.desktop-title-2-md{font-size:3rem;line-height:3.25rem;}.desktop-title-3,.desktop-title-3-sb,.desktop-title-3-bd,.desktop-title-3-rg,.desktop-title-3-lt,.desktop-title-3-md{font-size:2rem;line-height:2.75rem;}.desktop-title-4,.desktop-title-4-sb,.desktop-title-4-bd,.desktop-title-4-rg,.desktop-title-4-lt,.desktop-title-4-md{font-size:1.75rem;line-height:2rem;}.desktop-title-5,.desktop-title-5-sb,.desktop-title-5-bd,.desktop-title-5-rg,.desktop-title-5-lt,.desktop-title-5-md{font-size:1.5rem;line-height:1.75rem;}.desktop-title-6,.desktop-title-6-sb,.desktop-title-6-bd,.desktop-title-6-rg,.desktop-title-6-lt,.desktop-title-6-md{font-size:1.25rem;line-height:1.75rem;}.desktop-heading-1,.desktop-heading-1-sb,.desktop-heading-1-bd,.desktop-heading-1-rg,.desktop-heading-1-lt,.desktop-heading-1-md{font-size:2rem;line-height:2.75rem;}.desktop-heading-2,.desktop-heading-2-sb,.desktop-heading-2-bd,.desktop-heading-2-rg,.desktop-heading-2-lt,.desktop-heading-2-md{font-size:1.75rem;line-height:2rem;}.desktop-heading-3,.desktop-heading-3-sb,.desktop-heading-3-bd,.desktop-heading-3-rg,.desktop-heading-3-lt,.desktop-heading-3-md{font-size:1.5rem;line-height:1.75rem;}.desktop-heading-4,.desktop-heading-4-sb,.desktop-heading-4-bd,.desktop-heading-4-rg,.desktop-heading-4-lt,.desktop-heading-4-md{font-size:1.125rem;line-height:1.375rem;}.desktop-body-1,.desktop-body-1-sb,.desktop-body-1-bd,.desktop-body-1-rg,.desktop-body-1-lt,.desktop-body-1-md{font-size:1.5rem;line-height:2rem;}.desktop-body-2,.desktop-body-2-sb,.desktop-body-2-bd,.desktop-body-2-rg,.desktop-body-2-lt,.desktop-body-2-md{font-size:1.25rem;line-height:1.75rem;}.desktop-body-3,.desktop-body-3-sb,.desktop-body-3-bd,.desktop-body-3-rg,.desktop-body-3-lt,.desktop-body-3-md{font-size:1.125rem;line-height:1.5rem;}.desktop-body-4,.desktop-body-4-sb,.desktop-body-4-bd,.desktop-body-4-rg,.desktop-body-4-lt,.desktop-body-4-md{font-size:1rem;line-height:1.5rem;}.desktop-body-5,.desktop-body-5-sb,.desktop-body-5-bd,.desktop-body-5-rg,.desktop-body-5-lt,.desktop-body-5-md{font-size:0.875rem;line-height:1.125rem;}.desktop-body-6,.desktop-body-6-sb,.desktop-body-6-bd,.desktop-body-6-rg,.desktop-body-6-lt,.desktop-body-6-md{font-size:0.75rem;line-height:1rem;}.desktop-body-7,.desktop-body-7-sb,.desktop-body-7-bd,.desktop-body-7-rg,.desktop-body-7-lt,.desktop-body-7-md{font-size:0.625rem;line-height:0.875rem;}.desktop-interactive-1,.desktop-interactive-1-sb,.desktop-interactive-1-bd,.desktop-interactive-1-rg,.desktop-interactive-1-lt,.desktop-interactive-1-md{font-size:1rem;line-height:1.5rem;}.desktop-interactive-2,.desktop-interactive-2-sb,.desktop-interactive-2-bd,.desktop-interactive-2-rg,.desktop-interactive-2-lt,.desktop-interactive-2-md{font-size:0.875rem;line-height:1.125rem;}}z-button.zanit-button{--color-primary01:var(--red500);--color-hover-primary:var(--red800);--color-pressed-primary:var(--red400);--color-button-secondary:transparent;--color-primary02:transparent;--color-primary03:transparent}z-button.zanit-button-dark{--color-primary01:var(--gray950);--color-hover-primary:#000;--color-pressed-primary:var(--gray950);--color-button-secondary:transparent;--color-primary02:transparent;--color-primary03:transparent}:root{--zanit-accent-color:#ffe74c;--shadow-focus-primary:0 0 0 2px #fff, 0 0 2px 5px var(--gray950)}.zanit-link,.zanit-link-inverse{color:currentcolor;font-family:inherit;text-decoration:underline solid 12% var(--red500);text-underline-offset:28%}.zanit-link-inverse{color:var(--color-text-inverse);text-decoration-color:var(--color-text-inverse)}";
6
-
7
- /*
8
- Stencil Client Platform v4.33.1 | MIT Licensed | https://stenciljs.com
9
- */
10
- var __defProp = Object.defineProperty;
11
- var __export = (target, all) => {
12
- for (var name in all)
13
- __defProp(target, name, { get: all[name], enumerable: true });
14
- };
15
-
16
- // src/utils/es2022-rewire-class-members.ts
17
- var reWireGetterSetter = (instance, hostRef) => {
18
- var _a;
19
- const cmpMeta = hostRef.$cmpMeta$;
20
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
21
- members.map(([memberName, [memberFlags]]) => {
22
- if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
23
- const ogValue = instance[memberName];
24
- const ogDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
25
- Object.defineProperty(instance, memberName, {
26
- get() {
27
- return ogDescriptor.get.call(this);
28
- },
29
- set(newValue) {
30
- ogDescriptor.set.call(this, newValue);
31
- },
32
- configurable: true,
33
- enumerable: true
34
- });
35
- instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
36
- }
37
- });
38
- };
39
-
40
- // src/client/client-host-ref.ts
41
- var getHostRef = (ref) => {
42
- if (ref.__stencil__getHostRef) {
43
- return ref.__stencil__getHostRef();
44
- }
45
- return void 0;
46
- };
47
- var registerInstance = (lazyInstance, hostRef) => {
48
- lazyInstance.__stencil__getHostRef = () => hostRef;
49
- hostRef.$lazyInstance$ = lazyInstance;
50
- {
51
- reWireGetterSetter(lazyInstance, hostRef);
52
- }
53
- };
54
- var registerHost = (hostElement, cmpMeta) => {
55
- const hostRef = {
56
- $flags$: 0,
57
- $hostElement$: hostElement,
58
- $cmpMeta$: cmpMeta,
59
- $instanceValues$: /* @__PURE__ */ new Map()
60
- };
61
- {
62
- hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
63
- hostElement["s-p"] = [];
64
- hostElement["s-rc"] = [];
65
- }
66
- const ref = hostRef;
67
- hostElement.__stencil__getHostRef = () => ref;
68
- return ref;
69
- };
70
- var isMemberInElement = (elm, memberName) => memberName in elm;
71
- var consoleError = (e, el) => (0, console.error)(e, el);
72
-
73
- // src/client/client-load-module.ts
74
- var cmpModules = /* @__PURE__ */ new Map();
75
- var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
76
- const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
77
- const bundleId = cmpMeta.$lazyBundleId$;
78
- if (!bundleId) {
79
- return void 0;
80
- }
81
- const module = cmpModules.get(bundleId) ;
82
- if (module) {
83
- return module[exportName];
84
- }
85
-
86
- if (!hmrVersionId || !BUILD.hotModuleReplacement) {
87
- const processMod = importedModule => {
88
- cmpModules.set(bundleId, importedModule);
89
- return importedModule[exportName];
90
- }
91
- switch(bundleId) {
92
-
93
- case 'zanit-menubar_3':
94
- return import(
95
- /* webpackMode: "lazy" */
96
- './zanit-menubar_3.entry.js').then(processMod, consoleError);
97
- }
98
- }
99
- return import(
100
- /* @vite-ignore */
101
- /* webpackInclude: /\.entry\.js$/ */
102
- /* webpackExclude: /\.system\.entry\.js$/ */
103
- /* webpackMode: "lazy" */
104
- `./${bundleId}.entry.js${""}`
105
- ).then(
106
- (importedModule) => {
107
- {
108
- cmpModules.set(bundleId, importedModule);
109
- }
110
- return importedModule[exportName];
111
- },
112
- (e) => {
113
- consoleError(e, hostRef.$hostElement$);
114
- }
115
- );
116
- };
117
-
118
- // src/client/client-style.ts
119
- var styles = /* @__PURE__ */ new Map();
120
- var HYDRATED_STYLE_ID = "sty-id";
121
- var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
122
- var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
123
- var win = typeof window !== "undefined" ? window : {};
124
- var plt = {
125
- $flags$: 0,
126
- $resourcesUrl$: "",
127
- jmp: (h2) => h2(),
128
- raf: (h2) => requestAnimationFrame(h2),
129
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
130
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
131
- ce: (eventName, opts) => new CustomEvent(eventName, opts)
132
- };
133
- var supportsListenerOptions = /* @__PURE__ */ (() => {
134
- var _a;
135
- let supportsListenerOptions2 = false;
136
- try {
137
- (_a = win.document) == null ? void 0 : _a.addEventListener(
138
- "e",
139
- null,
140
- Object.defineProperty({}, "passive", {
141
- get() {
142
- supportsListenerOptions2 = true;
143
- }
144
- })
145
- );
146
- } catch (e) {
147
- }
148
- return supportsListenerOptions2;
149
- })();
150
- var promiseResolve = (v) => Promise.resolve(v);
151
- var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
152
- try {
153
- new CSSStyleSheet();
154
- return typeof new CSSStyleSheet().replaceSync === "function";
155
- } catch (e) {
156
- }
157
- return false;
158
- })() ;
159
- var queuePending = false;
160
- var queueDomReads = [];
161
- var queueDomWrites = [];
162
- var queueTask = (queue, write) => (cb) => {
163
- queue.push(cb);
164
- if (!queuePending) {
165
- queuePending = true;
166
- if (write && plt.$flags$ & 4 /* queueSync */) {
167
- nextTick(flush);
168
- } else {
169
- plt.raf(flush);
170
- }
171
- }
172
- };
173
- var consume = (queue) => {
174
- for (let i2 = 0; i2 < queue.length; i2++) {
175
- try {
176
- queue[i2](performance.now());
177
- } catch (e) {
178
- consoleError(e);
179
- }
180
- }
181
- queue.length = 0;
182
- };
183
- var flush = () => {
184
- consume(queueDomReads);
185
- {
186
- consume(queueDomWrites);
187
- if (queuePending = queueDomReads.length > 0) {
188
- plt.raf(flush);
189
- }
190
- }
191
- };
192
- var nextTick = (cb) => promiseResolve().then(cb);
193
- var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
194
- var isComplexType = (o) => {
195
- o = typeof o;
196
- return o === "object" || o === "function";
197
- };
198
-
199
- // src/utils/query-nonce-meta-tag-content.ts
200
- function queryNonceMetaTagContent(doc) {
201
- var _a, _b, _c;
202
- return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
203
- }
204
-
205
- // src/utils/regular-expression.ts
206
- var escapeRegExpSpecialCharacters = (text) => {
207
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
208
- };
209
-
210
- // src/utils/result.ts
211
- var result_exports = {};
212
- __export(result_exports, {
213
- err: () => err,
214
- map: () => map,
215
- ok: () => ok,
216
- unwrap: () => unwrap,
217
- unwrapErr: () => unwrapErr
218
- });
219
- var ok = (value) => ({
220
- isOk: true,
221
- isErr: false,
222
- value
223
- });
224
- var err = (value) => ({
225
- isOk: false,
226
- isErr: true,
227
- value
228
- });
229
- function map(result, fn) {
230
- if (result.isOk) {
231
- const val = fn(result.value);
232
- if (val instanceof Promise) {
233
- return val.then((newVal) => ok(newVal));
234
- } else {
235
- return ok(val);
236
- }
237
- }
238
- if (result.isErr) {
239
- const value = result.value;
240
- return err(value);
241
- }
242
- throw "should never get here";
243
- }
244
- var unwrap = (result) => {
245
- if (result.isOk) {
246
- return result.value;
247
- } else {
248
- throw result.value;
249
- }
250
- };
251
- var unwrapErr = (result) => {
252
- if (result.isErr) {
253
- return result.value;
254
- } else {
255
- throw result.value;
256
- }
257
- };
258
- function createShadowRoot(cmpMeta) {
259
- const shadowRoot = this.attachShadow({ mode: "open" });
260
- if (supportsConstructableStylesheets) {
261
- const sheet = new CSSStyleSheet();
262
- sheet.replaceSync(globalStyles);
263
- shadowRoot.adoptedStyleSheets.push(sheet);
264
- }
265
- }
266
- var createTime = (fnName, tagName = "") => {
267
- {
268
- return () => {
269
- return;
270
- };
271
- }
272
- };
273
- var uniqueTime = (key, measureText) => {
274
- {
275
- return () => {
276
- return;
277
- };
278
- }
279
- };
280
- var h = (nodeName, vnodeData, ...children) => {
281
- let child = null;
282
- let key = null;
283
- let simple = false;
284
- let lastSimple = false;
285
- const vNodeChildren = [];
286
- const walk = (c) => {
287
- for (let i2 = 0; i2 < c.length; i2++) {
288
- child = c[i2];
289
- if (Array.isArray(child)) {
290
- walk(child);
291
- } else if (child != null && typeof child !== "boolean") {
292
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
293
- child = String(child);
294
- }
295
- if (simple && lastSimple) {
296
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
297
- } else {
298
- vNodeChildren.push(simple ? newVNode(null, child) : child);
299
- }
300
- lastSimple = simple;
301
- }
302
- }
303
- };
304
- walk(children);
305
- if (vnodeData) {
306
- if (vnodeData.key) {
307
- key = vnodeData.key;
308
- }
309
- {
310
- const classData = vnodeData.className || vnodeData.class;
311
- if (classData) {
312
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
313
- }
314
- }
315
- }
316
- if (typeof nodeName === "function") {
317
- return nodeName(
318
- vnodeData === null ? {} : vnodeData,
319
- vNodeChildren,
320
- vdomFnUtils
321
- );
322
- }
323
- const vnode = newVNode(nodeName, null);
324
- vnode.$attrs$ = vnodeData;
325
- if (vNodeChildren.length > 0) {
326
- vnode.$children$ = vNodeChildren;
327
- }
328
- {
329
- vnode.$key$ = key;
330
- }
331
- return vnode;
332
- };
333
- var newVNode = (tag, text) => {
334
- const vnode = {
335
- $flags$: 0,
336
- $tag$: tag,
337
- $text$: text,
338
- $elm$: null,
339
- $children$: null
340
- };
341
- {
342
- vnode.$attrs$ = null;
343
- }
344
- {
345
- vnode.$key$ = null;
346
- }
347
- return vnode;
348
- };
349
- var Host = {};
350
- var isHost = (node) => node && node.$tag$ === Host;
351
- var vdomFnUtils = {
352
- forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
353
- map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
354
- };
355
- var convertToPublic = (node) => ({
356
- vattrs: node.$attrs$,
357
- vchildren: node.$children$,
358
- vkey: node.$key$,
359
- vname: node.$name$,
360
- vtag: node.$tag$,
361
- vtext: node.$text$
362
- });
363
- var convertToPrivate = (node) => {
364
- if (typeof node.vtag === "function") {
365
- const vnodeData = { ...node.vattrs };
366
- if (node.vkey) {
367
- vnodeData.key = node.vkey;
368
- }
369
- if (node.vname) {
370
- vnodeData.name = node.vname;
371
- }
372
- return h(node.vtag, vnodeData, ...node.vchildren || []);
373
- }
374
- const vnode = newVNode(node.vtag, node.vtext);
375
- vnode.$attrs$ = node.vattrs;
376
- vnode.$children$ = node.vchildren;
377
- vnode.$key$ = node.vkey;
378
- vnode.$name$ = node.vname;
379
- return vnode;
380
- };
381
- var createSupportsRuleRe = (selector) => {
382
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
383
- return new RegExp(
384
- // First capture group: match any context before the selector that's not inside @supports selector()
385
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
386
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
387
- "g"
388
- );
389
- };
390
- createSupportsRuleRe("::slotted");
391
- createSupportsRuleRe(":host");
392
- createSupportsRuleRe(":host-context");
393
- var parsePropertyValue = (propValue, propType) => {
394
- if (propValue != null && !isComplexType(propValue)) {
395
- if (propType & 4 /* Boolean */) {
396
- return propValue === "false" ? false : propValue === "" || !!propValue;
397
- }
398
- if (propType & 2 /* Number */) {
399
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
400
- }
401
- if (propType & 1 /* String */) {
402
- return String(propValue);
403
- }
404
- return propValue;
405
- }
406
- return propValue;
407
- };
408
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
409
-
410
- // src/runtime/event-emitter.ts
411
- var createEvent = (ref, name, flags) => {
412
- const elm = getElement(ref);
413
- return {
414
- emit: (detail) => {
415
- return emitEvent(elm, name, {
416
- bubbles: true,
417
- composed: true,
418
- cancelable: true,
419
- detail
420
- });
421
- }
422
- };
423
- };
424
- var emitEvent = (elm, name, opts) => {
425
- const ev = plt.ce(name, opts);
426
- elm.dispatchEvent(ev);
427
- return ev;
428
- };
429
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
430
- var registerStyle = (scopeId2, cssText, allowCS) => {
431
- let style = styles.get(scopeId2);
432
- if (supportsConstructableStylesheets && allowCS) {
433
- style = style || new CSSStyleSheet();
434
- if (typeof style === "string") {
435
- style = cssText;
436
- } else {
437
- style.replaceSync(cssText);
438
- }
439
- } else {
440
- style = cssText;
441
- }
442
- styles.set(scopeId2, style);
443
- };
444
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
445
- var _a;
446
- const scopeId2 = getScopeId(cmpMeta);
447
- const style = styles.get(scopeId2);
448
- if (!win.document) {
449
- return scopeId2;
450
- }
451
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
452
- if (style) {
453
- if (typeof style === "string") {
454
- styleContainerNode = styleContainerNode.head || styleContainerNode;
455
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
456
- let styleElm;
457
- if (!appliedStyles) {
458
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
459
- }
460
- if (!appliedStyles.has(scopeId2)) {
461
- {
462
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
463
- styleElm.innerHTML = style;
464
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
465
- if (nonce != null) {
466
- styleElm.setAttribute("nonce", nonce);
467
- }
468
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
469
- if (styleContainerNode.nodeName === "HEAD") {
470
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
471
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
472
- styleContainerNode.insertBefore(
473
- styleElm,
474
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
475
- );
476
- } else if ("host" in styleContainerNode) {
477
- if (supportsConstructableStylesheets) {
478
- const stylesheet = new CSSStyleSheet();
479
- stylesheet.replaceSync(style);
480
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
481
- } else {
482
- const existingStyleContainer = styleContainerNode.querySelector("style");
483
- if (existingStyleContainer) {
484
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
485
- } else {
486
- styleContainerNode.prepend(styleElm);
487
- }
488
- }
489
- } else {
490
- styleContainerNode.append(styleElm);
491
- }
492
- }
493
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
494
- styleContainerNode.insertBefore(styleElm, null);
495
- }
496
- }
497
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
498
- styleElm.innerHTML += SLOT_FB_CSS;
499
- }
500
- if (appliedStyles) {
501
- appliedStyles.add(scopeId2);
502
- }
503
- }
504
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
505
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
506
- }
507
- }
508
- return scopeId2;
509
- };
510
- var attachStyles = (hostRef) => {
511
- const cmpMeta = hostRef.$cmpMeta$;
512
- const elm = hostRef.$hostElement$;
513
- const flags = cmpMeta.$flags$;
514
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
515
- const scopeId2 = addStyle(
516
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
517
- cmpMeta);
518
- if (flags & 10 /* needsScopedEncapsulation */) {
519
- elm["s-sc"] = scopeId2;
520
- elm.classList.add(scopeId2 + "-h");
521
- }
522
- endAttachStyles();
523
- };
524
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
525
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
526
- if (oldValue === newValue) {
527
- return;
528
- }
529
- let isProp = isMemberInElement(elm, memberName);
530
- let ln = memberName.toLowerCase();
531
- if (memberName === "class") {
532
- const classList = elm.classList;
533
- const oldClasses = parseClassList(oldValue);
534
- let newClasses = parseClassList(newValue);
535
- {
536
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
537
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
538
- }
539
- } else if (memberName === "key") ; else if (memberName === "ref") {
540
- if (newValue) {
541
- newValue(elm);
542
- }
543
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
544
- if (memberName[2] === "-") {
545
- memberName = memberName.slice(3);
546
- } else if (isMemberInElement(win, ln)) {
547
- memberName = ln.slice(2);
548
- } else {
549
- memberName = ln[2] + memberName.slice(3);
550
- }
551
- if (oldValue || newValue) {
552
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
553
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
554
- if (oldValue) {
555
- plt.rel(elm, memberName, oldValue, capture);
556
- }
557
- if (newValue) {
558
- plt.ael(elm, memberName, newValue, capture);
559
- }
560
- }
561
- } else {
562
- const isComplex = isComplexType(newValue);
563
- if ((isProp || isComplex && newValue !== null) && true) {
564
- try {
565
- if (!elm.tagName.includes("-")) {
566
- const n = newValue == null ? "" : newValue;
567
- if (memberName === "list") {
568
- isProp = false;
569
- } else if (oldValue == null || elm[memberName] != n) {
570
- if (typeof elm.__lookupSetter__(memberName) === "function") {
571
- elm[memberName] = n;
572
- } else {
573
- elm.setAttribute(memberName, n);
574
- }
575
- }
576
- } else if (elm[memberName] !== newValue) {
577
- elm[memberName] = newValue;
578
- }
579
- } catch (e) {
580
- }
581
- }
582
- if (newValue == null || newValue === false) {
583
- if (newValue !== false || elm.getAttribute(memberName) === "") {
584
- {
585
- elm.removeAttribute(memberName);
586
- }
587
- }
588
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
589
- newValue = newValue === true ? "" : newValue;
590
- {
591
- elm.setAttribute(memberName, newValue);
592
- }
593
- }
594
- }
595
- };
596
- var parseClassListRegex = /\s/;
597
- var parseClassList = (value) => {
598
- if (typeof value === "object" && value && "baseVal" in value) {
599
- value = value.baseVal;
600
- }
601
- if (!value || typeof value !== "string") {
602
- return [];
603
- }
604
- return value.split(parseClassListRegex);
605
- };
606
- var CAPTURE_EVENT_SUFFIX = "Capture";
607
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
608
-
609
- // src/runtime/vdom/update-element.ts
610
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
611
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
612
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
613
- const newVnodeAttrs = newVnode.$attrs$ || {};
614
- {
615
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
616
- if (!(memberName in newVnodeAttrs)) {
617
- setAccessor(
618
- elm,
619
- memberName,
620
- oldVnodeAttrs[memberName],
621
- void 0,
622
- isSvgMode2,
623
- newVnode.$flags$);
624
- }
625
- }
626
- }
627
- for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
628
- setAccessor(
629
- elm,
630
- memberName,
631
- oldVnodeAttrs[memberName],
632
- newVnodeAttrs[memberName],
633
- isSvgMode2,
634
- newVnode.$flags$);
635
- }
636
- };
637
- function sortedAttrNames(attrNames) {
638
- return attrNames.includes("ref") ? (
639
- // we need to sort these to ensure that `'ref'` is the last attr
640
- [...attrNames.filter((attr) => attr !== "ref"), "ref"]
641
- ) : (
642
- // no need to sort, return the original array
643
- attrNames
644
- );
645
- }
646
- var hostTagName;
647
- var isSvgMode = false;
648
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
649
- const newVNode2 = newParentVNode.$children$[childIndex];
650
- let i2 = 0;
651
- let elm;
652
- let childNode;
653
- if (newVNode2.$text$ !== null) {
654
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
655
- } else {
656
- if (!win.document) {
657
- throw new Error(
658
- "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
659
- );
660
- }
661
- elm = newVNode2.$elm$ = win.document.createElement(
662
- newVNode2.$tag$
663
- );
664
- {
665
- updateElement(null, newVNode2, isSvgMode);
666
- }
667
- if (newVNode2.$children$) {
668
- for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
669
- childNode = createElm(oldParentVNode, newVNode2, i2);
670
- if (childNode) {
671
- elm.appendChild(childNode);
672
- }
673
- }
674
- }
675
- }
676
- elm["s-hn"] = hostTagName;
677
- return elm;
678
- };
679
- var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
680
- let containerElm = parentElm;
681
- let childNode;
682
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
683
- containerElm = containerElm.shadowRoot;
684
- }
685
- for (; startIdx <= endIdx; ++startIdx) {
686
- if (vnodes[startIdx]) {
687
- childNode = createElm(null, parentVNode, startIdx);
688
- if (childNode) {
689
- vnodes[startIdx].$elm$ = childNode;
690
- insertBefore(containerElm, childNode, before);
691
- }
692
- }
693
- }
694
- };
695
- var removeVnodes = (vnodes, startIdx, endIdx) => {
696
- for (let index = startIdx; index <= endIdx; ++index) {
697
- const vnode = vnodes[index];
698
- if (vnode) {
699
- const elm = vnode.$elm$;
700
- nullifyVNodeRefs(vnode);
701
- if (elm) {
702
- elm.remove();
703
- }
704
- }
705
- }
706
- };
707
- var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
708
- let oldStartIdx = 0;
709
- let newStartIdx = 0;
710
- let idxInOld = 0;
711
- let i2 = 0;
712
- let oldEndIdx = oldCh.length - 1;
713
- let oldStartVnode = oldCh[0];
714
- let oldEndVnode = oldCh[oldEndIdx];
715
- let newEndIdx = newCh.length - 1;
716
- let newStartVnode = newCh[0];
717
- let newEndVnode = newCh[newEndIdx];
718
- let node;
719
- let elmToMove;
720
- while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
721
- if (oldStartVnode == null) {
722
- oldStartVnode = oldCh[++oldStartIdx];
723
- } else if (oldEndVnode == null) {
724
- oldEndVnode = oldCh[--oldEndIdx];
725
- } else if (newStartVnode == null) {
726
- newStartVnode = newCh[++newStartIdx];
727
- } else if (newEndVnode == null) {
728
- newEndVnode = newCh[--newEndIdx];
729
- } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
730
- patch(oldStartVnode, newStartVnode, isInitialRender);
731
- oldStartVnode = oldCh[++oldStartIdx];
732
- newStartVnode = newCh[++newStartIdx];
733
- } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
734
- patch(oldEndVnode, newEndVnode, isInitialRender);
735
- oldEndVnode = oldCh[--oldEndIdx];
736
- newEndVnode = newCh[--newEndIdx];
737
- } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
738
- patch(oldStartVnode, newEndVnode, isInitialRender);
739
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
740
- oldStartVnode = oldCh[++oldStartIdx];
741
- newEndVnode = newCh[--newEndIdx];
742
- } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
743
- patch(oldEndVnode, newStartVnode, isInitialRender);
744
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
745
- oldEndVnode = oldCh[--oldEndIdx];
746
- newStartVnode = newCh[++newStartIdx];
747
- } else {
748
- idxInOld = -1;
749
- {
750
- for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
751
- if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
752
- idxInOld = i2;
753
- break;
754
- }
755
- }
756
- }
757
- if (idxInOld >= 0) {
758
- elmToMove = oldCh[idxInOld];
759
- if (elmToMove.$tag$ !== newStartVnode.$tag$) {
760
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
761
- } else {
762
- patch(elmToMove, newStartVnode, isInitialRender);
763
- oldCh[idxInOld] = void 0;
764
- node = elmToMove.$elm$;
765
- }
766
- newStartVnode = newCh[++newStartIdx];
767
- } else {
768
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
769
- newStartVnode = newCh[++newStartIdx];
770
- }
771
- if (node) {
772
- {
773
- insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
774
- }
775
- }
776
- }
777
- }
778
- if (oldStartIdx > oldEndIdx) {
779
- addVnodes(
780
- parentElm,
781
- newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
782
- newVNode2,
783
- newCh,
784
- newStartIdx,
785
- newEndIdx
786
- );
787
- } else if (newStartIdx > newEndIdx) {
788
- removeVnodes(oldCh, oldStartIdx, oldEndIdx);
789
- }
790
- };
791
- var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
792
- if (leftVNode.$tag$ === rightVNode.$tag$) {
793
- if (!isInitialRender) {
794
- return leftVNode.$key$ === rightVNode.$key$;
795
- }
796
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
797
- leftVNode.$key$ = rightVNode.$key$;
798
- }
799
- return true;
800
- }
801
- return false;
802
- };
803
- var patch = (oldVNode, newVNode2, isInitialRender = false) => {
804
- const elm = newVNode2.$elm$ = oldVNode.$elm$;
805
- const oldChildren = oldVNode.$children$;
806
- const newChildren = newVNode2.$children$;
807
- const text = newVNode2.$text$;
808
- if (text === null) {
809
- {
810
- updateElement(oldVNode, newVNode2, isSvgMode);
811
- }
812
- if (oldChildren !== null && newChildren !== null) {
813
- updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
814
- } else if (newChildren !== null) {
815
- if (oldVNode.$text$ !== null) {
816
- elm.textContent = "";
817
- }
818
- addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
819
- } else if (
820
- // don't do this on initial render as it can cause non-hydrated content to be removed
821
- !isInitialRender && BUILD.updatable && oldChildren !== null
822
- ) {
823
- removeVnodes(oldChildren, 0, oldChildren.length - 1);
824
- }
825
- } else if (oldVNode.$text$ !== text) {
826
- elm.data = text;
827
- }
828
- };
829
- var nullifyVNodeRefs = (vNode) => {
830
- {
831
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
832
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
833
- }
834
- };
835
- var insertBefore = (parent, newNode, reference) => {
836
- {
837
- return parent == null ? void 0 : parent.insertBefore(newNode, reference);
838
- }
839
- };
840
- var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
841
- const hostElm = hostRef.$hostElement$;
842
- const oldVNode = hostRef.$vnode$ || newVNode(null, null);
843
- const isHostElement = isHost(renderFnResults);
844
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
845
- hostTagName = hostElm.tagName;
846
- if (isInitialLoad && rootVnode.$attrs$) {
847
- for (const key of Object.keys(rootVnode.$attrs$)) {
848
- if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
849
- rootVnode.$attrs$[key] = hostElm[key];
850
- }
851
- }
852
- }
853
- rootVnode.$tag$ = null;
854
- rootVnode.$flags$ |= 4 /* isHost */;
855
- hostRef.$vnode$ = rootVnode;
856
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
857
- patch(oldVNode, rootVnode, isInitialLoad);
858
- };
859
-
860
- // src/runtime/update-component.ts
861
- var attachToAncestor = (hostRef, ancestorComponent) => {
862
- if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
863
- const index = ancestorComponent["s-p"].push(
864
- new Promise(
865
- (r) => hostRef.$onRenderResolve$ = () => {
866
- ancestorComponent["s-p"].splice(index - 1, 1);
867
- r();
868
- }
869
- )
870
- );
871
- }
872
- };
873
- var scheduleUpdate = (hostRef, isInitialLoad) => {
874
- {
875
- hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
876
- }
877
- if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
878
- hostRef.$flags$ |= 512 /* needsRerender */;
879
- return;
880
- }
881
- attachToAncestor(hostRef, hostRef.$ancestorComponent$);
882
- const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
883
- return writeTask(dispatch) ;
884
- };
885
- var dispatchHooks = (hostRef, isInitialLoad) => {
886
- const elm = hostRef.$hostElement$;
887
- const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
888
- const instance = hostRef.$lazyInstance$ ;
889
- if (!instance) {
890
- throw new Error(
891
- `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
892
- );
893
- }
894
- let maybePromise;
895
- if (isInitialLoad) {
896
- {
897
- hostRef.$flags$ |= 256 /* isListenReady */;
898
- if (hostRef.$queuedListeners$) {
899
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
900
- hostRef.$queuedListeners$ = void 0;
901
- }
902
- }
903
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
904
- } else {
905
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
906
- }
907
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
908
- endSchedule();
909
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
910
- };
911
- var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
912
- console.error(err2);
913
- fn();
914
- }) : fn();
915
- var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
916
- var updateComponent = async (hostRef, instance, isInitialLoad) => {
917
- var _a;
918
- const elm = hostRef.$hostElement$;
919
- const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
920
- const rc = elm["s-rc"];
921
- if (isInitialLoad) {
922
- attachStyles(hostRef);
923
- }
924
- const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
925
- {
926
- callRender(hostRef, instance, elm, isInitialLoad);
927
- }
928
- if (rc) {
929
- rc.map((cb) => cb());
930
- elm["s-rc"] = void 0;
931
- }
932
- endRender();
933
- endUpdate();
934
- {
935
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
936
- const postUpdate = () => postUpdateComponent(hostRef);
937
- if (childrenPromises.length === 0) {
938
- postUpdate();
939
- } else {
940
- Promise.all(childrenPromises).then(postUpdate);
941
- hostRef.$flags$ |= 4 /* isWaitingForChildren */;
942
- childrenPromises.length = 0;
943
- }
944
- }
945
- };
946
- var callRender = (hostRef, instance, elm, isInitialLoad) => {
947
- try {
948
- instance = instance.render() ;
949
- {
950
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
951
- }
952
- {
953
- hostRef.$flags$ |= 2 /* hasRendered */;
954
- }
955
- {
956
- {
957
- {
958
- renderVdom(hostRef, instance, isInitialLoad);
959
- }
960
- }
961
- }
962
- } catch (e) {
963
- consoleError(e, hostRef.$hostElement$);
964
- }
965
- return null;
966
- };
967
- var postUpdateComponent = (hostRef) => {
968
- const tagName = hostRef.$cmpMeta$.$tagName$;
969
- const elm = hostRef.$hostElement$;
970
- const endPostUpdate = createTime("postUpdate", tagName);
971
- const instance = hostRef.$lazyInstance$ ;
972
- const ancestorComponent = hostRef.$ancestorComponent$;
973
- safeCall(instance, "componentDidRender", void 0, elm);
974
- if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
975
- hostRef.$flags$ |= 64 /* hasLoadedComponent */;
976
- {
977
- addHydratedFlag(elm);
978
- }
979
- safeCall(instance, "componentDidLoad", void 0, elm);
980
- endPostUpdate();
981
- {
982
- hostRef.$onReadyResolve$(elm);
983
- if (!ancestorComponent) {
984
- appDidLoad();
985
- }
986
- }
987
- } else {
988
- safeCall(instance, "componentDidUpdate", void 0, elm);
989
- endPostUpdate();
990
- }
991
- {
992
- if (hostRef.$onRenderResolve$) {
993
- hostRef.$onRenderResolve$();
994
- hostRef.$onRenderResolve$ = void 0;
995
- }
996
- if (hostRef.$flags$ & 512 /* needsRerender */) {
997
- nextTick(() => scheduleUpdate(hostRef, false));
998
- }
999
- hostRef.$flags$ &= -517;
1000
- }
1001
- };
1002
- var appDidLoad = (who) => {
1003
- nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1004
- };
1005
- var safeCall = (instance, method, arg, elm) => {
1006
- if (instance && instance[method]) {
1007
- try {
1008
- return instance[method](arg);
1009
- } catch (e) {
1010
- consoleError(e, elm);
1011
- }
1012
- }
1013
- return void 0;
1014
- };
1015
- var addHydratedFlag = (elm) => {
1016
- var _a;
1017
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
1018
- };
1019
-
1020
- // src/runtime/set-value.ts
1021
- var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
1022
- var setValue = (ref, propName, newVal, cmpMeta) => {
1023
- const hostRef = getHostRef(ref);
1024
- if (!hostRef) {
1025
- throw new Error(
1026
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1027
- );
1028
- }
1029
- const elm = hostRef.$hostElement$ ;
1030
- const oldVal = hostRef.$instanceValues$.get(propName);
1031
- const flags = hostRef.$flags$;
1032
- const instance = hostRef.$lazyInstance$ ;
1033
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1034
- const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
1035
- const didValueChange = newVal !== oldVal && !areBothNaN;
1036
- if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1037
- hostRef.$instanceValues$.set(propName, newVal);
1038
- if (instance) {
1039
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1040
- const watchMethods = cmpMeta.$watchers$[propName];
1041
- if (watchMethods) {
1042
- watchMethods.map((watchMethodName) => {
1043
- try {
1044
- instance[watchMethodName](newVal, oldVal, propName);
1045
- } catch (e) {
1046
- consoleError(e, elm);
1047
- }
1048
- });
1049
- }
1050
- }
1051
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1052
- if (instance.componentShouldUpdate) {
1053
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
1054
- return;
1055
- }
1056
- }
1057
- scheduleUpdate(hostRef, false);
1058
- }
1059
- }
1060
- }
1061
- };
1062
-
1063
- // src/runtime/proxy-component.ts
1064
- var proxyComponent = (Cstr, cmpMeta, flags) => {
1065
- var _a, _b;
1066
- const prototype = Cstr.prototype;
1067
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1068
- if (Cstr.watchers && !cmpMeta.$watchers$) {
1069
- cmpMeta.$watchers$ = Cstr.watchers;
1070
- }
1071
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1072
- members.map(([memberName, [memberFlags]]) => {
1073
- if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1074
- const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1075
- if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1076
- if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1077
- if (flags & 1 /* isElementConstructor */ || !origGetter) {
1078
- Object.defineProperty(prototype, memberName, {
1079
- get() {
1080
- {
1081
- if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1082
- return getValue(this, memberName);
1083
- }
1084
- const ref = getHostRef(this);
1085
- const instance = ref ? ref.$lazyInstance$ : prototype;
1086
- if (!instance) return;
1087
- return instance[memberName];
1088
- }
1089
- },
1090
- configurable: true,
1091
- enumerable: true
1092
- });
1093
- }
1094
- Object.defineProperty(prototype, memberName, {
1095
- set(newValue) {
1096
- const ref = getHostRef(this);
1097
- if (origSetter) {
1098
- const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1099
- if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1100
- newValue = ref.$instanceValues$.get(memberName);
1101
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1102
- ref.$instanceValues$.set(memberName, currentValue);
1103
- }
1104
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1105
- newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1106
- setValue(this, memberName, newValue, cmpMeta);
1107
- return;
1108
- }
1109
- {
1110
- if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1111
- setValue(this, memberName, newValue, cmpMeta);
1112
- if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1113
- ref.$onReadyPromise$.then(() => {
1114
- if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1115
- ref.$lazyInstance$[memberName] = newValue;
1116
- }
1117
- });
1118
- }
1119
- return;
1120
- }
1121
- const setterSetVal = () => {
1122
- const currentValue = ref.$lazyInstance$[memberName];
1123
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
1124
- ref.$instanceValues$.set(memberName, currentValue);
1125
- }
1126
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1127
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1128
- };
1129
- if (ref.$lazyInstance$) {
1130
- setterSetVal();
1131
- } else {
1132
- ref.$onReadyPromise$.then(() => setterSetVal());
1133
- }
1134
- }
1135
- }
1136
- });
1137
- }
1138
- });
1139
- if ((flags & 1 /* isElementConstructor */)) {
1140
- const attrNameToPropName = /* @__PURE__ */ new Map();
1141
- prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
1142
- plt.jmp(() => {
1143
- var _a2;
1144
- const propName = attrNameToPropName.get(attrName);
1145
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1146
- newValue = this[propName];
1147
- delete this[propName];
1148
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1149
- this[propName] == newValue) {
1150
- return;
1151
- } else if (propName == null) {
1152
- const hostRef = getHostRef(this);
1153
- const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1154
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1155
- const instance = hostRef.$lazyInstance$ ;
1156
- const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1157
- entry == null ? void 0 : entry.forEach((callbackName) => {
1158
- if (instance[callbackName] != null) {
1159
- instance[callbackName].call(instance, newValue, oldValue, attrName);
1160
- }
1161
- });
1162
- }
1163
- return;
1164
- }
1165
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1166
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1167
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1168
- this[propName] = newValue;
1169
- }
1170
- });
1171
- };
1172
- Cstr.observedAttributes = Array.from(
1173
- /* @__PURE__ */ new Set([
1174
- ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1175
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
1176
- const attrName = m[1] || propName;
1177
- attrNameToPropName.set(attrName, propName);
1178
- return attrName;
1179
- })
1180
- ])
1181
- );
1182
- }
1183
- }
1184
- return Cstr;
1185
- };
1186
-
1187
- // src/runtime/initialize-component.ts
1188
- var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1189
- let Cstr;
1190
- if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1191
- hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1192
- const bundleId = cmpMeta.$lazyBundleId$;
1193
- if (bundleId) {
1194
- const CstrImport = loadModule(cmpMeta, hostRef);
1195
- if (CstrImport && "then" in CstrImport) {
1196
- const endLoad = uniqueTime();
1197
- Cstr = await CstrImport;
1198
- endLoad();
1199
- } else {
1200
- Cstr = CstrImport;
1201
- }
1202
- if (!Cstr) {
1203
- throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1204
- }
1205
- if (!Cstr.isProxied) {
1206
- {
1207
- cmpMeta.$watchers$ = Cstr.watchers;
1208
- }
1209
- proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1210
- Cstr.isProxied = true;
1211
- }
1212
- const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
1213
- {
1214
- hostRef.$flags$ |= 8 /* isConstructingInstance */;
1215
- }
1216
- try {
1217
- new Cstr(hostRef);
1218
- } catch (e) {
1219
- consoleError(e, elm);
1220
- }
1221
- {
1222
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1223
- }
1224
- {
1225
- hostRef.$flags$ |= 128 /* isWatchReady */;
1226
- }
1227
- endNewInstance();
1228
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1229
- } else {
1230
- Cstr = elm.constructor;
1231
- const cmpTag = elm.localName;
1232
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1233
- }
1234
- if (Cstr && Cstr.style) {
1235
- let style;
1236
- if (typeof Cstr.style === "string") {
1237
- style = Cstr.style;
1238
- }
1239
- const scopeId2 = getScopeId(cmpMeta);
1240
- if (!styles.has(scopeId2)) {
1241
- const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
1242
- registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
1243
- endRegisterStyles();
1244
- }
1245
- }
1246
- }
1247
- const ancestorComponent = hostRef.$ancestorComponent$;
1248
- const schedule = () => scheduleUpdate(hostRef, true);
1249
- if (ancestorComponent && ancestorComponent["s-rc"]) {
1250
- ancestorComponent["s-rc"].push(schedule);
1251
- } else {
1252
- schedule();
1253
- }
1254
- };
1255
- var fireConnectedCallback = (instance, elm) => {
1256
- {
1257
- safeCall(instance, "connectedCallback", void 0, elm);
1258
- }
1259
- };
1260
-
1261
- // src/runtime/connected-callback.ts
1262
- var connectedCallback = (elm) => {
1263
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1264
- const hostRef = getHostRef(elm);
1265
- const cmpMeta = hostRef.$cmpMeta$;
1266
- const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1267
- if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1268
- hostRef.$flags$ |= 1 /* hasConnected */;
1269
- {
1270
- let ancestorComponent = elm;
1271
- while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1272
- if (ancestorComponent["s-p"]) {
1273
- attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1274
- break;
1275
- }
1276
- }
1277
- }
1278
- if (cmpMeta.$members$) {
1279
- Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1280
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1281
- const value = elm[memberName];
1282
- delete elm[memberName];
1283
- elm[memberName] = value;
1284
- }
1285
- });
1286
- }
1287
- {
1288
- initializeComponent(elm, hostRef, cmpMeta);
1289
- }
1290
- } else {
1291
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1292
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1293
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1294
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1295
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1296
- }
1297
- }
1298
- endConnected();
1299
- }
1300
- };
1301
- var disconnectInstance = (instance, elm) => {
1302
- {
1303
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1304
- }
1305
- };
1306
- var disconnectedCallback = async (elm) => {
1307
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1308
- const hostRef = getHostRef(elm);
1309
- {
1310
- if (hostRef.$rmListeners$) {
1311
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1312
- hostRef.$rmListeners$ = void 0;
1313
- }
1314
- }
1315
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1316
- disconnectInstance(hostRef.$lazyInstance$, elm);
1317
- } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1318
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1319
- }
1320
- }
1321
- if (rootAppliedStyles.has(elm)) {
1322
- rootAppliedStyles.delete(elm);
1323
- }
1324
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1325
- rootAppliedStyles.delete(elm.shadowRoot);
1326
- }
1327
- };
1328
-
1329
- // src/runtime/bootstrap-lazy.ts
1330
- var bootstrapLazy = (lazyBundles, options = {}) => {
1331
- var _a;
1332
- if (!win.document) {
1333
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
1334
- return;
1335
- }
1336
- const endBootstrap = createTime();
1337
- const cmpTags = [];
1338
- const exclude = options.exclude || [];
1339
- const customElements2 = win.customElements;
1340
- const head = win.document.head;
1341
- const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
1342
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
1343
- const deferredConnectedCallbacks = [];
1344
- let appLoadFallback;
1345
- let isBootstrapping = true;
1346
- Object.assign(plt, options);
1347
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
1348
- let hasSlotRelocation = false;
1349
- lazyBundles.map((lazyBundle) => {
1350
- lazyBundle[1].map((compactMeta) => {
1351
- var _a2;
1352
- const cmpMeta = {
1353
- $flags$: compactMeta[0],
1354
- $tagName$: compactMeta[1],
1355
- $members$: compactMeta[2],
1356
- $listeners$: compactMeta[3]
1357
- };
1358
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1359
- hasSlotRelocation = true;
1360
- }
1361
- {
1362
- cmpMeta.$members$ = compactMeta[2];
1363
- }
1364
- {
1365
- cmpMeta.$listeners$ = compactMeta[3];
1366
- }
1367
- {
1368
- cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1369
- }
1370
- const tagName = cmpMeta.$tagName$;
1371
- const HostElement = class extends HTMLElement {
1372
- // StencilLazyHost
1373
- constructor(self) {
1374
- super(self);
1375
- this.hasRegisteredEventListeners = false;
1376
- self = this;
1377
- registerHost(self, cmpMeta);
1378
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1379
- {
1380
- if (!self.shadowRoot) {
1381
- createShadowRoot.call(self, cmpMeta);
1382
- } else {
1383
- if (self.shadowRoot.mode !== "open") {
1384
- throw new Error(
1385
- `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
1386
- );
1387
- }
1388
- }
1389
- }
1390
- }
1391
- }
1392
- connectedCallback() {
1393
- const hostRef = getHostRef(this);
1394
- if (!this.hasRegisteredEventListeners) {
1395
- this.hasRegisteredEventListeners = true;
1396
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1397
- }
1398
- if (appLoadFallback) {
1399
- clearTimeout(appLoadFallback);
1400
- appLoadFallback = null;
1401
- }
1402
- if (isBootstrapping) {
1403
- deferredConnectedCallbacks.push(this);
1404
- } else {
1405
- plt.jmp(() => connectedCallback(this));
1406
- }
1407
- }
1408
- disconnectedCallback() {
1409
- plt.jmp(() => disconnectedCallback(this));
1410
- plt.raf(() => {
1411
- var _a3;
1412
- const hostRef = getHostRef(this);
1413
- const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1414
- if (i2 > -1) {
1415
- deferredConnectedCallbacks.splice(i2, 1);
1416
- }
1417
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1418
- delete hostRef.$vnode$.$elm$;
1419
- }
1420
- });
1421
- }
1422
- componentOnReady() {
1423
- return getHostRef(this).$onReadyPromise$;
1424
- }
1425
- };
1426
- cmpMeta.$lazyBundleId$ = lazyBundle[0];
1427
- if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
1428
- cmpTags.push(tagName);
1429
- customElements2.define(
1430
- tagName,
1431
- proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
1432
- );
1433
- }
1434
- });
1435
- });
1436
- if (cmpTags.length > 0) {
1437
- if (hasSlotRelocation) {
1438
- dataStyles.textContent += SLOT_FB_CSS;
1439
- }
1440
- {
1441
- dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
1442
- }
1443
- if (dataStyles.innerHTML.length) {
1444
- dataStyles.setAttribute("data-styles", "");
1445
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1446
- if (nonce != null) {
1447
- dataStyles.setAttribute("nonce", nonce);
1448
- }
1449
- head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
1450
- }
1451
- }
1452
- isBootstrapping = false;
1453
- if (deferredConnectedCallbacks.length) {
1454
- deferredConnectedCallbacks.map((host) => host.connectedCallback());
1455
- } else {
1456
- {
1457
- plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
1458
- }
1459
- }
1460
- endBootstrap();
1461
- };
1462
-
1463
- // src/runtime/fragment.ts
1464
- var Fragment = (_, children) => children;
1465
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1466
- if (listeners && win.document) {
1467
- listeners.map(([flags, name, method]) => {
1468
- const target = getHostListenerTarget(win.document, elm, flags) ;
1469
- const handler = hostListenerProxy(hostRef, method);
1470
- const opts = hostListenerOpts(flags);
1471
- plt.ael(target, name, handler, opts);
1472
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1473
- });
1474
- }
1475
- };
1476
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1477
- var _a;
1478
- try {
1479
- {
1480
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1481
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1482
- } else {
1483
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1484
- }
1485
- }
1486
- } catch (e) {
1487
- consoleError(e, hostRef.$hostElement$);
1488
- }
1489
- };
1490
- var getHostListenerTarget = (doc, elm, flags) => {
1491
- if (flags & 4 /* TargetDocument */) {
1492
- return doc;
1493
- }
1494
- return elm;
1495
- };
1496
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1497
- passive: (flags & 1 /* Passive */) !== 0,
1498
- capture: (flags & 2 /* Capture */) !== 0
1499
- } : (flags & 2 /* Capture */) !== 0;
1500
-
1501
- // src/runtime/nonce.ts
1502
- var setNonce = (nonce) => plt.$nonce$ = nonce;
1503
-
1504
- export { Fragment as F, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1505
- //# sourceMappingURL=index-BGwuI2U_.js.map
1506
-
1507
- //# sourceMappingURL=index-BGwuI2U_.js.map