@builder.io/sdk-qwik 0.16.20 → 0.16.21

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 (464) hide show
  1. package/lib/browser/blocks/accordion/accordion.qwik.cjs +143 -74
  2. package/lib/browser/blocks/accordion/accordion.qwik.mjs +143 -74
  3. package/lib/browser/blocks/accordion/component-info.qwik.cjs +1 -2
  4. package/lib/browser/blocks/accordion/component-info.qwik.mjs +1 -2
  5. package/lib/browser/blocks/button/button.qwik.cjs +17 -8
  6. package/lib/browser/blocks/button/button.qwik.mjs +17 -8
  7. package/lib/browser/blocks/columns/columns.qwik.cjs +91 -45
  8. package/lib/browser/blocks/columns/columns.qwik.mjs +91 -45
  9. package/lib/browser/blocks/columns/component-info.qwik.cjs +3 -4
  10. package/lib/browser/blocks/columns/component-info.qwik.mjs +3 -4
  11. package/lib/browser/blocks/custom-code/custom-code.qwik.cjs +22 -18
  12. package/lib/browser/blocks/custom-code/custom-code.qwik.mjs +23 -19
  13. package/lib/browser/blocks/embed/embed.qwik.cjs +23 -17
  14. package/lib/browser/blocks/embed/embed.qwik.mjs +23 -17
  15. package/lib/browser/blocks/form/form/form.qwik.cjs +128 -74
  16. package/lib/browser/blocks/form/form/form.qwik.mjs +129 -75
  17. package/lib/browser/blocks/form/input/input.qwik.cjs +2 -2
  18. package/lib/browser/blocks/form/input/input.qwik.mjs +3 -3
  19. package/lib/browser/blocks/form/select/select.qwik.cjs +5 -7
  20. package/lib/browser/blocks/form/select/select.qwik.mjs +6 -8
  21. package/lib/browser/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
  22. package/lib/browser/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
  23. package/lib/browser/blocks/form/textarea/textarea.qwik.cjs +21 -11
  24. package/lib/browser/blocks/form/textarea/textarea.qwik.mjs +22 -12
  25. package/lib/browser/blocks/fragment/fragment.qwik.cjs +3 -6
  26. package/lib/browser/blocks/fragment/fragment.qwik.mjs +4 -7
  27. package/lib/browser/blocks/image/component-info.qwik.cjs +3 -6
  28. package/lib/browser/blocks/image/component-info.qwik.mjs +3 -6
  29. package/lib/browser/blocks/image/image.helpers.qwik.cjs +6 -12
  30. package/lib/browser/blocks/image/image.helpers.qwik.mjs +6 -12
  31. package/lib/browser/blocks/image/image.qwik.cjs +89 -63
  32. package/lib/browser/blocks/image/image.qwik.mjs +89 -63
  33. package/lib/browser/blocks/img/img.qwik.cjs +18 -12
  34. package/lib/browser/blocks/img/img.qwik.mjs +18 -12
  35. package/lib/browser/blocks/section/section.qwik.cjs +6 -7
  36. package/lib/browser/blocks/section/section.qwik.mjs +7 -8
  37. package/lib/browser/blocks/slot/slot.qwik.cjs +43 -17
  38. package/lib/browser/blocks/slot/slot.qwik.mjs +43 -17
  39. package/lib/browser/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
  40. package/lib/browser/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
  41. package/lib/browser/blocks/symbol/symbol.qwik.cjs +137 -45
  42. package/lib/browser/blocks/symbol/symbol.qwik.mjs +137 -45
  43. package/lib/browser/blocks/tabs/tabs.qwik.cjs +99 -45
  44. package/lib/browser/blocks/tabs/tabs.qwik.mjs +99 -45
  45. package/lib/browser/blocks/text/text.qwik.cjs +15 -11
  46. package/lib/browser/blocks/text/text.qwik.mjs +15 -11
  47. package/lib/browser/blocks/video/video.qwik.cjs +87 -73
  48. package/lib/browser/blocks/video/video.qwik.mjs +88 -74
  49. package/lib/browser/components/awaiter.qwik.cjs +7 -8
  50. package/lib/browser/components/awaiter.qwik.mjs +8 -9
  51. package/lib/browser/components/block/animator.qwik.cjs +11 -22
  52. package/lib/browser/components/block/animator.qwik.mjs +11 -22
  53. package/lib/browser/components/block/block.helpers.qwik.cjs +4 -8
  54. package/lib/browser/components/block/block.helpers.qwik.mjs +4 -8
  55. package/lib/browser/components/block/block.qwik.cjs +320 -114
  56. package/lib/browser/components/block/block.qwik.mjs +321 -115
  57. package/lib/browser/components/block/components/block-styles.qwik.cjs +39 -22
  58. package/lib/browser/components/block/components/block-styles.qwik.mjs +40 -23
  59. package/lib/browser/components/block/components/block-wrapper.qwik.cjs +18 -12
  60. package/lib/browser/components/block/components/block-wrapper.qwik.mjs +18 -12
  61. package/lib/browser/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
  62. package/lib/browser/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
  63. package/lib/browser/components/block/components/interactive-element.qwik.cjs +58 -25
  64. package/lib/browser/components/block/components/interactive-element.qwik.mjs +59 -26
  65. package/lib/browser/components/block/components/repeated-block.qwik.cjs +31 -10
  66. package/lib/browser/components/block/components/repeated-block.qwik.mjs +32 -11
  67. package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +73 -25
  68. package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +73 -25
  69. package/lib/browser/components/blocks/blocks.qwik.cjs +84 -20
  70. package/lib/browser/components/blocks/blocks.qwik.mjs +85 -21
  71. package/lib/browser/components/content/components/enable-editor.qwik.cjs +175 -90
  72. package/lib/browser/components/content/components/enable-editor.qwik.mjs +176 -91
  73. package/lib/browser/components/content/components/styles.helpers.qwik.cjs +6 -12
  74. package/lib/browser/components/content/components/styles.helpers.qwik.mjs +6 -12
  75. package/lib/browser/components/content/components/styles.qwik.cjs +20 -8
  76. package/lib/browser/components/content/components/styles.qwik.mjs +20 -8
  77. package/lib/browser/components/content/content.helpers.qwik.cjs +1 -2
  78. package/lib/browser/components/content/content.helpers.qwik.mjs +1 -2
  79. package/lib/browser/components/content/content.qwik.cjs +213 -51
  80. package/lib/browser/components/content/content.qwik.mjs +213 -51
  81. package/lib/browser/components/content-variants/content-variants.qwik.cjs +325 -76
  82. package/lib/browser/components/content-variants/content-variants.qwik.mjs +326 -77
  83. package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
  84. package/lib/browser/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
  85. package/lib/browser/components/inlined-script.qwik.cjs +13 -8
  86. package/lib/browser/components/inlined-script.qwik.mjs +14 -9
  87. package/lib/browser/components/inlined-styles.qwik.cjs +13 -8
  88. package/lib/browser/components/inlined-styles.qwik.mjs +14 -9
  89. package/lib/browser/constants/device-sizes.qwik.cjs +1 -2
  90. package/lib/browser/constants/device-sizes.qwik.mjs +1 -2
  91. package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
  92. package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
  93. package/lib/browser/functions/evaluate/evaluate.qwik.cjs +2 -4
  94. package/lib/browser/functions/evaluate/evaluate.qwik.mjs +2 -4
  95. package/lib/browser/functions/evaluate/helpers.qwik.cjs +3 -6
  96. package/lib/browser/functions/evaluate/helpers.qwik.mjs +3 -6
  97. package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
  98. package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
  99. package/lib/browser/functions/get-block-actions-handler.qwik.cjs +14 -8
  100. package/lib/browser/functions/get-block-actions-handler.qwik.mjs +15 -9
  101. package/lib/browser/functions/get-block-actions.qwik.cjs +2 -4
  102. package/lib/browser/functions/get-block-actions.qwik.mjs +2 -4
  103. package/lib/browser/functions/get-builder-search-params/index.qwik.cjs +2 -4
  104. package/lib/browser/functions/get-builder-search-params/index.qwik.mjs +2 -4
  105. package/lib/browser/functions/get-content/generate-content-url.qwik.cjs +11 -22
  106. package/lib/browser/functions/get-content/generate-content-url.qwik.mjs +11 -22
  107. package/lib/browser/functions/get-content/index.qwik.cjs +2 -4
  108. package/lib/browser/functions/get-content/index.qwik.mjs +2 -4
  109. package/lib/browser/functions/get-global-this.qwik.cjs +4 -8
  110. package/lib/browser/functions/get-global-this.qwik.mjs +4 -8
  111. package/lib/browser/functions/get-processed-block.qwik.cjs +8 -15
  112. package/lib/browser/functions/get-processed-block.qwik.mjs +8 -15
  113. package/lib/browser/functions/is-from-trusted-host.qwik.cjs +1 -2
  114. package/lib/browser/functions/is-from-trusted-host.qwik.mjs +1 -2
  115. package/lib/browser/functions/is-previewing.qwik.cjs +1 -2
  116. package/lib/browser/functions/is-previewing.qwik.mjs +1 -2
  117. package/lib/browser/functions/register-component.qwik.cjs +1 -2
  118. package/lib/browser/functions/register-component.qwik.mjs +1 -2
  119. package/lib/browser/functions/register.qwik.cjs +3 -6
  120. package/lib/browser/functions/register.qwik.mjs +3 -6
  121. package/lib/browser/functions/set.qwik.cjs +1 -2
  122. package/lib/browser/functions/set.qwik.mjs +1 -2
  123. package/lib/browser/functions/track/helpers.qwik.cjs +1 -2
  124. package/lib/browser/functions/track/helpers.qwik.mjs +1 -2
  125. package/lib/browser/functions/track/index.qwik.cjs +4 -8
  126. package/lib/browser/functions/track/index.qwik.mjs +4 -8
  127. package/lib/browser/functions/track/interaction.qwik.cjs +3 -6
  128. package/lib/browser/functions/track/interaction.qwik.mjs +3 -6
  129. package/lib/browser/helpers/ab-tests.qwik.cjs +8 -15
  130. package/lib/browser/helpers/ab-tests.qwik.mjs +9 -16
  131. package/lib/browser/helpers/cookie.qwik.cjs +2 -4
  132. package/lib/browser/helpers/cookie.qwik.mjs +2 -4
  133. package/lib/browser/helpers/css.qwik.cjs +4 -6
  134. package/lib/browser/helpers/css.qwik.mjs +4 -6
  135. package/lib/browser/helpers/flatten.qwik.cjs +2 -3
  136. package/lib/browser/helpers/flatten.qwik.mjs +2 -3
  137. package/lib/browser/helpers/localStorage.qwik.cjs +2 -4
  138. package/lib/browser/helpers/localStorage.qwik.mjs +2 -4
  139. package/lib/browser/helpers/omit.qwik.cjs +1 -2
  140. package/lib/browser/helpers/omit.qwik.mjs +1 -2
  141. package/lib/browser/helpers/search/search.qwik.cjs +2 -3
  142. package/lib/browser/helpers/search/search.qwik.mjs +2 -3
  143. package/lib/browser/helpers/sessionId.qwik.cjs +3 -4
  144. package/lib/browser/helpers/sessionId.qwik.mjs +3 -4
  145. package/lib/browser/helpers/subscribe-to-editor.qwik.cjs +5 -10
  146. package/lib/browser/helpers/subscribe-to-editor.qwik.mjs +5 -10
  147. package/lib/browser/helpers/url.qwik.cjs +2 -4
  148. package/lib/browser/helpers/url.qwik.mjs +2 -4
  149. package/lib/browser/helpers/visitorId.qwik.cjs +3 -4
  150. package/lib/browser/helpers/visitorId.qwik.mjs +3 -4
  151. package/lib/browser/scripts/init-editing.qwik.cjs +19 -25
  152. package/lib/browser/scripts/init-editing.qwik.mjs +19 -25
  153. package/lib/edge/blocks/accordion/accordion.qwik.cjs +143 -74
  154. package/lib/edge/blocks/accordion/accordion.qwik.mjs +143 -74
  155. package/lib/edge/blocks/accordion/component-info.qwik.cjs +1 -2
  156. package/lib/edge/blocks/accordion/component-info.qwik.mjs +1 -2
  157. package/lib/edge/blocks/button/button.qwik.cjs +17 -8
  158. package/lib/edge/blocks/button/button.qwik.mjs +17 -8
  159. package/lib/edge/blocks/columns/columns.qwik.cjs +91 -45
  160. package/lib/edge/blocks/columns/columns.qwik.mjs +91 -45
  161. package/lib/edge/blocks/columns/component-info.qwik.cjs +3 -4
  162. package/lib/edge/blocks/columns/component-info.qwik.mjs +3 -4
  163. package/lib/edge/blocks/custom-code/custom-code.qwik.cjs +22 -18
  164. package/lib/edge/blocks/custom-code/custom-code.qwik.mjs +23 -19
  165. package/lib/edge/blocks/embed/embed.qwik.cjs +23 -17
  166. package/lib/edge/blocks/embed/embed.qwik.mjs +23 -17
  167. package/lib/edge/blocks/form/form/form.qwik.cjs +128 -74
  168. package/lib/edge/blocks/form/form/form.qwik.mjs +129 -75
  169. package/lib/edge/blocks/form/input/input.qwik.cjs +2 -2
  170. package/lib/edge/blocks/form/input/input.qwik.mjs +3 -3
  171. package/lib/edge/blocks/form/select/select.qwik.cjs +5 -7
  172. package/lib/edge/blocks/form/select/select.qwik.mjs +6 -8
  173. package/lib/edge/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
  174. package/lib/edge/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
  175. package/lib/edge/blocks/form/textarea/textarea.qwik.cjs +21 -11
  176. package/lib/edge/blocks/form/textarea/textarea.qwik.mjs +22 -12
  177. package/lib/edge/blocks/fragment/fragment.qwik.cjs +3 -6
  178. package/lib/edge/blocks/fragment/fragment.qwik.mjs +4 -7
  179. package/lib/edge/blocks/image/component-info.qwik.cjs +3 -6
  180. package/lib/edge/blocks/image/component-info.qwik.mjs +3 -6
  181. package/lib/edge/blocks/image/image.helpers.qwik.cjs +6 -12
  182. package/lib/edge/blocks/image/image.helpers.qwik.mjs +6 -12
  183. package/lib/edge/blocks/image/image.qwik.cjs +89 -63
  184. package/lib/edge/blocks/image/image.qwik.mjs +89 -63
  185. package/lib/edge/blocks/img/img.qwik.cjs +18 -12
  186. package/lib/edge/blocks/img/img.qwik.mjs +18 -12
  187. package/lib/edge/blocks/section/section.qwik.cjs +6 -7
  188. package/lib/edge/blocks/section/section.qwik.mjs +7 -8
  189. package/lib/edge/blocks/slot/slot.qwik.cjs +43 -17
  190. package/lib/edge/blocks/slot/slot.qwik.mjs +43 -17
  191. package/lib/edge/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
  192. package/lib/edge/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
  193. package/lib/edge/blocks/symbol/symbol.qwik.cjs +137 -45
  194. package/lib/edge/blocks/symbol/symbol.qwik.mjs +137 -45
  195. package/lib/edge/blocks/tabs/tabs.qwik.cjs +99 -45
  196. package/lib/edge/blocks/tabs/tabs.qwik.mjs +99 -45
  197. package/lib/edge/blocks/text/text.qwik.cjs +15 -11
  198. package/lib/edge/blocks/text/text.qwik.mjs +15 -11
  199. package/lib/edge/blocks/video/video.qwik.cjs +87 -73
  200. package/lib/edge/blocks/video/video.qwik.mjs +88 -74
  201. package/lib/edge/components/awaiter.qwik.cjs +7 -8
  202. package/lib/edge/components/awaiter.qwik.mjs +8 -9
  203. package/lib/edge/components/block/animator.qwik.cjs +11 -22
  204. package/lib/edge/components/block/animator.qwik.mjs +11 -22
  205. package/lib/edge/components/block/block.helpers.qwik.cjs +4 -8
  206. package/lib/edge/components/block/block.helpers.qwik.mjs +4 -8
  207. package/lib/edge/components/block/block.qwik.cjs +320 -114
  208. package/lib/edge/components/block/block.qwik.mjs +321 -115
  209. package/lib/edge/components/block/components/block-styles.qwik.cjs +39 -22
  210. package/lib/edge/components/block/components/block-styles.qwik.mjs +40 -23
  211. package/lib/edge/components/block/components/block-wrapper.qwik.cjs +18 -12
  212. package/lib/edge/components/block/components/block-wrapper.qwik.mjs +18 -12
  213. package/lib/edge/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
  214. package/lib/edge/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
  215. package/lib/edge/components/block/components/interactive-element.qwik.cjs +58 -25
  216. package/lib/edge/components/block/components/interactive-element.qwik.mjs +59 -26
  217. package/lib/edge/components/block/components/repeated-block.qwik.cjs +31 -10
  218. package/lib/edge/components/block/components/repeated-block.qwik.mjs +32 -11
  219. package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +73 -25
  220. package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +73 -25
  221. package/lib/edge/components/blocks/blocks.qwik.cjs +84 -20
  222. package/lib/edge/components/blocks/blocks.qwik.mjs +85 -21
  223. package/lib/edge/components/content/components/enable-editor.qwik.cjs +175 -90
  224. package/lib/edge/components/content/components/enable-editor.qwik.mjs +176 -91
  225. package/lib/edge/components/content/components/styles.helpers.qwik.cjs +6 -12
  226. package/lib/edge/components/content/components/styles.helpers.qwik.mjs +6 -12
  227. package/lib/edge/components/content/components/styles.qwik.cjs +20 -8
  228. package/lib/edge/components/content/components/styles.qwik.mjs +20 -8
  229. package/lib/edge/components/content/content.helpers.qwik.cjs +1 -2
  230. package/lib/edge/components/content/content.helpers.qwik.mjs +1 -2
  231. package/lib/edge/components/content/content.qwik.cjs +213 -51
  232. package/lib/edge/components/content/content.qwik.mjs +213 -51
  233. package/lib/edge/components/content-variants/content-variants.qwik.cjs +325 -76
  234. package/lib/edge/components/content-variants/content-variants.qwik.mjs +326 -77
  235. package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
  236. package/lib/edge/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
  237. package/lib/edge/components/inlined-script.qwik.cjs +13 -8
  238. package/lib/edge/components/inlined-script.qwik.mjs +14 -9
  239. package/lib/edge/components/inlined-styles.qwik.cjs +13 -8
  240. package/lib/edge/components/inlined-styles.qwik.mjs +14 -9
  241. package/lib/edge/constants/device-sizes.qwik.cjs +1 -2
  242. package/lib/edge/constants/device-sizes.qwik.mjs +1 -2
  243. package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
  244. package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
  245. package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.cjs +7 -6
  246. package/lib/edge/functions/evaluate/edge-runtime/acorn-interpreter.qwik.mjs +7 -6
  247. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.cjs +11 -20
  248. package/lib/edge/functions/evaluate/edge-runtime/edge-runtime.qwik.mjs +11 -20
  249. package/lib/edge/functions/evaluate/evaluate.qwik.cjs +2 -4
  250. package/lib/edge/functions/evaluate/evaluate.qwik.mjs +2 -4
  251. package/lib/edge/functions/evaluate/helpers.qwik.cjs +3 -6
  252. package/lib/edge/functions/evaluate/helpers.qwik.mjs +3 -6
  253. package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
  254. package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
  255. package/lib/edge/functions/get-block-actions-handler.qwik.cjs +14 -8
  256. package/lib/edge/functions/get-block-actions-handler.qwik.mjs +15 -9
  257. package/lib/edge/functions/get-block-actions.qwik.cjs +2 -4
  258. package/lib/edge/functions/get-block-actions.qwik.mjs +2 -4
  259. package/lib/edge/functions/get-builder-search-params/index.qwik.cjs +2 -4
  260. package/lib/edge/functions/get-builder-search-params/index.qwik.mjs +2 -4
  261. package/lib/edge/functions/get-content/generate-content-url.qwik.cjs +11 -22
  262. package/lib/edge/functions/get-content/generate-content-url.qwik.mjs +11 -22
  263. package/lib/edge/functions/get-content/index.qwik.cjs +2 -4
  264. package/lib/edge/functions/get-content/index.qwik.mjs +2 -4
  265. package/lib/edge/functions/get-global-this.qwik.cjs +4 -8
  266. package/lib/edge/functions/get-global-this.qwik.mjs +4 -8
  267. package/lib/edge/functions/get-processed-block.qwik.cjs +8 -15
  268. package/lib/edge/functions/get-processed-block.qwik.mjs +8 -15
  269. package/lib/edge/functions/is-from-trusted-host.qwik.cjs +1 -2
  270. package/lib/edge/functions/is-from-trusted-host.qwik.mjs +1 -2
  271. package/lib/edge/functions/is-previewing.qwik.cjs +1 -2
  272. package/lib/edge/functions/is-previewing.qwik.mjs +1 -2
  273. package/lib/edge/functions/register-component.qwik.cjs +1 -2
  274. package/lib/edge/functions/register-component.qwik.mjs +1 -2
  275. package/lib/edge/functions/register.qwik.cjs +3 -6
  276. package/lib/edge/functions/register.qwik.mjs +3 -6
  277. package/lib/edge/functions/set.qwik.cjs +1 -2
  278. package/lib/edge/functions/set.qwik.mjs +1 -2
  279. package/lib/edge/functions/track/helpers.qwik.cjs +1 -2
  280. package/lib/edge/functions/track/helpers.qwik.mjs +1 -2
  281. package/lib/edge/functions/track/index.qwik.cjs +4 -8
  282. package/lib/edge/functions/track/index.qwik.mjs +4 -8
  283. package/lib/edge/functions/track/interaction.qwik.cjs +3 -6
  284. package/lib/edge/functions/track/interaction.qwik.mjs +3 -6
  285. package/lib/edge/helpers/ab-tests.qwik.cjs +8 -15
  286. package/lib/edge/helpers/ab-tests.qwik.mjs +9 -16
  287. package/lib/edge/helpers/cookie.qwik.cjs +2 -4
  288. package/lib/edge/helpers/cookie.qwik.mjs +2 -4
  289. package/lib/edge/helpers/css.qwik.cjs +4 -6
  290. package/lib/edge/helpers/css.qwik.mjs +4 -6
  291. package/lib/edge/helpers/flatten.qwik.cjs +2 -3
  292. package/lib/edge/helpers/flatten.qwik.mjs +2 -3
  293. package/lib/edge/helpers/localStorage.qwik.cjs +2 -4
  294. package/lib/edge/helpers/localStorage.qwik.mjs +2 -4
  295. package/lib/edge/helpers/omit.qwik.cjs +1 -2
  296. package/lib/edge/helpers/omit.qwik.mjs +1 -2
  297. package/lib/edge/helpers/search/search.qwik.cjs +2 -3
  298. package/lib/edge/helpers/search/search.qwik.mjs +2 -3
  299. package/lib/edge/helpers/sessionId.qwik.cjs +3 -4
  300. package/lib/edge/helpers/sessionId.qwik.mjs +3 -4
  301. package/lib/edge/helpers/subscribe-to-editor.qwik.cjs +5 -10
  302. package/lib/edge/helpers/subscribe-to-editor.qwik.mjs +5 -10
  303. package/lib/edge/helpers/url.qwik.cjs +2 -4
  304. package/lib/edge/helpers/url.qwik.mjs +2 -4
  305. package/lib/edge/helpers/visitorId.qwik.cjs +3 -4
  306. package/lib/edge/helpers/visitorId.qwik.mjs +3 -4
  307. package/lib/edge/scripts/init-editing.qwik.cjs +19 -25
  308. package/lib/edge/scripts/init-editing.qwik.mjs +19 -25
  309. package/lib/node/blocks/accordion/accordion.qwik.cjs +143 -74
  310. package/lib/node/blocks/accordion/accordion.qwik.mjs +143 -74
  311. package/lib/node/blocks/accordion/component-info.qwik.cjs +1 -2
  312. package/lib/node/blocks/accordion/component-info.qwik.mjs +1 -2
  313. package/lib/node/blocks/button/button.qwik.cjs +17 -8
  314. package/lib/node/blocks/button/button.qwik.mjs +17 -8
  315. package/lib/node/blocks/columns/columns.qwik.cjs +91 -45
  316. package/lib/node/blocks/columns/columns.qwik.mjs +91 -45
  317. package/lib/node/blocks/columns/component-info.qwik.cjs +3 -4
  318. package/lib/node/blocks/columns/component-info.qwik.mjs +3 -4
  319. package/lib/node/blocks/custom-code/custom-code.qwik.cjs +22 -18
  320. package/lib/node/blocks/custom-code/custom-code.qwik.mjs +23 -19
  321. package/lib/node/blocks/embed/embed.qwik.cjs +23 -17
  322. package/lib/node/blocks/embed/embed.qwik.mjs +23 -17
  323. package/lib/node/blocks/form/form/form.qwik.cjs +128 -74
  324. package/lib/node/blocks/form/form/form.qwik.mjs +129 -75
  325. package/lib/node/blocks/form/input/input.qwik.cjs +2 -2
  326. package/lib/node/blocks/form/input/input.qwik.mjs +3 -3
  327. package/lib/node/blocks/form/select/select.qwik.cjs +5 -7
  328. package/lib/node/blocks/form/select/select.qwik.mjs +6 -8
  329. package/lib/node/blocks/form/submit-button/submit-button.qwik.cjs +9 -7
  330. package/lib/node/blocks/form/submit-button/submit-button.qwik.mjs +10 -8
  331. package/lib/node/blocks/form/textarea/textarea.qwik.cjs +21 -11
  332. package/lib/node/blocks/form/textarea/textarea.qwik.mjs +22 -12
  333. package/lib/node/blocks/fragment/fragment.qwik.cjs +3 -6
  334. package/lib/node/blocks/fragment/fragment.qwik.mjs +4 -7
  335. package/lib/node/blocks/image/component-info.qwik.cjs +3 -6
  336. package/lib/node/blocks/image/component-info.qwik.mjs +3 -6
  337. package/lib/node/blocks/image/image.helpers.qwik.cjs +6 -12
  338. package/lib/node/blocks/image/image.helpers.qwik.mjs +6 -12
  339. package/lib/node/blocks/image/image.qwik.cjs +89 -63
  340. package/lib/node/blocks/image/image.qwik.mjs +89 -63
  341. package/lib/node/blocks/img/img.qwik.cjs +18 -12
  342. package/lib/node/blocks/img/img.qwik.mjs +18 -12
  343. package/lib/node/blocks/section/section.qwik.cjs +6 -7
  344. package/lib/node/blocks/section/section.qwik.mjs +7 -8
  345. package/lib/node/blocks/slot/slot.qwik.cjs +43 -17
  346. package/lib/node/blocks/slot/slot.qwik.mjs +43 -17
  347. package/lib/node/blocks/symbol/symbol.helpers.qwik.cjs +1 -2
  348. package/lib/node/blocks/symbol/symbol.helpers.qwik.mjs +1 -2
  349. package/lib/node/blocks/symbol/symbol.qwik.cjs +137 -45
  350. package/lib/node/blocks/symbol/symbol.qwik.mjs +137 -45
  351. package/lib/node/blocks/tabs/tabs.qwik.cjs +99 -45
  352. package/lib/node/blocks/tabs/tabs.qwik.mjs +99 -45
  353. package/lib/node/blocks/text/text.qwik.cjs +15 -11
  354. package/lib/node/blocks/text/text.qwik.mjs +15 -11
  355. package/lib/node/blocks/video/video.qwik.cjs +87 -73
  356. package/lib/node/blocks/video/video.qwik.mjs +88 -74
  357. package/lib/node/components/awaiter.qwik.cjs +7 -8
  358. package/lib/node/components/awaiter.qwik.mjs +8 -9
  359. package/lib/node/components/block/animator.qwik.cjs +11 -22
  360. package/lib/node/components/block/animator.qwik.mjs +11 -22
  361. package/lib/node/components/block/block.helpers.qwik.cjs +4 -8
  362. package/lib/node/components/block/block.helpers.qwik.mjs +4 -8
  363. package/lib/node/components/block/block.qwik.cjs +320 -114
  364. package/lib/node/components/block/block.qwik.mjs +321 -115
  365. package/lib/node/components/block/components/block-styles.qwik.cjs +39 -22
  366. package/lib/node/components/block/components/block-styles.qwik.mjs +40 -23
  367. package/lib/node/components/block/components/block-wrapper.qwik.cjs +18 -12
  368. package/lib/node/components/block/components/block-wrapper.qwik.mjs +18 -12
  369. package/lib/node/components/block/components/component-ref/component-ref.qwik.cjs +29 -12
  370. package/lib/node/components/block/components/component-ref/component-ref.qwik.mjs +31 -14
  371. package/lib/node/components/block/components/interactive-element.qwik.cjs +58 -25
  372. package/lib/node/components/block/components/interactive-element.qwik.mjs +59 -26
  373. package/lib/node/components/block/components/repeated-block.qwik.cjs +31 -10
  374. package/lib/node/components/block/components/repeated-block.qwik.mjs +32 -11
  375. package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +73 -25
  376. package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +73 -25
  377. package/lib/node/components/blocks/blocks.qwik.cjs +84 -20
  378. package/lib/node/components/blocks/blocks.qwik.mjs +85 -21
  379. package/lib/node/components/content/components/enable-editor.qwik.cjs +175 -90
  380. package/lib/node/components/content/components/enable-editor.qwik.mjs +176 -91
  381. package/lib/node/components/content/components/styles.helpers.qwik.cjs +6 -12
  382. package/lib/node/components/content/components/styles.helpers.qwik.mjs +6 -12
  383. package/lib/node/components/content/components/styles.qwik.cjs +20 -8
  384. package/lib/node/components/content/components/styles.qwik.mjs +20 -8
  385. package/lib/node/components/content/content.helpers.qwik.cjs +1 -2
  386. package/lib/node/components/content/content.helpers.qwik.mjs +1 -2
  387. package/lib/node/components/content/content.qwik.cjs +213 -51
  388. package/lib/node/components/content/content.qwik.mjs +213 -51
  389. package/lib/node/components/content-variants/content-variants.qwik.cjs +325 -76
  390. package/lib/node/components/content-variants/content-variants.qwik.mjs +326 -77
  391. package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.cjs +12 -11
  392. package/lib/node/components/dynamic-renderer/dynamic-renderer.qwik.mjs +13 -12
  393. package/lib/node/components/inlined-script.qwik.cjs +13 -8
  394. package/lib/node/components/inlined-script.qwik.mjs +14 -9
  395. package/lib/node/components/inlined-styles.qwik.cjs +13 -8
  396. package/lib/node/components/inlined-styles.qwik.mjs +14 -9
  397. package/lib/node/constants/device-sizes.qwik.cjs +1 -2
  398. package/lib/node/constants/device-sizes.qwik.mjs +1 -2
  399. package/lib/node/constants/sdk-version.qwik.cjs +1 -1
  400. package/lib/node/constants/sdk-version.qwik.mjs +1 -1
  401. package/lib/node/functions/evaluate/evaluate.qwik.cjs +2 -4
  402. package/lib/node/functions/evaluate/evaluate.qwik.mjs +2 -4
  403. package/lib/node/functions/evaluate/helpers.qwik.cjs +3 -6
  404. package/lib/node/functions/evaluate/helpers.qwik.mjs +3 -6
  405. package/lib/node/functions/evaluate/node-runtime/init.qwik.cjs +1 -2
  406. package/lib/node/functions/evaluate/node-runtime/init.qwik.mjs +1 -2
  407. package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.cjs +1 -2
  408. package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.qwik.mjs +1 -2
  409. package/lib/node/functions/get-block-actions-handler.qwik.cjs +14 -8
  410. package/lib/node/functions/get-block-actions-handler.qwik.mjs +15 -9
  411. package/lib/node/functions/get-block-actions.qwik.cjs +2 -4
  412. package/lib/node/functions/get-block-actions.qwik.mjs +2 -4
  413. package/lib/node/functions/get-builder-search-params/index.qwik.cjs +2 -4
  414. package/lib/node/functions/get-builder-search-params/index.qwik.mjs +2 -4
  415. package/lib/node/functions/get-content/generate-content-url.qwik.cjs +11 -22
  416. package/lib/node/functions/get-content/generate-content-url.qwik.mjs +11 -22
  417. package/lib/node/functions/get-content/index.qwik.cjs +2 -4
  418. package/lib/node/functions/get-content/index.qwik.mjs +2 -4
  419. package/lib/node/functions/get-global-this.qwik.cjs +4 -8
  420. package/lib/node/functions/get-global-this.qwik.mjs +4 -8
  421. package/lib/node/functions/get-processed-block.qwik.cjs +8 -15
  422. package/lib/node/functions/get-processed-block.qwik.mjs +8 -15
  423. package/lib/node/functions/is-from-trusted-host.qwik.cjs +1 -2
  424. package/lib/node/functions/is-from-trusted-host.qwik.mjs +1 -2
  425. package/lib/node/functions/is-previewing.qwik.cjs +1 -2
  426. package/lib/node/functions/is-previewing.qwik.mjs +1 -2
  427. package/lib/node/functions/register-component.qwik.cjs +1 -2
  428. package/lib/node/functions/register-component.qwik.mjs +1 -2
  429. package/lib/node/functions/register.qwik.cjs +3 -6
  430. package/lib/node/functions/register.qwik.mjs +3 -6
  431. package/lib/node/functions/set.qwik.cjs +1 -2
  432. package/lib/node/functions/set.qwik.mjs +1 -2
  433. package/lib/node/functions/track/helpers.qwik.cjs +1 -2
  434. package/lib/node/functions/track/helpers.qwik.mjs +1 -2
  435. package/lib/node/functions/track/index.qwik.cjs +4 -8
  436. package/lib/node/functions/track/index.qwik.mjs +4 -8
  437. package/lib/node/functions/track/interaction.qwik.cjs +3 -6
  438. package/lib/node/functions/track/interaction.qwik.mjs +3 -6
  439. package/lib/node/helpers/ab-tests.qwik.cjs +8 -15
  440. package/lib/node/helpers/ab-tests.qwik.mjs +9 -16
  441. package/lib/node/helpers/cookie.qwik.cjs +2 -4
  442. package/lib/node/helpers/cookie.qwik.mjs +2 -4
  443. package/lib/node/helpers/css.qwik.cjs +4 -6
  444. package/lib/node/helpers/css.qwik.mjs +4 -6
  445. package/lib/node/helpers/flatten.qwik.cjs +2 -3
  446. package/lib/node/helpers/flatten.qwik.mjs +2 -3
  447. package/lib/node/helpers/localStorage.qwik.cjs +2 -4
  448. package/lib/node/helpers/localStorage.qwik.mjs +2 -4
  449. package/lib/node/helpers/omit.qwik.cjs +1 -2
  450. package/lib/node/helpers/omit.qwik.mjs +1 -2
  451. package/lib/node/helpers/search/search.qwik.cjs +2 -3
  452. package/lib/node/helpers/search/search.qwik.mjs +2 -3
  453. package/lib/node/helpers/sessionId.qwik.cjs +3 -4
  454. package/lib/node/helpers/sessionId.qwik.mjs +3 -4
  455. package/lib/node/helpers/subscribe-to-editor.qwik.cjs +5 -10
  456. package/lib/node/helpers/subscribe-to-editor.qwik.mjs +5 -10
  457. package/lib/node/helpers/url.qwik.cjs +2 -4
  458. package/lib/node/helpers/url.qwik.mjs +2 -4
  459. package/lib/node/helpers/visitorId.qwik.cjs +3 -4
  460. package/lib/node/helpers/visitorId.qwik.mjs +3 -4
  461. package/lib/node/scripts/init-editing.qwik.cjs +19 -25
  462. package/lib/node/scripts/init-editing.qwik.mjs +19 -25
  463. package/package.json +2 -2
  464. package/types/src/constants/sdk-version.d.ts +1 -1
