@salla.sa/twilight-components 2.13.25 → 2.13.27

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 (217) hide show
  1. package/dist/cjs/{app-globals-ead164a5.js → app-globals-cdf64ffe.js} +2 -2
  2. package/dist/cjs/app-globals-cdf64ffe.js.map +1 -0
  3. package/dist/cjs/{index-96c545df.js → index-44391cfe.js} +58 -1
  4. package/dist/cjs/{index-96c545df.js.map → index-44391cfe.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/cjs/salla-add-product-button_47.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  12. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-offer.cjs.entry.js +147 -56
  19. package/dist/cjs/salla-offer.cjs.entry.js.map +1 -1
  20. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-products-slider.cjs.entry.js +12 -1
  26. package/dist/cjs/salla-products-slider.cjs.entry.js.map +1 -1
  27. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  28. package/dist/cjs/twilight.cjs.js +3 -3
  29. package/dist/collection/components/salla-offer/interfaces.js +16 -1
  30. package/dist/collection/components/salla-offer/interfaces.js.map +1 -1
  31. package/dist/collection/components/salla-offer/salla-offer.js +150 -65
  32. package/dist/collection/components/salla-offer/salla-offer.js.map +1 -1
  33. package/dist/collection/components/salla-products-slider/salla-products-slider.js +11 -0
  34. package/dist/collection/components/salla-products-slider/salla-products-slider.js.map +1 -1
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/index.js.map +1 -1
  37. package/dist/components/salla-offer.js +151 -57
  38. package/dist/components/salla-offer.js.map +1 -1
  39. package/dist/components/salla-products-slider.js +11 -0
  40. package/dist/components/salla-products-slider.js.map +1 -1
  41. package/dist/esm/{app-globals-26776020.js → app-globals-d4f3f915.js} +2 -2
  42. package/dist/esm/app-globals-d4f3f915.js.map +1 -0
  43. package/dist/esm/{index-9a9b1e67.js → index-79837019.js} +58 -1
  44. package/dist/esm/{index-9a9b1e67.js.map → index-79837019.js.map} +1 -1
  45. package/dist/esm/loader.js +4 -4
  46. package/dist/esm/salla-add-product-button_47.entry.js +1 -1
  47. package/dist/esm/salla-advertisement.entry.js +1 -1
  48. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  49. package/dist/esm/salla-apps-icons.entry.js +1 -1
  50. package/dist/esm/salla-conditional-fields.entry.js +1 -1
  51. package/dist/esm/salla-contacts.entry.js +1 -1
  52. package/dist/esm/salla-filters-widget.entry.js +1 -1
  53. package/dist/esm/salla-filters.entry.js +1 -1
  54. package/dist/esm/salla-installment.entry.js +1 -1
  55. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  56. package/dist/esm/salla-notification-item.entry.js +1 -1
  57. package/dist/esm/salla-notifications.entry.js +1 -1
  58. package/dist/esm/salla-offer.entry.js +147 -56
  59. package/dist/esm/salla-offer.entry.js.map +1 -1
  60. package/dist/esm/salla-order-summary.entry.js +1 -1
  61. package/dist/esm/salla-payments.entry.js +1 -1
  62. package/dist/esm/salla-price-range.entry.js +1 -1
  63. package/dist/esm/salla-product-options.entry.js +1 -1
  64. package/dist/esm/salla-products-list.entry.js +1 -1
  65. package/dist/esm/salla-products-slider.entry.js +12 -1
  66. package/dist/esm/salla-products-slider.entry.js.map +1 -1
  67. package/dist/esm/salla-social.entry.js +1 -1
  68. package/dist/esm/twilight.js +4 -4
  69. package/dist/esm-es5/{app-globals-26776020.js → app-globals-d4f3f915.js} +2 -2
  70. package/dist/esm-es5/app-globals-d4f3f915.js.map +1 -0
  71. package/dist/esm-es5/index-79837019.js +5 -0
  72. package/dist/esm-es5/index-79837019.js.map +1 -0
  73. package/dist/esm-es5/loader.js +1 -1
  74. package/dist/esm-es5/loader.js.map +1 -1
  75. package/dist/esm-es5/salla-add-product-button_47.entry.js +1 -1
  76. package/dist/esm-es5/salla-advertisement.entry.js +1 -1
  77. package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
  78. package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
  79. package/dist/esm-es5/salla-conditional-fields.entry.js +1 -1
  80. package/dist/esm-es5/salla-contacts.entry.js +1 -1
  81. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  82. package/dist/esm-es5/salla-filters.entry.js +1 -1
  83. package/dist/esm-es5/salla-installment.entry.js +1 -1
  84. package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
  85. package/dist/esm-es5/salla-notification-item.entry.js +1 -1
  86. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  87. package/dist/esm-es5/salla-offer.entry.js +1 -1
  88. package/dist/esm-es5/salla-offer.entry.js.map +1 -1
  89. package/dist/esm-es5/salla-order-summary.entry.js +2 -2
  90. package/dist/esm-es5/salla-payments.entry.js +1 -1
  91. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  92. package/dist/esm-es5/salla-product-options.entry.js +1 -1
  93. package/dist/esm-es5/salla-products-list.entry.js +1 -1
  94. package/dist/esm-es5/salla-products-slider.entry.js +1 -1
  95. package/dist/esm-es5/salla-products-slider.entry.js.map +1 -1
  96. package/dist/esm-es5/salla-social.entry.js +1 -1
  97. package/dist/esm-es5/twilight.js +1 -1
  98. package/dist/esm-es5/twilight.js.map +1 -1
  99. package/dist/twilight/{p-94ad2e62.entry.js → p-03f23525.entry.js} +2 -2
  100. package/dist/twilight/{p-24381109.js → p-07c67c7a.js} +3 -3
  101. package/dist/twilight/p-07c67c7a.js.map +1 -0
  102. package/dist/twilight/{p-e218f9e3.entry.js → p-080bbb5b.entry.js} +2 -2
  103. package/dist/twilight/{p-dcd5ddbe.system.entry.js → p-0ed91e2a.system.entry.js} +2 -2
  104. package/dist/twilight/{p-f30e7de2.entry.js → p-199114a5.entry.js} +2 -2
  105. package/dist/twilight/{p-26807b00.system.entry.js → p-230e06da.system.entry.js} +2 -2
  106. package/dist/twilight/{p-26ccfdb9.system.entry.js → p-26fd0612.system.entry.js} +2 -2
  107. package/dist/twilight/{p-5775cbdb.entry.js → p-34751048.entry.js} +2 -2
  108. package/dist/twilight/{p-97a6c220.system.entry.js → p-390d5cbb.system.entry.js} +2 -2
  109. package/dist/twilight/{p-c7f23f03.entry.js → p-3c32b61c.entry.js} +2 -2
  110. package/dist/twilight/p-4390fbcd.system.entry.js +5 -0
  111. package/dist/twilight/{p-f5cd04ef.entry.js → p-46ccba25.entry.js} +2 -2
  112. package/dist/twilight/{p-ed382e13.system.entry.js → p-52ff730a.system.entry.js} +2 -2
  113. package/dist/twilight/p-5b579b17.entry.js +5 -0
  114. package/dist/twilight/p-5b579b17.entry.js.map +1 -0
  115. package/dist/twilight/{p-09708e69.entry.js → p-5bc4cd9e.entry.js} +2 -2
  116. package/dist/twilight/p-69245750.system.js +5 -0
  117. package/dist/twilight/{p-03fcd5fe.system.js.map → p-69245750.system.js.map} +1 -1
  118. package/dist/twilight/p-6a8a9ec7.system.entry.js +5 -0
  119. package/dist/twilight/p-6a8a9ec7.system.entry.js.map +1 -0
  120. package/dist/twilight/{p-19338c46.entry.js → p-6b4d6c03.entry.js} +2 -2
  121. package/dist/twilight/{p-4923a67f.system.entry.js → p-6d2ad7ef.system.entry.js} +2 -2
  122. package/dist/twilight/{p-07d2c534.system.js → p-6e94a792.system.js} +2 -2
  123. package/dist/twilight/p-6e94a792.system.js.map +1 -0
  124. package/dist/twilight/{p-52e80e00.system.entry.js → p-7686e7fd.system.entry.js} +2 -2
  125. package/dist/twilight/{p-d41dfff7.entry.js → p-76920369.entry.js} +2 -2
  126. package/dist/twilight/{p-d5e825e0.entry.js → p-7dc1b3c7.entry.js} +2 -2
  127. package/dist/twilight/{p-98df3e02.system.entry.js → p-7ff9dda0.system.entry.js} +2 -2
  128. package/dist/twilight/{p-06371bb0.entry.js → p-85993e98.entry.js} +2 -2
  129. package/dist/twilight/{p-e6bb10f0.entry.js → p-85cbfc81.entry.js} +2 -2
  130. package/dist/twilight/{p-0b502ded.system.entry.js → p-962d53a3.system.entry.js} +2 -2
  131. package/dist/twilight/{p-b568dcc3.entry.js → p-9c38d0c5.entry.js} +2 -2
  132. package/dist/twilight/{p-244fdaa3.system.entry.js → p-9ff06235.system.entry.js} +2 -2
  133. package/dist/twilight/{p-1d8dea0d.system.entry.js → p-a00e5e28.system.entry.js} +2 -2
  134. package/dist/twilight/p-a0dabf35.system.js +6 -0
  135. package/dist/twilight/p-a0dabf35.system.js.map +1 -0
  136. package/dist/twilight/p-a2813bc2.entry.js +5 -0
  137. package/dist/twilight/p-a2813bc2.entry.js.map +1 -0
  138. package/dist/twilight/{p-e7aa06ff.entry.js → p-b6a073de.entry.js} +2 -2
  139. package/dist/twilight/{p-5ab9e320.system.entry.js → p-bea45f66.system.entry.js} +2 -2
  140. package/dist/twilight/{p-7fc43537.entry.js → p-befee3a2.entry.js} +2 -2
  141. package/dist/twilight/{p-5cf571e0.entry.js → p-c9a82718.entry.js} +2 -2
  142. package/dist/twilight/{p-65f0067f.entry.js → p-cd86b571.entry.js} +2 -2
  143. package/dist/twilight/{p-27e67445.system.entry.js → p-d6a5a331.system.entry.js} +2 -2
  144. package/dist/twilight/{p-9afefe3a.system.entry.js → p-da0686ae.system.entry.js} +2 -2
  145. package/dist/twilight/{p-d1b7315f.system.entry.js → p-e39cd40e.system.entry.js} +2 -2
  146. package/dist/twilight/p-e64a8b4d.system.entry.js +5 -0
  147. package/dist/twilight/p-e64a8b4d.system.entry.js.map +1 -0
  148. package/dist/twilight/{p-bb77d0d9.system.entry.js → p-e6a7f1f0.system.entry.js} +2 -2
  149. package/dist/twilight/{p-2919b445.system.entry.js → p-f3d5458e.system.entry.js} +2 -2
  150. package/dist/twilight/p-fafedb13.js +6 -0
  151. package/dist/twilight/p-fafedb13.js.map +1 -0
  152. package/dist/twilight/{p-93a0c3f0.entry.js → p-fc8e9b7f.entry.js} +2 -2
  153. package/dist/twilight/twilight.esm.js +1 -1
  154. package/dist/twilight/twilight.esm.js.map +1 -1
  155. package/dist/twilight/twilight.js +1 -1
  156. package/dist/types/components/salla-offer/interfaces.d.ts +65 -38
  157. package/dist/types/components/salla-offer/salla-offer.d.ts +26 -16
  158. package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +1 -0
  159. package/dist/types/components.d.ts +6 -4
  160. package/package.json +5 -5
  161. package/dist/cjs/app-globals-ead164a5.js.map +0 -1
  162. package/dist/esm/app-globals-26776020.js.map +0 -1
  163. package/dist/esm-es5/app-globals-26776020.js.map +0 -1
  164. package/dist/esm-es5/index-9a9b1e67.js +0 -5
  165. package/dist/esm-es5/index-9a9b1e67.js.map +0 -1
  166. package/dist/twilight/p-03fcd5fe.system.js +0 -5
  167. package/dist/twilight/p-07d2c534.system.js.map +0 -1
  168. package/dist/twilight/p-24381109.js.map +0 -1
  169. package/dist/twilight/p-294dad80.js +0 -6
  170. package/dist/twilight/p-294dad80.js.map +0 -1
  171. package/dist/twilight/p-5add79da.system.entry.js +0 -5
  172. package/dist/twilight/p-65a4715d.entry.js +0 -5
  173. package/dist/twilight/p-65a4715d.entry.js.map +0 -1
  174. package/dist/twilight/p-66da3f43.system.entry.js +0 -5
  175. package/dist/twilight/p-66da3f43.system.entry.js.map +0 -1
  176. package/dist/twilight/p-78b1292d.system.entry.js +0 -5
  177. package/dist/twilight/p-78b1292d.system.entry.js.map +0 -1
  178. package/dist/twilight/p-c8c265d7.entry.js +0 -5
  179. package/dist/twilight/p-c8c265d7.entry.js.map +0 -1
  180. package/dist/twilight/p-eebd57c0.system.js +0 -6
  181. package/dist/twilight/p-eebd57c0.system.js.map +0 -1
  182. /package/dist/twilight/{p-94ad2e62.entry.js.map → p-03f23525.entry.js.map} +0 -0
  183. /package/dist/twilight/{p-e218f9e3.entry.js.map → p-080bbb5b.entry.js.map} +0 -0
  184. /package/dist/twilight/{p-dcd5ddbe.system.entry.js.map → p-0ed91e2a.system.entry.js.map} +0 -0
  185. /package/dist/twilight/{p-f30e7de2.entry.js.map → p-199114a5.entry.js.map} +0 -0
  186. /package/dist/twilight/{p-26807b00.system.entry.js.map → p-230e06da.system.entry.js.map} +0 -0
  187. /package/dist/twilight/{p-26ccfdb9.system.entry.js.map → p-26fd0612.system.entry.js.map} +0 -0
  188. /package/dist/twilight/{p-5775cbdb.entry.js.map → p-34751048.entry.js.map} +0 -0
  189. /package/dist/twilight/{p-97a6c220.system.entry.js.map → p-390d5cbb.system.entry.js.map} +0 -0
  190. /package/dist/twilight/{p-c7f23f03.entry.js.map → p-3c32b61c.entry.js.map} +0 -0
  191. /package/dist/twilight/{p-5add79da.system.entry.js.map → p-4390fbcd.system.entry.js.map} +0 -0
  192. /package/dist/twilight/{p-f5cd04ef.entry.js.map → p-46ccba25.entry.js.map} +0 -0
  193. /package/dist/twilight/{p-ed382e13.system.entry.js.map → p-52ff730a.system.entry.js.map} +0 -0
  194. /package/dist/twilight/{p-09708e69.entry.js.map → p-5bc4cd9e.entry.js.map} +0 -0
  195. /package/dist/twilight/{p-19338c46.entry.js.map → p-6b4d6c03.entry.js.map} +0 -0
  196. /package/dist/twilight/{p-4923a67f.system.entry.js.map → p-6d2ad7ef.system.entry.js.map} +0 -0
  197. /package/dist/twilight/{p-52e80e00.system.entry.js.map → p-7686e7fd.system.entry.js.map} +0 -0
  198. /package/dist/twilight/{p-d41dfff7.entry.js.map → p-76920369.entry.js.map} +0 -0
  199. /package/dist/twilight/{p-d5e825e0.entry.js.map → p-7dc1b3c7.entry.js.map} +0 -0
  200. /package/dist/twilight/{p-98df3e02.system.entry.js.map → p-7ff9dda0.system.entry.js.map} +0 -0
  201. /package/dist/twilight/{p-06371bb0.entry.js.map → p-85993e98.entry.js.map} +0 -0
  202. /package/dist/twilight/{p-e6bb10f0.entry.js.map → p-85cbfc81.entry.js.map} +0 -0
  203. /package/dist/twilight/{p-0b502ded.system.entry.js.map → p-962d53a3.system.entry.js.map} +0 -0
  204. /package/dist/twilight/{p-b568dcc3.entry.js.map → p-9c38d0c5.entry.js.map} +0 -0
  205. /package/dist/twilight/{p-244fdaa3.system.entry.js.map → p-9ff06235.system.entry.js.map} +0 -0
  206. /package/dist/twilight/{p-1d8dea0d.system.entry.js.map → p-a00e5e28.system.entry.js.map} +0 -0
  207. /package/dist/twilight/{p-e7aa06ff.entry.js.map → p-b6a073de.entry.js.map} +0 -0
  208. /package/dist/twilight/{p-5ab9e320.system.entry.js.map → p-bea45f66.system.entry.js.map} +0 -0
  209. /package/dist/twilight/{p-7fc43537.entry.js.map → p-befee3a2.entry.js.map} +0 -0
  210. /package/dist/twilight/{p-5cf571e0.entry.js.map → p-c9a82718.entry.js.map} +0 -0
  211. /package/dist/twilight/{p-65f0067f.entry.js.map → p-cd86b571.entry.js.map} +0 -0
  212. /package/dist/twilight/{p-27e67445.system.entry.js.map → p-d6a5a331.system.entry.js.map} +0 -0
  213. /package/dist/twilight/{p-9afefe3a.system.entry.js.map → p-da0686ae.system.entry.js.map} +0 -0
  214. /package/dist/twilight/{p-d1b7315f.system.entry.js.map → p-e39cd40e.system.entry.js.map} +0 -0
  215. /package/dist/twilight/{p-bb77d0d9.system.entry.js.map → p-e6a7f1f0.system.entry.js.map} +0 -0
  216. /package/dist/twilight/{p-2919b445.system.entry.js.map → p-f3d5458e.system.entry.js.map} +0 -0
  217. /package/dist/twilight/{p-93a0c3f0.entry.js.map → p-fc8e9b7f.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sallaProductsSliderCss","SallaProductsSlider","componentWillLoad","Helper","onSallaReadyPromise","resolve","this","sourceValueIsValid","getSourceValue","isSourceWithoutValue","salla","logger","warn","getSource","hasCustomComponent","customElements","get","productCardComponent","source","productsData","isReady","config","fetchProducts","limit","then","response","data","event","emit","componentDidRender","processedCount","intervalId","setInterval","_a","host","querySelectorAll","forEach","img","removeAttribute","clearInterval","includes","getItemHTML","product","url","toLowerCase","h","class","customElem","document","createElement","setAttribute","JSON","stringify","innerHTML","outerHTML","canRender","getProductsSource","getProductsSourceValue","sourceValue","render","Host","id","sliderId","Math","random","toString","substr","autoplay","type","blockTitle","subTitle","displayAllUrl","sliderConfig","slot","map"],"sources":["src/components/salla-products-slider/salla-products-slider.scss?tag=salla-products-slider","src/components/salla-products-slider/salla-products-slider.tsx"],"sourcesContent":[".s-products-slider{\n &-wrapper{\n\n }\n &-slider{\n\n }\n &-card{\n\n }\n}","import { Component, Host, h, Prop, Element, State } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\n\n//todo:: extends this component from salla-products-list or the opposite\nexport class SallaProductsSlider {\n /**\n * Title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() blockTitle: string;\n\n /**\n * Sub title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() subTitle: string;\n\n /**\n * Slider Id, if not provided will be generated automatically\n * @type {string}\n * @default ''\n * */\n @Prop() sliderId: string;\n\n /**\n * Display 'ALL' URL\n * @type {string}\n * @default ''\n * */\n @Prop() displayAllUrl: string;\n\n /**\n * autoplay option for products slider\n */\n @Prop({ mutable: true }) autoplay: boolean\n\n /**\n * Source of the products, if api will get the products from the API, if json will get the products from the products prop\n * @type {string}\n * @default ''\n * */\n @Prop({\n reflect: true,\n mutable: true\n }) source: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'tags' | 'selected' | 'offers' | 'landing-page' | 'wishlist';\n\n /**\n * The source value, cloud be different values as following:\n * - array of ids when `source` in ['categories', 'brands', 'tags', 'selected']\n * - products payload when `source` = 'json'\n * - product_id when `source` = 'related'\n *\n * @type {string}\n * */\n @Prop() sourceValue: string;\n\n /**\n * Limit for number of products in the list.\n */\n @Prop({ mutable: true }) limit: number;\n\n /**\n * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n\n /**\n * Custom Card Component for the Salla Products Slider.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products Slider.\n *\n * @example\n * <salla-products-slider product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-slider product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\n\n\n @State() productsData: any;\n @State() isReady: boolean;\n @State() sourceValueIsValid: boolean;\n @State() hasCustomComponent: boolean;\n @State() apiUrl: string = '';\n @State() parsedSourceValue: any;\n\n componentWillLoad() {\n return Helper.onSallaReadyPromise((resolve) => {\n this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${this.getSource()\n }]`);\n return resolve(true);\n }\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return resolve(true);\n }\n\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled'))) {\n this.isReady = false\n return resolve(true);\n }\n\n return Helper.fetchProducts(this.getSource(), this.getSourceValue(), this.limit).then(response => {\n this.productsData = response.data\n this.isReady = true\n salla.event.emit('salla-products-slider::products.fetched', response.data);\n resolve(response);\n });\n });\n }\n componentDidRender() {\n let processedCount = 0;\n const intervalId = setInterval(() => {\n this.host.querySelectorAll('[loading=\"lazy\"]')?.forEach(img => img.removeAttribute('loading'));\n processedCount++;\n if (processedCount >= 10) {\n clearInterval(intervalId);\n }\n }, 1000);\n }\n\n private isSourceWithoutValue() {\n return ['offers', 'latest', 'sales'].includes(this.getSource());\n }\n\n private getItemHTML(product) {\n\n //as a request they don't want to let the user to open the product details\n //todo:: find a better way to handle this request\n this.getSource() === 'landing-page' && (product.url = '');\n if (this.hasCustomComponent && this.productCardComponent.toLowerCase() == 'custom-salla-product-card') {\n return <div class=\"s-products-slider-card\">\n <custom-salla-product-card product={product} source={this.getSource()} source-value={this.getSourceValue()} />\n </div>\n }\n\n if (this.hasCustomComponent) {\n const customElem = document.createElement(this.productCardComponent);\n customElem.setAttribute('product', JSON.stringify(product));\n customElem.setAttribute('source', this.getSource());\n customElem.setAttribute('source-value', this.getSourceValue());\n\n return <div class=\"s-products-slider-card\" innerHTML={customElem.outerHTML} />;\n }\n\n return <div class=\"s-products-slider-card\">\n <salla-product-card\n show-quantity={this.getSource() == 'landing-page'}\n hide-add-btn={this.getSource() == 'landing-page'}\n shadow-on-hover={true}\n product={product} />\n </div>;\n }\n\n private canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n\n private getSource() {\n return Helper.getProductsSource(this.source);\n }\n\n private getSourceValue() {\n return Helper.getProductsSourceValue(this.source, this.sourceValue);\n }\n\n render() {\n if (!this.canRender()) {\n return;\n }\n return (\n <Host class=\"s-products-slider-wrapper\">\n <salla-slider\n class=\"s-products-slider-slider\"\n id={this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`}\n auto-play={this.autoplay}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n sliderConfig={this.sliderConfig ? this.sliderConfig : null}\n >\n <div slot=\"items\">\n {this.productsData?.map(product => this.getItemHTML(product))}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"mappings":";;;6FAAA,MAAMA,EAAyB,G,MCQlBC,EAAmB,M,oRAiFS,4B,mIAUb,G,iCAG1B,iBAAAC,GACE,OAAOC,EAAOC,qBAAqBC,IACjCC,KAAKC,sBAAwBD,KAAKE,kBAAoBF,KAAKG,wBAC3D,IAAKH,KAAKC,mBAAoB,CAC5BG,MAAMC,OAAOC,KAAK,6CAA6CN,KAAKO,gBAEpE,OAAOR,EAAQ,K,CAEjBC,KAAKQ,qBAAuBC,eAAeC,IAAIV,KAAKW,sBAEpD,GAAIX,KAAKY,SAAW,OAAQ,CAC1BZ,KAAKa,aAAeb,KAAKE,iBACzBF,KAAKc,QAAU,KACf,OAAOf,EAAQ,K,CAGjB,GAAKC,KAAKO,aAAe,YAAcH,MAAMW,OAAOL,IAAI,mDAAqD,CAC3GV,KAAKc,QAAU,MACf,OAAOf,EAAQ,K,CAGjB,OAAOF,EAAOmB,cAAchB,KAAKO,YAAaP,KAAKE,iBAAkBF,KAAKiB,OAAOC,MAAKC,IACpFnB,KAAKa,aAAeM,EAASC,KAC7BpB,KAAKc,QAAU,KACfV,MAAMiB,MAAMC,KAAK,0CAA2CH,EAASC,MACrErB,EAAQoB,EAAS,GACjB,G,CAGN,kBAAAI,GACE,IAAIC,EAAiB,EACrB,MAAMC,EAAaC,aAAY,K,OAC7BC,EAAA3B,KAAK4B,KAAKC,iBAAiB,uBAAmB,MAAAF,SAAA,SAAAA,EAAEG,SAAQC,GAAOA,EAAIC,gBAAgB,aACnFR,IACA,GAAIA,GAAkB,GAAI,CACxBS,cAAcR,E,IAEf,I,CAGG,oBAAAtB,GACN,MAAO,CAAC,SAAU,SAAU,SAAS+B,SAASlC,KAAKO,Y,CAG7C,WAAA4B,CAAYC,GAIlBpC,KAAKO,cAAgB,iBAAmB6B,EAAQC,IAAM,IACtD,GAAIrC,KAAKQ,oBAAsBR,KAAKW,qBAAqB2B,eAAiB,4BAA6B,CACrG,OAAOC,EAAA,OAAKC,MAAM,0BAChBD,EAAA,6BAA2BH,QAASA,EAASxB,OAAQZ,KAAKO,YAAW,eAAgBP,KAAKE,mB,CAI9F,GAAIF,KAAKQ,mBAAoB,CAC3B,MAAMiC,EAAaC,SAASC,cAAc3C,KAAKW,sBAC/C8B,EAAWG,aAAa,UAAWC,KAAKC,UAAUV,IAClDK,EAAWG,aAAa,SAAU5C,KAAKO,aACvCkC,EAAWG,aAAa,eAAgB5C,KAAKE,kBAE7C,OAAOqC,EAAA,OAAKC,MAAM,yBAAyBO,UAAWN,EAAWO,W,CAGnE,OAAOT,EAAA,OAAKC,MAAM,0BAChBD,EAAA,sCACiBvC,KAAKO,aAAe,eAAc,eACnCP,KAAKO,aAAe,eAAc,kBAC/B,KACjB6B,QAASA,I,CAIP,SAAAa,GACN,OAAOjD,KAAKC,oBAAsBD,KAAKc,O,CAGjC,SAAAP,GACN,OAAOV,EAAOqD,kBAAkBlD,KAAKY,O,CAG/B,cAAAV,GACN,OAAOL,EAAOsD,uBAAuBnD,KAAKY,OAAQZ,KAAKoD,Y,CAGzD,MAAAC,G,MACE,IAAKrD,KAAKiD,YAAa,CACrB,M,CAEF,OACEV,EAACe,EAAI,CAACd,MAAM,6BACVD,EAAA,gBACEC,MAAM,2BACNe,GAAIvD,KAAKwD,UAAY,qBAAqBC,KAAKC,SAASC,SAAS,IAAIC,OAAO,EAAG,KAAI,YACxE5D,KAAK6D,SAChBC,KAAK,WAAU,cACF9D,KAAK+D,WAAU,iBACZ/D,KAAKgE,SAAQ,kBACZhE,KAAKiE,cACtBC,aAAclE,KAAKkE,aAAelE,KAAKkE,aAAe,MAEtD3B,EAAA,OAAK4B,KAAK,UACPxC,EAAA3B,KAAKa,gBAAY,MAAAc,SAAA,SAAAA,EAAEyC,KAAIhC,GAAWpC,KAAKmC,YAAYC,O"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as e,h as i,H as t,g as l}from"./p-294dad80.js";const n=class{constructor(i){e(this,i)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var i;e.setAttribute("disabled","");e.removeAttribute("required");if(((i=e===null||e===void 0?void 0:e.tagName)===null||i===void 0?void 0:i.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var i;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not support input: "+(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.tagName)||"N/A"));return}let t=e.target.name.replace("[]","");let l=e.target.getAttribute("type")==="checkbox";salla.log("Trying to find all the element with condition:",`[data-show-when^="${t}"]`);this.host.querySelectorAll(`[data-show-when^="${t}"]`).forEach((i=>{let t=!(i===null||i===void 0?void 0:i.dataset.showWhen.includes("!="));let n=i===null||i===void 0?void 0:i.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(l){let i=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=i.includes(n.toString())}else{o=n===e.target.value}salla.log("The input is ",l?"Multiple":"Single"," value:",o);let d=t&&o||!t&&!o;if(d){i.classList.remove("hidden");i.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const i=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const t=i.some((e=>e.checked));if(t){i.forEach((e=>{e.removeAttribute("required")}))}}if(!["checkbox"].includes(e.getAttribute("type"))&&i.getElementsByClassName("required").length){e.setAttribute("required","")}}))}else{this.hideAllOptions(i.dataset.optionId);i.classList.add("hidden");this.disableInputs(i)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var i;let t=(i=e===null||e===void 0?void 0:e.dataset)===null||i===void 0?void 0:i.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!t){return}this.changeHandler({target:this.host.querySelector('[name^="'+t+'"]')})}))}render(){return i(t,null,i("slot",null))}get host(){return l(this)}};export{n as salla_conditional_fields};
5
- //# sourceMappingURL=p-09708e69.entry.js.map
4
+ import{r as e,h as i,H as t,g as l}from"./p-fafedb13.js";const n=class{constructor(i){e(this,i)}hideAllOptions(e){this.host.querySelectorAll(`[data-show-when^="options[${e}"]`).forEach((e=>{e.classList.add("hidden");this.hideAllOptions(e.dataset.optionId);this.disableInputs(e)}))}disableInputs(e){e.querySelectorAll("[name]").forEach((e=>{var i;e.setAttribute("disabled","");e.removeAttribute("required");if(((i=e===null||e===void 0?void 0:e.tagName)===null||i===void 0?void 0:i.toLowerCase())==="select"){e.value=""}if(["checkbox"].includes(e.getAttribute("type"))&&e.hasOwnProperty("checked")){e.checked=false}}))}changeHandler(e){var i;salla.event.emit("salla-onditional-fields::change",e);salla.log("Received the change event: ",e);if(!e.target||!["SELECT"].includes(e.target.tagName)&&!["checkbox"].includes(e.target.getAttribute("type"))){salla.log("Ignore the change because is not support input: "+(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.tagName)||"N/A"));return}let t=e.target.name.replace("[]","");let l=e.target.getAttribute("type")==="checkbox";salla.log("Trying to find all the element with condition:",`[data-show-when^="${t}"]`);this.host.querySelectorAll(`[data-show-when^="${t}"]`).forEach((i=>{let t=!(i===null||i===void 0?void 0:i.dataset.showWhen.includes("!="));let n=i===null||i===void 0?void 0:i.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$3").trim();let o;if(l){let i=Array.from(this.host.querySelectorAll(`input[name="${e.target.name}"]:checked`),(e=>e===null||e===void 0?void 0:e.value));o=i.includes(n.toString())}else{o=n===e.target.value}salla.log("The input is ",l?"Multiple":"Single"," value:",o);let d=t&&o||!t&&!o;if(d){i.classList.remove("hidden");i.querySelectorAll("[name]").forEach((e=>{e.removeAttribute("disabled");const t=e.closest(".s-product-options-option");if(t.dataset.optionRequired==="true"){e.setAttribute("required","")}if(e.getAttribute("type")==="checkbox"){const i=Array.from(document.querySelectorAll(`input[type="checkbox"][name="${e.getAttribute("name")}"]`));const t=i.some((e=>e.checked));if(t){i.forEach((e=>{e.removeAttribute("required")}))}}if(!["checkbox"].includes(e.getAttribute("type"))&&i.getElementsByClassName("required").length){e.setAttribute("required","")}}))}else{this.hideAllOptions(i.dataset.optionId);i.classList.add("hidden");this.disableInputs(i)}}))}componentDidRender(){this.host.querySelectorAll(`[data-show-when]`).forEach((e=>{var i;let t=(i=e===null||e===void 0?void 0:e.dataset)===null||i===void 0?void 0:i.showWhen.replace(/(.*)(=|!=)(.*)/gm,"$1").trim();if(!t){return}this.changeHandler({target:this.host.querySelector('[name^="'+t+'"]')})}))}render(){return i(t,null,i("slot",null))}get host(){return l(this)}};export{n as salla_conditional_fields};
5
+ //# sourceMappingURL=p-5bc4cd9e.entry.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ System.register(["./p-a0dabf35.system.js","./p-6e94a792.system.js","./p-9beb6b7b.system.js"],(function(e,t){"use strict";var a,o,l;return{setters:[function(t){a=t.p;o=t.b;e("setNonce",t.s)},function(e){l=e.g},function(){}],execute:function(){var e=function(){var e=t.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return a(o)};e().then((function(e){l();return o(JSON.parse('[["p-6a8a9ec7.system",[[0,"salla-offer",{"productCardComponent":[1,"product-card-component"],"offersList":[32],"userCurrency":[32],"isMultipleBank":[32],"title":[32],"currentPage":[32],"hasCustomComponent":[32],"isBankOffer":[32],"canRender":[32],"offer_with_price_text":[32],"with_discount_text":[32],"product_discount_text":[32],"special_offer_text":[32],"buy_quantity_text":[32]}]]],["p-e64a8b4d.system",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"autoplay":[1028],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"sliderConfig":[520,"slider-config"],"productCardComponent":[1,"product-card-component"],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-230e06da.system",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectDonationAmount":[32],"selectAmount":[32],"isCustomDonation":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-da0686ae.system",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-26fd0612.system",[[0,"salla-notifications",{"loadMoreText":[1,"load-more-text"],"itemPerPage":[2,"item-per-page"],"notifications":[32],"pagination":[32],"hasInfiniteScroll":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"no_notifications_trans":[32],"load_more_text_trans":[32]}]]],["p-390d5cbb.system",[[0,"salla-order-summary",{"orderId":[514,"order-id"],"codeCopied":[32],"noItemFound":[32],"order_items":[32]}]]],["p-bea45f66.system",[[0,"salla-advertisement",{"position":[32],"advertisements":[32],"advertIcon":[32],"currentSlug":[32]}]]],["p-a00e5e28.system",[[0,"salla-app-install-alert",{"data":[32],"ctaLink":[32],"open":[32],"closing":[32]}]]],["p-4390fbcd.system",[[0,"salla-apps-icons",{"hideTitle":[4,"hide-title"],"appsTitle":[1,"apps-title"],"vertical":[4],"apps":[32]}]]],["p-962d53a3.system",[[0,"salla-contacts",{"contactsTitle":[1025,"contacts-title"],"hideTitle":[4,"hide-title"],"isHeader":[4,"is-header"],"horizontal":[4],"iconsOnly":[4,"icons-only"],"contacts":[32],"iconsList":[32]}]]],["p-7ff9dda0.system",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32],"mispayActive":[32],"installment_sheria_text":[32]}]]],["p-7686e7fd.system",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-6d2ad7ef.system",[[0,"salla-payments",{"withSbc":[4,"with-sbc"],"sbcId":[1,"sbc-id"],"withMadeInKsa":[4,"with-made-in-ksa"],"payments":[32],"placeholderImage":[32]}]]],["p-52ff730a.system",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"autoload":[1028],"loadMoreText":[1,"load-more-text"],"productCardComponent":[1,"product-card-component"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"endOfText":[32],"failedLoadMore":[32],"currentPage":[32],"currentCategoryIdFilter":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-9ff06235.system",[[0,"salla-social",{"links":[32],"iconsList":[32]}]]],["p-e6a7f1f0.system",[[4,"salla-filters-widget",{"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"page":[32],"setWidgetHeight":[64],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-f3d5458e.system",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-e39cd40e.system",[[0,"salla-notification-item",{"notification":[16]}]]],["p-d6a5a331.system",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"typing":[32],"debounce":[32],"reset":[64]}]]],["p-0ed91e2a.system",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetTitle":[1,"widget-title"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[0,"salla-menu",{"source":[1],"sourceValue":[1,"source-value"],"topnav":[4],"useReactLink":[4,"use-react-link"],"menus":[32],"hasCustomComponent":[32],"setMenuContent":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"inline":[516],"withoutReload":[4,"without-reload"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"isModalOpen":[32],"currentPhone":[32],"currentEmail":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"hasError":[32],"errorMessage":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-bottom-alert",{"type":[513],"icon":[513],"message":[513],"actionUrl":[513,"action-url"],"actionLabel":[513,"action-label"],"storeId":[32],"template":[32],"loading":[32],"templateData":[32],"defaultMessage":[32],"defaultActionLabel":[32],"storeFeatures":[32],"storeDetails":[32],"storePrice":[32],"theDeveloper":[32],"templateInformation":[32],"buyTheTemplate":[32],"isRtl":[32]}],[0,"salla-comments",{"itemId":[2,"item-id"],"loadMoreText":[1,"load-more-text"],"hideForm":[4,"hide-form"],"type":[1],"comments":[32],"pagination":[32],"total":[32],"showPlaceholder":[32],"nextPage":[32],"noComments":[32],"comment_title":[32],"comment_name":[32],"placeholder_text":[32]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-profile",{"customFields":[1,"custom-fields"],"userData":[32],"userDefinedFields":[32],"disableAction":[32],"first_name_trans":[32],"last_name_trans":[32],"birthday_trans":[32],"birthday_placeholder_trans":[32],"gender_trans":[32],"gender_placeholder_trans":[32],"male_trans":[32],"female_trans":[32],"email_trans":[32],"mobile_trans":[32],"save_btn_trans":[32],"drag_and_drop_trans":[32],"browse_trans":[32],"email_required_trans":[32],"invalid_email_trans":[32],"setCustomFields":[64]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"maxWords":[2,"max-words"],"showAction":[4,"show-action"],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64],"refresh":[64]}],[0,"salla-breadcrumb",{"items":[1],"breadcrumbs":[32],"currentPage":[32],"isRtl":[32]}],[4,"salla-cart-summary",{"showCartLabel":[4,"show-cart-label"],"cartSummaryCount":[32],"cartSummaryTotal":[32],"cartLabel":[32],"animateToCart":[64]}],[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"autoload":[1028],"container":[1],"loadMoreText":[1,"load-more-text"],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"cartItemId":[8,"cart-item-id"],"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"hasError":[32],"errorMessage":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[0,"salla-comment-item",{"comment":[16],"has_bought_trans":[32],"rated_trans":[32],"waiting_approval_trans":[32],"has_order_trans":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"cartId":[1025,"cart-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"applePayOnly":[1028,"apple-pay-only"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"windowWidth":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-tel-input",{"phone":[1025],"autofocus":[516],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"type":[513],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]]]'),e)}))}}}));
5
+ //# sourceMappingURL=p-69245750.system.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","module","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["../../node_modules/.pnpm/@stencil+core@4.2.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kPAKA,IAAMA,EAAe,WAyBjB,IAAMC,EAAaC,EAAAC,KAAAC,IACnB,IAAMC,EAAqE,GAC3E,GAAIJ,IAAe,GAAI,CACnBI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,I,CAEjD,OAAOC,EAAeJ,EAC1B,EChCAL,IAAeU,MAAK,SAAAC,GAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,28nBAAuCJ,EAC9D,G"}
1
+ {"version":3,"names":["patchBrowser","importMeta","module","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","JSON","parse"],"sources":["../../node_modules/.pnpm/@stencil+core@4.2.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.2.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":";;;kPAKA,IAAMA,EAAe,WAyBjB,IAAMC,EAAaC,EAAAC,KAAAC,IACnB,IAAMC,EAAqE,GAC3E,GAAIJ,IAAe,GAAI,CACnBI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,I,CAEjD,OAAOC,EAAeJ,EAC1B,EChCAL,IAAeU,MAAK,SAAAC,GAClBC,IACA,OAAOC,EAAcC,KAAAC,MAAA,mioBAAuCJ,EAC9D,G"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ System.register(["./p-a0dabf35.system.js"],(function(e){"use strict";var t,r,s;return{setters:[function(e){t=e.r;r=e.h;s=e.g}],execute:function(){var i;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(i||(i={}));var n;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y"})(n||(n={}));var a='.s-offer-wrapper .s-slider-block__title h2{font-size:1.125rem;line-height:1.75rem;color:#f87171}.s-offer-wrapper .s-slider-block__title h2::before{font-family:"sallaicons";content:"\\ee30" !important;position:absolute;top:1rem;font-size:3rem;font-weight:400;line-height:1;color:#fef2f2}.s-offer-bank-wrapper-sinlge-item{display:-ms-flexbox;display:flex;-ms-flex-align:center !important;align-items:center !important;gap:14px}.s-offer-bank-wrapper{display:-ms-flexbox !important;display:flex !important;width:100% !important}';var o=e("salla_offer",function(){function e(e){var r=this;t(this,e);var s;this.productCardComponent="custom-salla-product-card";this.offersList=[];this.userCurrency=undefined;this.isMultipleBank=false;this.title=undefined;this.currentPage=undefined;this.hasCustomComponent=undefined;this.isBankOffer=false;this.canRender=false;this.offer_with_price_text=salla.lang.get("pages.offer.with_price",{price:""});this.with_discount_text=salla.lang.get("pages.products.with_a_discount");this.product_discount_text=salla.lang.get("pages.products.discount");this.special_offer_text=salla.lang.get("pages.products.special_offer");this.buy_quantity_text=function(e){return salla.lang.get("pages.offer.buy_quantity",{quantity:e})};salla.lang.onLoaded((function(){r.offer_with_price_text=salla.lang.get("pages.offer.with_price");r.with_discount_text=salla.lang.get("pages.products.with_a_discount");r.product_discount_text=salla.lang.get("pages.products.discount");r.special_offer_text=salla.lang.get("pages.products.special_offer");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug")}));this.categorySlot=((s=this.host.querySelector('[slot="category"]'))===null||s===void 0?void 0:s.innerHTML)||'<a href={url} class="s-offer-slide-cat-entry"><i class={icon}></i><h4>{name}</h4></a>'}e.prototype.getEndpointByPageName=function(){var e;return(e={},e[i.Cart]="offers/cart/".concat(salla.storage.get("cart.id")),e[i.ProductDetail]="offers/product/".concat(salla.config.get("page.id")),e)[this.currentPage]||"offers"};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);var t=this.getOffersFromStorage();if(t){return t.then((function(t){return e.offersList=t}))}return salla.api.request(this.getEndpointByPageName()).then((function(t){if(!(e.offersList=t.data).length){throw new Error("salla-offers:: There is no offers!")}var r=e.offersList.find((function(e){return[n.Bank,n.BuyXGetY,n.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===n.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===n.Bank){e.offersList=e.offersList.filter((function(e){return e.type===n.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}var s=r.details.get;return s.source==="products"?salla.product.api.fetch({source:"selected",source_value:s.source_value}).then((function(t){s.products=t.data;r.details.get=s;return e.offersList=[r]})):salla.product.api.categories().then((function(t){s.categories=e.findCategories(t.data,s.source_value);r.details.get=s;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true}))};e.prototype.findCategories=function(e,t){var r;var s=[];for(var i=0,n=e;i<n.length;i++){var a=n[i];if(t.includes(a.id_||a.id)){s.push(a)}if(((r=a.sub_categories)===null||r===void 0?void 0:r.length)>0){s=s.concat(this.findCategories(a.sub_categories,t))}}return s};e.prototype.getStorageKey=function(){return"s-offers-".concat(salla.config.get("page.slug").replace(".","_"),"-").concat(salla.lang.getLocale(),"-").concat(salla.config.currency().code)};e.prototype.getOffersFromStorage=function(){var e=salla.storage.get(this.getStorageKey());if(!e||e.stored_at<(new Date).getTime()-10*60*1e3){salla.storage.remove(this.getStorageKey());return null}this.canRender=true;return Promise.resolve(e.offers)};e.prototype.render=function(){if(!this.offersList.length||!this.canRender)return null;var e=this.offersList[0];var t=!this.isBankOffer||this.isMultipleBank?{"block-title":e.title,"block-subTitle":e.description}:{};return r("div",{class:"s-offer-wrapper"},this.isBankOffer&&r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},t),r("div",{slot:"items"},this.renderSectionForOfferType(e.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==n.BuyXGetY){return this.renderBuyXGetYSection()}return this.renderDiscountTableSection()};e.prototype.getCategoriesSection=function(e){return r("div",{class:"s-offer-slide-one-sixth swiper-slide",innerHTML:this.categorySlot.replace(/\{url\}/g,e.url).replace(/\{icon\}/g,e.icon||"sicon-store").replace(/\{name\}/g,e.name)})};e.prototype.renderBuyXGetYSection=function(){var e=this;var t,s;var i=this.offersList[0].details;return[(t=i.get.products)===null||t===void 0?void 0:t.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},e.hasCustomComponent?r(e.productCardComponent,{product:t}):r("salla-product-card",{"shadow-on-hover":true,product:t}))})),(s=i.get.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)}))]};e.prototype.renderBankSection=function(){var e=this;return this.offersList.map((function(t){return r("div",{class:{"s-offer-slide-one-sixth":e.isMultipleBank,"s-offer-bank-wrapper-sinlge-item":!e.isMultipleBank}},r("div",{class:{"s-offer-bank-wrapper":true,"s-offer-slide-one-sixth":!e.isMultipleBank,"s-offer-bank-wrapper-multi-spacer":e.isMultipleBank}},r("div",{class:"s-offer-bank-logo"},r("img",{src:t.details.logo||salla.url.cdn("images/s-empty.png"),"data-src":t.details.logo,alt:t.title+" offer"})),r("ul",{class:"s-offer-bank-payment-wrapper"},t.details.payments.map((function(e){return r("li",{class:"s-offer-bank-payment-single"},r("img",{src:salla.url.cdn("images/payment/"+e+".png")||salla.url.cdn("images/s-empty.png"),"data-src":salla.url.cdn("images/payment/"+e+".png"),alt:"payment"}))}))),e.isMultipleBank?r("p",{class:"s-offer-bank-payment-discount-percent"},e.product_discount_text+t.details.percent,"%"):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",null,e.offersList[0].description)):"")}))};e.prototype.renderDiscountTableSection=function(){var e=this;return this.offersList[0].details.discounts.map((function(t){return r("div",{class:"s-offer-slide-one-fourth"},r("div",{class:"s-offer-slide-offer-entry"},r("div",{class:"s-offer-slide-offer-entry-price-quantity-container"},r("p",{class:"s-offer-slide-offer-entry-quantity"},e.buy_quantity_text(t.quantity))),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage),")")))}))};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
5
+ //# sourceMappingURL=p-6a8a9ec7.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PageType","OfferType","sallaOfferCss","SallaOffer","exports","class_1","hostRef","_this","this","salla","lang","get","price","quantity","onLoaded","offer_with_price_text","with_discount_text","product_discount_text","special_offer_text","buy_quantity_text","onReady","currentPage","config","categorySlot","_a","host","querySelector","innerHTML","prototype","getEndpointByPageName","_c","Cart","concat","storage","ProductDetail","componentWillLoad","hasCustomComponent","customElements","productCardComponent","offers","getOffersFromStorage","then","offersFromStorage","offersList","api","request","res","data","length","Error","offer","find","Bank","BuyXGetY","DiscountsTable","includes","type","isBankOffer","filter","isMultipleBank","getY","details","source","product","fetch","source_value","response","products","categories","findCategories","set","getStorageKey","stored_at","Date","getTime","canRender","ids","found","_i","categories_1","category","id_","id","push","sub_categories","replace","getLocale","currency","code","storageOffers","remove","Promise","resolve","render","titles","title","description","h","class","Object","assign","slot","renderSectionForOfferType","offerType","renderBankSection","renderBuyXGetYSection","renderDiscountTableSection","getCategoriesSection","url","icon","name","map","_b","bankOffer","src","logo","cdn","alt","payments","payment","percent","discounts","discount","percentage"],"sources":["src/components/salla-offer/interfaces.ts","src/components/salla-offer/salla-offer.scss?tag=salla-offer","src/components/salla-offer/salla-offer.tsx"],"sourcesContent":["export enum PageType {\n ProductDetail = \"product.single\",\n Cart = \"cart\"\n}\n\nexport enum OfferType {\n Conditional = \"conditional\",\n PercentageOrFixed = \"fixed\",\n DiscountsTable = \"discounts_table\",\n Bank = \"bank\",\n BuyXGetY = \"buy_x_get_y\"\n}\n\n\nexport interface DiscountDetailFixed {\n discount_type: \"fixed\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailFreeProduct {\n discount_type: \"free_product\";\n min_spend: number;\n discount_value: number;\n}\n\nexport interface DiscountDetailConditional extends Array<DiscountDetailFixed | DiscountDetailFreeProduct> {}\n\nexport interface DiscountDetailPercentageFixed {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n ends_at: number;\n min_spend: number;\n discount_value: number;\n}\n\nexport interface Discount {\n quantity: number;\n percentage: number;\n}\n\nexport interface DiscountDetailTable {\n apply_to: \"all\" | \"products\" | \"categories\" | \"payment_methods\";\n targets: Array<string | number>;\n discounts: Discount[];\n}\n\nexport interface BankOffer {\n logo: string;\n percent: string;\n payments: string[];\n}\n\nexport interface BuyXGetYDetail {\n ends_at: number;\n buy: {\n source: \"product\" | \"category\";\n source_value: number[];\n quantity: number;\n };\n get: {\n source: \"products\" | \"category\";\n source_value: number[];\n type: \"free_product\" | \"percentage\" | \"fixed\";\n value: number;\n products?: Product[];//we will set this dynamically\n categories?: Category[];//we will set this dynamically\n };\n}\n\nexport interface Offer {\n id: number;\n title: string;\n description: string;\n type: OfferType | \"conditional\" | \"fixed\" | \"discounts_table\" | \"bank\" | \"buy_x_get_y\";\n details: DiscountDetailConditional | DiscountDetailPercentageFixed | DiscountDetailTable | BankOffer | BuyXGetYDetail;\n}\n\nexport interface Product {\n id: number;\n type: string;\n status: string;\n is_available: boolean;\n sku: string;\n name: string;\n price: { amount: number; currency: string; };\n promotion: { title: string; sub_title: string; };\n sale_price: { amount: number; currency: string; };\n regular_price: { amount: number; currency: string; };\n currency: string;\n url: string;\n thumbnail: string;\n has_special_price: boolean;\n favorite?: any;\n}\n\nexport interface Category {\n id?: string;\n id_?: number;\n name?: string;\n url?: string;\n icon?: string;\n sub_categories?: Category[];\n items?: any[] | null;\n}\n\nexport interface Currency {\n code: string | 'SAR';\n name: string;\n symbol: string;\n amount?: number;\n country_code?: string;\n}\n",".s-offer-wrapper .s-slider-block__title {\n h2 {\n font-size: 1.125rem;\n line-height: 1.75rem;\n color: #f87171;\n\n &::before {\n font-family: \"sallaicons\";\n content: \"\\ee30\" !important;\n position: absolute;\n top: 1rem;\n font-size: 3rem;\n font-weight: 400;\n line-height: 1;\n color: #fef2f2;\n }\n }\n}\n\n.s-offer-bank-wrapper-sinlge-item{\n display: flex;\n align-items: center !important;\n gap: 14px;\n}\n\n.s-offer-bank-wrapper {\n display: flex !important;\n width: 100% !important;\n}\n\n// .s-offer-bank-wrapper {\n // \n// }","import { Component, Element, Prop, State, h } from '@stencil/core';\nimport { Offer, Category, Product, Discount, Currency, BuyXGetYDetail, PageType, OfferType, BankOffer, DiscountDetailTable } from './interfaces';\n\n\n/**\n * `salla-offer` is a StencilJS component that displays offers, categories, products, banks, and discount information.\n * It uses the `salla-slider` component for carousel functionality.\n *\n * @slot category - The slot for customizing the category entry layout.\n * \n * @csspart custom - Custom CSS part to target specific elements in the component.\n *\n * @example\n * <salla-offer product-id=\"123\"></salla-offer>\n */\n@Component({\n tag: 'salla-offer',\n styleUrl: 'salla-offer.scss',\n})\nexport class SallaOffer {\n\n constructor() {\n // Language\n salla.lang.onLoaded(() => {\n this.offer_with_price_text = salla.lang.get('pages.offer.with_price');\n this.with_discount_text = salla.lang.get('pages.products.with_a_discount');\n this.product_discount_text = salla.lang.get('pages.products.discount');\n this.special_offer_text = salla.lang.get('pages.products.special_offer');\n this.buy_quantity_text(0);\n })\n\n salla.onReady(() => {\n this.currentPage = salla.config.get('page.slug')\n });\n\n this.categorySlot = this.host.querySelector('[slot=\"category\"]')?.innerHTML || '<a href={url} class=\"s-offer-slide-cat-entry\"><i class={icon}></i><h4>{name}</h4></a>';\n }\n\n /**\n * Custom Card Component for the Salla Products List.\n *\n * This component allows you to customize the appearance of individual product cards within a Salla Products List.\n *\n * @example\n * <salla-products-list product-card-component=\"my-custom-card-style1\" ...\n * <salla-products-list product-card-component=\"my-custom-card-style2\" ...\n */\n @Prop() productCardComponent: string = 'custom-salla-product-card';\n\n // Declare component state variables\n @State() offersList: Offer[] = [];\n @State() userCurrency: Currency;\n @State() isMultipleBank: boolean = false;\n @State() title?: string;\n @State() currentPage: string;\n @State() hasCustomComponent: boolean;\n\n @State() isBankOffer: boolean = false;\n @State() canRender: boolean = false;\n\n // Default translated texts\n @State() offer_with_price_text: string = salla.lang.get('pages.offer.with_price', { price: '' });\n @State() with_discount_text: string = salla.lang.get('pages.products.with_a_discount')\n @State() product_discount_text: string = salla.lang.get('pages.products.discount')\n @State() special_offer_text: string = salla.lang.get('pages.products.special_offer')\n @State() buy_quantity_text: (quantity: number) => string = (quantity) => salla.lang.get('pages.offer.buy_quantity', { quantity })\n\n // Reference to the host element\n @Element() host: HTMLElement;\n\n private categorySlot: string;\n\n private getEndpointByPageName(): string {\n return {\n [PageType.Cart]: `offers/cart/${salla.storage.get('cart.id')}`,\n [PageType.ProductDetail]: `offers/product/${salla.config.get('page.id')}`,\n }[this.currentPage] || \"offers\";\n }\n\n componentWillLoad() {\n this.hasCustomComponent = !!customElements.get(this.productCardComponent);\n let offers = this.getOffersFromStorage();\n if (offers) {\n return offers.then(offersFromStorage => this.offersList = offersFromStorage);\n }\n\n return salla.api.request(this.getEndpointByPageName())\n .then((res) => {\n if (!(this.offersList = res.data).length) {\n throw new Error('salla-offers:: There is no offers!');\n }\n //we support these offers only\n const offer = this.offersList.find(offer => [OfferType.Bank, OfferType.BuyXGetY, OfferType.DiscountsTable].includes(offer.type as any));\n if (!offer) {\n throw new Error('salla-offers:: Offer type not supported yet!');\n }\n //because there is no need for special handling for discounts table, just skip the other cases\n if (offer.type === OfferType.DiscountsTable) {\n return this.offersList = [offer];\n }\n\n //if it's banks offer, we need to include the other banks overs\n if ((this.isBankOffer = offer.type === OfferType.Bank)) {\n this.offersList = this.offersList.filter(offer => offer.type === OfferType.Bank);\n this.isMultipleBank = this.offersList.length > 1;\n return this.offersList;\n }\n //BuyXGetY offers\n const getY = (offer.details as BuyXGetYDetail).get;\n\n return getY.source === 'products'\n //todo:: avoid this request, and the handling for the products, just use `salla-products-slider` and don't forget to pass the customcard\n ? salla.product.api.fetch({ source: \"selected\", source_value: getY.source_value })\n .then((response: any) => {\n getY.products = response.data;\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n })//set the products\n : salla.product.api.categories()//get all categories in one query, then extract only the selected one, instead of sending multi requests\n .then((res) => {\n getY.categories = this.findCategories(res.data, getY.source_value);\n (offer.details as any).get = getY;\n return this.offersList = [offer];\n });\n })\n .then((offers: Offer[]) => {\n salla.storage.set(this.getStorageKey(), { offers, stored_at: new Date().getTime() });\n this.canRender = true;\n })\n }\n\n\n findCategories(categories: Category[], ids: any[]): Category[] {\n let found: Category[] = [];\n\n for (const category of categories) {\n if (ids.includes(category.id_ || category.id)) { //here we are using || because we are planning to drop `id_`\n found.push(category);\n }\n if (category.sub_categories?.length > 0) {\n found = found.concat(this.findCategories(category.sub_categories, ids));\n }\n }\n\n return found;\n }\n\n //todo::add to the key params, to make sure it will support multi offers in the same page if it's wanted\n getStorageKey(): string {\n return `s-offers-${salla.config.get('page.slug').replace('.', '_')}-${salla.lang.getLocale()}-${salla.config.currency().code}`;\n }\n\n getOffersFromStorage(): null | Promise<Offer[]> {\n let storageOffers = salla.storage.get(this.getStorageKey());\n //if the offers not existed, or it has been stored before 10 minutes from now, ignore it;\n if (!storageOffers || storageOffers.stored_at < (new Date().getTime() - 10 * 60 * 1000)) {\n salla.storage.remove(this.getStorageKey());\n return null;\n }\n this.canRender = true;\n\n //return it as resolve to support .then\n return Promise.resolve(storageOffers.offers);\n }\n\n render() {\n if (!this.offersList.length || !this.canRender) return null;\n const offer: Offer = this.offersList[0];\n const titles = (!this.isBankOffer || this.isMultipleBank)\n ? { 'block-title': offer.title, 'block-subTitle': offer.description }\n : {}\n return (\n <div class=\"s-offer-wrapper\">\n {this.isBankOffer && <p class=\"s-offer-corner-badge\">{this.special_offer_text}</p>}\n {/* discounts table is not a slider, it's a table🤔 */}\n {/* single bank offer is not a slider, it's a dom without slider🤔 */}\n <salla-slider type=\"carousel\" id=\"offer-slider\" {...titles}>\n <div slot='items'>\n {this.renderSectionForOfferType(offer.type)}\n </div>\n </salla-slider>\n </div>\n );\n }\n\n private renderSectionForOfferType(offerType: OfferType | string) {\n if (this.isBankOffer) {\n return this.renderBankSection();\n }\n if (offerType == OfferType.BuyXGetY) {\n return this.renderBuyXGetYSection();\n }\n\n return this.renderDiscountTableSection();\n }\n\n /**\n * Generates content for the categories section.\n *\n * @param offeredCategories - An array of Category objects.\n * @returns An array of HTML elements representing categories.\n */\n private getCategoriesSection(category: Category) {\n return <div class=\"s-offer-slide-one-sixth swiper-slide\" innerHTML={this.categorySlot\n .replace(/\\{url\\}/g, category.url)\n .replace(/\\{icon\\}/g, category.icon || \"sicon-store\")\n .replace(/\\{name\\}/g, category.name)}></div>\n }\n\n private renderBuyXGetYSection() {\n const details = (this.offersList[0].details as BuyXGetYDetail)\n return [\n details.get.products?.map((product: Product) => (\n <div class=\"s-offer-slide-one-fourth\">\n {this.hasCustomComponent\n ? <this.productCardComponent product={product}></this.productCardComponent>\n : <salla-product-card shadow-on-hover product={product}></salla-product-card>}\n </div>\n )),\n details.get.categories?.map((category: Category) => this.getCategoriesSection(category))\n ];\n }\n\n /**\n * Generates content for the bank section.\n *\n * @param offeredBank - An array of Bank objects.\n * @param name - The title of the current offer.\n * @param description - The description of the current offer.\n * @returns An array of HTML elements representing banks.\n * \n * TODO: loop over the list and filter bank types and pass it to this function\n */\n private renderBankSection() {\n return this.offersList.map((bankOffer: Offer) =>\n <div class={{ \"s-offer-slide-one-sixth\": this.isMultipleBank, \"s-offer-bank-wrapper-sinlge-item\": !this.isMultipleBank }}>\n <div class={{ \"s-offer-bank-wrapper\": true, \"s-offer-slide-one-sixth\": !this.isMultipleBank, \"s-offer-bank-wrapper-multi-spacer\": this.isMultipleBank }}>\n <div class=\"s-offer-bank-logo\">\n <img src={(bankOffer.details as BankOffer).logo || salla.url.cdn('images/s-empty.png')} data-src={(bankOffer.details as BankOffer).logo} alt={bankOffer.title + \" offer\"} />\n </div>\n <ul class=\"s-offer-bank-payment-wrapper\">\n {(bankOffer.details as BankOffer).payments.map((payment: string) => {\n return <li class=\"s-offer-bank-payment-single\">\n <img\n src={salla.url.cdn('images/payment/' + payment + '.png') || salla.url.cdn('images/s-empty.png')}\n data-src={salla.url.cdn('images/payment/' + payment + '.png')}\n alt=\"payment\" />\n </li>\n })}\n </ul>\n {this.isMultipleBank ?\n <p class=\"s-offer-bank-payment-discount-percent\">\n {this.product_discount_text + (bankOffer.details as BankOffer).percent}%\n </p>\n : \"\"}\n </div>\n {!this.isMultipleBank ?\n <div class=\"s-offer-bank-message s-offer-slide-one-fourth\">\n <h2>{this.offersList[0].title}</h2>\n <p>{this.offersList[0].description}</p>\n </div>\n : \"\"}\n </div>\n )\n }\n\n /**\n * Generates content for the discount table section.\n *\n * @param discountTable - An array of Discount objects.\n * @returns An array of HTML elements representing discounts_table.\n */\n private renderDiscountTableSection() {\n return (this.offersList[0].details as DiscountDetailTable).discounts\n .map((discount: Discount) => <div class=\"s-offer-slide-one-fourth\">\n <div class=\"s-offer-slide-offer-entry\">\n <div class=\"s-offer-slide-offer-entry-price-quantity-container\">\n <p class=\"s-offer-slide-offer-entry-quantity\">{this.buy_quantity_text(discount.quantity)}</p>\n {/* {discount.show_discounted_price ?\n <div class=\"s-offer-slide-offer-entry-price\">\n <span>{this.offer_with_price_text}</span>\n <span class=\"s-offer-slide-offer-entry-price-amount\">{salla.helpers.money(discount.price)}</span> {this.userCurrency?.symbol}\n </div> : \"\"} */}\n </div>\n <p class=\"s-offer-slide-offer-entry-price-amount-percent\">{this.with_discount_text}\n (<span>{discount.percentage}</span>)</p>\n </div>\n </div>\n )\n }\n\n}\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t}from"./p-294dad80.js";import{C as c}from"./p-0186ffc1.js";const a=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n`;const e=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n`;const l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital";this.orderId=undefined;this.codeCopied=null;this.noItemFound=true;this.order_items=[]}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const c=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(c){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?c:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:a}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:e}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
- //# sourceMappingURL=p-19338c46.entry.js.map
4
+ import{r as s,h as t}from"./p-fafedb13.js";import{C as c}from"./p-0186ffc1.js";const a=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n`;const e=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n`;const i=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n`;const l=`\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n`;const n=":host{display:block}";const h=class{constructor(t){s(this,t);this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital";this.orderId=undefined;this.codeCopied=null;this.noItemFound=true;this.order_items=[]}async componentWillLoad(){salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes");this.copy_text=salla.lang.get("common.elements.copy");this.files_text=salla.lang.get("pages.thank_you.files");this.download_text=salla.lang.get("pages.thank_you.download")}));return await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator){try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s;this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id");const t="Failed to fetch order items";if(!s){salla.logger.error(t);throw new Error(t)}try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);const c=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(c){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:l}),t("span",null,s.code)),t("salla-button",{class:`s-order-summary-item-copy-button ${this.codeCopied===s.code?"copied":""}`,onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?c:i}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:a}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:e}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
5
+ //# sourceMappingURL=p-6b4d6c03.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-eebd57c0.system.js"],(function(t){"use strict";var e,s,i,a;return{setters:[function(t){e=t.r;s=t.h;i=t.H;a=t.g}],execute:function(){var l=":host{display:block}";var n=t("salla_payments",function(){function t(t){var s=this;e(this,t);var i,a,l;this.payments=salla.config.get("store.settings.payments");this.placeholderImage=salla.url.cdn("images/s-empty.png");this.withSbc=undefined;this.sbcId=undefined;this.withMadeInKsa=undefined;this.paymentSlot=((i=this.host.querySelector('[slot="payment"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src="{image}" alt={name} /><li>');this.sbcSlot=((a=this.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');this.codSlot=((l=this.host.querySelector('[slot="cod"]'))===null||l===void 0?void 0:l.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');salla.onReady((function(){s.payments=salla.config.get("store.settings.payments");s.placeholderImage=salla.url.cdn("images/s-empty.png")}))}t.prototype.render=function(){var t=this;return s(i,{class:"s-payments-list"},this.withMadeInKsa&&s("li",{class:"s-payments-list-item"},s("img",{class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg"),alt:"made in KSA certified"})),this.payments.map((function(e){return s("div",{id:"payment-slot",innerHTML:t.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(e,"_mini.png"))).replace(/\{payment\}/g,e)})})),s("div",{id:"cod-slot",innerHTML:this.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png"))}),this.withSbc&&this.sbcId&&s("div",{id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png")).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(this.sbcId))}))};t.prototype.componentDidLoad=function(){var t;(t=document.lazyLoadInstance)===null||t===void 0?void 0:t.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(t){t.addEventListener("load",(function(){t.setAttribute("width","100%");t.setAttribute("height","100%")}))}))};t.prototype.componentDidRender=function(){var t,e,s;this.host.querySelectorAll("#payment-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));(t=this.host.querySelector('[slot="payment"]'))===null||t===void 0?void 0:t.remove();(e=this.host.querySelector('[slot="sbc"]'))===null||e===void 0?void 0:e.remove();(s=this.host.querySelector('[slot="cod"]'))===null||s===void 0?void 0:s.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
5
- //# sourceMappingURL=p-4923a67f.system.entry.js.map
4
+ System.register(["./p-a0dabf35.system.js"],(function(t){"use strict";var e,s,i,a;return{setters:[function(t){e=t.r;s=t.h;i=t.H;a=t.g}],execute:function(){var l=":host{display:block}";var n=t("salla_payments",function(){function t(t){var s=this;e(this,t);var i,a,l;this.payments=salla.config.get("store.settings.payments");this.placeholderImage=salla.url.cdn("images/s-empty.png");this.withSbc=undefined;this.sbcId=undefined;this.withMadeInKsa=undefined;this.paymentSlot=((i=this.host.querySelector('[slot="payment"]'))===null||i===void 0?void 0:i.innerHTML)||'<li class="s-payments-list-item"><img class="lazy" width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src="{image}" alt={name} /><li>');this.sbcSlot=((a=this.host.querySelector('[slot="sbc"]'))===null||a===void 0?void 0:a.innerHTML)||'<li class="s-payments-list-item"><a target="_blank" href="{link}"> <img width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src={image} class="lazy s-payments-sbc-image" alt="SBC"/></a><li>');this.codSlot=((l=this.host.querySelector('[slot="cod"]'))===null||l===void 0?void 0:l.innerHTML)||'<li class="s-payments-list-item"> <img width="100%" height="100%" src="'.concat(this.placeholderImage,'" data-src={image} class="lazy" alt="COD"/><li>');salla.onReady((function(){s.payments=salla.config.get("store.settings.payments");s.placeholderImage=salla.url.cdn("images/s-empty.png")}))}t.prototype.render=function(){var t=this;return s(i,{class:"s-payments-list"},this.withMadeInKsa&&s("li",{class:"s-payments-list-item"},s("img",{class:"lazy",width:"100%",height:"100%",decoding:"async",loading:"lazy","data-src":salla.url.cdn("images/made-in-ksa.svg"),alt:"made in KSA certified"})),this.payments.map((function(e){return s("div",{id:"payment-slot",innerHTML:t.paymentSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/".concat(e,"_mini.png"))).replace(/\{payment\}/g,e)})})),s("div",{id:"cod-slot",innerHTML:this.codSlot.replace(/\{image\}/g,salla.url.cdn("images/payment/cod_mini.png"))}),this.withSbc&&this.sbcId&&s("div",{id:"sbc-slot",innerHTML:this.sbcSlot.replace(/\{image\}/g,salla.url.cdn("images/sbc.png")).replace(/\{link\}/g,"https://eauthenticate.saudibusiness.gov.sa/certificate-details/".concat(this.sbcId))}))};t.prototype.componentDidLoad=function(){var t;(t=document.lazyLoadInstance)===null||t===void 0?void 0:t.update(this.host.querySelectorAll(".lazy"));this.host.querySelectorAll(".lazy").forEach((function(t){t.addEventListener("load",(function(){t.setAttribute("width","100%");t.setAttribute("height","100%")}))}))};t.prototype.componentDidRender=function(){var t,e,s;this.host.querySelectorAll("#payment-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#sbc-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));this.host.querySelectorAll("#cod-slot").forEach((function(t){return t.replaceWith(t.firstChild)}));(t=this.host.querySelector('[slot="payment"]'))===null||t===void 0?void 0:t.remove();(e=this.host.querySelector('[slot="sbc"]'))===null||e===void 0?void 0:e.remove();(s=this.host.querySelector('[slot="cod"]'))===null||s===void 0?void 0:s.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());n.style=l}}}));
5
+ //# sourceMappingURL=p-6d2ad7ef.system.entry.js.map