@lmvz-ds/components 0.16.0 → 0.17.1

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 (248) hide show
  1. package/dist/cjs/{icons-BOM23oli.js → Effect-DdYOHaR4.js} +153 -889
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
  3. package/dist/cjs/aria-loader-BRxRUIyi.js +121 -0
  4. package/dist/cjs/{assets-XY-cBmal.js → assets-OvQ-WUwR.js} +2 -5
  5. package/dist/cjs/component-Csg9MtNK.js +140 -0
  6. package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
  7. package/dist/cjs/icons-EHBLbidD.js +653 -0
  8. package/dist/cjs/{index-ww_DCXU7.js → index-BBqtydE-.js} +426 -431
  9. package/dist/cjs/index-Bp6Dd2i1.js +94 -0
  10. package/dist/cjs/{index-B1Puzu82.js → index-CH-YLRgg.js} +650 -10
  11. package/dist/cjs/index.cjs.js +12 -13
  12. package/dist/cjs/lmvz-action.cjs.entry.js +2 -5
  13. package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
  14. package/dist/cjs/lmvz-card.cjs.entry.js +3 -6
  15. package/dist/cjs/lmvz-chip.cjs.entry.js +2 -5
  16. package/dist/cjs/lmvz-components.cjs.js +2 -5
  17. package/dist/cjs/lmvz-header_2.cjs.entry.js +153 -0
  18. package/dist/cjs/lmvz-icon.cjs.entry.js +87 -0
  19. package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
  20. package/dist/cjs/lmvz-menuitem.cjs.entry.js +36 -0
  21. package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
  22. package/dist/cjs/loader.cjs.js +2 -5
  23. package/dist/cjs/reactive-controller-host-vy1TIIXv.js +189 -0
  24. package/dist/collection/api/ds.constants.js +0 -1
  25. package/dist/collection/api/index.js +0 -1
  26. package/dist/collection/collection-manifest.json +13 -1
  27. package/dist/collection/components/lmvz-action/lmvz-action.js +1 -2
  28. package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
  29. package/dist/collection/components/lmvz-button/lmvz-button.js +1 -2
  30. package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
  31. package/dist/collection/components/lmvz-card/lmvz-card.js +1 -2
  32. package/dist/collection/components/lmvz-chip/lmvz-chip.js +1 -2
  33. package/dist/collection/components/lmvz-header/lmvz-header.js +1 -2
  34. package/dist/collection/components/lmvz-icon/icons.js +0 -1
  35. package/dist/collection/components/lmvz-icon/lmvz-icon.js +1 -2
  36. package/dist/collection/components/lmvz-icon/public.js +0 -1
  37. package/dist/collection/components/lmvz-icon/test/icons.unit.js +0 -1
  38. package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
  39. package/dist/collection/components/lmvz-input/lmvz-input.js +2 -3
  40. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
  41. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -2
  42. package/dist/collection/components/lmvz-select/lmvz-select.css +2 -24
  43. package/dist/collection/components/lmvz-select/lmvz-select.js +1 -2
  44. package/dist/collection/index.js +0 -1
  45. package/dist/collection/integration/header-integration.js +1 -2
  46. package/dist/collection/utils/aria/aria-validation-controller.js +0 -1
  47. package/dist/collection/utils/aria/element-activation-controller.js +0 -1
  48. package/dist/collection/utils/aria/list-keyboard-controller.js +0 -1
  49. package/dist/collection/utils/assets.js +0 -1
  50. package/dist/collection/utils/component.js +0 -1
  51. package/dist/collection/utils/effect.js +0 -1
  52. package/dist/collection/utils/environment.js +0 -1
  53. package/dist/collection/utils/http.js +0 -1
  54. package/dist/collection/utils/http.unit.js +0 -1
  55. package/dist/collection/utils/public.js +0 -1
  56. package/dist/collection/utils/reactive-controller-host.js +0 -1
  57. package/dist/collection/utils/validation/svg.js +0 -1
  58. package/dist/components/index.d.ts +0 -2
  59. package/dist/components/index.js +1 -2
  60. package/dist/components/lmvz-action.js +1 -2
  61. package/dist/components/lmvz-button.js +1 -2
  62. package/dist/components/lmvz-card.js +1 -2
  63. package/dist/components/lmvz-chip.js +1 -2
  64. package/dist/components/lmvz-header.js +1 -2
  65. package/dist/components/lmvz-icon.js +1 -2
  66. package/dist/components/lmvz-input.js +1 -2
  67. package/dist/components/lmvz-menuitem.js +1 -2
  68. package/dist/components/lmvz-select.js +1 -2
  69. package/dist/components/p-BfTCfPZ1.js +2 -3
  70. package/dist/components/p-BsHYIl56.js +1 -2
  71. package/dist/components/p-CKtksB0G.js +1 -0
  72. package/dist/components/p-CN0JX9-m.js +1 -2
  73. package/dist/components/p-CahBdGGN.js +1 -0
  74. package/dist/components/p-DQEkWkMh.js +1 -2
  75. package/dist/components/p-GKEnURpp.js +1 -0
  76. package/dist/components/p-vIq2biqy.js +2 -3
  77. package/dist/esm/{icons-D1lxdRXP.js → Effect-9SROYpxM.js} +91 -854
  78. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  79. package/dist/esm/aria-loader-JxXwTAe5.js +114 -0
  80. package/dist/esm/{assets-BD98wsl7.js → assets-CNHv_WMG.js} +1 -4
  81. package/dist/esm/component-DIrAQ4IB.js +134 -0
  82. package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
  83. package/dist/esm/icons-B255FOe4.js +649 -0
  84. package/dist/esm/{index-DoNkkDv1.js → index-BW1YMEA3.js} +1 -6
  85. package/dist/esm/index-BfTCfPZ1.js +92 -0
  86. package/dist/esm/{index-WeqgWisK.js → index-CQb-mBBB.js} +650 -10
  87. package/dist/esm/index.js +5 -7
  88. package/dist/esm/lmvz-action.entry.js +2 -5
  89. package/dist/esm/lmvz-button.entry.js +71 -0
  90. package/dist/esm/lmvz-card.entry.js +3 -6
  91. package/dist/esm/lmvz-chip.entry.js +2 -5
  92. package/dist/esm/lmvz-components.js +3 -6
  93. package/dist/esm/lmvz-header_2.entry.js +150 -0
  94. package/dist/esm/lmvz-icon.entry.js +85 -0
  95. package/dist/esm/lmvz-input.entry.js +181 -0
  96. package/dist/esm/lmvz-menuitem.entry.js +34 -0
  97. package/dist/esm/lmvz-select.entry.js +69 -0
  98. package/dist/esm/loader.js +3 -6
  99. package/dist/esm/reactive-controller-host-OhKYwMvP.js +186 -0
  100. package/dist/lmvz-components/index.esm.js +1 -2
  101. package/dist/lmvz-components/lmvz-components.esm.js +1 -2
  102. package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
  103. package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
  104. package/dist/lmvz-components/p-4530f088.entry.js +1 -0
  105. package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
  106. package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
  107. package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
  108. package/dist/lmvz-components/p-9SROYpxM.js +1 -0
  109. package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
  110. package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
  111. package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
  112. package/dist/lmvz-components/p-CQb-mBBB.js +2 -0
  113. package/dist/lmvz-components/p-Cp76bcGb.js +1 -0
  114. package/dist/lmvz-components/p-Cp7cp10e.js +12 -0
  115. package/dist/lmvz-components/p-DIrAQ4IB.js +1 -0
  116. package/dist/lmvz-components/p-DQuL1Twl.js +1 -2
  117. package/dist/lmvz-components/p-DyO6wO4l.js +1 -0
  118. package/dist/lmvz-components/p-b8926640.entry.js +1 -0
  119. package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
  120. package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
  121. package/dist/lmvz-components/p-i2508Ct1.js +1 -0
  122. package/dist/manifest.json +11 -47
  123. package/dist/stencil.config.base.js +0 -1
  124. package/dist/stencil.config.dev.js +0 -1
  125. package/dist/stencil.config.integration.js +0 -1
  126. package/dist/stencil.config.js +0 -1
  127. package/dist/stencil.config.prod.js +0 -1
  128. package/dist/types/components.d.ts +0 -18
  129. package/hydrate/index.js +11 -11
  130. package/hydrate/index.mjs +11 -11
  131. package/package.json +4 -4
  132. package/readme.md +1 -1
  133. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
  134. package/dist/cjs/assets-XY-cBmal.js.map +0 -1
  135. package/dist/cjs/header-integration_7.cjs.entry.js +0 -1024
  136. package/dist/cjs/header-integration_7.cjs.entry.js.map +0 -1
  137. package/dist/cjs/icons-BOM23oli.js.map +0 -1
  138. package/dist/cjs/index-B1Puzu82.js.map +0 -1
  139. package/dist/cjs/index-ww_DCXU7.js.map +0 -1
  140. package/dist/cjs/index.cjs.js.map +0 -1
  141. package/dist/cjs/lmvz-action.cjs.entry.js.map +0 -1
  142. package/dist/cjs/lmvz-card.cjs.entry.js.map +0 -1
  143. package/dist/cjs/lmvz-chip.cjs.entry.js.map +0 -1
  144. package/dist/cjs/lmvz-components.cjs.js.map +0 -1
  145. package/dist/cjs/loader.cjs.js.map +0 -1
  146. package/dist/collection/api/ds.constants.js.map +0 -1
  147. package/dist/collection/api/index.js.map +0 -1
  148. package/dist/collection/components/lmvz-action/lmvz-action.js.map +0 -1
  149. package/dist/collection/components/lmvz-button/lmvz-button.js.map +0 -1
  150. package/dist/collection/components/lmvz-card/lmvz-card.js.map +0 -1
  151. package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +0 -1
  152. package/dist/collection/components/lmvz-header/lmvz-header.js.map +0 -1
  153. package/dist/collection/components/lmvz-icon/icons.js.map +0 -1
  154. package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +0 -1
  155. package/dist/collection/components/lmvz-icon/public.js.map +0 -1
  156. package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +0 -1
  157. package/dist/collection/components/lmvz-input/lmvz-input.js.map +0 -1
  158. package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +0 -1
  159. package/dist/collection/components/lmvz-select/lmvz-select.js.map +0 -1
  160. package/dist/collection/index.js.map +0 -1
  161. package/dist/collection/integration/header-integration.js.map +0 -1
  162. package/dist/collection/utils/aria/aria-validation-controller.js.map +0 -1
  163. package/dist/collection/utils/aria/element-activation-controller.js.map +0 -1
  164. package/dist/collection/utils/aria/list-keyboard-controller.js.map +0 -1
  165. package/dist/collection/utils/assets.js.map +0 -1
  166. package/dist/collection/utils/component.js.map +0 -1
  167. package/dist/collection/utils/effect.js.map +0 -1
  168. package/dist/collection/utils/environment.js.map +0 -1
  169. package/dist/collection/utils/http.js.map +0 -1
  170. package/dist/collection/utils/http.unit.js.map +0 -1
  171. package/dist/collection/utils/public.js.map +0 -1
  172. package/dist/collection/utils/reactive-controller-host.js.map +0 -1
  173. package/dist/collection/utils/validation/svg.js.map +0 -1
  174. package/dist/components/header-integration.d.ts +0 -11
  175. package/dist/components/header-integration.js +0 -2
  176. package/dist/components/header-integration.js.map +0 -1
  177. package/dist/components/index.js.map +0 -1
  178. package/dist/components/lmvz-action.js.map +0 -1
  179. package/dist/components/lmvz-button.js.map +0 -1
  180. package/dist/components/lmvz-card.js.map +0 -1
  181. package/dist/components/lmvz-chip.js.map +0 -1
  182. package/dist/components/lmvz-header.js.map +0 -1
  183. package/dist/components/lmvz-icon.js.map +0 -1
  184. package/dist/components/lmvz-input.js.map +0 -1
  185. package/dist/components/lmvz-menuitem.js.map +0 -1
  186. package/dist/components/lmvz-select.js.map +0 -1
  187. package/dist/components/p-B2g3aN-E.js +0 -2
  188. package/dist/components/p-B2g3aN-E.js.map +0 -1
  189. package/dist/components/p-BXdOuZTp.js +0 -2
  190. package/dist/components/p-BXdOuZTp.js.map +0 -1
  191. package/dist/components/p-BfTCfPZ1.js.map +0 -1
  192. package/dist/components/p-BpCjj39Z.js +0 -2
  193. package/dist/components/p-BpCjj39Z.js.map +0 -1
  194. package/dist/components/p-BsHYIl56.js.map +0 -1
  195. package/dist/components/p-C5rqq3bf.js +0 -2
  196. package/dist/components/p-C5rqq3bf.js.map +0 -1
  197. package/dist/components/p-CI0tffvo.js +0 -2
  198. package/dist/components/p-CI0tffvo.js.map +0 -1
  199. package/dist/components/p-CN0JX9-m.js.map +0 -1
  200. package/dist/components/p-ClmDNIy4.js +0 -2
  201. package/dist/components/p-ClmDNIy4.js.map +0 -1
  202. package/dist/components/p-DQEkWkMh.js.map +0 -1
  203. package/dist/components/p-X5fEFT9T.js +0 -2
  204. package/dist/components/p-X5fEFT9T.js.map +0 -1
  205. package/dist/components/p-vIq2biqy.js.map +0 -1
  206. package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
  207. package/dist/esm/assets-BD98wsl7.js.map +0 -1
  208. package/dist/esm/header-integration_7.entry.js +0 -1016
  209. package/dist/esm/header-integration_7.entry.js.map +0 -1
  210. package/dist/esm/icons-D1lxdRXP.js.map +0 -1
  211. package/dist/esm/index-DoNkkDv1.js.map +0 -1
  212. package/dist/esm/index-WeqgWisK.js.map +0 -1
  213. package/dist/esm/index.js.map +0 -1
  214. package/dist/esm/lmvz-action.entry.js.map +0 -1
  215. package/dist/esm/lmvz-card.entry.js.map +0 -1
  216. package/dist/esm/lmvz-chip.entry.js.map +0 -1
  217. package/dist/esm/lmvz-components.js.map +0 -1
  218. package/dist/esm/loader.js.map +0 -1
  219. package/dist/lmvz-components/index.esm.js.map +0 -1
  220. package/dist/lmvz-components/lmvz-components.esm.js.map +0 -1
  221. package/dist/lmvz-components/p-33485219.entry.js +0 -2
  222. package/dist/lmvz-components/p-33485219.entry.js.map +0 -1
  223. package/dist/lmvz-components/p-76032c32.entry.js +0 -2
  224. package/dist/lmvz-components/p-76032c32.entry.js.map +0 -1
  225. package/dist/lmvz-components/p-7aeec9a8.entry.js +0 -7
  226. package/dist/lmvz-components/p-7aeec9a8.entry.js.map +0 -1
  227. package/dist/lmvz-components/p-84e0a9dd.entry.js +0 -2
  228. package/dist/lmvz-components/p-84e0a9dd.entry.js.map +0 -1
  229. package/dist/lmvz-components/p-CkJb8WVZ.js +0 -2
  230. package/dist/lmvz-components/p-CkJb8WVZ.js.map +0 -1
  231. package/dist/lmvz-components/p-DQuL1Twl.js.map +0 -1
  232. package/dist/lmvz-components/p-WeqgWisK.js +0 -3
  233. package/dist/lmvz-components/p-WeqgWisK.js.map +0 -1
  234. package/dist/lmvz-components/p-Z9X0_ik0.js +0 -2
  235. package/dist/lmvz-components/p-Z9X0_ik0.js.map +0 -1
  236. package/dist/lmvz-components/p-eP0oxQ44.js +0 -13
  237. package/dist/lmvz-components/p-eP0oxQ44.js.map +0 -1
  238. package/dist/stencil.config.base.js.map +0 -1
  239. package/dist/stencil.config.dev.js.map +0 -1
  240. package/dist/stencil.config.integration.js.map +0 -1
  241. package/dist/stencil.config.js.map +0 -1
  242. package/dist/stencil.config.prod.js.map +0 -1
  243. package/dist/types/integration/header-integration.d.ts +0 -5
  244. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.base.d.ts +0 -0
  245. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.d.ts +0 -0
  246. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.dev.d.ts +0 -0
  247. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.integration.d.ts +0 -0
  248. /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