@@ -6,9 +6,8 @@ const DEFAULT_TRUSTED_HOSTS = [
6
6
  "qa.builder.io"
7
7
  ];
8
8
  function isFromTrustedHost(trustedHosts, e) {
9
- if (!e.origin.startsWith("http") && !e.origin.startsWith("https")) {
9
+ if (!e.origin.startsWith("http") && !e.origin.startsWith("https"))
10
10
  return false;
11
- }
12
11
  const url = new URL(e.origin), hostname = url.hostname;
13
12
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
14
13
  }
@@ -4,9 +4,8 @@ const search = require("../helpers/search/search.qwik.cjs");
4
4
  const isBrowser = require("./is-browser.qwik.cjs");
5
5
  function isPreviewing(_search) {
6
6
  const search$1 = _search || (isBrowser.isBrowser() ? window.location.search : void 0);
7
- if (!search$1) {
7
+ if (!search$1)
8
8
  return false;
9
- }
10
9
  const normalizedSearch = search.getSearchString(search$1);
11
10
  return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
12
11
  }
@@ -2,9 +2,8 @@ import { getSearchString } from "../helpers/search/search.qwik.mjs";
2
2
  import { isBrowser } from "./is-browser.qwik.mjs";
3
3
  function isPreviewing(_search) {
4
4
  const search = _search || (isBrowser() ? window.location.search : void 0);
5
- if (!search) {
5
+ if (!search)
6
6
  return false;
7
- }
8
7
  const normalizedSearch = getSearchString(search);
9
8
  return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
10
9
  }
