@salla.sa/twilight-components 2.14.239 → 2.14.241
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.
- package/dist/cjs/{app-globals-DbdvvtOW.js → app-globals-DvkVPAlZ.js} +3 -3
- package/dist/cjs/{app-globals-DbdvvtOW.js.map → app-globals-DvkVPAlZ.js.map} +1 -1
- package/dist/cjs/{index-BDdHgq9_.js → index-BPhiWOV7.js} +4 -4
- package/dist/cjs/index-BPhiWOV7.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion-head.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_51.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-options.cjs.entry.js +37 -6
- package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-product-options.entry.cjs.js.map +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +23 -10
- package/dist/cjs/salla-tiered-offer.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-tiered-offer.entry.cjs.js.map +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/collection/components/salla-product-options/salla-product-options.js +36 -5
- package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +22 -9
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-product-options.js +36 -5
- package/dist/components/salla-product-options.js.map +1 -1
- package/dist/components/salla-tiered-offer.js +22 -9
- package/dist/components/salla-tiered-offer.js.map +1 -1
- package/dist/esm/{app-globals-Db6Lb5QT.js → app-globals-BoC0E74W.js} +3 -3
- package/dist/esm/{app-globals-Db6Lb5QT.js.map → app-globals-BoC0E74W.js.map} +1 -1
- package/dist/esm/{index-Dxu9oA9K.js → index-Qk6_ks1N.js} +4 -4
- package/dist/esm/index-Qk6_ks1N.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body.entry.js +1 -1
- package/dist/esm/salla-accordion-head.entry.js +1 -1
- package/dist/esm/salla-accordion.entry.js +1 -1
- package/dist/esm/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-booking-field_2.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-options.entry.js +37 -6
- package/dist/esm/salla-product-options.entry.js.map +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +23 -10
- package/dist/esm/salla-tiered-offer.entry.js.map +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm-es5/{app-globals-Db6Lb5QT.js → app-globals-BoC0E74W.js} +2 -2
- package/dist/esm-es5/{app-globals-Db6Lb5QT.js.map → app-globals-BoC0E74W.js.map} +1 -1
- package/dist/esm-es5/{index-Dxu9oA9K.js → index-Qk6_ks1N.js} +3 -3
- package/dist/{twilight/p-Dxu9oA9K.js.map → esm-es5/index-Qk6_ks1N.js.map} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion-body.entry.js +1 -1
- package/dist/esm-es5/salla-accordion-head.entry.js +1 -1
- package/dist/esm-es5/salla-accordion.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_51.entry.js +1 -1
- package/dist/esm-es5/salla-advertisement.entry.js +1 -1
- package/dist/esm-es5/salla-app-install-alert.entry.js +1 -1
- package/dist/esm-es5/salla-apps-icons.entry.js +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js +2 -2
- package/dist/esm-es5/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm-es5/salla-conditional-offer.entry.js +1 -1
- package/dist/esm-es5/salla-contacts.entry.js +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
- package/dist/esm-es5/salla-filters.entry.js +1 -1
- package/dist/esm-es5/salla-installment.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm-es5/salla-loyalty-program.entry.js +2 -2
- package/dist/esm-es5/salla-metadata.entry.js +1 -1
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +1 -1
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-summary.entry.js +1 -1
- package/dist/esm-es5/salla-orders.entry.js +1 -1
- package/dist/esm-es5/salla-payments.entry.js +1 -1
- package/dist/esm-es5/salla-price-range.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js.map +1 -1
- package/dist/esm-es5/salla-review-card.entry.js +1 -1
- package/dist/esm-es5/salla-reviews-page.entry.js +1 -1
- package/dist/esm-es5/salla-reviews.entry.js +1 -1
- package/dist/esm-es5/salla-social.entry.js +1 -1
- package/dist/esm-es5/salla-tiered-offer.entry.js +2 -2
- package/dist/esm-es5/salla-tiered-offer.entry.js.map +1 -1
- package/dist/esm-es5/salla-tooltip.entry.js +1 -1
- package/dist/esm-es5/salla-verify.entry.js +1 -1
- package/dist/esm-es5/salla-wallet.entry.js +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/p-0080e341.entry.js +5 -0
- package/dist/twilight/{p-79dab8b8.system.entry.js → p-03f69cea.system.entry.js} +2 -2
- package/dist/twilight/{p-7167cda0.system.entry.js → p-0488395f.system.entry.js} +2 -2
- package/dist/twilight/{p-cab02e98.system.entry.js → p-085de295.system.entry.js} +2 -2
- package/dist/twilight/{p-03f98d2f.system.entry.js → p-095cd107.system.entry.js} +2 -2
- package/dist/twilight/{p-7632d96b.system.entry.js → p-0b5059a8.system.entry.js} +2 -2
- package/dist/twilight/{p-64128588.entry.js → p-109639b5.entry.js} +2 -2
- package/dist/twilight/p-109639b5.entry.js.map +1 -0
- package/dist/twilight/{p-11fe6afc.entry.js → p-113610e6.entry.js} +2 -2
- package/dist/twilight/{p-1b84dff7.system.entry.js → p-17ac3f07.system.entry.js} +2 -2
- package/dist/twilight/{p-2d41b312.entry.js → p-1bac43db.entry.js} +2 -2
- package/dist/twilight/{p-2b6b8c81.entry.js → p-1cbfdf9c.entry.js} +2 -2
- package/dist/twilight/{p-eb410142.entry.js → p-2018f332.entry.js} +2 -2
- package/dist/twilight/{p-b24fe018.system.entry.js → p-22a97b77.system.entry.js} +2 -2
- package/dist/twilight/{p-67c709ff.entry.js → p-2504b7c0.entry.js} +2 -2
- package/dist/twilight/{p-6f2cf177.entry.js → p-26f3294b.entry.js} +2 -2
- package/dist/twilight/{p-DjvOm_NU.system.js.map → p-2pstlFTx.system.js.map} +1 -1
- package/dist/twilight/{p-4c9e43fe.system.entry.js → p-31249011.system.entry.js} +2 -2
- package/dist/twilight/{p-331c6ed5.system.entry.js → p-33c1da66.system.entry.js} +2 -2
- package/dist/twilight/{p-9110491f.entry.js → p-34170712.entry.js} +2 -2
- package/dist/twilight/{p-3f455e4b.entry.js → p-3ca55ad3.entry.js} +2 -2
- package/dist/twilight/{p-3917911e.system.entry.js → p-3d646989.system.entry.js} +2 -2
- package/dist/twilight/{p-37ef34af.entry.js → p-3e782481.entry.js} +2 -2
- package/dist/twilight/{p-5eb4592c.entry.js → p-3f2e984c.entry.js} +2 -2
- package/dist/twilight/{p-142c7169.entry.js → p-4049f624.entry.js} +2 -2
- package/dist/twilight/{p-529f23c6.system.entry.js → p-41c210db.system.entry.js} +2 -2
- package/dist/twilight/p-4aad96c4.system.entry.js +5 -0
- package/dist/twilight/p-4aad96c4.system.entry.js.map +1 -0
- package/dist/twilight/{p-b3451de7.system.entry.js → p-4c901b62.system.entry.js} +2 -2
- package/dist/twilight/{p-C1Uuu_Iz.system.js.map → p-4qh49PqK.system.js.map} +1 -1
- package/dist/twilight/{p-462c7109.system.entry.js → p-59796bb2.system.entry.js} +2 -2
- package/dist/twilight/{p-f8352357.entry.js → p-6029cdd7.entry.js} +2 -2
- package/dist/twilight/{p-3b21bc63.entry.js → p-60dac7ef.entry.js} +2 -2
- package/dist/twilight/{p-28c53329.system.entry.js → p-60f649f5.system.entry.js} +2 -2
- package/dist/twilight/{p-5ee8e3ee.system.entry.js → p-61cec922.system.entry.js} +2 -2
- package/dist/twilight/{p-c698caa6.system.entry.js → p-65c74d07.system.entry.js} +2 -2
- package/dist/twilight/{p-099c2ddf.entry.js → p-65ee4bcd.entry.js} +2 -2
- package/dist/twilight/{p-3971d884.system.entry.js → p-66f0d009.system.entry.js} +2 -2
- package/dist/twilight/{p-a642fb2d.system.entry.js → p-69c4dc57.system.entry.js} +3 -3
- package/dist/twilight/{p-f6a84618.entry.js → p-824f1195.entry.js} +2 -2
- package/dist/twilight/{p-5b5a6101.entry.js → p-84013163.entry.js} +2 -2
- package/dist/twilight/p-87b54ba7.system.entry.js +5 -0
- package/dist/twilight/p-87b54ba7.system.entry.js.map +1 -0
- package/dist/twilight/{p-bdf35a25.system.entry.js → p-8a9bfcbb.system.entry.js} +2 -2
- package/dist/twilight/{p-816097f4.entry.js → p-8c3bf70a.entry.js} +2 -2
- package/dist/twilight/{p-ea58fa22.entry.js → p-8e111e2e.entry.js} +2 -2
- package/dist/twilight/{p-ad1bfcf3.entry.js → p-90e0ff36.entry.js} +7 -7
- package/dist/twilight/{p-411b87ef.entry.js → p-92cbc26e.entry.js} +2 -2
- package/dist/twilight/{p-c24b8585.system.entry.js → p-932a9495.system.entry.js} +2 -2
- package/dist/twilight/{p-b5838794.entry.js → p-9c99ec9d.entry.js} +2 -2
- package/dist/twilight/{p-cf060e6c.system.entry.js → p-9da459e3.system.entry.js} +2 -2
- package/dist/twilight/{p-01aded94.system.entry.js → p-9da95409.system.entry.js} +2 -2
- package/dist/twilight/{p-ab42e437.entry.js → p-9f52c186.entry.js} +2 -2
- package/dist/twilight/{p-_oBuExIe.system.js.map → p-B-e3U5P8.system.js.map} +1 -1
- package/dist/twilight/{p-DNbI4S_I.js → p-B2te2F0k.js} +2 -2
- package/dist/twilight/{p-DNbI4S_I.js.map → p-B2te2F0k.js.map} +1 -1
- package/dist/twilight/{p-CFR20olG.system.js.map → p-B7cmAuH9.system.js.map} +1 -1
- package/dist/twilight/{p-Cih6sizk.system.js.map → p-BBH0E_z-.system.js.map} +1 -1
- package/dist/twilight/{p-Dlx1ErOi.system.js.map → p-BKPR76P3.system.js.map} +1 -1
- package/dist/twilight/p-BZcH7srY.system.js.map +1 -0
- package/dist/twilight/{p-DdyaaxwR.system.js.map → p-BahDCVg3.system.js.map} +1 -1
- package/dist/twilight/{p-DNQHLxWG.system.js.map → p-Bb2NxpFe.system.js.map} +1 -1
- package/dist/twilight/{p-CwLRhDos.system.js.map → p-BcNL_T6G.system.js.map} +1 -1
- package/dist/twilight/{p-CkkLk7Pj.system.js.map → p-Bn8EiyAB.system.js.map} +1 -1
- package/dist/twilight/{p-Cym5H1Z6.system.js.map → p-Brs9NM0b.system.js.map} +1 -1
- package/dist/twilight/{p-D5r3ATtc.system.js.map → p-BtBYqT4P.system.js.map} +1 -1
- package/dist/twilight/{p-gKm1xaeh.system.js.map → p-C0CfWHAH.system.js.map} +1 -1
- package/dist/twilight/{p-NfM7SGbO.system.js.map → p-C3WNijb1.system.js.map} +1 -1
- package/dist/twilight/p-CJsgY2dR.system.js.map +1 -0
- package/dist/twilight/{p-Cww7QFEI.system.js.map → p-CNDItboI.system.js.map} +1 -1
- package/dist/twilight/{p-Dl5noMXr.system.js.map → p-CVoL_QTn.system.js.map} +1 -1
- package/dist/twilight/{p-BuTOc-d8.system.js.map → p-CanB30IP.system.js.map} +1 -1
- package/dist/twilight/{p-Dzux6KMv.system.js.map → p-CdbjWpSy.system.js.map} +1 -1
- package/dist/twilight/{p-Cv46yWRf.system.js.map → p-CpwGQDDt.system.js.map} +1 -1
- package/dist/twilight/{p-D2DsyAg6.system.js.map → p-Ct1jxnfI.system.js.map} +1 -1
- package/dist/twilight/{p-BDyUK9ox.system.js.map → p-CtJIl0_w.system.js.map} +1 -1
- package/dist/twilight/{p-DdBJaRrc.system.js.map → p-CxzOd1Cr.system.js.map} +1 -1
- package/dist/twilight/{p-B6bpYnnP.system.js.map → p-Cyx08ZZ7.system.js.map} +1 -1
- package/dist/twilight/{p-DyN-KAxy.system.js.map → p-D41YJ-X4.system.js.map} +1 -1
- package/dist/twilight/{p-DxmXbXHz.system.js.map → p-D68XohHN.system.js.map} +1 -1
- package/dist/twilight/{p-BUwki4wf.system.js.map → p-DG5qnodN.system.js.map} +1 -1
- package/dist/twilight/{p-D1zqgG9Y.system.js.map → p-DQoj-KfA.system.js.map} +1 -1
- package/dist/twilight/{p-DST6iM3C.system.js.map → p-DVqAtg79.system.js.map} +1 -1
- package/dist/twilight/{p-BV4kErtd.system.js → p-DdFhEMb6.system.js} +3 -3
- package/dist/twilight/p-DdFhEMb6.system.js.map +1 -0
- package/dist/twilight/{p-dQTzJHLh.system.js.map → p-Dhb4JyLV.system.js.map} +1 -1
- package/dist/twilight/{p-CRhaoLbg.system.js.map → p-DrQZJLBF.system.js.map} +1 -1
- package/dist/twilight/{p-BbWNHcOU.system.js → p-DxWLRF--.system.js} +2 -2
- package/dist/twilight/{p-BbWNHcOU.system.js.map → p-DxWLRF--.system.js.map} +1 -1
- package/dist/twilight/{p-E94lGW7o.system.js.map → p-L6p0JXbn.system.js.map} +1 -1
- package/dist/twilight/{p-Dxu9oA9K.js → p-Qk6_ks1N.js} +3 -3
- package/dist/twilight/p-Qk6_ks1N.js.map +1 -0
- package/dist/twilight/{p-DIHPMktR.system.js → p-XH--V_xY.system.js} +2 -2
- package/dist/twilight/{p-DIHPMktR.system.js.map → p-XH--V_xY.system.js.map} +1 -1
- package/dist/twilight/{p-e651f83f.system.entry.js → p-a0bfb9f0.system.entry.js} +2 -2
- package/dist/twilight/{p-4437951d.system.entry.js → p-b4dcca7d.system.entry.js} +2 -2
- package/dist/twilight/{p-67d370cb.entry.js → p-ba73145a.entry.js} +2 -2
- package/dist/twilight/{p-b854bd23.entry.js → p-bd157361.entry.js} +2 -2
- package/dist/twilight/p-c09b9065.entry.js +5 -0
- package/dist/twilight/p-c09b9065.entry.js.map +1 -0
- package/dist/twilight/{p-12198e85.system.entry.js → p-c32b29f3.system.entry.js} +2 -2
- package/dist/twilight/{p-4659c645.entry.js → p-cafa90ca.entry.js} +2 -2
- package/dist/twilight/{p-554092d9.system.entry.js → p-cb051f40.system.entry.js} +2 -2
- package/dist/twilight/p-d7834bb8.system.entry.js +5 -0
- package/dist/twilight/{p-4bc9089d.entry.js → p-da0d4708.entry.js} +2 -2
- package/dist/twilight/p-da239ecb.entry.js +5 -0
- package/dist/twilight/{p-cc5e1937.system.entry.js → p-e0c33d75.system.entry.js} +2 -2
- package/dist/twilight/{p-bd89e063.system.entry.js → p-e3a5c60b.system.entry.js} +2 -2
- package/dist/twilight/{p-c695b1d9.system.entry.js → p-e505c759.system.entry.js} +2 -2
- package/dist/twilight/{p-788980fa.entry.js → p-e702680e.entry.js} +2 -2
- package/dist/twilight/{p-a3cd1fad.entry.js → p-f289d1e4.entry.js} +2 -2
- package/dist/twilight/{p-f36b71e2.system.entry.js → p-f7619cf4.system.entry.js} +2 -2
- package/dist/twilight/{p-07f023da.entry.js → p-f8ddee2c.entry.js} +2 -2
- package/dist/twilight/{p-Cr6XPQwf.system.js.map → p-xWkxNUTt.system.js.map} +1 -1
- package/dist/twilight/salla-product-options.entry.esm.js.map +1 -1
- package/dist/twilight/salla-tiered-offer.entry.esm.js.map +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +11 -1
- package/package.json +5 -5
- package/dist/cjs/index-BDdHgq9_.js.map +0 -1
- package/dist/esm/index-Dxu9oA9K.js.map +0 -1
- package/dist/esm-es5/index-Dxu9oA9K.js.map +0 -1
- package/dist/twilight/p-06af0212.entry.js +0 -5
- package/dist/twilight/p-06af0212.entry.js.map +0 -1
- package/dist/twilight/p-5273af20.entry.js +0 -5
- package/dist/twilight/p-63f5db56.system.entry.js +0 -5
- package/dist/twilight/p-63f5db56.system.entry.js.map +0 -1
- package/dist/twilight/p-64128588.entry.js.map +0 -1
- package/dist/twilight/p-BV4kErtd.system.js.map +0 -1
- package/dist/twilight/p-DRACrmyE.system.js.map +0 -1
- package/dist/twilight/p-STaxwEDu.system.js.map +0 -1
- package/dist/twilight/p-b4b32523.system.entry.js +0 -5
- package/dist/twilight/p-bf84ef7e.system.entry.js +0 -5
- package/dist/twilight/p-bf84ef7e.system.entry.js.map +0 -1
- package/dist/twilight/p-efcb6ca0.entry.js +0 -5
- /package/dist/twilight/{p-efcb6ca0.entry.js.map → p-0080e341.entry.js.map} +0 -0
- /package/dist/twilight/{p-79dab8b8.system.entry.js.map → p-03f69cea.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7167cda0.system.entry.js.map → p-0488395f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-cab02e98.system.entry.js.map → p-085de295.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-03f98d2f.system.entry.js.map → p-095cd107.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7632d96b.system.entry.js.map → p-0b5059a8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-11fe6afc.entry.js.map → p-113610e6.entry.js.map} +0 -0
- /package/dist/twilight/{p-1b84dff7.system.entry.js.map → p-17ac3f07.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2d41b312.entry.js.map → p-1bac43db.entry.js.map} +0 -0
- /package/dist/twilight/{p-2b6b8c81.entry.js.map → p-1cbfdf9c.entry.js.map} +0 -0
- /package/dist/twilight/{p-eb410142.entry.js.map → p-2018f332.entry.js.map} +0 -0
- /package/dist/twilight/{p-b24fe018.system.entry.js.map → p-22a97b77.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-67c709ff.entry.js.map → p-2504b7c0.entry.js.map} +0 -0
- /package/dist/twilight/{p-6f2cf177.entry.js.map → p-26f3294b.entry.js.map} +0 -0
- /package/dist/twilight/{p-4c9e43fe.system.entry.js.map → p-31249011.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-331c6ed5.system.entry.js.map → p-33c1da66.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9110491f.entry.js.map → p-34170712.entry.js.map} +0 -0
- /package/dist/twilight/{p-3f455e4b.entry.js.map → p-3ca55ad3.entry.js.map} +0 -0
- /package/dist/twilight/{p-3917911e.system.entry.js.map → p-3d646989.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-37ef34af.entry.js.map → p-3e782481.entry.js.map} +0 -0
- /package/dist/twilight/{p-5eb4592c.entry.js.map → p-3f2e984c.entry.js.map} +0 -0
- /package/dist/twilight/{p-142c7169.entry.js.map → p-4049f624.entry.js.map} +0 -0
- /package/dist/twilight/{p-529f23c6.system.entry.js.map → p-41c210db.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b3451de7.system.entry.js.map → p-4c901b62.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-462c7109.system.entry.js.map → p-59796bb2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f8352357.entry.js.map → p-6029cdd7.entry.js.map} +0 -0
- /package/dist/twilight/{p-3b21bc63.entry.js.map → p-60dac7ef.entry.js.map} +0 -0
- /package/dist/twilight/{p-28c53329.system.entry.js.map → p-60f649f5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5ee8e3ee.system.entry.js.map → p-61cec922.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c698caa6.system.entry.js.map → p-65c74d07.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-099c2ddf.entry.js.map → p-65ee4bcd.entry.js.map} +0 -0
- /package/dist/twilight/{p-3971d884.system.entry.js.map → p-66f0d009.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a642fb2d.system.entry.js.map → p-69c4dc57.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f6a84618.entry.js.map → p-824f1195.entry.js.map} +0 -0
- /package/dist/twilight/{p-5b5a6101.entry.js.map → p-84013163.entry.js.map} +0 -0
- /package/dist/twilight/{p-bdf35a25.system.entry.js.map → p-8a9bfcbb.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-816097f4.entry.js.map → p-8c3bf70a.entry.js.map} +0 -0
- /package/dist/twilight/{p-ea58fa22.entry.js.map → p-8e111e2e.entry.js.map} +0 -0
- /package/dist/twilight/{p-ad1bfcf3.entry.js.map → p-90e0ff36.entry.js.map} +0 -0
- /package/dist/twilight/{p-411b87ef.entry.js.map → p-92cbc26e.entry.js.map} +0 -0
- /package/dist/twilight/{p-c24b8585.system.entry.js.map → p-932a9495.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b5838794.entry.js.map → p-9c99ec9d.entry.js.map} +0 -0
- /package/dist/twilight/{p-cf060e6c.system.entry.js.map → p-9da459e3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-01aded94.system.entry.js.map → p-9da95409.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-ab42e437.entry.js.map → p-9f52c186.entry.js.map} +0 -0
- /package/dist/twilight/{p-e651f83f.system.entry.js.map → p-a0bfb9f0.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4437951d.system.entry.js.map → p-b4dcca7d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-67d370cb.entry.js.map → p-ba73145a.entry.js.map} +0 -0
- /package/dist/twilight/{p-b854bd23.entry.js.map → p-bd157361.entry.js.map} +0 -0
- /package/dist/twilight/{p-12198e85.system.entry.js.map → p-c32b29f3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4659c645.entry.js.map → p-cafa90ca.entry.js.map} +0 -0
- /package/dist/twilight/{p-554092d9.system.entry.js.map → p-cb051f40.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b4b32523.system.entry.js.map → p-d7834bb8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4bc9089d.entry.js.map → p-da0d4708.entry.js.map} +0 -0
- /package/dist/twilight/{p-5273af20.entry.js.map → p-da239ecb.entry.js.map} +0 -0
- /package/dist/twilight/{p-cc5e1937.system.entry.js.map → p-e0c33d75.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bd89e063.system.entry.js.map → p-e3a5c60b.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c695b1d9.system.entry.js.map → p-e505c759.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-788980fa.entry.js.map → p-e702680e.entry.js.map} +0 -0
- /package/dist/twilight/{p-a3cd1fad.entry.js.map → p-f289d1e4.entry.js.map} +0 -0
- /package/dist/twilight/{p-f36b71e2.system.entry.js.map → p-f7619cf4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-07f023da.entry.js.map → p-f8ddee2c.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DiscountType","TIERED_OFFER_CONFIG","staticIcons","StarIcon","StarsIcon","GoldIcon","DiamondIcon","staticColors","TierUtils","findTierByIndex","tiers","index","find","tier","findTierByName","tierName","tier_name","getTierNameByIndex","_a","this","findCurrentTierIndex","currentValue","i","length","threshold","sallaTieredOfferCss","SallaTieredOffer","exports","class_1","hostRef","_this","currentTierIndex","canRender","isLoading","handleTabClick","activeTabTier","salla","lang","onLoaded","loyaltyProgramText","get","currentTierText","discountText","benefitText","prototype","componentWillLoad","onReady","_c","sent","checkFeatureEnabled","checkCartExists","fetchTieredOfferData","offerData","initializeComponent","logger","warn","error_1","config","includes","_b","storage","summary","count","validateCouponCompatibility","cartCoupon","details","applied_with_coupon","api","cart","offers","data","tieredOffer","offer","type","coupon","error_2","apiOfferData","tieredOfferData","mapApiDataToTiers","title","current_value","currentTier","componentDidLoad","event","on","updatedCart","__awaiter","updateOfferValues","apiData","sortedDiscounts","__spreadArray","discounts","sort","a","b","min_spend","map","discount","name","PERCENTAGE","concat","helpers","number","value","money","icon","text_color","current_tier","freshOfferData","with_current_cart","newTierIndex","getLoadingSkeletonView","h","Host","class","height","width","getCurrentTierData","getProgressWidth","totalTiers","completedTiers","calculateMilestonePosition","milestonePercent","offsetPercent","Math","max","min","getMilestoneStyles","isRtl","document","documentElement","dir","adjustedPercent","alignItems","position","transform","getMilestoneIconStyles","isCurrent","isReached","color","renderProgressBarBackground","progressWidth","style","renderMilestoneIcon","iconClasses","filter","Boolean","join","innerHTML","renderMilestoneName","renderMilestones","containerClass","renderProgressBar","renderTabs","isActive","onClick","activeTier","render","currentTierData"],"sources":["src/components/salla-tiered-offer/interfaces.ts","src/components/salla-tiered-offer/constants.ts","src/components/salla-tiered-offer/utils.ts","src/components/salla-tiered-offer/salla-tiered-offer.scss?tag=salla-tiered-offer","src/components/salla-tiered-offer/salla-tiered-offer.tsx"],"sourcesContent":["export enum DiscountType {\n PERCENTAGE = \"percentage\",\n FIXED = \"fixed\",\n}\n\n\nexport interface Discount {\n name?: string;\n type?: DiscountType;\n value?: number;\n min_spend?: number;\n}\n\nexport interface TieredOfferDetails {\n based_on?: string;\n ends_at?: number;\n start_value?: number;\n end_value?: number;\n current_value?: number;\n discounts?: Discount[];\n with_current_cart?: boolean;\n applied_with_coupon?: boolean;\n}\n\nexport interface Offer {\n id?: number;\n type?: string;\n title?: string;\n description?: string;\n details?: TieredOfferDetails | null;\n}\n\nexport interface TieredOfferTier {\n name: string;\n tier_name: string;\n discount: string;\n icon: string;\n threshold: number;\n text_color?: string;\n index: number;\n}\n\nexport interface TieredOfferData {\n current_tier: string;\n tiers: TieredOfferTier[];\n}\n\nexport interface TieredOfferConfig {\n staticIcons: string[];\n staticColors: string[];\n}\n","import { TieredOfferConfig } from './interfaces';\nimport StarIcon from '../../assets/svg/star-rounded.svg';\nimport StarsIcon from '../../assets/svg/stars.svg';\nimport GoldIcon from '../../assets/svg/gold.svg';\nimport DiamondIcon from '../../assets/svg/diamond-02.svg';\n\nexport const TIERED_OFFER_CONFIG: TieredOfferConfig = {\n staticIcons: [StarIcon, StarsIcon, GoldIcon, DiamondIcon],\n staticColors: ['#993018', '#444444', '#D18F36', '#315F9C']\n};","import { TieredOfferTier } from './interfaces';\n\nexport class TierUtils {\n /**\n * Find tier by index\n */\n static findTierByIndex(tiers: TieredOfferTier[], index: number): TieredOfferTier | null {\n return tiers.find(tier => tier.index === index) || null;\n }\n\n /**\n * Find tier by tier name\n */\n static findTierByName(tiers: TieredOfferTier[], tierName: string): TieredOfferTier | null {\n return tiers.find(tier => tier.tier_name === tierName) || null;\n }\n\n /**\n * Get tier name by index\n */\n static getTierNameByIndex(tiers: TieredOfferTier[], index: number): string | undefined {\n return this.findTierByIndex(tiers, index)?.tier_name;\n }\n\n /**\n * Find current tier index based on current value\n */\n static findCurrentTierIndex(currentValue: number, tiers: TieredOfferTier[]): number {\n if (!tiers) return 0;\n \n for (let i = tiers.length - 1; i >= 0; i--) {\n if (currentValue >= tiers[i].threshold) {\n return tiers[i].index;\n }\n }\n return 0;\n }\n}","\n// SVG styling for milestone icons \n.s-tiered-offer-milestone-icon {\n svg {\n color: currentColor;\n \n path {\n stroke: currentColor;\n fill: none;\n }\n }\n \n // Active and completed states - fill the star icon, keep others as stroke\n &.s-tiered-offer-milestone-active,\n &.s-tiered-offer-milestone-completed {\n svg {\n path {\n fill: currentColor;\n stroke: none;\n }\n \n // For stroke-based icons (crown, stars, diamond) \n &[fill=\"none\"] path {\n fill: none;\n stroke: currentColor;\n }\n }\n }\n}\n\n// RTL Support \n[dir=\"rtl\"] {\n .s-tiered-offer-progress-wrapper {\n .s-tiered-offer-progress-bg {\n transform: scaleX(-1);\n }\n \n .s-tiered-offer-progress-fill {\n transform: scaleX(-1);\n left: auto;\n }\n }\n\n .flip-x {\n transform: scaleX(-1);\n }\n}\n","import { Component, Host, h, State } from '@stencil/core';\nimport { Offer, TieredOfferTier, TieredOfferData, DiscountType } from './interfaces';\nimport { TIERED_OFFER_CONFIG } from './constants';\nimport { TierUtils } from './utils';\n\n@Component({\n tag: 'salla-tiered-offer',\n styleUrl: 'salla-tiered-offer.scss',\n})\nexport class SallaTieredOffer {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.loyaltyProgramText = salla.lang.get('blocks.tiered_offer.program_title');\n this.currentTierText = salla.lang.get('blocks.tiered_offer.current_tier');\n this.discountText = salla.lang.get('blocks.tiered_offer.discount');\n this.benefitText = salla.lang.get('blocks.tiered_offer.tier_description');\n });\n }\n\n\n @State() tieredOfferData: TieredOfferData;\n @State() apiOfferData: Offer;\n @State() currentTierIndex: number = 0;\n @State() currentTier: string;\n @State() activeTabTier: string;\n\n @State() canRender: boolean = false;\n @State() isLoading: boolean = false;\n\n // Language strings\n @State() loyaltyProgramText: string;\n @State() currentTierText: string;\n @State() discountText: string;\n @State() benefitText: string;\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n \n if (!this.checkFeatureEnabled()) {\n return;\n }\n \n if (!this.checkCartExists()) {\n return;\n }\n \n this.isLoading = true;\n \n const offerData = await this.fetchTieredOfferData();\n if (!offerData) {\n return;\n }\n \n this.initializeComponent(offerData);\n \n } catch (error) {\n this.canRender = false;\n salla.logger.warn('salla-tiered-offer:: ', error);\n } finally {\n this.isLoading = false;\n }\n }\n \n private checkFeatureEnabled(): boolean {\n return salla.config.get('store.features')?.includes('tiered-offer');\n }\n \n private checkCartExists(): boolean {\n return !!salla.storage.get(\"cart\")?.summary?.count;\n }\n \n private validateCouponCompatibility(offerData: Offer, cartCoupon?: any): boolean {\n // If coupon is applied but offer doesn't support coupons, widget should be hidden\n return !(cartCoupon && !offerData.details?.applied_with_coupon);\n }\n \n private async fetchTieredOfferData(): Promise<Offer | null> {\n try {\n const { data }: { data: Offer[] } = await salla.api.cart.offers();\n const tieredOffer = data.find(offer => offer.type === \"tiered_offer\");\n \n if (!tieredOffer) {\n return null;\n }\n \n // Hide widget if coupon is applied and offer doesn't support coupons\n if (!this.validateCouponCompatibility(tieredOffer, salla.storage.get(\"cart\")?.coupon)) {\n this.canRender = false;\n return null;\n }\n \n return tieredOffer;\n } catch (error) {\n throw error;\n }\n }\n \n private initializeComponent(apiOfferData: Offer): void {\n this.apiOfferData = apiOfferData;\n \n // Map tiered details data to component format\n this.tieredOfferData = this.mapApiDataToTiers(this.apiOfferData);\n this.loyaltyProgramText = this.apiOfferData.title || this.loyaltyProgramText;\n \n // Find current tier index based on current_value from API\n const currentValue = this.apiOfferData.details?.current_value || 0;\n const currentTierIndex = this.findCurrentTierIndex(currentValue);\n \n // Only render if user has reached at least the first tier\n if (currentTierIndex === 0) {\n this.canRender = false;\n return;\n }\n \n this.currentTierIndex = currentTierIndex;\n this.currentTier = TierUtils.getTierNameByIndex(this.tieredOfferData.tiers, currentTierIndex);\n this.activeTabTier = this.currentTier;\n this.canRender = true;\n }\n\n componentDidLoad() {\n salla.event.on(\"cart::updated\", async (updatedCart) => {\n const offerData = await this.fetchTieredOfferData();\n if (offerData) {\n this.updateOfferValues(updatedCart, offerData);\n }\n });\n }\n\n private mapApiDataToTiers(apiData: Offer): TieredOfferData {\n // Sort discounts by min_spend to create proper tier order\n const sortedDiscounts = [...apiData.details.discounts].sort((a, b) => a.min_spend - b.min_spend);\n\n const tiers: TieredOfferTier[] = sortedDiscounts.map((discount, index) => ({\n name: discount.name, \n tier_name: discount.name, \n discount: discount.type === DiscountType.PERCENTAGE ? `${salla.helpers.number(discount.value)}%` : salla.money(discount.value),\n icon: TIERED_OFFER_CONFIG.staticIcons[index] || TIERED_OFFER_CONFIG.staticIcons[0], \n threshold: discount.min_spend,\n text_color: TIERED_OFFER_CONFIG.staticColors[index], \n index: index + 1\n }));\n\n return {\n current_tier: TierUtils.getTierNameByIndex(tiers, this.findCurrentTierIndex(apiData.details.current_value, tiers)),\n tiers\n };\n }\n\n private findCurrentTierIndex(currentValue: number, tiers = this.tieredOfferData?.tiers): number {\n return TierUtils.findCurrentTierIndex(currentValue, tiers || []);\n }\n\n private updateOfferValues(updatedCart: { items: any[], sub_total: number, coupon?: any }, freshOfferData: Offer) {\n if (!freshOfferData || !this.tieredOfferData) {\n return;\n }\n\n // Check coupon compatibility\n if (!this.validateCouponCompatibility(freshOfferData, updatedCart.coupon)) {\n this.canRender = false;\n return;\n }\n\n // If no coupon conflict, show widget\n this.canRender = true;\n\n // Check if this offer should update with cart changes\n if (freshOfferData.details?.with_current_cart === false) {\n return;\n }\n\n // Update current_value in API offer data\n // const currentValue = updatedCart.sub_total;\n // console.log('currentValue #####3', currentValue);\n // this.apiOfferData = {\n // ...this.apiOfferData,\n // details: {\n // ...this.apiOfferData.details,\n // current_value: currentValue\n // }\n // };\n\n // Use current_value from fresh API data instead of cart sub_total\n const currentValue = freshOfferData.details?.current_value || 0;\n this.apiOfferData = freshOfferData;\n\n // Update current tier based on new value\n const newTierIndex = this.findCurrentTierIndex(currentValue);\n\n // Check if user qualifies for any tier\n if (newTierIndex === 0) {\n this.canRender = false;\n return;\n }\n\n // user qualifies show widget\n this.canRender = true;\n this.currentTierIndex = newTierIndex;\n this.currentTier = TierUtils.getTierNameByIndex(this.tieredOfferData.tiers, newTierIndex);\n\n // Update active tab if needed\n if (this.activeTabTier !== this.currentTier) {\n this.activeTabTier = this.currentTier;\n }\n }\n\n private getLoadingSkeletonView() {\n return <Host>\n <div class=\"s-tiered-offer-container\">\n <div class=\"s-tiered-offer-skeleton-wrapper\">\n <div class=\"s-tiered-offer-skeleton-title\">\n <salla-skeleton height=\"16px\" width=\"40%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-subtitle\">\n <salla-skeleton height=\"20px\" width=\"60%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-progress\">\n <salla-skeleton height=\"16px\" width=\"100%\" />\n </div>\n <div class=\"s-tiered-offer-skeleton-tabs\">\n <salla-skeleton height=\"50px\" width=\"100%\" />\n </div>\n </div>\n </div>\n </Host>\n }\n\n private getCurrentTierData(): TieredOfferTier {\n return TierUtils.findTierByIndex(this.tieredOfferData.tiers, this.currentTierIndex) || this.tieredOfferData.tiers[0];\n }\n\n private getProgressWidth(): number {\n const currentValue = this.apiOfferData.details?.current_value || 0;\n const totalTiers = this.tieredOfferData.tiers.length;\n \n // Use existing method to find current tier index (which already handles the logic)\n const currentTierIndex = this.findCurrentTierIndex(currentValue);\n \n // Convert to 0-based index for progress calculation\n const completedTiers = currentTierIndex;\n return (completedTiers / totalTiers) * 100;\n }\n\n private handleTabClick = (tierName: string) => {\n this.activeTabTier = tierName;\n }\n \n private calculateMilestonePosition(index: number, totalTiers: number): string {\n if (totalTiers === 1) {\n return 'calc(100% - 18px)';\n }\n const milestonePercent = ((index + 1) / totalTiers) * 100;\n const offsetPercent = 8 / totalTiers;\n return `${Math.max(2, Math.min(95, milestonePercent - offsetPercent))}%`;\n }\n \n private getMilestoneStyles(tier: TieredOfferTier, index: number, totalTiers: number) {\n const isRtl = document.documentElement.dir === 'rtl';\n const adjustedPercent = this.calculateMilestonePosition(index, totalTiers);\n const alignItems = tier.name.length > 6 ? 'flex-end' : 'center';\n \n return {\n [isRtl ? 'right' : 'left']: adjustedPercent,\n alignItems,\n position: 'absolute' as const,\n transform: isRtl ? 'translateX(50%)' : 'translateX(-50%)'\n };\n }\n \n private getMilestoneIconStyles(tier: TieredOfferTier, isCurrent: boolean, isReached: boolean) {\n if (isCurrent) {\n return { color: tier.text_color };\n }\n if (isReached) {\n return { color: 'var(--color-primary)' };\n }\n return {};\n }\n \n private renderProgressBarBackground(progressWidth: number) {\n return [\n <div class=\"s-tiered-offer-progress-bg\"></div>,\n <div \n class=\"s-tiered-offer-progress-fill\"\n style={{ width: `${progressWidth}%` }}>\n </div>\n ];\n }\n \n private renderMilestoneIcon(tier: TieredOfferTier, isCurrent: boolean, isReached: boolean) {\n const iconClasses = [\n 's-tiered-offer-milestone-icon',\n isCurrent ? 's-tiered-offer-milestone-active' : '',\n isReached ? 's-tiered-offer-milestone-completed' : ''\n ].filter(Boolean).join(' ');\n \n return (\n <div \n class={iconClasses}\n style={this.getMilestoneIconStyles(tier, isCurrent, isReached)}>\n <span innerHTML={tier.icon}></span>\n </div>\n );\n }\n \n private renderMilestoneName(tier: TieredOfferTier, isCurrent: boolean) {\n return (\n <div class=\"s-tiered-offer-milestone-name\">\n {isCurrent && (\n <span style={{ color: tier.text_color }}>\n {tier.name}\n </span>\n )}\n </div>\n );\n }\n \n private renderMilestones(currentValue: number, totalTiers: number) {\n const containerClass = totalTiers === 1 \n ? 's-tiered-offer-single-milestone-justify-end' \n : 's-tiered-offer-milestones';\n \n return (\n <div class=\"s-tiered-offer-milestones-wrapper\">\n <div class={containerClass}>\n {this.tieredOfferData.tiers.map((tier, index) => {\n const isReached = currentValue >= tier.threshold;\n const isCurrent = tier.tier_name === this.currentTier;\n \n return (\n <div \n class=\"s-tiered-offer-milestone\"\n style={this.getMilestoneStyles(tier, index, totalTiers)}>\n {this.renderMilestoneIcon(tier, isCurrent, isReached)}\n {this.renderMilestoneName(tier, isCurrent)}\n </div>\n );\n })}\n </div>\n </div>\n );\n }\n\n private renderProgressBar() {\n const progressWidth = this.getProgressWidth();\n const totalTiers = this.tieredOfferData.tiers.length;\n const currentValue = this.apiOfferData.details?.current_value || 0;\n\n return (\n <div class=\"s-tiered-offer-progress-container\">\n <div class=\"s-tiered-offer-progress-wrapper\">\n {this.renderProgressBarBackground(progressWidth)}\n {this.renderMilestones(currentValue, totalTiers)}\n </div>\n </div>\n );\n }\n\n private renderTabs() {\n return (\n <div class=\"s-tiered-offer-tabs-container\">\n {/* Tab Headers */}\n <div class=\"s-tiered-offer-tab-headers\">\n {this.tieredOfferData.tiers.map(tier => {\n const isActive = tier.tier_name === this.activeTabTier;\n return (\n <button \n class={`s-tiered-offer-tab-header ${isActive ? 's-tiered-offer-tab-active' : ''}`}\n onClick={() => this.handleTabClick(tier.tier_name)}>\n <span>{tier.name}</span>\n </button>\n );\n })}\n </div>\n\n {/* Tab Content */}\n <div class=\"s-tiered-offer-tab-content-wrapper\">\n {(() => {\n const activeTier = TierUtils.findTierByName(this.tieredOfferData.tiers, this.activeTabTier);\n if (!activeTier) return null;\n \n return (\n <div class=\"s-tiered-offer-tab-content\">\n <div class=\"s-tiered-offer-tab-content-inner\">\n <div class=\"s-tiered-offer-discount-section\">\n <p class=\"s-tiered-offer-discount-title\">\n {this.discountText} <span innerHTML={activeTier.discount}></span>\n </p>\n <p class=\"s-tiered-offer-benefit-description\">\n {this.benefitText} {activeTier.name}\n </p>\n </div>\n </div>\n </div>\n );\n })()}\n </div>\n </div>\n );\n }\n\n render() {\n \n if (this.isLoading) {\n return this.getLoadingSkeletonView();\n }\n\n if (!this.canRender || !this.tieredOfferData) {\n return null;\n }\n \n\n const currentTierData = this.getCurrentTierData();\n\n return (\n <Host>\n <div class=\"s-tiered-offer-container\">\n {/* Header Section */}\n <div class=\"s-tiered-offer-header\">\n <div class=\"s-tiered-offer-header-content\">\n <p class=\"s-tiered-offer-program-title\">{this.loyaltyProgramText}</p>\n <div class=\"s-tiered-offer-current-tier-name-wrapper\">\n <h2 class=\"s-tiered-offer-current-tier\">\n {this.currentTierText} <span class=\"s-tiered-offer-tier-name\">{currentTierData.name}</span>\n </h2>\n <span innerHTML={currentTierData.icon}></span>\n </div>\n </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,WAEE,GAAI1I,KAAKc,UAAW,CAClB,OAAOd,KAAK4F,wB,CAGd,IAAK5F,KAAKa,YAAcb,KAAK0D,gBAAiB,CAC5C,OAAO,I,CAIT,IAAMiF,EAAkB3I,KAAKkG,qBAE7B,OACEL,EAACC,EAAI,KACHD,EAAK,OAAAE,MAAM,4BAETF,EAAK,OAAAE,MAAM,yBACTF,EAAK,OAAAE,MAAM,iCACTF,EAAA,KAAGE,MAAM,gCAAgC/F,KAAKoB,oBAC9CyE,EAAK,OAAAE,MAAM,4CACTF,EAAI,MAAAE,MAAM,+BACP/F,KAAKsB,gBAAe,IAAEuE,EAAM,QAAAE,MAAM,4BAA4B4C,EAAgB5D,OAEjFc,EAAM,QAAAoC,UAAWU,EAAgBrD,UAMtCtF,KAAKqI,oBAGLrI,KAAKsI,c,WA5aa,I","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,r,e,n){function s(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function i(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?e(t.value):s(t.value).then(a,i)}l((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(t){return function(r){return l([t,r])}}function l(i){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,i[0]&&(e=0)),e)try{if(n=1,s&&(o=i[0]&2?s["return"]:i[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,i[1])).done)return o;if(s=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:e.label++;return{value:i[1],done:false};case 5:e.label++;s=i[1];i=[0];continue;case 7:i=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){e.label=i[1];break}if(i[0]===6&&e.label<o[1]){e.label=o[1];o=i;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(i);break}if(o[2])e.ops.pop();e.trys.pop();continue}i=r.call(t,e)}catch(t){i=[6,t];s=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DdFhEMb6.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var r,e,n,s;return{setters:[function(t){r=t.r;e=t.h;n=t.g},function(t){s=t.H},null],execute:function(){var o=":host{display:block}";var a=t("salla_orders",function(){function t(t){var e=this;r(this,t);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((function(){e.languageCode=salla.lang.locale;e.orderNumberText=salla.lang.get("pages.thank_you.order_id");e.totalOrderText=salla.lang.get("pages.orders.total");e.orderDateText=salla.lang.get("pages.orders.date");e.orderStatusText=salla.lang.get("pages.orders.status");e.noOrderText=salla.lang.get("pages.orders.non_orders");e.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}t.prototype.loading=function(t){if(t===void 0){t=true}var r;var e=(r=this.status)===null||r===void 0?void 0:r.querySelector(".s-button-text");if(e){s.toggleElementClassIf(e,"s-button-hide","s-button-show",(function(){return t}));this.btnLoader.style.display=t?"inherit":"none"}};t.prototype.initiateInfiniteScroll=function(){var t=this;var r,e,n;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:function(){return t.nextPage},history:false,nextPage:this.nextPage,scrollThreshold:false},true);(r=this.infiniteScroll)===null||r===void 0?void 0:r.on("request",(function(r){t.loading()}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(r){var e,n;t.loading(false);t.pagination=r.pagination;t.nextPage=((n=(e=r.pagination)===null||e===void 0?void 0:e.links)===null||n===void 0?void 0:n.next)||null;t.handleResponse(r.data).forEach((function(r){t.wrapper.append(r)}));var o=t.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(o)}));(n=this.infiniteScroll)===null||n===void 0?void 0:n.on("error",(function(t){salla.logger.error("Error loading more comments:",t)}))};t.prototype.loadMore=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.infiniteScroll.loadNextPage();return[2]}))}))};t.prototype.handleResponse=function(t){var r=this;return t.map((function(t){return r.getSingleOrderItem(t)}))};t.prototype.loadInitialData=function(){return __awaiter(this,void 0,void 0,(function(){var t;var r=this;return __generator(this,(function(e){switch(e.label){case 0:t=new URL(window.location.href);return[4,salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((function(t){var e,n,o,a;r.orders=t.data;r.hasInfiniteScroll=!!((e=t.pagination)===null||e===void 0?void 0:e.links.next);r.pagination=t.pagination;r.total=(n=t.pagination)===null||n===void 0?void 0:n.total;r.nextPage=((a=(o=t.pagination)===null||o===void 0?void 0:o.links)===null||a===void 0?void 0:a.next)||null;if(!r.orders.length){r.showPlaceholder=true;return r.loading(false)}setTimeout((function(){r.handleResponse(t.data).forEach((function(t){r.wrapper.append(t)}));r.initiateInfiniteScroll();var e=r.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");s.animateItems(e)}),100)})).catch((function(t){r.showPlaceholder=true;r.loading(false);salla.logger.error(t)}))];case 1:e.sent();return[2]}}))}))};t.prototype.getSingleOrderItem=function(t){var r=document.createElement("tr");r.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");var e=document.createElement("td");e.classList.add("s-orders-table-tbody-tr-td");var n=document.createElement("div");n.classList.add("s-orders-table-tbody-tr-td-content");var o=document.createElement("span");o.classList.add("s-orders-mobile-title");o.textContent=this.orderNumberText+":";var a=document.createElement("span");a.classList.add("s-orders-reference-id");a.textContent="#"+t.reference_id;n.appendChild(o);n.appendChild(a);if(t.source=="buy_as_gift"){var i=document.createElement("i");i.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");n.appendChild(i)}var l=document.createElement("a");l.href=t.url;n.appendChild(l);var u=document.createElement("div");u.classList.add("s-orders-copy-to-clipboard-button");var d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(function(t){s.copyToClipboard(t);s.toggleElementClassIf(d,"copied","code-to-copy",(function(){return true}));setTimeout((function(){s.toggleElementClassIf(d,"code-to-copy","copied",(function(){return true}))}),1e3)}));var c=document.createElement("span");c.textContent="#"+t.reference_id;var f=document.createElement("i");f.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");var h=salla.config.get("theme.is_rtl",true);if(h){d.appendChild(f);d.appendChild(c)}else{d.appendChild(c);d.appendChild(f)}u.appendChild(d);n.appendChild(u);e.appendChild(n);r.appendChild(e);var v=document.createElement("td");v.classList.add("s-orders-table-tbody-tr-td");var b=document.createElement("div");b.classList.add("s-orders-table-tbody-tr-td-content");var m=document.createElement("span");m.classList.add("s-orders-mobile-title");m.textContent=this.totalOrderText+":";var p=document.createElement("div");p.innerHTML=salla.money(t.total);var y=document.createElement("a");y.href=t.url;b.appendChild(m);b.appendChild(p);b.appendChild(y);v.appendChild(b);r.appendChild(v);var _=document.createElement("td");_.classList.add("s-orders-table-tbody-tr-td");var g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");var w=document.createElement("span");w.classList.add("s-orders-mobile-title");w.textContent=this.orderDateText+":";var k=document.createElement("div");k.textContent=s.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);var x=document.createElement("a");x.href=t.url;g.appendChild(w);g.appendChild(k);g.appendChild(x);_.appendChild(g);r.appendChild(_);var j=document.createElement("td");j.classList.add("s-orders-table-tbody-tr-td");var C=document.createElement("div");C.classList.add("s-orders-table-tbody-tr-td-content");var S=document.createElement("span");S.classList.add("s-orders-mobile-title");S.textContent=this.orderStatusText+":";var T=document.createElement("span");T.classList.add("s-orders-status-container");T.style.color=t.status.color;var E=document.createElement("i");E.classList.add(t.status.icon);var O=document.createElement("span");O.textContent=t.status.name;T.appendChild(E);T.appendChild(O);C.appendChild(S);C.appendChild(T);var q=document.createElement("i");q.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");C.appendChild(q);var F=document.createElement("a");F.href=t.url;C.appendChild(F);j.appendChild(C);r.appendChild(j);return r};t.prototype.render=function(){var t=this;var r;if(this.showPlaceholder){return e("div",{class:"s-orders-no-content"},e("i",{class:"sicon-packed-box icon"}),e("p",null,this.noOrderText))}return e("div",{class:"s-orders-wrapper"},e("table",{class:"s-orders-table"},e("thead",{class:"s-orders-table-head"},e("tr",{class:"s-orders-table-head-tr"},e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),e("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),e("tbody",{class:"s-orders-table-tbody",ref:function(r){return t.wrapper=r}})),this.nextPage&&e("div",{class:"s-infinite-scroll-wrapper",ref:function(r){return t.status=r}},e("button",{onClick:function(){return t.loadMore()},class:"s-infinite-scroll-btn s-button-btn s-button-primary"},e("span",{class:"s-button-text s-infinite-scroll-btn-text"},(r=this.loadMoreText)!==null&&r!==void 0?r:this.load_more_text_trans),e("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:function(r){return t.btnLoader=r},style:{display:"none"}}))))};t.prototype.componentWillLoad=function(){var t=this;return salla.onReady().then((function(){return t.loadInitialData()})).then((function(){return t.initiateInfiniteScroll()}))};Object.defineProperty(t.prototype,"host",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=o}}}));
|
|
5
|
+
//# sourceMappingURL=p-4c901b62.system.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-
|
|
1
|
+
{"version":3,"file":"p-4qh49PqK.system.js","sources":["src/components/salla-payments/salla-payments.scss?tag=salla-payments","src/components/salla-payments/salla-payments.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h, Element } from '@stencil/core';\n/**\n * @slot payment - Replaces payment item, has replaceable props `{image}`, `{payment}`.\n * @slot sbc - Replaces SBC certificate item, has replaceable props `{image}`.\n * @slot cod - Replaces COD item, has replaceable props `{image}`.\n */\n@Component({\n tag: 'salla-payments',\n styleUrl: 'salla-payments.scss'\n})\n\nexport class SallaPayments {\n @Element() host: HTMLElement;\n private paymentSlot: string;\n private sbcSlot: string;\n private codSlot: string;\n private payments: string[];\n private placeholderImage: string;\n /**\n * Array of the payments/items that are not supported, ex: [\"sbc\", \"made-in-ksa\", \"cod\", \"mada\", \"\"].\n */\n @Prop({ mutable: true }) exclude: string[] = [];\n\n componentWillLoad() {\n return salla.onReady()\n .then(() => {\n if (typeof this.exclude === 'string') {\n try {\n this.exclude = JSON.parse(this.exclude);\n } catch (error) {\n salla.logger.error('salla-payments:: failed to parse the exclude props!', this.exclude);\n this.exclude = [];\n }\n }\n this.placeholderImage = salla.url.cdn(`images/s-empty.png`);\n this.paymentSlot = this.host.querySelector('[slot=\"payment\"]')?.innerHTML || `<li class=\"s-payments-list-item\"><img class=\"lazy\" width=\"100%\" height=\"100%\" src=\"${this.placeholderImage}\" data-src=\"{image}\" alt={payment} /><li>`;\n this.sbcSlot = this.host.querySelector('[slot=\"sbc\"]')?.innerHTML || `<li class=\"s-payments-list-item\"><a target=\"_blank\" href=\"{link}\"> <img width=\"100%\" height=\"100%\" src=\"${this.placeholderImage}\" data-src={image} class=\"lazy s-payments-sbc-image\" alt=\"SBC\"/></a><li>`;\n this.codSlot = this.host.querySelector('[slot=\"cod\"]')?.innerHTML || `<li class=\"s-payments-list-item\"> <img width=\"100%\" height=\"100%\" src=\"${this.placeholderImage}\" data-src={image} class=\"lazy\" alt=\"COD\"/><li>`;\n this.payments = salla.config.get('store.settings.payments');\n })\n }\n \n render() {\n const madeInKSA = !this.exclude.includes('made-in-ksa') && salla.config.get('store.settings.made_in_ksa');\n const sbcId = this.exclude.includes('sbc') ? null : salla.config.get('store.settings.certificate.id');\n return (\n <Host class=\"s-payments-list-wrap\">\n { }\n <ul class=\"s-payments-list\">\n {madeInKSA && <li class=\"s-payments-list-item\">\n <img class=\"lazy\" width=\"100%\" height=\"100%\" decoding=\"async\" loading=\"lazy\" data-src={salla.url.cdn(`images/made-in-ksa.svg`, 58, 58)} alt=\"made in KSA certified\" />\n </li>}\n\n {/* Dynamic methods */}\n {this.payments.map((payment) => (\n payment == \"cod\" ?\n <div id=\"cod-slot\" innerHTML={this.codSlot\n .replace(/\\{image\\}/g, salla.url.cdn(`images/payment/cod_mini.png`, 58, 58))}>\n </div> :\n <div id=\"payment-slot\" innerHTML={this.paymentSlot\n .replace(/\\{image\\}/g, salla.url.cdn(`images/payment/${payment}_mini.png`, 58, 58))\n .replace(/\\{payment\\}/g, payment)}>\n </div>\n ))}\n\n {/* SBC certificate */}\n {sbcId && <div id=\"sbc-slot\" innerHTML={this.sbcSlot\n .replace(/\\{image\\}/g, salla.url.cdn(`images/sbc.png`, 58, 58))\n .replace(/\\{link\\}/g, `https://eauthenticate.saudibusiness.gov.sa/certificate-details/${sbcId}`)}>\n </div>}\n </ul>\n </Host>\n );\n }\n componentDidLoad() {\n //todo:: double check about the following workaround, it looks not normal\n document.lazyLoadInstance?.update(this.host.querySelectorAll('.lazy'));\n // fix lazy loaded images that have 100% width and height\n this.host.querySelectorAll('.lazy').forEach((img) => {\n img.addEventListener('load', () => {\n img.setAttribute('width', \"100%\");\n img.setAttribute('height', \"100%\");\n });\n });\n }\n componentDidRender() {\n //todo:: double check about the following workaround to reduce the dom length, it looks unusal\n this.host.querySelectorAll('#payment-slot').forEach(el => el.replaceWith(el.firstChild));\n this.host.querySelectorAll('#sbc-slot').forEach(el => el.replaceWith(el.firstChild));\n this.host.querySelectorAll('#cod-slot').forEach(el => el.replaceWith(el.firstChild));\n this.host.querySelector('[slot=\"payment\"]')?.remove();\n this.host.querySelector('[slot=\"sbc\"]')?.remove();\n this.host.querySelector('[slot=\"cod\"]')?.remove();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAAA,MAAM,gBAAgB,GAAG,sBAAsB;;YCWlC,aAAa,6BAAA,MAAA;MAL1B,IAAA,WAAA,CAAA,OAAA,EAAA;;MAYE;;MAEG;MACsB,QAAA,IAAO,CAAA,OAAA,GAAa,EAAE;MAyEhD;UAvEC,iBAAiB,GAAA;cACf,OAAO,KAAK,CAAC,OAAO;mBACjB,IAAI,CAAC,MAAK;;MACT,YAAA,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;MACpC,gBAAA,IAAI;0BACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;;sBACvC,OAAO,KAAK,EAAE;0BACd,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,qDAAqD,EAAE,IAAI,CAAC,OAAO,CAAC;MACvF,oBAAA,IAAI,CAAC,OAAO,GAAG,EAAE;;;kBAGrB,IAAI,CAAC,gBAAgB,GAAG,KAA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AAC,aAAa,CAAC,cAAc,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE;MACjD,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(e,t,r,s){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s["throw"](e))}catch(e){i(e)}}function l(e){e.done?r(e.value):n(e.value).then(a,o)}l((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,n,i,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return l([e,t])}}function l(o){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(r=0)),r)try{if(s=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{s=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-BV4kErtd.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 n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));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.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");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.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");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.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));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(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).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[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];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(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};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(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.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 n=this.offersList[0].details;return[(t=n.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=n.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"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.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)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.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}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DdFhEMb6.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 n;(function(e){e["ProductDetail"]="product.single";e["Cart"]="cart"})(n||(n={}));var i;(function(e){e["Conditional"]="conditional";e["PercentageOrFixed"]="fixed";e["DiscountsTable"]="discounts_table";e["Bank"]="bank";e["BuyXGetY"]="buy_x_get_y";e["SpecialPrice"]="special_price"})(i||(i={}));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.isMultipleBank=false;this.isBankOffer=false;this.canRender=false;this.showOffer=salla.config.get("store.settings.product.show_special_offers");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.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");this.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");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.multipleBankOfferTitleText=salla.lang.get("pages.offer.multiple_bank_offers_title");r.multipleBankOfferTitleDescription=salla.lang.get("pages.offer.multiple_bank_offers_message");r.buy_quantity_text(0)}));salla.onReady((function(){r.currentPage=salla.config.get("page.slug");r.userCurrency=salla.config.get("currencies")[salla.config.get("user.currency_code")].symbol}));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(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:if(!(this.currentPage==n.Cart))return[3,2];return[4,Salla.cart.getCurrentCartId()];case 1:e=t.sent();return[2,"offers/cart/".concat(e)];case 2:if(this.currentPage==n.ProductDetail){return[2,"offers/product/".concat(salla.config.get("page.id"))]}return[2,"offers"]}}))}))};e.prototype.emitPromotionViewed=function(){if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var e={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:1};salla.event.emit("promotion::viewed",[e])};e.prototype.emitPromotionClicked=function(e){if(e===void 0){e=1}if(!(this.offersList.length&&this.canRender&&this.showOffer))return;var t={id:this.offersList[0].id,name:this.offersList[0].title,creative:this.offersList[0].description||"",position:e};salla.event.emit("promotion::clicked",[t])};e.prototype.componentWillLoad=function(){var e=this;this.hasCustomComponent=!!customElements.get(this.productCardComponent);return new Promise((function(e){return salla.onReady(e)})).then((function(){e.showOffer=!salla.url.is_page("product.single")||salla.config.get("store.settings.product.show_special_offers");if(e.showOffer){return}throw new Error("Merchant disabled showing the offers on product page")})).then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:t=(e=salla.api).request;return[4,this.getEndpointByPageName()];case 1:return[2,t.apply(e,[r.sent()])]}}))}))})).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[i.SpecialPrice,i.Bank,i.BuyXGetY,i.DiscountsTable].includes(e.type)}));if(!r){throw new Error("salla-offers:: Offer type not supported yet!")}if(r.type===i.DiscountsTable){return e.offersList=[r]}if(e.isBankOffer=r.type===i.Bank){e.offersList=e.offersList.filter((function(e){return e.type===i.Bank}));e.isMultipleBank=e.offersList.length>1;return e.offersList}if(r.type===i.SpecialPrice){var s=r.details;return s.apply_to==="product"?salla.product.api.fetch({source:"selected",source_value:s.targets}).then((function(t){r.details.products=t.data;return e.offersList=[r]})):salla.product.api.categories().then((function(t){var n=e.findCategories(t.data,s.targets);r.details.categories=n;return e.offersList=[r]}))}var n=r.details.get;return n.source==="products"?salla.product.api.fetch({source:"selected",source_value:n.source_value}).then((function(t){n.products=t.data;r.details.get=n;return e.offersList=[r]})):salla.product.api.categories().then((function(t){n.categories=e.findCategories(t.data,n.source_value);r.details.get=n;return e.offersList=[r]}))})).then((function(t){salla.storage.set(e.getStorageKey(),{offers:t,stored_at:(new Date).getTime()});e.canRender=true})).catch((function(e){salla.logger.warn(e)}))};e.prototype.componentDidLoad=function(){var e=this.host.querySelector(".s-slider-block__title-nav");e===null||e===void 0?void 0:e.classList.add("s-offer-bank-payment-nav");this.emitPromotionViewed()};e.prototype.findCategories=function(e,t){var r;var s=[];for(var n=0,i=e;n<i.length;n++){var a=i[n];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(){try{var e=salla.config.get("page.slug").replace(".","_");var t=salla.lang.getLocale();var r=salla.config.currency().code;if(!e||!t||!r){throw new Error("Unable to get the storage key.")}return"s-offers-".concat(e,"-").concat(salla.config.get("page.id"),"-").concat(t,"-").concat(r)}catch(e){return""}};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(){var e=this;if(!this.offersList.length||!this.canRender||!this.showOffer)return null;var t=this.offersList[0];var s=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleText:null:t.title;var n=this.isBankOffer?this.isMultipleBank?this.multipleBankOfferTitleDescription:null:t.description;var i={"block-title":s,"block-subTitle":n,"show-controls":this.isMultipleBank};return r("div",{class:"s-offer-wrapper",onClick:function(){return e.emitPromotionClicked()}},r("p",{class:"s-offer-corner-badge"},this.special_offer_text),r("salla-slider",Object.assign({type:"carousel",id:"offer-slider"},i),r("div",{slot:"items"},this.renderSectionForOfferType(t.type))))};e.prototype.renderSectionForOfferType=function(e){if(this.isBankOffer){return this.renderBankSection()}if(e==i.SpecialPrice){return this.renderSpecialPriceSection()}if(e==i.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 n=this.offersList[0].details;return[(t=n.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=n.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"},"".concat(e.product_discount_text," ").concat(t.details.discount_value).concat(t.details.discount_type==="percentage"&&"%")):""),!e.isMultipleBank?r("div",{class:"s-offer-bank-message s-offer-slide-one-fourth"},r("h2",null,e.offersList[0].title),r("p",{innerHTML:e.generateBankDescription(e.offersList[0].description,t.details.discount_value)})):"")}))};e.prototype.generateBankDescription=function(e,t){return e.replace(new RegExp("".concat(t," %")),'<span class="s-offer-bank-message-amount">'.concat(t," %</span>"))};e.prototype.renderDiscountTableSection=function(){var e=this;var t;var s=this.offersList[0];var n=s.details.show_price_after_discount;return(t=this.offersList[0].details.discounts)===null||t===void 0?void 0:t.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)),n?r("div",{class:"s-offer-slide-offer-entry-price"},r("span",null,e.offer_with_price_text),r("span",{class:"s-offer-slide-offer-entry-price-amount"},t.discounted_amount)," ",r("span",null,e.userCurrency)):""),r("p",{class:"s-offer-slide-offer-entry-price-amount-percent"},e.with_discount_text,"(",r("span",null,t.percentage,!!t.percentage&&"%"),")")))}))};e.prototype.renderSpecialPriceSection=function(){var e=this;var t,s;var n=this.offersList[0].details;return[n.apply_to==="product"&&((t=n.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}))}))),n.apply_to==="category"&&((s=n.categories)===null||s===void 0?void 0:s.map((function(t){return e.getCategoriesSection(t)})))]};Object.defineProperty(e.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());o.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-59796bb2.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t,H as a,g as e}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as s,h as t,H as a,g as e}from"./p-Qk6_ks1N.js";const o="";const i=class{constructor(t){s(this,t);this.collapsible=true;this.collapsed=true;this.dir=document.dir||"rtl"}directionChangedHandler(s){this.dir=s.detail.dir}handleCollapse(s){this.collapsed=s.detail.payload.collapsed}setcollapsibleProp(){const s=this.host.querySelector("salla-accordion-head");if(this.collapsible&&s){s.setAttribute("collapsible","true");s.setAttribute("collapsed",this.collapsed.toString())}}componentDidRender(){this.setcollapsibleProp();const s=this.host.querySelector("salla-accordion-body");if(this.collapsible){this.host.setAttribute("data-collapsed",this.collapsed.toString());s===null||s===void 0?void 0:s.setAttribute("data-collapsed",this.collapsed.toString())}}render(){return t(a,{key:"30e906d87cba59e197e71460bb24e578455f2d28",class:`s-accordion-wrapper ${this.dir}`,"data-collapsed":this.collapsed.toString()},t("slot",{key:"8c26efc12856022567e5abe587c7537a5776285b"}))}get host(){return e(this)}};i.style=o;export{i as salla_accordion};
|
|
5
|
+
//# sourceMappingURL=p-6029cdd7.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as s,h as t}from"./p-Qk6_ks1N.js";import{I as a}from"./p-uTyAzPSy.js";var 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>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`;var c=`\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`;var 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`;var 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.codeCopied=null;this.noItemFound=true;this.order_items=[];this.isDigitalCard=s=>s.product.type==="codes";this.isDigitalProduct=s=>s.product.type==="digital"}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 a=t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)));if(a){this.order_items=t;this.noItemFound=false}}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"6358d81e74e1fd966b7046deab946f33391b2fc6",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?a: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:e}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:c}),t("span",null,this.download_text))))))):null)))}};h.style=n;export{h as salla_order_summary};
|
|
5
|
+
//# sourceMappingURL=p-60dac7ef.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-BV4kErtd.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-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 2v0zM25 7v0z"></path>\n</svg>\n';var 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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},t("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DdFhEMb6.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\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>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-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 2v0zM25 7v0z"></path>\n</svg>\n';var 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>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\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>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\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>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},t("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
|
|
5
|
+
//# sourceMappingURL=p-60f649f5.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DdFhEMb6.system.js"],(function(e){"use strict";var t,i,a,s;return{setters:[function(e){t=e.r;i=e.c;a=e.h;s=e.H}],execute:function(){var c="salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";var b=e("salla_loyalty_prize_item",function(){function e(e){t(this,e);this.prizeItemSelected=i(this,"prizeItemSelected")}e.prototype.onPrizeItemClick=function(){this.prizeItemSelected.emit(this.item)};e.prototype.render=function(){return a(s,{key:"601dbcf73e68678eecc912c14c2b1be612a78551"},a("div",{key:"074f8b4cb736bfabd5885d9df77bf74e7c4829a1",onClick:this.onPrizeItemClick.bind(this)},a("img",{key:"4bec672992f7e998bde639295831a5c9ad5f5088",class:"s-loyalty-prize-item-image",src:this.item.image,alt:this.item.name}),a("div",{key:"c8f858a7f406fe8e9123c57df627a4b6a2cbd719",class:"s-loyalty-prize-item-title"},this.item.name),a("div",{key:"81b954aa730e07c7f32ee538692581dede3543db",class:"s-loyalty-prize-item-subtitle"},this.item.description),a("div",{key:"b7baeada2da364fec6ee7bd606b595b1f652d8a8",class:"s-loyalty-prize-item-points"},this.item.cost_points," Points")))};return e}());b.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-61cec922.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DdFhEMb6.system.js"],(function(t){"use strict";var s,n,a,i;return{setters:[function(t){s=t.r;n=t.h;a=t.H;i=t.g}],execute:function(){var r=":host{display:block}";var e=t("salla_apps_icons",function(){function t(t){var n=this;s(this,t);var a;this.apps=salla.config.get("store.apps");this.appSlot=((a=this.host.querySelector('[slot="app"]'))===null||a===void 0?void 0:a.innerHTML)||"<img alt={name} src={icon} />";salla.onReady((function(){n.apps=salla.config.get("store.apps")}));salla.lang.onLoaded((function(){n.appsTitle=salla.lang.get("blocks.footer.download_apps")}))}t.prototype.getAppsArray=function(){return Object.entries(this.apps).map((function(t){var s=t[0],n=t[1];return{name:s,value:n}}))};t.prototype.componentWillLoad=function(){return new Promise((function(t){return salla.onReady(t)}))};t.prototype.render=function(){var t=this;var s=this.getAppsArray();if(Array.isArray(s)&&!s.length){return}return n(a,{class:"s-apps-icons"},!this.hideTitle&&n("h3",null,this.appsTitle),n("div",{class:{"s-apps-icons-list":true,vertical:this.vertical}},s.map((function(s,a){return n("a",{key:a,href:s.value,rel:"noreferrer",target:"_blank",class:"s-apps-icons-item",id:"app-slot",innerHTML:t.appSlot.replace(/\{icon\}/g,salla.url.cdn("images/".concat(s.name,".png"))).replace(/\{name\}/g,s.name)})}))))};t.prototype.componentDidRender=function(){var t;(t=this.host.querySelector('[slot="app"]'))===null||t===void 0?void 0:t.remove()};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());e.style=r}}}));
|
|
5
|
+
//# sourceMappingURL=p-65c74d07.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,g as o}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as e,g as o}from"./p-Qk6_ks1N.js";const i='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;-webkit-transform:translateX(-39%);transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){-webkit-transform:translateX(-72%);transform:translateX(-72%)}';const s=class{constructor(e){t(this,e);this.show=false;this.targetElement=null}handleMouseOver(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=true}}handleMouseOut(t){if(this.targetElement&&this.targetElement.contains(t.target)){this.show=false}}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){return e("div",{key:"87a485eeb144377502782b6a7ac61417349423e2",class:"s-tooltip-container"},e("slot",{key:"8329e929fce52cd2ef4f9258548770576e67ee96"}),this.show&&e("div",{key:"18f9cd55110713d0b472601dc0a9ef20dd31af19",class:"s-tooltip-item"},this.text))}get el(){return o(this)}};s.style=i;export{s as salla_tooltip};
|
|
5
|
+
//# sourceMappingURL=p-65ee4bcd.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-DdFhEMb6.system.js","./p-C2rVu_Jb.system.js"],(function(c){"use strict";var a,e,t,i,s,d,n;return{setters:[function(c){a=c.r;e=c.c;t=c.h;i=c.H;s=c.g},function(c){d=c.p;n=c.m}],execute:function(){var o="";var r=c("salla_accordion_head",function(){function c(c){a(this,c);this.accordionToggle=e(this,"accordionToggle");this.collapsible=false;this.collapsed=true}c.prototype.emitCollapsePanel=function(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})};c.prototype.toggleCollapse=function(){var c,a,e;if(!this.collapsible)return;this.collapsed=!this.collapsed;(c=this.host.parentElement)===null||c===void 0?void 0:c.setAttribute("data-collapsed",this.collapsed.toString());(e=(a=this.host.parentElement)===null||a===void 0?void 0:a.querySelector("salla-accordion-body"))===null||e===void 0?void 0:e.setAttribute("data-collapsed",this.collapsed.toString());this.emitCollapsePanel()};c.prototype.render=function(){var c=this;return t(i,{key:"9bb7ad4ad615f5316968b48839b2433619bd3850","data-collapsed":this.collapsed.toString(),onClick:function(){return c.toggleCollapse()},class:"s-accordion-head-wrapper"},t("div",{key:"6826492e1c552440d6407435dfe4e0ca3915cdf4",class:"s-accordion-head-wrapper-start"},t("slot",{key:"2c19c500b57444ac8f69c2f64616904a819f54da",name:"title"}),t("slot",{key:"a6ed0daccd969ec94128f5f749ccddfa9f62e5d3",name:"subtitle"})),t("div",{key:"ddeff9dcacc42028d272298371c721ce00039176",class:"s-accordion-head-wrapper-end"},t("slot",{key:"daa4d8c9db6484f3fc67cf855250c5bc3cc59314",name:"notification"}),this.collapsible&&t("button",{key:"2bcc66dc07c3ae1ea9a31fbd0c7b8204f1eca2be",class:{"s-accordion-head-wrapper-toggle":true,active:!this.collapsed},onClick:function(a){a.stopPropagation();c.toggleCollapse()}},t("span",{key:"2853844a2fbc662c002f7e2cacb299874c9debb3",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?d:n}))))};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());r.style=o}}}));
|
|
5
|
+
//# sourceMappingURL=p-66f0d009.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,a,e,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,a,e,n){function r(t){return t instanceof e?t:new e((function(a){a(t)}))}return new(e||(e=Promise))((function(e,i){function s(t){try{o(n.next(t))}catch(t){i(t)}}function u(t){try{o(n["throw"](t))}catch(t){i(t)}}function o(t){t.done?e(t.value):r(t.value).then(s,u)}o((n=n.apply(t,a||[])).next())}))};var __generator=this&&this.__generator||function(t,a){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(a){return o([t,a])}}function o(u){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(n=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=a.call(t,e)}catch(t){u=[6,t];r=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DdFhEMb6.system.js"],(function(t){"use strict";var a,e,n,r;return{setters:[function(t){a=t.r;e=t.h;n=t.H;r=t.g}],execute:function(){var i="";var s=t("salla_metadata",function(){function t(t){a(this,t);this.entity="product";this.specs=[];this.download=salla.lang.get("pages.thank_you.download");if(this.entityId){try{this.entityId=Array.isArray(this.entityId)?this.entityId:JSON.parse(this.entityId);return}catch(t){salla.log("Bad json passed via entityId prop")}}}t.prototype.getValue=function(t){if(t.type==="file"){return'<a href="'.concat(t.value,'" class="text-primary" target="_blank"><span class="sicon-download"></span> ').concat(this.download,"</a>")}if(t.type==="url"){return'<a href="'.concat(t.value,'" class="text-blue-700 underline" target="_blank">').concat(t.value,"</a>")}if(t.type==="date"){var a=new Date(t.value);var e=String(a.getDate()).padStart(2,"0");var n=String(a.getMonth()+1).padStart(2,"0");var r=a.getFullYear();var i="".concat(e,"/").concat(n,"/").concat(r);return i}return t.value};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,a,e;return __generator(this,(function(n){switch(n.label){case 0:return[4,salla.onReady()];case 1:n.sent();if(!((t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("custom-fields"))){return[2,salla.logger.error("feature custom-fields is not activated")]}if(!this.entityId&&(salla.url.is_page("product.single")||salla.url.is_page("product.showNewUrls"))){this.entityId=salla.config.get("page.id")}if(!this.entityId){return[2,salla.logger.error("can't render salla-metadata without enity-id prop!")]}return[4,salla.lang.onLoaded()];case 2:n.sent();this.download=salla.lang.get("pages.thank_you.download");return[4,Salla.api.metadata.fetchValues(this.entity,this.entityId)];case 3:e=n.sent();this.specs=(a=e.data[0])===null||a===void 0?void 0:a.sections;return[2]}}))}))};t.prototype.render=function(){var t=this;if(!this.specs.length){return}return e(n,{class:"s-metadata-wrapper"},this.specs.map((function(a){return e("div",{class:"s-metadata-box"},e("div",{class:"s-metadata-box-header"},e("i",{class:"sicon-list"}),a.name),a.fields.map((function(a){return e("div",{class:"s-metadata-row"},e("p",{class:"s-metadata-row-name"},a.name),e("p",{class:"s-metadata-row-value",innerHTML:t.getValue(a)}))})))})))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());s.style=i}}}));
|
|
5
|
+
//# sourceMappingURL=p-69c4dc57.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,g as o}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as t,h as s,g as o}from"./p-Qk6_ks1N.js";import{H as e}from"./p-DVKz7ZDb.js";import"./p-CgtvEd63.js";const r=":host{display:block}";const a=class{constructor(s){t(this,s);this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more");this.languageCode=salla.lang.locale;this.orders=[];salla.lang.onLoaded((()=>{this.languageCode=salla.lang.locale;this.orderNumberText=salla.lang.get("pages.thank_you.order_id");this.totalOrderText=salla.lang.get("pages.orders.total");this.orderDateText=salla.lang.get("pages.orders.date");this.orderStatusText=salla.lang.get("pages.orders.status");this.noOrderText=salla.lang.get("pages.orders.non_orders");this.load_more_text_trans=salla.lang.get("common.elements.load_more")}))}loading(t=true){var s;let o=(s=this.status)===null||s===void 0?void 0:s.querySelector(".s-button-text");if(o){e.toggleElementClassIf(o,"s-button-hide","s-button-show",(()=>t));this.btnLoader.style.display=t?"inherit":"none"}}initiateInfiniteScroll(){var t,s,o;if(!this.hasInfiniteScroll){return}if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>this.nextPage,history:false,nextPage:this.nextPage,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(t=>{this.loading()}));(s=this.infiniteScroll)===null||s===void 0?void 0:s.on("load",(t=>{var s,o;this.loading(false);this.pagination=t.pagination;this.nextPage=((o=(s=t.pagination)===null||s===void 0?void 0:s.links)===null||o===void 0?void 0:o.next)||null;this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));let r=this.host.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(r)}));(o=this.infiniteScroll)===null||o===void 0?void 0:o.on("error",(t=>{salla.logger.error("Error loading more comments:",t)}))}async loadMore(){this.infiniteScroll.loadNextPage()}handleResponse(t){return t.map((t=>this.getSingleOrderItem(t)))}async loadInitialData(){const t=new URL(window.location.href);await salla.order.api.fetch(Object.assign(Object.assign({},this.params),{types:[""],feedback_status:t.searchParams.get("feedback_status")})).then((t=>{var s,o,r,a;this.orders=t.data;this.hasInfiniteScroll=!!((s=t.pagination)===null||s===void 0?void 0:s.links.next);this.pagination=t.pagination;this.total=(o=t.pagination)===null||o===void 0?void 0:o.total;this.nextPage=((a=(r=t.pagination)===null||r===void 0?void 0:r.links)===null||a===void 0?void 0:a.next)||null;if(!this.orders.length){this.showPlaceholder=true;return this.loading(false)}setTimeout((()=>{this.handleResponse(t.data).forEach((t=>{this.wrapper.append(t)}));this.initiateInfiniteScroll();let s=this.wrapper.querySelectorAll(".s-orders-table-tbody-tr:not(.animated)");e.animateItems(s)}),100)})).catch((t=>{this.showPlaceholder=true;this.loading(false);salla.logger.error(t)}))}getSingleOrderItem(t){const s=document.createElement("tr");s.classList.add("s-orders-table-tbody-tr","s-orders-table-tbody-tr-shadow");const o=document.createElement("td");o.classList.add("s-orders-table-tbody-tr-td");const r=document.createElement("div");r.classList.add("s-orders-table-tbody-tr-td-content");const a=document.createElement("span");a.classList.add("s-orders-mobile-title");a.textContent=this.orderNumberText+":";const i=document.createElement("span");i.classList.add("s-orders-reference-id");i.textContent="#"+t.reference_id;r.appendChild(a);r.appendChild(i);if(t.source=="buy_as_gift"){const t=document.createElement("i");t.classList.add("sicon-gift-sharing","s-orders-buy-as-gift-icon");r.appendChild(t)}const n=document.createElement("a");n.href=t.url;r.appendChild(n);const l=document.createElement("div");l.classList.add("s-orders-copy-to-clipboard-button");const d=document.createElement("salla-button");d.classList.add("relative");d.setAttribute("color","dark");d.setAttribute("shape","link");d.dataset.content=t.reference_id.toString();d.addEventListener("click",(t=>{e.copyToClipboard(t);e.toggleElementClassIf(d,"copied","code-to-copy",(()=>true));setTimeout((()=>{e.toggleElementClassIf(d,"code-to-copy","copied",(()=>true))}),1e3)}));const c=document.createElement("span");c.textContent="#"+t.reference_id;const h=document.createElement("i");h.classList.add("sicon-swap-stroke","s-orders-copy-to-clipboard-button-icon");let u=salla.config.get("theme.is_rtl",true);if(u){d.appendChild(h);d.appendChild(c)}else{d.appendChild(c);d.appendChild(h)}l.appendChild(d);r.appendChild(l);o.appendChild(r);s.appendChild(o);const b=document.createElement("td");b.classList.add("s-orders-table-tbody-tr-td");const m=document.createElement("div");m.classList.add("s-orders-table-tbody-tr-td-content");const p=document.createElement("span");p.classList.add("s-orders-mobile-title");p.textContent=this.totalOrderText+":";const v=document.createElement("div");v.innerHTML=salla.money(t.total);const f=document.createElement("a");f.href=t.url;m.appendChild(p);m.appendChild(v);m.appendChild(f);b.appendChild(m);s.appendChild(b);const y=document.createElement("td");y.classList.add("s-orders-table-tbody-tr-td");const g=document.createElement("div");g.classList.add("s-orders-table-tbody-tr-td-content");const _=document.createElement("span");_.classList.add("s-orders-mobile-title");_.textContent=this.orderDateText+":";const k=document.createElement("div");k.textContent=e.formatDateFromString(t.created_at.date,salla.helpers.number,this.languageCode);const w=document.createElement("a");w.href=t.url;g.appendChild(_);g.appendChild(k);g.appendChild(w);y.appendChild(g);s.appendChild(y);const x=document.createElement("td");x.classList.add("s-orders-table-tbody-tr-td");const j=document.createElement("div");j.classList.add("s-orders-table-tbody-tr-td-content");const C=document.createElement("span");C.classList.add("s-orders-mobile-title");C.textContent=this.orderStatusText+":";const D=document.createElement("span");D.classList.add("s-orders-status-container");D.style.color=t.status.color;const I=document.createElement("i");I.classList.add(t.status.icon);const O=document.createElement("span");O.textContent=t.status.name;D.appendChild(I);D.appendChild(O);j.appendChild(C);j.appendChild(D);const T=document.createElement("i");T.classList.add("sicon-star2","s-orders-status-rated",t.is_rated?"s-orders-rated-text":"s-orders-unrated-text");j.appendChild(T);const E=document.createElement("a");E.href=t.url;j.appendChild(E);x.appendChild(j);s.appendChild(x);return s}render(){var t;if(this.showPlaceholder){return s("div",{class:"s-orders-no-content"},s("i",{class:"sicon-packed-box icon"}),s("p",null,this.noOrderText))}return s("div",{class:"s-orders-wrapper"},s("table",{class:"s-orders-table"},s("thead",{class:"s-orders-table-head"},s("tr",{class:"s-orders-table-head-tr"},s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderNumberText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.totalOrderText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderDateText),s("th",{class:"s-orders-table-head-tr-th",scope:"col"},this.orderStatusText))),s("tbody",{class:"s-orders-table-tbody",ref:t=>this.wrapper=t})),this.nextPage&&s("div",{class:"s-infinite-scroll-wrapper",ref:t=>this.status=t},s("button",{onClick:()=>this.loadMore(),class:"s-infinite-scroll-btn s-button-btn s-button-primary"},s("span",{class:"s-button-text s-infinite-scroll-btn-text"},(t=this.loadMoreText)!==null&&t!==void 0?t:this.load_more_text_trans),s("span",{class:"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader",ref:t=>this.btnLoader=t,style:{display:"none"}}))))}componentWillLoad(){return salla.onReady().then((()=>this.loadInitialData())).then((()=>this.initiateInfiniteScroll()))}get host(){return o(this)}};a.style=r;export{a as salla_orders};
|
|
5
|
+
//# sourceMappingURL=p-824f1195.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as e}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as i,h as e}from"./p-Qk6_ks1N.js";const a="";const t=class{constructor(e){i(this,e)}render(){return e("a",{key:"f4818ac9b7dc2573dd1ac8aa31aabc82454ea439",href:this.notification.url,class:{"s-notifications-item":true,"s-notifications-item-shadow":true,"s-notifications-item-read":!this.notification.is_new}},e("span",{key:"3766a4eb835408bf293054be3e04a561e1510728",class:"s-notifications-item-icon"},e("i",{key:"e9b1e4a18f22e765053b7d62f83a4af6e426bd47",class:{"s-notifications-item-icon sicon-bell-ring":true,"s-notifications-item-icon-new":this.notification.is_new}})),e("div",{key:"2005bcf68b61bb0aa5606480f703e4ee4cfbd415",class:"s-notifications-item-content"},e("div",{key:"a60fdc96431899c0c3183512ea81477f52e550d0",class:"s-notifications-item-content-leading"},e("h4",{key:"fb0eb1efe08440a1e2c12dc1af263adba0413d2b"},this.notification.title),e("p",{key:"c32790ad29bd267323d86e5c3abdec1ab75c09b2"},this.notification.sub_title)),e("span",{key:"e8fbfea5e91fe7d16c489a285502eaab08b16fd5",class:"s-notifications-item-content-trailing"},e("i",{key:"ea9fb9cf6ac2f9c84cde152fa1381e884971cba4",class:"sicon-time s-notifications-item-content-trailing-icon"}),e("span",{key:"1fb25f1463210c8ab467dff8aea22d9c4510301c"},this.notification.date))))}};t.style=a;export{t as salla_notification_item};
|
|
5
|
+
//# sourceMappingURL=p-84013163.entry.js.map
|