@@ -7,6 +7,30 @@ const BUILD = /* lmvz-components */ { hotModuleReplacement: false, hydratedSelec
7
7
 
8
8
  var Build = {
9
9
  isDev: false};
10
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
11
+ PrimitiveType2["Undefined"] = "undefined";
12
+ PrimitiveType2["Null"] = "null";
13
+ PrimitiveType2["String"] = "string";
14
+ PrimitiveType2["Number"] = "number";
15
+ PrimitiveType2["SpecialNumber"] = "number";
16
+ PrimitiveType2["Boolean"] = "boolean";
17
+ PrimitiveType2["BigInt"] = "bigint";
18
+ return PrimitiveType2;
19
+ })(PrimitiveType || {});
20
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
21
+ NonPrimitiveType2["Array"] = "array";
22
+ NonPrimitiveType2["Date"] = "date";
23
+ NonPrimitiveType2["Map"] = "map";
24
+ NonPrimitiveType2["Object"] = "object";
25
+ NonPrimitiveType2["RegularExpression"] = "regexp";
26
+ NonPrimitiveType2["Set"] = "set";
27
+ NonPrimitiveType2["Channel"] = "channel";
28
+ NonPrimitiveType2["Symbol"] = "symbol";
29
+ return NonPrimitiveType2;
30
+ })(NonPrimitiveType || {});
31
+ var TYPE_CONSTANT = "type";
32
+ var VALUE_CONSTANT = "value";
33
+ var SERIALIZED_PREFIX = "serialized:";
10
34
 