@@ -11,9 +11,8 @@ const serializeFn = (fnValue) => {
11
11
  };
12
12
  function serializeIncludingFunctions(info) {
13
13
  return JSON.parse(JSON.stringify(info, (key, value) => {
14
- if (typeof value === "function") {
14
+ if (typeof value === "function")
15
15
  return serializeFn(value);
16
- }
17
16
  return value;
18
17
  }));
19
18
  }
@@ -9,9 +9,8 @@ const serializeFn = (fnValue) => {
9
9
  };
10
10
  function serializeIncludingFunctions(info) {
11
11
  return JSON.parse(JSON.stringify(info, (key, value) => {
12
- if (typeof value === "function") {
12
+ if (typeof value === "function")
13
13
  return serializeFn(value);
14
- }
15
14
  return value;
16
15
  }));
17
16
  }
@@ -4,13 +4,11 @@ const isBrowser = require("./is-browser.qwik.cjs");
4
4
  const registerComponent = require("./register-component.qwik.cjs");
5
5
  const registry = {};
6
6
  function register(type, info) {
7
- if (type === "plugin") {
7
+ if (type === "plugin")
8
8
  info = registerComponent.serializeIncludingFunctions(info);
9
- }
10
9
  let typeList = registry[type];
11
- if (!typeList) {
10
+ if (!typeList)
12
11
  typeList = registry[type] = [];
13
- }
14
12
  typeList.push(info);
15
13
  if (isBrowser.isBrowser()) {
16
14
  const message = {
@@ -22,9 +20,8 @@ function register(type, info) {
22
20
  };
23
21
  try {
24
22
  parent.postMessage(message, "*");
25
- if (parent !== window) {
23
+ if (parent !== window)
26
24
  window.postMessage(message, "*");
27
- }
28
25
  } catch (err) {
29
26
  console.debug("Could not postmessage", err);
30
27
  }
@@ -2,13 +2,11 @@ import { isBrowser } from "./is-browser.qwik.mjs";
2
2
  import { serializeIncludingFunctions } from "./register-component.qwik.mjs";
3
3
  const registry = {};
4
4
  function register(type, info) {
5
- if (type === "plugin") {
5
+ if (type === "plugin")
6
6
  info = serializeIncludingFunctions(info);
7
- }
8
7
  let typeList = registry[type];
9
- if (!typeList) {
8
+ if (!typeList)
10
9
  typeList = registry[type] = [];
11
- }
12
10
  typeList.push(info);
13
11
  if (isBrowser()) {
14
12
  const message = {
@@ -20,9 +18,8 @@ function register(type, info) {
20
18
  };
21
19
  try {
22
20
  parent.postMessage(message, "*");
23
- if (parent !== window) {
21
+ if (parent !== window)
24
22
  window.postMessage(message, "*");
25
- }
26
23
  } catch (err) {
27
24
  console.debug("Could not postmessage", err);
28
25
  }
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const set = (obj, _path, value) => {
4
- if (Object(obj) !== obj) {
4
+ if (Object(obj) !== obj)
5
5
  return obj;
6
- }
7
6
  const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
8
7
  path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
9
8
  return obj;
@@ -1,7 +1,6 @@
1
1
  const set = (obj, _path, value) => {
2
- if (Object(obj) !== obj) {
2
+ if (Object(obj) !== obj)
3
3
  return obj;
4
- }
5
4
  const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
6
5
  path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
7
6
  return obj;
@@ -5,9 +5,8 @@ const isBrowser = require("../is-browser.qwik.cjs");
5
5
  const getLocation = () => {
6
6
  if (isBrowser.isBrowser()) {
7
7
  const parsedLocation = new URL(location.href);
8
- if (parsedLocation.pathname === "") {
8
+ if (parsedLocation.pathname === "")
9
9
  parsedLocation.pathname = "/";
10
- }
11
10
  return parsedLocation;
12
11
  } else {
13
12
  console.warn("Cannot get location for tracking in non-browser environment");
@@ -3,9 +3,8 @@ import { isBrowser } from "../is-browser.qwik.mjs";
3
3
  const getLocation = () => {
4
4
  if (isBrowser()) {
5
5
  const parsedLocation = new URL(location.href);
6
- if (parsedLocation.pathname === "") {
6
+ if (parsedLocation.pathname === "")
7
7
  parsedLocation.pathname = "/";
8
- }
9
8
  return parsedLocation;
10
9
  } else {
11
10
  console.warn("Cannot get location for tracking in non-browser environment");
@@ -9,12 +9,11 @@ const isBrowser = require("../is-browser.qwik.cjs");
9
9
  const isEditing = require("../is-editing.qwik.cjs");
10
10
  const helpers = require("./helpers.qwik.cjs");
11
11
  const getTrackingEventData = async ({ canTrack }) => {
12
- if (!canTrack) {
12
+ if (!canTrack)
13
13
  return {
14
14
  visitorId: void 0,
15
15
  sessionId: void 0
16
16
  };
17
- }
18
17
  const sessionId$1 = await sessionId.getSessionId({
19
18
  canTrack
20
19
  });
@@ -46,15 +45,12 @@ async function _track({ apiHost, ...eventProps }) {
46
45
  logger.logger.error("Missing API key for track call. Please provide your API key.");
47
46
  return;
48
47
  }
49
- if (!eventProps.canTrack) {
48
+ if (!eventProps.canTrack)
50
49
  return;
51
- }
52
- if (isEditing.isEditing()) {
50
+ if (isEditing.isEditing())
53
51
  return;
54
- }
55
- if (!(isBrowser.isBrowser() || target.TARGET === "reactNative")) {
52
+ if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
56
53
  return;
57
- }
58
54
  const baseUrl = apiHost || "https://cdn.builder.io";
59
55
  return fetch(`${baseUrl}/api/v1/track`, {
60
56
  method: "POST",
@@ -7,12 +7,11 @@ import { isBrowser } from "../is-browser.qwik.mjs";
7
7
  import { isEditing } from "../is-editing.qwik.mjs";
8
8
  import { getUserAttributes } from "./helpers.qwik.mjs";
9
9
  const getTrackingEventData = async ({ canTrack }) => {
10
- if (!canTrack) {
10
+ if (!canTrack)
11
11
  return {
12
12
  visitorId: void 0,
13
13
  sessionId: void 0
14
14
  };
15
- }
16
15
  const sessionId = await getSessionId({
17
16
  canTrack
18
17
  });
@@ -44,15 +43,12 @@ async function _track({ apiHost, ...eventProps }) {
44
43
  logger.error("Missing API key for track call. Please provide your API key.");
45
44
  return;
46
45
  }
47
- if (!eventProps.canTrack) {
46
+ if (!eventProps.canTrack)
48
47
  return;
49
- }
50
- if (isEditing()) {
48
+ if (isEditing())
51
49
  return;
52
- }
53
- if (!(isBrowser() || TARGET === "reactNative")) {
50
+ if (!(isBrowser() || TARGET === "reactNative"))
54
51
  return;
55
- }
56
52
  const baseUrl = apiHost || "https://cdn.builder.io";
57
53
  return fetch(`${baseUrl}/api/v1/track`, {
58
54
  method: "POST",
@@ -4,18 +4,15 @@ function round(num) {
4
4
  return Math.round(num * 1e3) / 1e3;
5
5
  }
6
6
  const findParentElement = (target, callback, checkElement = true) => {
7
- if (!(target instanceof HTMLElement)) {
7
+ if (!(target instanceof HTMLElement))
8
8
  return null;
9
- }
10
9
  let parent = checkElement ? target : target.parentElement;
11
10
  do {
12
- if (!parent) {
11
+ if (!parent)
13
12
  return null;
14
- }
15
13
  const matches = callback(parent);
16
- if (matches) {
14
+ if (matches)
17
15
  return parent;
18
- }
19
16
  } while (parent = parent.parentElement);
20
17
  return null;
21
18
  };
@@ -2,18 +2,15 @@ function round(num) {
2
2
  return Math.round(num * 1e3) / 1e3;
3
3
  }
4
4
  const findParentElement = (target, callback, checkElement = true) => {
5
- if (!(target instanceof HTMLElement)) {
5
+ if (!(target instanceof HTMLElement))
6
6
  return null;
7
- }
8
7
  let parent = checkElement ? target : target.parentElement;
9
8
  do {
10
- if (!parent) {
9
+ if (!parent)
11
10
  return null;
12
- }
13
11
  const matches = callback(parent);
14
- if (matches) {
12
+ if (matches)
15
13
  return parent;
16
- }
17
14
  } while (parent = parent.parentElement);
18
15
  return null;
19
16
  };
@@ -26,9 +26,8 @@ const getRandomVariationId = ({ id, variations }) => {
26
26
  for (const id2 in variations) {
27
27
  const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
28
28
  n += testRatio;
29
- if (random < n) {
29
+ if (random < n)
30
30
  return id2;
31
- }
32
31
  }
33
32
  return id;
34
33
  };
@@ -45,29 +44,25 @@ const getAndSetVariantId = (args) => {
45
44
  const getTestFields = ({ item, testGroupId }) => {
46
45
  const variationValue = item.variations[testGroupId];
47
46
  if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
48
- !variationValue) {
47
+ !variationValue)
49
48
  return {
50
49
  testVariationId: item.id,
51
50
  testVariationName: "Default"
52
51
  };
53
- } else {
52
+ else
54
53
  return {
55
54
  data: variationValue.data,
56
55
  testVariationId: variationValue.id,
57
56
  testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
58
57
  };
59
- }
60
58
  };
61
59
  const handleABTestingSync = ({ item, canTrack }) => {
62
- if (!canTrack) {
60
+ if (!canTrack)
63
61
  return item;
64
- }
65
- if (!item) {
62
+ if (!item)
66
63
  return void 0;
67
- }
68
- if (!checkIsBuilderContentWithVariations(item)) {
64
+ if (!checkIsBuilderContentWithVariations(item))
69
65
  return item;
70
- }
71
66
  const testGroupId = getContentVariationCookieSync({
72
67
  contentId: item.id
73
68
  }) || getAndSetVariantId({
@@ -84,12 +79,10 @@ const handleABTestingSync = ({ item, canTrack }) => {
84
79
  };
85
80
  };
86
81
  const handleABTesting = async ({ item, canTrack }) => {
87
- if (!canTrack) {
82
+ if (!canTrack)
88
83
  return item;
89
- }
90
- if (!checkIsBuilderContentWithVariations(item)) {
84
+ if (!checkIsBuilderContentWithVariations(item))
91
85
  return item;
92
- }
93
86
  const cookieValue = await getContentVariationCookie({
94
87
  contentId: item.id
95
88
  });
@@ -1,5 +1,5 @@
1
1
  import { checkIsDefined } from "./nullable.qwik.mjs";
2
- import { getCookieSync, getCookie, setCookie } from "./cookie.qwik.mjs";
2
+ import { getCookie, getCookieSync, setCookie } from "./cookie.qwik.mjs";
3
3
  import { logger } from "./logger.qwik.mjs";
4
4
  const BUILDER_STORE_PREFIX = "builder.tests";
5
5
  const getContentTestKey = (id) => `${BUILDER_STORE_PREFIX}.${id}`;
@@ -24,9 +24,8 @@ const getRandomVariationId = ({ id, variations }) => {
24
24
  for (const id2 in variations) {
25
25
  const testRatio = (_a = variations[id2]) == null ? void 0 : _a.testRatio;
26
26
  n += testRatio;
27
- if (random < n) {
27
+ if (random < n)
28
28
  return id2;
29
- }
30
29
  }
31
30
  return id;
32
31
  };
@@ -43,29 +42,25 @@ const getAndSetVariantId = (args) => {
43
42
  const getTestFields = ({ item, testGroupId }) => {
44
43
  const variationValue = item.variations[testGroupId];
45
44
  if (testGroupId === item.id || // handle edge-case where `testGroupId` points to non-existing variation
46
- !variationValue) {
45
+ !variationValue)
47
46
  return {
48
47
  testVariationId: item.id,
49
48
  testVariationName: "Default"
50
49
  };
51
- } else {
50
+ else
52
51
  return {
53
52
  data: variationValue.data,
54
53
  testVariationId: variationValue.id,
55
54
  testVariationName: variationValue.name || (variationValue.id === item.id ? "Default" : "")
56
55
  };
57
- }
58
56
  };
59
57
  const handleABTestingSync = ({ item, canTrack }) => {
60
- if (!canTrack) {
58
+ if (!canTrack)
61
59
  return item;
62
- }
63
- if (!item) {
60
+ if (!item)
64
61
  return void 0;
65
- }
66
- if (!checkIsBuilderContentWithVariations(item)) {
62
+ if (!checkIsBuilderContentWithVariations(item))
67
63
  return item;
68
- }
69
64
  const testGroupId = getContentVariationCookieSync({
70
65
  contentId: item.id
71
66
  }) || getAndSetVariantId({
@@ -82,12 +77,10 @@ const handleABTestingSync = ({ item, canTrack }) => {
82
77
  };
83
78
  };
84
79
  const handleABTesting = async ({ item, canTrack }) => {
85
- if (!canTrack) {
80
+ if (!canTrack)
86
81
  return item;
87
- }
88
- if (!checkIsBuilderContentWithVariations(item)) {
82
+ if (!checkIsBuilderContentWithVariations(item))
89
83
  return item;
90
- }
91
84
  const cookieValue = await getContentVariationCookie({
92
85
  contentId: item.id
93
86
  });
@@ -7,9 +7,8 @@ const url = require("./url.qwik.cjs");
7
7
  const getCookieSync = ({ name, canTrack }) => {
8
8
  var _a;
9
9
  try {
10
- if (!canTrack) {
10
+ if (!canTrack)
11
11
  return void 0;
12
- }
13
12
  return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
14
13
  } catch (err) {
15
14
  logger.logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
@@ -62,9 +61,8 @@ const createCookieString = ({ name, value, expires }) => {
62
61
  };
63
62
  const setCookie = async ({ name, value, expires, canTrack }) => {
64
63
  try {
65
- if (!canTrack) {
64
+ if (!canTrack)
66
65
  return;
67
- }
68
66
  const cookie = createCookieString({
69
67
  name,
70
68
  value,
@@ -5,9 +5,8 @@ import { getTopLevelDomain } from "./url.qwik.mjs";
5
5
  const getCookieSync = ({ name, canTrack }) => {
6
6
  var _a;
7
7
  try {
8
- if (!canTrack) {
8
+ if (!canTrack)
9
9
  return void 0;
10
- }
11
10
  return (_a = document.cookie.split("; ").find((row) => row.startsWith(`${name}=`))) == null ? void 0 : _a.split("=")[1];
12
11
  } catch (err) {
13
12
  logger.warn("[COOKIE] GET error: ", (err == null ? void 0 : err.message) || err);
@@ -60,9 +59,8 @@ const createCookieString = ({ name, value, expires }) => {
60
59
  };
61
60
  const setCookie = async ({ name, value, expires, canTrack }) => {
62
61
  try {
63
- if (!canTrack) {
62
+ if (!canTrack)
64
63
  return;
65
- }
66
64
  const cookie = createCookieString({
67
65
  name,
68
66
  value,
@@ -4,11 +4,10 @@ const camelToKebabCase = require("../functions/camel-to-kebab-case.qwik.cjs");
4
4
  const nullable = require("./nullable.qwik.cjs");
5
5
  const convertStyleMapToCSSArray = (style) => {
6
6
  const cssProps = Object.entries(style).map(([key, value]) => {
7
- if (typeof value === "string") {
7
+ if (typeof value === "string")
8
8
  return `${camelToKebabCase.camelToKebabCase(key)}: ${value};`;
9
- } else {
9
+ else
10
10
  return void 0;
11
- }
12
11
  });
13
12
  return cssProps.filter(nullable.checkIsDefined);
14
13
  };
@@ -17,13 +16,12 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
17
16
  const cssClass = `.${className} {
18
17
  ${convertStyleMapToCSS(styles)}
19
18
  }`;
20
- if (mediaQuery) {
19
+ if (mediaQuery)
21
20
  return `${mediaQuery} {
22
21
  ${cssClass}
23
22
  }`;
24
- } else {
23
+ else
25
24
  return cssClass;
26
- }
27
25
  };
28
26
  exports.convertStyleMapToCSS = convertStyleMapToCSS;
29
27
  exports.convertStyleMapToCSSArray = convertStyleMapToCSSArray;
@@ -2,11 +2,10 @@ import { camelToKebabCase } from "../functions/camel-to-kebab-case.qwik.mjs";
2
2
  import { checkIsDefined } from "./nullable.qwik.mjs";
3
3
  const convertStyleMapToCSSArray = (style) => {
4
4
  const cssProps = Object.entries(style).map(([key, value]) => {
5
- if (typeof value === "string") {
5
+ if (typeof value === "string")
6
6
  return `${camelToKebabCase(key)}: ${value};`;
7
- } else {
7
+ else
8
8
  return void 0;
9
- }
10
9
  });
11
10
  return cssProps.filter(checkIsDefined);
12
11
  };
@@ -15,13 +14,12 @@ const createCssClass = ({ mediaQuery, className, styles }) => {
15
14
  const cssClass = `.${className} {
16
15
  ${convertStyleMapToCSS(styles)}
17
16
  }`;
18
- if (mediaQuery) {
17
+ if (mediaQuery)
19
18
  return `${mediaQuery} {
20
19
  ${cssClass}
21
20
  }`;
22
- } else {
21
+ else
23
22
  return cssClass;
24
- }
25
23
  };
26
24
  export {
27
25
  convertStyleMapToCSS,
@@ -25,11 +25,10 @@ function flattenMongoQuery(obj, _current, _res = {}) {
25
25
  for (const key in obj) {
26
26
  const value = obj[key];
27
27
  const newKey = _current ? _current + "." + key : key;
28
- if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$"))) {
28
+ if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
29
29
  flattenMongoQuery(value, newKey, _res);
30
- } else {
30
+ else
31
31
  _res[newKey] = value;
32
- }
33
32
  }
34
33
  return _res;
35
34
  }
@@ -23,11 +23,10 @@ function flattenMongoQuery(obj, _current, _res = {}) {
23
23
  for (const key in obj) {
24
24
  const value = obj[key];
25
25
  const newKey = _current ? _current + "." + key : key;
26
- if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$"))) {
26
+ if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).find((item) => item.startsWith("$")))
27
27
  flattenMongoQuery(value, newKey, _res);
28
- } else {
28
+ else
29
29
  _res[newKey] = value;
30
- }
31
30
  }
32
31
  return _res;
33
32
  }
@@ -5,9 +5,8 @@ const getLocalStorage = () => isBrowser.isBrowser() && typeof localStorage !== "
5
5
  const getLocalStorageItem = ({ key, canTrack }) => {
6
6
  var _a;
7
7
  try {
8
- if (canTrack) {
8
+ if (canTrack)
9
9
  return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
10
- }
11
10
  return void 0;
12
11
  } catch (err) {
13
12
  console.debug("[LocalStorage] GET error: ", err);
@@ -17,9 +16,8 @@ const getLocalStorageItem = ({ key, canTrack }) => {
17
16
  const setLocalStorageItem = ({ key, canTrack, value }) => {
18
17
  var _a;
19
18
  try {
20
- if (canTrack) {
19
+ if (canTrack)
21
20
  (_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
22
- }
23
21
  } catch (err) {
24
22
  console.debug("[LocalStorage] SET error: ", err);
25
23
  }
@@ -3,9 +3,8 @@ const getLocalStorage = () => isBrowser() && typeof localStorage !== "undefined"
3
3
  const getLocalStorageItem = ({ key, canTrack }) => {
4
4
  var _a;
5
5
  try {
6
- if (canTrack) {
6
+ if (canTrack)
7
7
  return (_a = getLocalStorage()) == null ? void 0 : _a.getItem(key);
8
- }
9
8
  return void 0;
10
9
  } catch (err) {
11
10
  console.debug("[LocalStorage] GET error: ", err);
@@ -15,9 +14,8 @@ const getLocalStorageItem = ({ key, canTrack }) => {
15
14
  const setLocalStorageItem = ({ key, canTrack, value }) => {
16
15
  var _a;
17
16
  try {
18
- if (canTrack) {
17
+ if (canTrack)
19
18
  (_a = getLocalStorage()) == null ? void 0 : _a.setItem(key, value);
20
- }
21
19
  } catch (err) {
22
20
  console.debug("[LocalStorage] SET error: ", err);
23
21
  }
@@ -2,9 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  function omit(obj, ...values) {
4
4
  const newObject = Object.assign({}, obj);
5
- for (const key of values) {
5
+ for (const key of values)
6
6
  delete newObject[key];
7
- }
8
7
  return newObject;
9
8
  }
10
9
  exports.omit = omit;
@@ -1,8 +1,7 @@
1
1
  function omit(obj, ...values) {
2
2
  const newObject = Object.assign({}, obj);
3
- for (const key of values) {
3
+ for (const key of values)
4
4
  delete newObject[key];
5
- }
6
5
  return newObject;
7
6
  }
8
7
  export {
@@ -9,11 +9,10 @@ const convertSearchParamsToQueryObject = (searchParams) => {
9
9
  };
10
10
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
11
11
  const getSearchString = (search) => {
12
- if (typeof search === "string") {
12
+ if (typeof search === "string")
13
13
  return search;
14
- } else if (search instanceof URLSearchParams) {
14
+ else if (search instanceof URLSearchParams)
15
15
  return search.toString();
16
- }
17
16
  return new URLSearchParams(search).toString();
18
17
  };
19
18
  exports.convertSearchParamsToQueryObject = convertSearchParamsToQueryObject;
@@ -7,11 +7,10 @@ const convertSearchParamsToQueryObject = (searchParams) => {
7
7
  };
8
8
  const normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchParams ? convertSearchParamsToQueryObject(searchParams) : searchParams;
9
9
  const getSearchString = (search) => {
10
- if (typeof search === "string") {
10
+ if (typeof search === "string")
11
11
  return search;
12
- } else if (search instanceof URLSearchParams) {
12
+ else if (search instanceof URLSearchParams)
13
13
  return search.toString();
14
- }
15
14
  return new URLSearchParams(search).toString();
16
15
  };
17
16
  export {
@@ -5,16 +5,15 @@ const nullable = require("./nullable.qwik.cjs");
5
5
  const uuid = require("./uuid.qwik.cjs");
6
6
  const SESSION_LOCAL_STORAGE_KEY = "builderSessionId";
7
7
  const getSessionId = async ({ canTrack }) => {
8
- if (!canTrack) {
8
+ if (!canTrack)
9
9
  return void 0;
10
- }
11
10
  const sessionId = await cookie.getCookie({
12
11
  name: SESSION_LOCAL_STORAGE_KEY,
13
12
  canTrack
14
13
  });
15
- if (nullable.checkIsDefined(sessionId)) {
14
+ if (nullable.checkIsDefined(sessionId))
16
15
  return sessionId;
17
- } else {
16
+ else {
18
17
  const newSessionId = createSessionId();
19
18
  setSessionId({
20
19
  id: newSessionId,