11
35
  // src/utils/get-prop-descriptor.ts
12
36
  function getPropertyDescriptor(obj, memberName, getOnly) {
@@ -124,6 +148,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
124
148
 
125
149
  // src/client/client-style.ts
126
150
  var styles = /* @__PURE__ */ new Map();
151
+
152
+ // src/runtime/runtime-constants.ts
153
+ var CONTENT_REF_ID = "r";
154
+ var ORG_LOCATION_ID = "o";
155
+ var SLOT_NODE_ID = "s";
156
+ var TEXT_NODE_ID = "t";
157
+ var COMMENT_NODE_ID = "c";
158
+ var HYDRATE_ID = "s-id";
159
+ var HYDRATED_STYLE_ID = "sty-id";
160
+ var HYDRATE_CHILD_ID = "c-id";
127
161
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
128
162
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
129
163
  var XLINK_NS = "http://www.w3.org/1999/xlink";
@@ -290,6 +324,34 @@ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
290
324
  }
291
325
  return slotName === "";
292
326
  };
327
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
328
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
329
+ return;
330
+ }
331
+ const slottedNodeLocation = document.createTextNode("");
332
+ slottedNodeLocation["s-nr"] = newChild;
333
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
334
+ const parent = slotNode["s-cr"].parentNode;
335
+ const appendMethod = internalCall(parent, "appendChild");
336
+ if (typeof position !== "undefined") {
337
+ slottedNodeLocation["s-oo"] = position;
338
+ const childNodes = internalCall(parent, "childNodes");
339
+ const slotRelocateNodes = [slottedNodeLocation];
340
+ childNodes.forEach((n) => {
341
+ if (n["s-nr"]) slotRelocateNodes.push(n);
342
+ });
343
+ slotRelocateNodes.sort((a, b) => {
344
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
345
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
346
+ return 0;
347
+ });
348
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
349
+ } else {
350
+ appendMethod.call(parent, slottedNodeLocation);
351
+ }
352
+ newChild["s-ol"] = slottedNodeLocation;
353
+ newChild["s-sh"] = slotNode["s-hn"];
354
+ };
293
355
  var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
294
356
  function patchSlotNode(node) {
295
357
  if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
@@ -393,7 +455,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
393
455
  if (!appliedStyles) {
394
456
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
395
457
  }
396
- if (!appliedStyles.has(scopeId2)) {
458
+ const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
459
+ if (existingStyleElm) {
460
+ existingStyleElm.textContent = style;
461
+ } else if (!appliedStyles.has(scopeId2)) {
397
462
  styleElm = win.document.createElement("style");
398
463
  styleElm.textContent = style;
399
464
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
@@ -462,6 +527,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
462
527
  styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
463
528
  }
464
529
  appliedStyles.add(scopeId2);
530
+ if ("host" in styleContainerNode) {
531
+ const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
532
+ if (ssrStyleElm) {
533
+ writeTask(() => ssrStyleElm.remove());
534
+ }
535
+ }
465
536
  }
466
537
  }
467
538
  }
@@ -482,6 +553,17 @@ var attachStyles = (hostRef) => {
482
553
  endAttachStyles();
483
554
  };
484
555
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
556
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
557
+ var hydrateScopedToShadow = () => {
558
+ if (!win.document) {
559
+ return;
560
+ }
561
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
562
+ let i2 = 0;
563
+ for (; i2 < styles2.length; i2++) {
564
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
565
+ }
566
+ };
485
567
 
486
568
  // src/utils/helpers.ts
487
569
  var isDef = (v) => v != null && v !== void 0;
@@ -570,8 +652,529 @@ var newVNode = (tag, text) => {
570
652
  var Host = {};
571
653
  var isHost = (node) => node && node.$tag$ === Host;
572
654
 
655
+ // src/runtime/client-hydrate.ts
656
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
657
+ var _a, _b, _c, _d;
658
+ const endHydrate = createTime("hydrateClient", tagName);
659
+ const shadowRoot = hostElm.shadowRoot;
660
+ const childRenderNodes = [];
661
+ const slotNodes = [];
662
+ const slottedNodes = [];
663
+ const shadowRootNodes = shadowRoot ? [] : null;
664
+ const vnode = newVNode(tagName, null);
665
+ vnode.$elm$ = hostElm;
666
+ let scopeId2;
667
+ {
668
+ const cmpMeta = hostRef.$cmpMeta$;
669
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
670
+ scopeId2 = hostElm["s-sc"];
671
+ hostElm.classList.add(scopeId2 + "-h");
672
+ } else if (hostElm["s-sc"]) {
673
+ delete hostElm["s-sc"];
674
+ }
675
+ }
676
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
677
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
678
+ }
679
+ hostElm[HYDRATE_ID] = hostId;
680
+ hostElm.removeAttribute(HYDRATE_ID);
681
+ hostRef.$vnode$ = clientHydrate(
682
+ vnode,
683
+ childRenderNodes,
684
+ slotNodes,
685
+ shadowRootNodes,
686
+ hostElm,
687
+ hostElm,
688
+ hostId,
689
+ slottedNodes
690
+ );
691
+ let crIndex = 0;
692
+ const crLength = childRenderNodes.length;
693
+ let childRenderNode;
694
+ for (crIndex; crIndex < crLength; crIndex++) {
695
+ childRenderNode = childRenderNodes[crIndex];
696
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
697
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
698
+ const node = childRenderNode.$elm$;
699
+ if (!shadowRoot) {
700
+ node["s-hn"] = transformTag(tagName).toUpperCase();
701
+ if (childRenderNode.$tag$ === "slot") {
702
+ node["s-cr"] = hostElm["s-cr"];
703
+ }
704
+ } else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
705
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
706
+ if (cmpMeta) {
707
+ const scopeId3 = getScopeId(
708
+ cmpMeta.$cmpMeta$);
709
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
710
+ if (styleSheet) {
711
+ shadowRootNodes.unshift(styleSheet.cloneNode(true));
712
+ }
713
+ }
714
+ }
715
+ if (childRenderNode.$tag$ === "slot") {
716
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
717
+ if (childRenderNode.$children$) {
718
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
719
+ if (!childRenderNode.$elm$.childNodes.length) {
720
+ childRenderNode.$children$.forEach((c) => {
721
+ childRenderNode.$elm$.appendChild(c.$elm$);
722
+ });
723
+ }
724
+ } else {
725
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
726
+ }
727
+ }
728
+ if (orgLocationNode && orgLocationNode.isConnected) {
729
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
730
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
731
+ }
732
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
733
+ if (!shadowRoot) {
734
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
735
+ }
736
+ }
737
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
738
+ plt.$orgLocNodes$.delete(orgLocationId);
739
+ }
740
+ }
741
+ const hosts = [];
742
+ const snLen = slottedNodes.length;
743
+ let snIndex = 0;
744
+ let slotGroup;
745
+ let snGroupIdx;
746
+ let snGroupLen;
747
+ let slottedItem;
748
+ let currentPos = 0;
749
+ for (snIndex; snIndex < snLen; snIndex++) {
750
+ slotGroup = slottedNodes[snIndex];
751
+ if (!slotGroup || !slotGroup.length) continue;
752
+ snGroupLen = slotGroup.length;
753
+ snGroupIdx = 0;
754
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
755
+ slottedItem = slotGroup[snGroupIdx];
756
+ if (!hosts[slottedItem.hostId]) {
757
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
758
+ }
759
+ if (!hosts[slottedItem.hostId]) continue;
760
+ const hostEle = hosts[slottedItem.hostId];
761
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
762
+ hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
763
+ }
764
+ if (!hostEle.shadowRoot || !shadowRoot) {
765
+ if (!slottedItem.slot["s-cr"]) {
766
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
767
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
768
+ slottedItem.slot["s-cr"] = hostEle;
769
+ } else {
770
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
771
+ }
772
+ }
773
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
774
+ if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
775
+ slottedItem.node.removeAttribute("slot");
776
+ }
777
+ }
778
+ currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
779
+ }
780
+ }
781
+ if (scopeId2 && slotNodes.length) {
782
+ slotNodes.forEach((slot) => {
783
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
784
+ });
785
+ }
786
+ if (shadowRoot && !shadowRoot.childNodes.length) {
787
+ let rnIdex = 0;
788
+ const rnLen = shadowRootNodes.length;
789
+ if (rnLen) {
790
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
791
+ const node = shadowRootNodes[rnIdex];
792
+ if (node) {
793
+ shadowRoot.appendChild(node);
794
+ }
795
+ }
796
+ Array.from(hostElm.childNodes).forEach((node) => {
797
+ if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
798
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
799
+ node.removeAttribute("hidden");
800
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
801
+ node.parentNode.removeChild(node);
802
+ }
803
+ }
804
+ });
805
+ }
806
+ }
807
+ hostRef.$hostElement$ = hostElm;
808
+ endHydrate();
809
+ };
810
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
811
+ let childNodeType;
812
+ let childIdSplt;
813
+ let childVNode;
814
+ let i2;
815
+ const scopeId2 = hostElm["s-sc"];
816
+ if (node.nodeType === 1 /* ElementNode */) {
817
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
818
+ if (childNodeType) {
819
+ childIdSplt = childNodeType.split(".");
820
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
821
+ childVNode = createSimpleVNode({
822
+ $flags$: 0,
823
+ $hostId$: childIdSplt[0],
824
+ $nodeId$: childIdSplt[1],
825
+ $depth$: childIdSplt[2],
826
+ $index$: childIdSplt[3],
827
+ $tag$: node.tagName.toLowerCase(),
828
+ $elm$: node,
829
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
830
+ // won't try to reconcile them. Classes set on the node will be blown away.
831
+ $attrs$: { class: node.className || "" }
832
+ });
833
+ childRenderNodes.push(childVNode);
834
+ node.removeAttribute(HYDRATE_CHILD_ID);
835
+ if (!parentVNode.$children$) {
836
+ parentVNode.$children$ = [];
837
+ }
838
+ if (scopeId2 && childIdSplt[0] === hostId) {
839
+ node["s-si"] = scopeId2;
840
+ childVNode.$attrs$.class += " " + scopeId2;
841
+ }
842
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
843
+ if (typeof slotName === "string") {
844
+ if (childVNode.$tag$ === "slot-fb") {
845
+ addSlot(
846
+ slotName,
847
+ childIdSplt[2],
848
+ childVNode,
849
+ node,
850
+ parentVNode,
851
+ childRenderNodes,
852
+ slotNodes,
853
+ shadowRootNodes,
854
+ slottedNodes
855
+ );
856
+ if (scopeId2) {
857
+ node.classList.add(scopeId2);
858
+ }
859
+ }
860
+ childVNode.$elm$["s-sn"] = slotName;
861
+ childVNode.$elm$.removeAttribute("s-sn");
862
+ }
863
+ if (childVNode.$index$ !== void 0) {
864
+ parentVNode.$children$[childVNode.$index$] = childVNode;
865
+ }
866
+ parentVNode = childVNode;
867
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
868
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
869
+ }
870
+ }
871
+ }
872
+ if (node.shadowRoot) {
873
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
874
+ clientHydrate(
875
+ parentVNode,
876
+ childRenderNodes,
877
+ slotNodes,
878
+ shadowRootNodes,
879
+ hostElm,
880
+ node.shadowRoot.childNodes[i2],
881
+ hostId,
882
+ slottedNodes
883
+ );
884
+ }
885
+ }
886
+ const nonShadowNodes = node.__childNodes || node.childNodes;
887
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
888
+ clientHydrate(
889
+ parentVNode,
890
+ childRenderNodes,
891
+ slotNodes,
892
+ shadowRootNodes,
893
+ hostElm,
894
+ nonShadowNodes[i2],
895
+ hostId,
896
+ slottedNodes
897
+ );
898
+ }
899
+ } else if (node.nodeType === 8 /* CommentNode */) {
900
+ childIdSplt = node.nodeValue.split(".");
901
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
902
+ childNodeType = childIdSplt[0];
903
+ childVNode = createSimpleVNode({
904
+ $hostId$: childIdSplt[1],
905
+ $nodeId$: childIdSplt[2],
906
+ $depth$: childIdSplt[3],
907
+ $index$: childIdSplt[4] || "0",
908
+ $elm$: node,
909
+ $attrs$: null,
910
+ $children$: null,
911
+ $key$: null,
912
+ $name$: null,
913
+ $tag$: null,
914
+ $text$: null
915
+ });
916
+ if (childNodeType === TEXT_NODE_ID) {
917
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
918
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
919
+ childVNode.$text$ = childVNode.$elm$.textContent;
920
+ childRenderNodes.push(childVNode);
921
+ node.remove();
922
+ if (hostId === childVNode.$hostId$) {
923
+ if (!parentVNode.$children$) {
924
+ parentVNode.$children$ = [];
925
+ }
926
+ parentVNode.$children$[childVNode.$index$] = childVNode;
927
+ }
928
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
929
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
930
+ }
931
+ }
932
+ } else if (childNodeType === COMMENT_NODE_ID) {
933
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
934
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
935
+ childRenderNodes.push(childVNode);
936
+ node.remove();
937
+ }
938
+ } else if (childVNode.$hostId$ === hostId) {
939
+ if (childNodeType === SLOT_NODE_ID) {
940
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
941
+ addSlot(
942
+ slotName,
943
+ childIdSplt[2],
944
+ childVNode,
945
+ node,
946
+ parentVNode,
947
+ childRenderNodes,
948
+ slotNodes,
949
+ shadowRootNodes,
950
+ slottedNodes
951
+ );
952
+ } else if (childNodeType === CONTENT_REF_ID) {
953
+ if (shadowRootNodes) {
954
+ node.remove();
955
+ } else {
956
+ hostElm["s-cr"] = node;
957
+ node["s-cn"] = true;
958
+ }
959
+ }
960
+ }
961
+ }
962
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
963
+ const vnode = newVNode(null, node.textContent);
964
+ vnode.$elm$ = node;
965
+ vnode.$index$ = "0";
966
+ parentVNode.$children$ = [vnode];
967
+ }
968
+ return parentVNode;
969
+ };
970
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
971
+ if (node.nodeType === 1 /* ElementNode */) {
972
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
973
+ if (componentId) {
974
+ orgLocNodes.set(componentId, node);
975
+ }
976
+ let i2 = 0;
977
+ if (node.shadowRoot) {
978
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
979
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
980
+ }
981
+ }
982
+ const nonShadowNodes = node.__childNodes || node.childNodes;
983
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
984
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
985
+ }
986
+ } else if (node.nodeType === 8 /* CommentNode */) {
987
+ const childIdSplt = node.nodeValue.split(".");
988
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
989
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
990
+ node.nodeValue = "";
991
+ node["s-en"] = childIdSplt[3];
992
+ }
993
+ }
994
+ };
995
+ var createSimpleVNode = (vnode) => {
996
+ const defaultVNode = {
997
+ $flags$: 0,
998
+ $hostId$: null,
999
+ $nodeId$: null,
1000
+ $depth$: null,
1001
+ $index$: "0",
1002
+ $elm$: null,
1003
+ $attrs$: null,
1004
+ $children$: null,
1005
+ $key$: null,
1006
+ $name$: null,
1007
+ $tag$: null,
1008
+ $text$: null
1009
+ };
1010
+ return { ...defaultVNode, ...vnode };
1011
+ };
1012
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1013
+ node["s-sr"] = true;
1014
+ childVNode.$name$ = slotName || null;
1015
+ childVNode.$tag$ = "slot";
1016
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1017
+ if (shadowRootNodes && win.document) {
1018
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1019
+ if (childVNode.$name$) {
1020
+ childVNode.$elm$.setAttribute("name", slotName);
1021
+ }
1022
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1023
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1024
+ } else {
1025
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1026
+ }
1027
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1028
+ node.remove();
1029
+ if (childVNode.$depth$ === "0") {
1030
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1031
+ }
1032
+ } else {
1033
+ const slot = childVNode.$elm$;
1034
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1035
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1036
+ patchSlotNode(node);
1037
+ if (shouldMove) {
1038
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1039
+ }
1040
+ }
1041
+ childRenderNodes.push(childVNode);
1042
+ slotNodes.push(childVNode);
1043
+ if (!parentVNode.$children$) {
1044
+ parentVNode.$children$ = [];
1045
+ }
1046
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1047
+ }
1048
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1049
+ var _a, _b;
1050
+ let slottedNode = slotNode.nextSibling;
1051
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1052
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1053
+ do {
1054
+ if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
1055
+ slottedNode["s-sn"] = slotName;
1056
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1057
+ }
1058
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
1059
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1060
+ };
1061
+ var findCorrespondingNode = (node, type) => {
1062
+ let sibling = node;
1063
+ do {
1064
+ sibling = sibling.nextSibling;
1065
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1066
+ return sibling;
1067
+ };
1068
+
1069
+ // src/utils/remote-value.ts
1070
+ var RemoteValue = class _RemoteValue {
1071
+ /**
1072
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
1073
+ *
1074
+ * @param serialized The serialized LocalValue object
1075
+ * @returns The original JavaScript value/object
1076
+ */
1077
+ static fromLocalValue(serialized) {
1078
+ const type = serialized[TYPE_CONSTANT];
1079
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
1080
+ switch (type) {
1081
+ case "string" /* String */:
1082
+ return value;
1083
+ case "boolean" /* Boolean */:
1084
+ return value;
1085
+ case "bigint" /* BigInt */:
1086
+ return BigInt(value);
1087
+ case "undefined" /* Undefined */:
1088
+ return void 0;
1089
+ case "null" /* Null */:
1090
+ return null;
1091
+ case "number" /* Number */:
1092
+ if (value === "NaN") return NaN;
1093
+ if (value === "-0") return -0;
1094
+ if (value === "Infinity") return Infinity;
1095
+ if (value === "-Infinity") return -Infinity;
1096
+ return value;
1097
+ case "array" /* Array */:
1098
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
1099
+ case "date" /* Date */:
1100
+ return new Date(value);
1101
+ case "map" /* Map */:
1102
+ const map = /* @__PURE__ */ new Map();
1103
+ for (const [key, val] of value) {
1104
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
1105
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
1106
+ map.set(deserializedKey, deserializedValue);
1107
+ }
1108
+ return map;
1109
+ case "object" /* Object */:
1110
+ const obj = {};
1111
+ for (const [key, val] of value) {
1112
+ obj[key] = _RemoteValue.fromLocalValue(val);
1113
+ }
1114
+ return obj;
1115
+ case "regexp" /* RegularExpression */:
1116
+ const { pattern, flags } = value;
1117
+ return new RegExp(pattern, flags);
1118
+ case "set" /* Set */:
1119
+ const set = /* @__PURE__ */ new Set();
1120
+ for (const item of value) {
1121
+ set.add(_RemoteValue.fromLocalValue(item));
1122
+ }
1123
+ return set;
1124
+ case "symbol" /* Symbol */:
1125
+ return Symbol(value);
1126
+ default:
1127
+ throw new Error(`Unsupported type: ${type}`);
1128
+ }
1129
+ }
1130
+ /**
1131
+ * Utility method to deserialize multiple LocalValues at once
1132
+ *
1133
+ * @param serializedValues Array of serialized LocalValue objects
1134
+ * @returns Array of deserialized JavaScript values
1135
+ */
1136
+ static fromLocalValueArray(serializedValues) {
1137
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
1138
+ }
1139
+ /**
1140
+ * Verifies if the given object matches the structure of a serialized LocalValue
1141
+ *
1142
+ * @param obj Object to verify
1143
+ * @returns boolean indicating if the object has LocalValue structure
1144
+ */
1145
+ static isLocalValueObject(obj) {
1146
+ if (typeof obj !== "object" || obj === null) {
1147
+ return false;
1148
+ }
1149
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
1150
+ return false;
1151
+ }
1152
+ const type = obj[TYPE_CONSTANT];
1153
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
1154
+ if (!hasTypeProperty) {
1155
+ return false;
1156
+ }
1157
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
1158
+ return obj.hasOwnProperty(VALUE_CONSTANT);
1159
+ }
1160
+ return true;
1161
+ }
1162
+ };
1163
+
1164
+ // src/utils/serialize.ts
1165
+ function deserializeProperty(value) {
1166
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
1167
+ return value;
1168
+ }
1169
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
1170
+ }
1171
+
573
1172
  // src/runtime/parse-property-value.ts
574
1173
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1174
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1175
+ propValue = deserializeProperty(propValue);
1176
+ return propValue;
1177
+ }
575
1178
  if (propValue != null && !isComplexType(propValue)) {
576
1179
  if (propType & 4 /* Boolean */) {
577
1180
  if (isFormAssociated && typeof propValue === "string") {
@@ -624,7 +1227,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
624
1227
  const classList = elm.classList;
625
1228
  const oldClasses = parseClassList(oldValue);
626
1229
  let newClasses = parseClassList(newValue);
627
- {
1230
+ if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
1231
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
1232
+ newClasses.push(scopeId2);
1233
+ oldClasses.forEach((c) => {
1234
+ if (c.startsWith(scopeId2)) newClasses.push(c);
1235
+ });
1236
+ newClasses = [...new Set(newClasses)].filter((c) => c);
1237
+ classList.add(...newClasses);
1238
+ } else {
628
1239
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
629
1240
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
630
1241
  }
@@ -774,7 +1385,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
774
1385
  oldVnodeAttrs[memberName],
775
1386
  void 0,
776
1387
  isSvgMode2,
777
- newVnode.$flags$);
1388
+ newVnode.$flags$,
1389
+ isInitialRender
1390
+ );
778
1391
  }
779
1392
  }
780
1393
  }
@@ -785,7 +1398,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
785
1398
  oldVnodeAttrs[memberName],
786
1399
  newVnodeAttrs[memberName],
787
1400
  isSvgMode2,
788
- newVnode.$flags$);
1401
+ newVnode.$flags$,
1402
+ isInitialRender
1403
+ );
789
1404
  }
790
1405
  };
791
1406
  function sortedAttrNames(attrNames) {
@@ -1090,7 +1705,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1090
1705
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1091
1706
  }
1092
1707
  }
1093
- updateElement(oldVNode, newVNode2, isSvgMode);
1708
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1094
1709
  }
1095
1710
  if (oldChildren !== null && newChildren !== null) {
1096
1711
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1104,7 +1719,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1104
1719
  !isInitialRender && BUILD.updatable && oldChildren !== null
1105
1720
  ) {
1106
1721
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
1107
- } else ;
1722
+ } else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
1723
+ newVNode2.$children$ = oldChildren;
1724
+ }
1108
1725
  } else if ((defaultHolder = elm["s-cr"])) {
1109
1726
  defaultHolder.parentNode.textContent = text;
1110
1727
  } else if (oldVNode.$text$ !== text) {
@@ -1508,7 +2125,13 @@ var postUpdateComponent = (hostRef) => {
1508
2125
  }
1509
2126
  };
1510
2127
  var appDidLoad = (who) => {
2128
+ var _a;
1511
2129
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2130
+ {
2131
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
2132
+ plt.$orgLocNodes$.clear();
2133
+ }
2134
+ }
1512
2135
  };
1513
2136
  var safeCall = (instance, method, arg, elm) => {
1514
2137
  if (instance && instance[method]) {
@@ -1873,7 +2496,21 @@ var connectedCallback = (elm) => {
1873
2496
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1874
2497
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
1875
2498
  hostRef.$flags$ |= 1 /* hasConnected */;
2499
+ let hostId;
1876
2500
  {
2501
+ hostId = elm.getAttribute(HYDRATE_ID);
2502
+ if (hostId) {
2503
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2504
+ const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
2505
+ elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2506
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2507
+ const scopeId2 = getScopeId(cmpMeta);
2508
+ elm["s-sc"] = scopeId2;
2509
+ }
2510
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2511
+ }
2512
+ }
2513
+ if (!hostId) {
1877
2514
  if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
1878
2515
  cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
1879
2516
  setContentReference(elm);
@@ -1882,7 +2519,7 @@ var connectedCallback = (elm) => {
1882
2519
  {
1883
2520
  let ancestorComponent = elm;
1884
2521
  while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
1885
- if (ancestorComponent["s-p"]) {
2522
+ if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
1886
2523
  attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
1887
2524
  break;
1888
2525
  }
@@ -1961,6 +2598,12 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1961
2598
  let isBootstrapping = true;
1962
2599
  Object.assign(plt, options);
1963
2600
  plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2601
+ {
2602
+ plt.$flags$ |= 2 /* appLoaded */;
2603
+ }
2604
+ {
2605
+ hydrateScopedToShadow();
2606
+ }
1964
2607
  let hasSlotRelocation = false;
1965
2608
  lazyBundles.map((lazyBundle) => {
1966
2609
  lazyBundle[1].map((compactMeta) => {
@@ -2096,6 +2739,3 @@ function transformTag(tag) {
2096
2739
  }
2097
2740
 
2098
2741
  export { Build as B, Host as H, getAssetPath as a, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2099
- //# sourceMappingURL=index-WeqgWisK.js.map
2100
-
2101
- //# sourceMappingURL=index-WeqgWisK.js.map