@salla.sa/twilight-components 2.14.233 → 2.14.234
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-kgudP8z9.js → app-globals-B7QiJQe8.js} +3 -3
- package/dist/cjs/{app-globals-kgudP8z9.js.map → app-globals-B7QiJQe8.js.map} +1 -1
- package/dist/cjs/{index-C4OGyni4.js → index-Dm36Q4mL.js} +4 -4
- package/dist/cjs/index-Dm36Q4mL.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 +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 +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/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/esm/{app-globals-VHJXHc9G.js → app-globals-Bc6KUTI9.js} +3 -3
- package/dist/esm/{app-globals-VHJXHc9G.js.map → app-globals-Bc6KUTI9.js.map} +1 -1
- package/dist/esm/{index-CEe15jb6.js → index-BGDvJS4B.js} +4 -4
- package/dist/esm/index-BGDvJS4B.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 +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 +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-VHJXHc9G.js → app-globals-Bc6KUTI9.js} +2 -2
- package/dist/esm-es5/{app-globals-VHJXHc9G.js.map → app-globals-Bc6KUTI9.js.map} +1 -1
- package/dist/esm-es5/{index-CEe15jb6.js → index-BGDvJS4B.js} +3 -3
- package/dist/esm-es5/index-BGDvJS4B.js.map +1 -0
- 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 +4 -4
- 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 +1 -1
- 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-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 +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-194b165d.entry.js → p-06e9ca51.entry.js} +2 -2
- package/dist/twilight/{p-af325218.system.entry.js → p-08367106.system.entry.js} +2 -2
- package/dist/twilight/p-0e06403d.system.entry.js +5 -0
- package/dist/twilight/{p-d38397c6.system.entry.js → p-0e4d6578.system.entry.js} +3 -3
- package/dist/twilight/{p-1145182e.system.entry.js → p-142d93ea.system.entry.js} +2 -2
- package/dist/twilight/{p-9d6b77ff.entry.js → p-14f592cd.entry.js} +2 -2
- package/dist/twilight/{p-95a138bc.entry.js → p-16651719.entry.js} +2 -2
- package/dist/twilight/{p-d4c8288b.system.entry.js → p-18ec24bd.system.entry.js} +2 -2
- package/dist/twilight/{p-96430f54.entry.js → p-1df16bce.entry.js} +2 -2
- package/dist/twilight/{p-BO9YOlVP.system.js.map → p-1lyo6Pde.system.js.map} +1 -1
- package/dist/twilight/{p-Byn-sYFP.system.js.map → p-1qW5pWjC.system.js.map} +1 -1
- package/dist/twilight/{p-b396d78c.system.entry.js → p-2328ea5c.system.entry.js} +2 -2
- package/dist/twilight/{p-39d1f3d1.entry.js → p-239a3511.entry.js} +2 -2
- package/dist/twilight/{p-f187021b.system.entry.js → p-29bee9b3.system.entry.js} +2 -2
- package/dist/twilight/{p-3b75e437.entry.js → p-2f461ddb.entry.js} +2 -2
- package/dist/twilight/{p-f8595d00.system.entry.js → p-36ef2d7c.system.entry.js} +2 -2
- package/dist/twilight/{p-6ecc0c53.system.entry.js → p-3980c4f2.system.entry.js} +2 -2
- package/dist/twilight/{p-d08b79aa.entry.js → p-3bd05448.entry.js} +2 -2
- package/dist/twilight/{p-ae0a1e1c.entry.js → p-406e6701.entry.js} +2 -2
- package/dist/twilight/{p-bb48cfd3.entry.js → p-46542cea.entry.js} +2 -2
- package/dist/twilight/{p-ceec4af2.entry.js → p-49e1ed5f.entry.js} +2 -2
- package/dist/twilight/{p-43bf45df.entry.js → p-4ca26309.entry.js} +2 -2
- package/dist/twilight/{p-af61d094.entry.js → p-5238d329.entry.js} +2 -2
- package/dist/twilight/{p-ba85f8b7.entry.js → p-5a20b7de.entry.js} +2 -2
- package/dist/twilight/{p-846f23ea.system.entry.js → p-5af30e4f.system.entry.js} +2 -2
- package/dist/twilight/{p-7f6b4c27.entry.js → p-5b14396a.entry.js} +2 -2
- package/dist/twilight/{p-b1ac1932.entry.js → p-5ba64405.entry.js} +2 -2
- package/dist/twilight/{p-9cb24c69.entry.js → p-5c2e4d49.entry.js} +6 -6
- package/dist/twilight/{p-ca590a3e.entry.js → p-69b677ce.entry.js} +2 -2
- package/dist/twilight/{p-Bm1W_Atm.system.js.map → p-6OQSnDdn.system.js.map} +1 -1
- package/dist/twilight/{p-BZCE0dGR.system.js.map → p-6rqe-bcW.system.js.map} +1 -1
- package/dist/twilight/p-746111b0.entry.js +5 -0
- package/dist/twilight/{p-2cae0041.entry.js → p-7ae3b822.entry.js} +2 -2
- package/dist/twilight/{p-1bd73f1a.system.entry.js → p-7fd8e66d.system.entry.js} +2 -2
- package/dist/twilight/{p-b07c7068.system.entry.js → p-82581948.system.entry.js} +2 -2
- package/dist/twilight/{p-7c3f8c80.system.entry.js → p-82d58cac.system.entry.js} +2 -2
- package/dist/twilight/{p-063c51ce.system.entry.js → p-840a3ca1.system.entry.js} +2 -2
- package/dist/twilight/{p-0d410804.system.entry.js → p-891d733c.system.entry.js} +2 -2
- package/dist/twilight/{p-eb007475.system.entry.js → p-89503256.system.entry.js} +2 -2
- package/dist/twilight/{p-8d39ed3b.system.entry.js → p-89612b51.system.entry.js} +2 -2
- package/dist/twilight/{p-946e11c2.entry.js → p-8b51924d.entry.js} +2 -2
- package/dist/twilight/{p-28cb0615.entry.js → p-91e651dc.entry.js} +2 -2
- package/dist/twilight/{p-a6bad12e.system.entry.js → p-934eb5e4.system.entry.js} +2 -2
- package/dist/twilight/{p-48c4a52b.system.entry.js → p-9533659e.system.entry.js} +2 -2
- package/dist/twilight/{p-6104d666.system.entry.js → p-9ee6a212.system.entry.js} +2 -2
- package/dist/twilight/{p-CTyTAQuA.system.js → p-B4Aq4JzL.system.js} +2 -2
- package/dist/twilight/{p-CTyTAQuA.system.js.map → p-B4Aq4JzL.system.js.map} +1 -1
- package/dist/twilight/{p-CEe15jb6.js → p-BGDvJS4B.js} +3 -3
- package/dist/twilight/p-BGDvJS4B.js.map +1 -0
- package/dist/twilight/{p-Cpc9rVv6.system.js.map → p-BJ5kEVBM.system.js.map} +1 -1
- package/dist/twilight/{p-gY_RwSP3.system.js.map → p-BR5YrQPp.system.js.map} +1 -1
- package/dist/twilight/{p-C8q5N0LD.system.js.map → p-BRRkNit3.system.js.map} +1 -1
- package/dist/twilight/{p-BbdSDDJi.system.js.map → p-BYnJGJbC.system.js.map} +1 -1
- package/dist/twilight/{p-BbWxnwxo.system.js.map → p-BpYBd4mw.system.js.map} +1 -1
- package/dist/twilight/{p-Dr1vV7dC.system.js.map → p-BunuIUpx.system.js.map} +1 -1
- package/dist/twilight/{p-DemaZqvR.system.js.map → p-CGrj4ciQ.system.js.map} +1 -1
- package/dist/twilight/{p-Dk7KCjx6.system.js.map → p-CZNp3uap.system.js.map} +1 -1
- package/dist/twilight/{p-Cup65oAI.system.js.map → p-CZyJ6ROC.system.js.map} +1 -1
- package/dist/twilight/{p-C7BKMKUF.system.js → p-Ccha-ZJF.system.js} +3 -3
- package/dist/twilight/p-Ccha-ZJF.system.js.map +1 -0
- package/dist/twilight/{p-CfWppqUF.system.js.map → p-Ck04JyIY.system.js.map} +1 -1
- package/dist/twilight/{p-DKBeFj36.system.js.map → p-D2hkuzdE.system.js.map} +1 -1
- package/dist/twilight/{p-CoUcEBRt.system.js.map → p-D5Qq7J1v.system.js.map} +1 -1
- package/dist/twilight/{p-HXbp0gAB.system.js.map → p-D5eqRKGl.system.js.map} +1 -1
- package/dist/twilight/{p-BVxu8iQj.system.js.map → p-DAKY9unu.system.js.map} +1 -1
- package/dist/twilight/{p-3hel9JIz.system.js.map → p-DFL-a55W.system.js.map} +1 -1
- package/dist/twilight/{p-87MgmIsq.system.js.map → p-DcPjF7dc.system.js.map} +1 -1
- package/dist/twilight/{p-Gf3WxbeX.system.js.map → p-DhNoJ00f.system.js.map} +1 -1
- package/dist/twilight/{p-BLYYDqmi.system.js.map → p-Dk-jCtAE.system.js.map} +1 -1
- package/dist/twilight/{p-B2Gpm2G9.system.js.map → p-Dpk2CSkm.system.js.map} +1 -1
- package/dist/twilight/{p-DZNWYaCd.system.js.map → p-E3pnx_X_.system.js.map} +1 -1
- package/dist/twilight/{p-BDAoMGtk.system.js.map → p-J6BNBy13.system.js.map} +1 -1
- package/dist/twilight/{p-ejZp65iZ.system.js.map → p-McYrcLSR.system.js.map} +1 -1
- package/dist/twilight/{p-BT2h1zhk.system.js.map → p-NhmTUC-v.system.js.map} +1 -1
- package/dist/twilight/{p-5670049b.system.entry.js → p-a86106ef.system.entry.js} +2 -2
- package/dist/twilight/{p-fe2a6dd3.system.entry.js → p-ab2abb1c.system.entry.js} +2 -2
- package/dist/twilight/{p-f0e1b9b2.system.entry.js → p-b30b19df.system.entry.js} +2 -2
- package/dist/twilight/{p-490e5149.system.entry.js → p-b5198abd.system.entry.js} +2 -2
- package/dist/twilight/{p-f2ec5654.system.entry.js → p-b7d2b466.system.entry.js} +2 -2
- package/dist/twilight/{p-b56da6d8.entry.js → p-bbd47250.entry.js} +2 -2
- package/dist/twilight/{p-b854eb91.entry.js → p-c4713d5f.entry.js} +2 -2
- package/dist/twilight/{p-2235b38e.entry.js → p-c90bb4f3.entry.js} +2 -2
- package/dist/twilight/{p-81908b6c.system.entry.js → p-d0d99042.system.entry.js} +2 -2
- package/dist/twilight/{p-6580d3b0.entry.js → p-d2156b50.entry.js} +2 -2
- package/dist/twilight/{p-1dec5f99.entry.js → p-d4f59862.entry.js} +2 -2
- package/dist/twilight/{p-bce05761.system.entry.js → p-da16a332.system.entry.js} +2 -2
- package/dist/twilight/{p-e32f1667.system.entry.js → p-dbfc044f.system.entry.js} +2 -2
- package/dist/twilight/{p-43d07c4b.entry.js → p-dddab5ed.entry.js} +2 -2
- package/dist/twilight/{p-3655d49b.system.entry.js → p-e2208e65.system.entry.js} +2 -2
- package/dist/twilight/{p-eaafcc82.system.entry.js → p-e46999d5.system.entry.js} +2 -2
- package/dist/twilight/{p-c93412b4.entry.js → p-e6cc54d8.entry.js} +2 -2
- package/dist/twilight/{p-cb2f5184.entry.js → p-e7efe7d1.entry.js} +2 -2
- package/dist/twilight/{p-DgU841Ht.system.js.map → p-eeeXvpzF.system.js.map} +1 -1
- package/dist/twilight/{p-4241b175.system.entry.js → p-ef6326a6.system.entry.js} +2 -2
- package/dist/twilight/{p-2ad57293.system.entry.js → p-f21710ed.system.entry.js} +6 -6
- package/dist/twilight/{p-bb43fbeb.entry.js → p-f76565e7.entry.js} +2 -2
- package/dist/twilight/{p-6dcfe8e5.entry.js → p-fafaa257.entry.js} +2 -2
- package/dist/twilight/{p-f990fedc.entry.js → p-fe0ff20e.entry.js} +2 -2
- package/dist/twilight/{p-9f503d87.system.entry.js → p-fe5073bc.system.entry.js} +2 -2
- package/dist/twilight/{p-733fa702.entry.js → p-ffdf55a7.entry.js} +2 -2
- package/dist/twilight/{p-DX4N6wDH.system.js → p-jWuwTxY0.system.js} +2 -2
- package/dist/twilight/{p-DX4N6wDH.system.js.map → p-jWuwTxY0.system.js.map} +1 -1
- package/dist/twilight/{p-BW9AwcdU.system.js.map → p-mC1G5s_O.system.js.map} +1 -1
- package/dist/twilight/{p-DAAkQi8n.system.js.map → p-mSklqBuH.system.js.map} +1 -1
- package/dist/twilight/{p-BXqFGvOy.system.js.map → p-nulEO5dR.system.js.map} +1 -1
- package/dist/twilight/{p-B1rSs9_9.system.js.map → p-oiDeuDfZ.system.js.map} +1 -1
- package/dist/twilight/{p-Drg-Jaud.system.js.map → p-rM8rGF9K.system.js.map} +1 -1
- package/dist/twilight/{p-DvnjcO4b.system.js.map → p-v2SW5PkK.system.js.map} +1 -1
- package/dist/twilight/{p-BrkHvQrk.js → p-zeKXLVHw.js} +2 -2
- package/dist/twilight/{p-BrkHvQrk.js.map → p-zeKXLVHw.js.map} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/index-C4OGyni4.js.map +0 -1
- package/dist/esm/index-CEe15jb6.js.map +0 -1
- package/dist/esm-es5/index-CEe15jb6.js.map +0 -1
- package/dist/twilight/p-582c3b1c.entry.js +0 -5
- package/dist/twilight/p-C7BKMKUF.system.js.map +0 -1
- package/dist/twilight/p-CEe15jb6.js.map +0 -1
- package/dist/twilight/p-e730ec58.system.entry.js +0 -5
- /package/dist/twilight/{p-194b165d.entry.js.map → p-06e9ca51.entry.js.map} +0 -0
- /package/dist/twilight/{p-af325218.system.entry.js.map → p-08367106.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e730ec58.system.entry.js.map → p-0e06403d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d38397c6.system.entry.js.map → p-0e4d6578.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-1145182e.system.entry.js.map → p-142d93ea.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9d6b77ff.entry.js.map → p-14f592cd.entry.js.map} +0 -0
- /package/dist/twilight/{p-95a138bc.entry.js.map → p-16651719.entry.js.map} +0 -0
- /package/dist/twilight/{p-d4c8288b.system.entry.js.map → p-18ec24bd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-96430f54.entry.js.map → p-1df16bce.entry.js.map} +0 -0
- /package/dist/twilight/{p-b396d78c.system.entry.js.map → p-2328ea5c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-39d1f3d1.entry.js.map → p-239a3511.entry.js.map} +0 -0
- /package/dist/twilight/{p-f187021b.system.entry.js.map → p-29bee9b3.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3b75e437.entry.js.map → p-2f461ddb.entry.js.map} +0 -0
- /package/dist/twilight/{p-f8595d00.system.entry.js.map → p-36ef2d7c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6ecc0c53.system.entry.js.map → p-3980c4f2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-d08b79aa.entry.js.map → p-3bd05448.entry.js.map} +0 -0
- /package/dist/twilight/{p-ae0a1e1c.entry.js.map → p-406e6701.entry.js.map} +0 -0
- /package/dist/twilight/{p-bb48cfd3.entry.js.map → p-46542cea.entry.js.map} +0 -0
- /package/dist/twilight/{p-ceec4af2.entry.js.map → p-49e1ed5f.entry.js.map} +0 -0
- /package/dist/twilight/{p-43bf45df.entry.js.map → p-4ca26309.entry.js.map} +0 -0
- /package/dist/twilight/{p-af61d094.entry.js.map → p-5238d329.entry.js.map} +0 -0
- /package/dist/twilight/{p-ba85f8b7.entry.js.map → p-5a20b7de.entry.js.map} +0 -0
- /package/dist/twilight/{p-846f23ea.system.entry.js.map → p-5af30e4f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7f6b4c27.entry.js.map → p-5b14396a.entry.js.map} +0 -0
- /package/dist/twilight/{p-b1ac1932.entry.js.map → p-5ba64405.entry.js.map} +0 -0
- /package/dist/twilight/{p-9cb24c69.entry.js.map → p-5c2e4d49.entry.js.map} +0 -0
- /package/dist/twilight/{p-ca590a3e.entry.js.map → p-69b677ce.entry.js.map} +0 -0
- /package/dist/twilight/{p-582c3b1c.entry.js.map → p-746111b0.entry.js.map} +0 -0
- /package/dist/twilight/{p-2cae0041.entry.js.map → p-7ae3b822.entry.js.map} +0 -0
- /package/dist/twilight/{p-1bd73f1a.system.entry.js.map → p-7fd8e66d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b07c7068.system.entry.js.map → p-82581948.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7c3f8c80.system.entry.js.map → p-82d58cac.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-063c51ce.system.entry.js.map → p-840a3ca1.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0d410804.system.entry.js.map → p-891d733c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-eb007475.system.entry.js.map → p-89503256.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8d39ed3b.system.entry.js.map → p-89612b51.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-946e11c2.entry.js.map → p-8b51924d.entry.js.map} +0 -0
- /package/dist/twilight/{p-28cb0615.entry.js.map → p-91e651dc.entry.js.map} +0 -0
- /package/dist/twilight/{p-a6bad12e.system.entry.js.map → p-934eb5e4.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-48c4a52b.system.entry.js.map → p-9533659e.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6104d666.system.entry.js.map → p-9ee6a212.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5670049b.system.entry.js.map → p-a86106ef.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-fe2a6dd3.system.entry.js.map → p-ab2abb1c.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f0e1b9b2.system.entry.js.map → p-b30b19df.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-490e5149.system.entry.js.map → p-b5198abd.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f2ec5654.system.entry.js.map → p-b7d2b466.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-b56da6d8.entry.js.map → p-bbd47250.entry.js.map} +0 -0
- /package/dist/twilight/{p-b854eb91.entry.js.map → p-c4713d5f.entry.js.map} +0 -0
- /package/dist/twilight/{p-2235b38e.entry.js.map → p-c90bb4f3.entry.js.map} +0 -0
- /package/dist/twilight/{p-81908b6c.system.entry.js.map → p-d0d99042.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-6580d3b0.entry.js.map → p-d2156b50.entry.js.map} +0 -0
- /package/dist/twilight/{p-1dec5f99.entry.js.map → p-d4f59862.entry.js.map} +0 -0
- /package/dist/twilight/{p-bce05761.system.entry.js.map → p-da16a332.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-e32f1667.system.entry.js.map → p-dbfc044f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-43d07c4b.entry.js.map → p-dddab5ed.entry.js.map} +0 -0
- /package/dist/twilight/{p-3655d49b.system.entry.js.map → p-e2208e65.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-eaafcc82.system.entry.js.map → p-e46999d5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-c93412b4.entry.js.map → p-e6cc54d8.entry.js.map} +0 -0
- /package/dist/twilight/{p-cb2f5184.entry.js.map → p-e7efe7d1.entry.js.map} +0 -0
- /package/dist/twilight/{p-4241b175.system.entry.js.map → p-ef6326a6.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2ad57293.system.entry.js.map → p-f21710ed.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-bb43fbeb.entry.js.map → p-f76565e7.entry.js.map} +0 -0
- /package/dist/twilight/{p-6dcfe8e5.entry.js.map → p-fafaa257.entry.js.map} +0 -0
- /package/dist/twilight/{p-f990fedc.entry.js.map → p-fe0ff20e.entry.js.map} +0 -0
- /package/dist/twilight/{p-9f503d87.system.entry.js.map → p-fe5073bc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-733fa702.entry.js.map → p-ffdf55a7.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,i,n,e){function r(t){return t instanceof n?t:new n((function(i){i(t)}))}return new(n||(n=Promise))((function(n,s){function o(t){try{a(e.next(t))}catch(t){s(t)}}function u(t){try{a(e["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):r(t.value).then(o,u)}a((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(i){return a([t,i])}}function a(u){if(e)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(n=0)),n)try{if(e=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;r=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1];s=u;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(u);break}if(s[2])n.ops.pop();n.trys.pop();continue}u=i.call(t,n)}catch(t){u=[6,t];r=0}finally{e=s=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-Ccha-ZJF.system.js","./p-Be8TJdpm.system.js"],(function(t){"use strict";var i,n,e,r,s,o;return{setters:[function(t){i=t.r;n=t.c;e=t.h;r=t.H;s=t.g},function(t){o=t.M}],execute:function(){var u='\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>android-phone</title>\n<path d="M22.667 0h-13.333c-2.941 0-5.333 2.392-5.333 5.333v21.333c0 2.941 2.392 5.333 5.333 5.333h13.333c2.941 0 5.333-2.392 5.333-5.333v-21.333c0-2.941-2.392-5.333-5.333-5.333zM25.333 26.667c0 1.471-1.196 2.667-2.667 2.667h-13.333c-1.471 0-2.667-1.196-2.667-2.667v-2.667h18.667zM25.333 21.333h-18.667v-16c0-1.471 1.196-2.667 2.667-2.667h13.333c1.471 0 2.667 1.196 2.667 2.667zM13.333 28h5.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"></path>\n</svg>\n';var a="salla-verify{display:block}.s-verify-input{}.s-verify-input::-webkit-outer-spin-button,.s-verify-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.s-verify-input[type=number]{-moz-appearance:textfield}";var f=t("salla_verify",function(){function t(t){var e=this;i(this,t);this.verified=n(this,"verified");this.translationLoaded=false;this.display="modal";this.type="mobile";this.autoReload=true;this.supportWebAuth=true;this.resendAfter=30;this.isProfileVerify=false;salla.lang.onLoaded((function(){var t;e.translationLoaded=true;e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+e.type);(t=e.modal)===null||t===void 0?void 0:t.setTitle(e.title)}));if(this.display=="inline"){this.modal={open:function(){return""},close:function(){return""},setTitle:function(){return""}};return}salla.event.on("profile::verification",(function(t){var i;var n=Array.isArray(t)?t[0]:t;e.isProfileVerify=true;e.open(n);e.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+n.type);(i=e.modal)===null||i===void 0?void 0:i.setTitle(e.title)}));salla.event.on("modalClosed",(function(){e.resendAfter=0;e.timer.innerHTML="30 : 00"}))}t.prototype.splitNumber=function(t){this.resetError();var i=t.data||t.target.value;if(!i)return;if(i.length===1)return;this.modifyNext(t.target,i)};t.prototype.modifyNext=function(t,i){t.value=i[0];i=i.substring(1);if(t.nextElementSibling&&i.length){this.modifyNext(t.nextElementSibling,i)}else if(!t.nextElementSibling&&i.length===0){t.focus()}else if(t.nextElementSibling&&i.length===0){t.nextElementSibling.focus()}};t.prototype.checkAllInputs=function(){var t=true;for(var i=0;i<this.otpInputs.length;i++){if(this.otpInputs[i].value===""){t=false}}return t};t.prototype.handleKeyUp=function(t){var i,n,e,r;this.resetError();if(["Alt","Shift","Control","AltGraph","Ctrl"].includes(t.key)){return}var s=t.keyCode||t.charCode;if(t.target.value){(i=t.target.nextElementSibling)===null||i===void 0?void 0:i.focus();(n=t.target.nextElementSibling)===null||n===void 0?void 0:n.select()}else if([8,46].includes(s)){(e=t.target.previousElementSibling)===null||e===void 0?void 0:e.focus();(r=t.target.previousElementSibling)===null||r===void 0?void 0:r.select()}if(t.target.value.length>1){this.splitNumber(t)}};t.prototype.handlePaste=function(t){this.resetError();var i=salla.helpers.number(t.clipboardData.getData("text"))||"";var n=i.replace(/[^0-9]/g,"");n=n.substring(0,this.otpInputs.length);this.otpInputs.forEach((function(t){return t.value=""}));this.modifyNext(this.otpInputs[0],n)};t.prototype.handleInput=function(t){var i=this;this.resetError();salla.helpers.inputDigitsOnly(t.target);if(this.checkAllInputs()){setTimeout((function(){i.toggleOTPSubmit()}),100)}};t.prototype.resetError=function(){this.hasError=false;this.errorMessage=""};t.prototype.handleFocus=function(t){var i;if(t.target===this.firstOtpInput)return;if(((i=this.firstOtpInput)===null||i===void 0?void 0:i.value)==""){this.firstOtpInput.focus()}if(t.target.previousElementSibling.value==""){t.target.previousElementSibling.focus()}};t.prototype.getCode=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.code.value]}))}))};t.prototype.open=function(t){return __awaiter(this,void 0,void 0,(function(){var i,n;var e=this;return __generator(this,(function(r){this.data=t;this.data.type=this.data.type||this.type;this.type=this.data.type;this.resendTimer();this.otpInputs=this.body.querySelectorAll(".s-verify-input");this.firstOtpInput=this.body.querySelector("#otp-1");this.reset();this.resetError();this.display=="modal"&&((i=this.modal)===null||i===void 0?void 0:i.setTitle(this.title));this.modal.open();(n=this.firstOtpInput)===null||n===void 0?void 0:n.addEventListener("input",(function(t){return e.splitNumber(t)}));setTimeout((function(){return e.otpInputs[0].focus()}),100);return[2]}))}))};t.prototype.toggleOTPSubmit=function(){var t=[];this.otpInputs.forEach((function(i){return i.value&&t.push(i.value)}));this.code.value=t.join("");if(t.length===4){this.btn.disable();this.btn.click();return}this.btn.enable()};t.prototype.reset=function(){this.otpInputs.forEach((function(t){return t.value=""}));this.code.value="";this.otpInputs[0].focus()};t.prototype.resendTimer=function(){var t=this;this.resendMessage.style.display="block";this.resend.style.display="none";this.resendAfter=30;var i=setInterval((function(){if(t.resendAfter<=0){clearInterval(i);t.resend.style.display="block";t.resendMessage.style.display="none"}else{t.timer.innerHTML="".concat(t.resendAfter>=10?t.resendAfter:"0"+t.resendAfter," : 00");t.resendAfter--}}),1e3)};t.prototype.resendCode=function(){var t=this;return this.btn.stop().then((function(){return t.btn.disable()})).then((function(){t.otpInputs.forEach((function(t){return t.value=""}));t.otpInputs[0].focus()})).then((function(){return salla.api.auth.resend(t.data)})).finally((function(){return t.resendTimer()}))};t.prototype.submit=function(){var t=this;if(this.code.value.length<4){this.otpInputs[this.code.value.length].focus();salla.log("Trying to submit without 4 digits!");return}var i=Object.assign({code:this.code.value},this.data);return this.btn.load().then((function(){return t.btn.disable()})).then((function(){return t.isProfileVerify?salla.profile.verify(i):salla.auth.verify(i,t.supportWebAuth)})).then((function(i){return t.verified.emit(i)})).then((function(){return t.btn.stop()&&t.btn.disable()})).then((function(){return t.modal.close()})).then((function(){return t.autoReload&&window.location.reload()})).catch((function(i){var n,e,r;t.hasError=true;t.errorMessage=((r=(e=(n=i.response)===null||n===void 0?void 0:n.data)===null||e===void 0?void 0:e.error)===null||r===void 0?void 0:r.message)||salla.lang.get("common.errors.error_occurred");if(!i.response){console.log("Unexpected error",i)}else{salla.logger.error(i)}t.btn.stop()&&t.btn.enable()&&t.reset()}))};t.prototype.render=function(){var t=this;return this.display=="inline"?e(r,null,this.myBody()):e("salla-modal",{width:"xs",class:"s-verify",ref:function(i){return t.modal=i},"modal-title":this.title},e("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:this.type=="mobile"?u:o}),this.myBody())};t.prototype.myBody=function(){var t=this;return e("div",{class:"s-verify-body",ref:function(i){return t.body=i}},e("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),e("slot",{name:"mobile"}),e("slot",{name:"email"}),e("input",{type:"hidden",name:"code",maxlength:"4",required:true,ref:function(i){return t.code=i}}),e("div",{class:{"s-verify-codes":true,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((function(i){return e("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:"otp-".concat(i),class:{"s-verify-input":true,"s-has-error":t.hasError},onInput:function(i){return t.handleInput(i)},onPaste:function(i){return t.handlePaste(i)},onKeyUp:function(i){return t.handleKeyUp(i)},onFocus:function(i){return t.handleFocus(i)},required:true})}))),this.hasError&&this.errorMessage?e("span",{class:"s-verify-error-message"},this.errorMessage):"",e("div",{slot:"footer",class:"s-verify-footer"},e("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:true,onClick:function(){return t.submit()},ref:function(i){return t.btn=i}},salla.lang.get("pages.profile.verify")),e("p",{class:"s-verify-resend-message",ref:function(i){return t.resendMessage=i}},salla.lang.get("blocks.header.resend_after"),e("b",{class:"s-verify-timer",ref:function(i){return t.timer=i}})),e("a",{href:"#",class:"s-verify-resend",onClick:function(){return t.resendCode()},ref:function(i){return t.resend=i}},salla.lang.get("blocks.comments.submit"))),e("slot",{name:"after-footer"}))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());f.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-da16a332.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(r,t,e,i){function n(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,a){function s(r){try{o(i.next(r))}catch(r){a(r)}}function u(r){try{o(i["throw"](r))}catch(r){a(r)}}function o(r){r.done?e(r.value):n(r.value).then(s,u)}o((i=i.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(r){return function(t){return o([r,t])}}function o(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;n=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1];a=u;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(u);break}if(a[2])e.ops.pop();e.trys.pop();continue}u=t.call(r,e)}catch(r){u=[6,r];n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var i=0,n=t.length,a;i<n;i++){if(a||!(i in t)){if(!a)a=Array.prototype.slice.call(t,0,i);a[i]=t[i]}}return r.concat(a||Array.prototype.slice.call(t))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-C7BKMKUF.system.js","./p-B8FGqfEh.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var g;var w;function m(){if(w)return g;w=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}g=e;return g}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,g=false,w=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){g=!!o.leading;w="maxWait"in o;c=w?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return g?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return w?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||w&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function M(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(w){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}M.cancel=E;M.flush=x;return M}k=u;return k}var E;var x;function M(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var S=M();var C=n(S);var j=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=C((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=F(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function F(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var U=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new j(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;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(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());U.style=L}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ccha-ZJF.system.js","./p-B8FGqfEh.system.js","./p-CSGkUch3.system.js","./p-CLqFzsVe.system.js"],(function(r){"use strict";var t,e,i,n,a,s,u,o,f;return{setters:[function(r){t=r.a;e=r.d;i=r.e;n=r.f;a=r.r;s=r.h;u=r.g},function(r){o=r.S},function(r){f=r.H},null],execute:function(){var l;var c;function v(){if(c)return l;c=1;var r=t();var e=function(){return r.Date.now()};l=e;return l}var h;var d;function p(){if(d)return h;d=1;var r=/\s/;function t(t){var e=t.length;while(e--&&r.test(t.charAt(e))){}return e}h=t;return h}var g;var w;function m(){if(w)return g;w=1;var r=p();var t=/^\s+/;function e(e){return e?e.slice(0,r(e)+1).replace(t,""):e}g=e;return g}var y;var b;function _(){if(b)return y;b=1;var r=m(),t=e(),n=i();var a=0/0;var s=/^[-+]0x[0-9a-f]+$/i;var u=/^0b[01]+$/i;var o=/^0o[0-7]+$/i;var f=parseInt;function l(e){if(typeof e=="number"){return e}if(n(e)){return a}if(t(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=t(i)?i+"":i}if(typeof e!="string"){return e===0?e:+e}e=r(e);var l=u.test(e);return l||o.test(e)?f(e.slice(2),l?2:8):s.test(e)?a:+e}y=l;return y}var k;var T;function A(){if(T)return k;T=1;var r=e(),t=v(),i=_();var n="Expected a function";var a=Math.max,s=Math.min;function u(e,u,o){var f,l,c,v,h,d,p=0,g=false,w=false,m=true;if(typeof e!="function"){throw new TypeError(n)}u=i(u)||0;if(r(o)){g=!!o.leading;w="maxWait"in o;c=w?a(i(o.maxWait)||0,u):c;m="trailing"in o?!!o.trailing:m}function y(r){var t=f,i=l;f=l=undefined;p=r;v=e.apply(i,t);return v}function b(r){p=r;h=setTimeout(T,u);return g?y(r):v}function _(r){var t=r-d,e=r-p,i=u-t;return w?s(i,c-e):i}function k(r){var t=r-d,e=r-p;return d===undefined||t>=u||t<0||w&&e>=c}function T(){var r=t();if(k(r)){return A(r)}h=setTimeout(T,_(r))}function A(r){h=undefined;if(m&&f){return y(r)}f=l=undefined;return v}function E(){if(h!==undefined){clearTimeout(h)}p=0;f=d=l=h=undefined}function x(){return h===undefined?v:A(t())}function S(){var r=t(),e=k(r);f=arguments;l=this;d=r;if(e){if(h===undefined){return b(d)}if(w){clearTimeout(h);h=setTimeout(T,u);return y(d)}}if(h===undefined){h=setTimeout(T,u)}return v}S.cancel=E;S.flush=x;return S}k=u;return k}var E;var x;function S(){if(x)return E;x=1;var r=A(),t=e();var i="Expected a function";function n(e,n,a){var s=true,u=true;if(typeof e!="function"){throw new TypeError(i)}if(t(a)){s="leading"in a?!!a.leading:s;u="trailing"in a?!!a.trailing:u}return r(e,n,{leading:s,maxWait:n,trailing:u})}E=n;return E}var C=S();var M=n(C);var j=function(){function r(r){var t=this;this.grid=r;this.create=function(){t.mutationObserver.observe(t.grid,{childList:true});for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];t.resizeObserver.observe(i)}};this.onContainerMutation=function(r){var e=r.flatMap((function(r){return Array.from(r.removedNodes)}));var i=r.flatMap((function(r){return Array.from(r.addedNodes)}));for(var n=0,a=e;n<a.length;n++){var s=a[n];if(s instanceof Element){t.resizeObserver.unobserve(s)}}for(var u=0,o=i;u<o.length;u++){var s=o[u];if(s instanceof Element){t.resizeObserver.observe(s)}}if(e.length>0&&i.length===0){t.update()}};this.onChildrenResize=function(r){var e=r.filter((function(r){return r.target.parentElement!==null}));if(e.length>0){t.update()}};this.update=M((function(){var r=window.getComputedStyle(t.grid);if(r.getPropertyValue("display").includes("grid")===false){t.clean();return}var e=F(t.grid);if(e.length<=1){t.clean();return}var i=Number.parseFloat(r.getPropertyValue("row-gap").trim())||0;var n=Array.from(t.grid.children);for(var a=0;a<e.length;a++){var s=n[a];s===null||s===void 0?void 0:s.style.removeProperty("margin-top")}for(var u=0;u<n.length;u++){var o=n[u-e.length];var f=n[u];if(o!==undefined&&f!==undefined){var l=o.getBoundingClientRect().bottom;f.style.removeProperty("margin-top");var c=f.getBoundingClientRect().top;if(c-i!==l){var v=Math.round((l-(c-i)+Number.EPSILON)*100)/100;f.style.setProperty("margin-top","".concat(v,"px"))}}}}),32);this.destroy=function(){t.resizeObserver.disconnect();t.mutationObserver.disconnect();t.clean()};this.clean=function(){for(var r=0,e=Array.from(t.grid.children);r<e.length;r++){var i=e[r];i.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}r.prototype[Symbol.dispose]=function(){this.destroy()};return r}();function F(r){var t=window.getComputedStyle(r);var e=t.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}var L=":host{display:block}";var q=r("salla_reviews_page",function(){function r(r){a(this,r);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}r.prototype.getUrlParams=function(){var r=new URLSearchParams(window.location.search);return{sort:r.get("sort")||null,page:Number.parseInt(r.get("page"))||1}};r.prototype.updateUrlParams=function(r){var t=new URL(window.location.href);for(var e=0,i=Object.entries(r);e<i.length;e++){var n=i[e],a=n[0],s=n[1];if(s){t.searchParams.set(a,s.toString())}else{t.searchParams.delete(a)}}window.history.replaceState({},"",t.toString())};r.prototype.fetchReviews=function(r,t){var e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:t||e.page||1,sort:r||e.sort||null}})};r.prototype.initializeMasonry=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){r=this.el.querySelector(".s-reviews-page-grid");if(!r)return[2];try{new j(r);salla.logger.info("Masonry initialized successfully")}catch(r){salla.logger.error("Masonry initialization failed:",r)}return[2]}))}))};r.prototype.animateReviewCards=function(){var r=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");f.animateItems(r)};r.prototype.initiateInfiniteScroll=function(){var r=this;var t,e,i;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(){var t,e;return((e=(t=r.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(function(){r.isLoading=true}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("load",(function(t){r.pagination=t.pagination;r.reviews=__spreadArray(__spreadArray([],r.reviews,true),t.data,true);r.isLoading=false;r.updateUrlParams({page:t.pagination.current_page})}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("error",(function(t){salla.logger.error("Error loading more reviews:",t);r.isLoading=false}))};r.prototype.componentDidRender=function(){var r=this;setTimeout((function(){requestAnimationFrame(r.animateReviewCards.bind(r))}),176)};r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,t,e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,salla.onReady()];case 1:n.sent();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");t=this.getUrlParams();return[4,this.fetchReviews(t.sort)];case 2:e=n.sent();this.sort=t.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(r=this.pagination)===null||r===void 0?void 0:r.total);return[3,4];case 3:i=n.sent();salla.logger.error("Error loading reviews:",i);return[3,4];case 4:return[2]}}))}))};r.prototype.handleSorting=function(r){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(i){switch(i.label){case 0:t=r.target.value;this.sort=t;this.updateUrlParams({sort:t,page:1});return[4,this.fetchReviews(t,1)];case 1:e=i.sent();this.reviews=e.data;this.pagination=e.pagination;return[2]}}))}))};r.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,this.initializeMasonry()];case 1:r.sent();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1});return[2]}}))}))};r.prototype.disconnectedCallback=function(){if(this.infiniteScroll){this.infiniteScroll.destroy()}};r.prototype.renderSortingOptions=function(){var r=this;var t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((function(t){return s("option",{key:t.value,value:t.value,selected:t.value===r.sort},t.label)}))};r.prototype.render=function(){var r=this;var t,e;return s("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},s("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},s("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,s("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),s("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},s("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),s("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:function(t){return r.handleSorting(t)},disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?s("main",{class:"s-reviews-page-grid",ref:function(t){r.wrapper=t}},this.reviews.map((function(r){return s("salla-review-card",{key:r.id,review:r})}))):s("div",{class:"s-products-list-placeholder"},s("span",{innerHTML:o}),s("p",null,this.placeholderText)),((e=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||e===void 0?void 0:e.next)&&this.reviews.length?s("div",{class:"s-reviews-page-load-more-container"},s("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:function(){var t;return(t=r.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)};Object.defineProperty(r.prototype,"el",{get:function(){return u(this)},enumerable:false,configurable:true});return r}());q.style=L}}}));
|
|
5
|
+
//# sourceMappingURL=p-dbfc044f.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{a as t,d as i,e,f as s,r,h as a,g as n}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{a as t,d as i,e,f as s,r,h as a,g as n}from"./p-BGDvJS4B.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-DVKz7ZDb.js";import"./p-CgtvEd63.js";var c;var u;function f(){if(u)return c;u=1;var i=t();var e=function(){return i.Date.now()};c=e;return c}var h;var d;function v(){if(d)return h;d=1;var t=/\s/;function i(i){var e=i.length;while(e--&&t.test(i.charAt(e))){}return e}h=i;return h}var p;var m;function g(){if(m)return p;m=1;var t=v();var i=/^\s+/;function e(e){return e?e.slice(0,t(e)+1).replace(i,""):e}p=e;return p}var w;var b;function y(){if(b)return w;b=1;var t=g(),s=i(),r=e();var a=0/0;var n=/^[-+]0x[0-9a-f]+$/i;var o=/^0b[01]+$/i;var l=/^0o[0-7]+$/i;var c=parseInt;function u(i){if(typeof i=="number"){return i}if(r(i)){return a}if(s(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=s(e)?e+"":e}if(typeof i!="string"){return i===0?i:+i}i=t(i);var u=o.test(i);return u||l.test(i)?c(i.slice(2),u?2:8):n.test(i)?a:+i}w=u;return w}var _;var k;function T(){if(k)return _;k=1;var t=i(),e=f(),s=y();var r="Expected a function";var a=Math.max,n=Math.min;function o(i,o,l){var c,u,f,h,d,v,p=0,m=false,g=false,w=true;if(typeof i!="function"){throw new TypeError(r)}o=s(o)||0;if(t(l)){m=!!l.leading;g="maxWait"in l;f=g?a(s(l.maxWait)||0,o):f;w="trailing"in l?!!l.trailing:w}function b(t){var e=c,s=u;c=u=undefined;p=t;h=i.apply(s,e);return h}function y(t){p=t;d=setTimeout(T,o);return m?b(t):h}function _(t){var i=t-v,e=t-p,s=o-i;return g?n(s,f-e):s}function k(t){var i=t-v,e=t-p;return v===undefined||i>=o||i<0||g&&e>=f}function T(){var t=e();if(k(t)){return E(t)}d=setTimeout(T,_(t))}function E(t){d=undefined;if(w&&c){return b(t)}c=u=undefined;return h}function S(){if(d!==undefined){clearTimeout(d)}p=0;c=v=u=d=undefined}function M(){return d===undefined?h:E(e())}function x(){var t=e(),i=k(t);c=arguments;u=this;v=t;if(i){if(d===undefined){return y(v)}if(g){clearTimeout(d);d=setTimeout(T,o);return b(v)}}if(d===undefined){d=setTimeout(T,o)}return h}x.cancel=S;x.flush=M;return x}_=o;return _}var E;var S;function M(){if(S)return E;S=1;var t=T(),e=i();var s="Expected a function";function r(i,r,a){var n=true,o=true;if(typeof i!="function"){throw new TypeError(s)}if(e(a)){n="leading"in a?!!a.leading:n;o="trailing"in a?!!a.trailing:o}return t(i,r,{leading:n,maxWait:r,trailing:o})}E=r;return E}var x=M();var C=s(x);class D{constructor(t){this.grid=t;this.create=()=>{this.mutationObserver.observe(this.grid,{childList:true});for(const t of Array.from(this.grid.children)){this.resizeObserver.observe(t)}};this.onContainerMutation=t=>{const i=t.flatMap((t=>Array.from(t.removedNodes)));const e=t.flatMap((t=>Array.from(t.addedNodes)));for(const t of i){if(t instanceof Element){this.resizeObserver.unobserve(t)}}for(const t of e){if(t instanceof Element){this.resizeObserver.observe(t)}}if(i.length>0&&e.length===0){this.update()}};this.onChildrenResize=t=>{const i=t.filter((t=>t.target.parentElement!==null));if(i.length>0){this.update()}};this.update=C((()=>{const t=window.getComputedStyle(this.grid);if(t.getPropertyValue("display").includes("grid")===false){this.clean();return}const i=A(this.grid);if(i.length<=1){this.clean();return}const e=Number.parseFloat(t.getPropertyValue("row-gap").trim())||0;const s=Array.from(this.grid.children);for(let t=0;t<i.length;t++){const i=s[t];i===null||i===void 0?void 0:i.style.removeProperty("margin-top")}for(let t=0;t<s.length;t++){const r=s[t-i.length];const a=s[t];if(r!==undefined&&a!==undefined){const t=r.getBoundingClientRect().bottom;a.style.removeProperty("margin-top");const i=a.getBoundingClientRect().top;if(i-e!==t){const s=Math.round((t-(i-e)+Number.EPSILON)*100)/100;a.style.setProperty("margin-top",`${s}px`)}}}}),32);this.destroy=()=>{this.resizeObserver.disconnect();this.mutationObserver.disconnect();this.clean()};this.clean=()=>{for(const t of Array.from(this.grid.children)){t.style.removeProperty("margin-top")}};this.mutationObserver=new MutationObserver(this.onContainerMutation);this.resizeObserver=new ResizeObserver(this.onChildrenResize);if(CSS.supports("grid-template-rows","masonry")===false){this.create()}}[Symbol.dispose](){this.destroy()}}function A(t){const i=window.getComputedStyle(t);const e=i.getPropertyValue("grid-template-columns");return e.trim().split(/\s+(?=(?:[^()]*\([^()]*\))*[^()]*$)/)}const L=":host{display:block}";const R=class{constructor(t){r(this,t);this.reviews=[];this.isLoading=false;this.pagination=null;this.sort="latest"}getUrlParams(){const t=new URLSearchParams(window.location.search);return{sort:t.get("sort")||null,page:Number.parseInt(t.get("page"))||1}}updateUrlParams(t){const i=new URL(window.location.href);for(const[e,s]of Object.entries(t)){if(s){i.searchParams.set(e,s.toString())}else{i.searchParams.delete(e)}}window.history.replaceState({},"",i.toString())}fetchReviews(t,i){const e=this.getUrlParams();return salla.api.request("reviews",{params:{type:"products",format:"lite",per_page:8,page:i||e.page||1,sort:t||e.sort||null}})}async initializeMasonry(){const t=this.el.querySelector(".s-reviews-page-grid");if(!t)return;try{new D(t);salla.logger.info("Masonry initialized successfully")}catch(t){salla.logger.error("Masonry initialization failed:",t)}}animateReviewCards(){const t=this.wrapper.querySelectorAll("salla-review-card:not(.animated)");l.animateItems(t)}initiateInfiniteScroll(){var t,i,e;if(!this.wrapper){salla.logger.error("Wrapper is undefined. Cannot initiate infinite scroll.");return}this.infiniteScroll=salla.infiniteScroll.initiate(this.wrapper,this.wrapper,{path:()=>{var t,i;return((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)||null},history:false,scrollThreshold:false},true);(t=this.infiniteScroll)===null||t===void 0?void 0:t.on("request",(()=>{this.isLoading=true}));(i=this.infiniteScroll)===null||i===void 0?void 0:i.on("load",(t=>{this.pagination=t.pagination;this.reviews=[...this.reviews,...t.data];this.isLoading=false;this.updateUrlParams({page:t.pagination.current_page})}));(e=this.infiniteScroll)===null||e===void 0?void 0:e.on("error",(t=>{salla.logger.error("Error loading more reviews:",t);this.isLoading=false}))}componentDidRender(){setTimeout((()=>{requestAnimationFrame(this.animateReviewCards.bind(this))}),176)}async componentWillLoad(){var t;try{await salla.onReady();this.langTitlesReviews=salla.lang.get("common.titles.reviews");this.langSorting=salla.lang.get("pages.categories.sorting");this.placeholderText=salla.lang.choice("pages.rating.reviews",0);this.langLoadMore=salla.lang.get("common.elements.load_more");this.langSortByTopRating=salla.lang.get("pages.testimonials.sort_by_rating_desc");this.langSortByMostRecent=salla.lang.get("pages.testimonials.sort_by_date_desc");this.langSortByLeastRated=salla.lang.get("pages.testimonials.sort_by_rating_asc");this.langSortByLeastRecent=salla.lang.get("pages.testimonials.sort_by_date_asc");const i=this.getUrlParams();const e=await this.fetchReviews(i.sort);this.sort=i.sort;this.reviews=e.data;this.pagination=e.pagination;this.langRatingReviews=salla.lang.choice("pages.rating.reviews",(t=this.pagination)===null||t===void 0?void 0:t.total)}catch(t){salla.logger.error("Error loading reviews:",t)}}async handleSorting(t){const i=t.target.value;this.sort=i;this.updateUrlParams({sort:i,page:1});const e=await this.fetchReviews(i,1);this.reviews=e.data;this.pagination=e.pagination}async componentDidLoad(){await this.initializeMasonry();this.initiateInfiniteScroll();this.sort=this.getUrlParams().sort||"latest";this.updateUrlParams({sort:this.sort,page:1})}disconnectedCallback(){if(this.infiniteScroll){this.infiniteScroll.destroy()}}renderSortingOptions(){const t=[{value:"latest",label:this.langSortByMostRecent},{value:"oldest",label:this.langSortByLeastRecent},{value:"top_rating",label:this.langSortByTopRating},{value:"bottom_rating",label:this.langSortByLeastRated}];return t.map((t=>a("option",{key:t.value,value:t.value,selected:t.value===this.sort},t.label)))}render(){var t,i;return a("host",{key:"2108b6bebdc8a651705e45d169fb10127c3c215e"},a("div",{key:"84972824884151462a1040bdc53c334b733cd7fb",class:"s-reviews-page-header-wrapper"},a("h2",{key:"80905de0950443f7e2b1c28d63bcb7f3fa47dc0c",class:"s-reviews-page-title"},this.langTitlesReviews,a("span",{key:"d51385e66a1dee802786b50d063501b6397ce345",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),a("div",{key:"2fc74d0b61d0377f0d14a5fd15a4d852e6850932",class:"s-reviews-page-filter-wrapper"},a("label",{key:"8d1363a2b2f6722f1c56445b5ba33a98f241b106",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),a("select",{key:"eb27d82e25fa609b25d5ca825381285c0a40cc5b",onChange:t=>this.handleSorting(t),disabled:!this.reviews.length,class:"s-reviews-page-filter"},this.renderSortingOptions()))),this.reviews.length?a("main",{class:"s-reviews-page-grid",ref:t=>{this.wrapper=t}},this.reviews.map((t=>a("salla-review-card",{key:t.id,review:t})))):a("div",{class:"s-products-list-placeholder"},a("span",{innerHTML:o}),a("p",null,this.placeholderText)),((i=(t=this.pagination)===null||t===void 0?void 0:t.links)===null||i===void 0?void 0:i.next)&&this.reviews.length?a("div",{class:"s-reviews-page-load-more-container"},a("salla-button",{class:"s-reviews-page-load-more-btn",loading:this.isLoading,onClick:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()},onKeyUp:()=>{var t;return(t=this.infiniteScroll)===null||t===void 0?void 0:t.loadNextPage()}},this.langLoadMore)):null)}get el(){return n(this)}};R.style=L;export{R as salla_reviews_page};
|
|
5
|
+
//# sourceMappingURL=p-dddab5ed.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-Ccha-ZJF.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-e2208e65.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-Ccha-ZJF.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,s,i,e;return{setters:[function(t){n=t.r;s=t.h;i=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var s=this;n(this,t);var i;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){s.currentSlug=salla.config.get("page.slug")}));this.advSlot=((i=this.host.querySelector('[slot="adv"]'))===null||i===void 0?void 0:i.innerHTML)||'<div class="s-advertisement-content"><h2 class="s-advertisement-content-main">{iconElem}{urlElem}</h2>{closeElem}</div>\n '}t.prototype.isNotVisible=function(t){return!!salla.storage.get("statusAd-".concat(t.id))};t.prototype.setCanDisplayFlag=function(t,n){if(!n){salla.storage.set("statusAd-".concat(t.id),"dismissed");e({targets:this.host,opacity:[1,0],duration:300,height:[this.host.clientHeight,0],easing:"easeInOutQuad"})}};t.prototype.render=function(){var t=this;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}return this.advertisements.map((function(n){return s("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},s("div",{id:"adv-slot",innerHTML:t.advSlot.replace("{iconElem}",'<i class="s-advertisement-content-icon '.concat(n.icon,'"></i>')).replace("{urlElem}",n.url?'<a href="'.concat(n.url,'" target="').concat(n.target,'">').concat(n.description,"</a>"):n.description).replace("{closeElem}",'<button class="s-advertisement-action" aria-label="close-alert"><i class="sicon-cancel"></i></button>').replace("{icon}",n.icon).replace("{url}",n.url).replace("{target}",n.target).replace("{description}",n.description).replace("{bg_color}",n.colors.bg).replace("{text_color}",n.colors.text)}))}))};t.prototype.componentWillLoad=function(){var t=this;return new Promise((function(t){return salla.onReady(t)})).then((function(){return salla.api.advertisement.fetch(t.currentSlug)})).then((function(t){return Array.isArray(t.data)?t.data.find((function(t){return!salla.storage.get("statusAd-".concat(t.id))})):null})).then((function(n){return t.advertisements=n?[n]:[]}))};t.prototype.componentDidRender=function(){var t=this;var n;if(Array.isArray(this.advertisements)&&!this.advertisements.length||!this.advertisements){return}setTimeout((function(){var n=t.host.querySelector(".s-advertisement-action");if(n){n.addEventListener("click",(function(){return t.setCanDisplayFlag(t.advertisements[0],false)}))}}));this.host.querySelectorAll("#adv-slot").forEach((function(t){return t===null||t===void 0?void 0:t.replaceWith(t===null||t===void 0?void 0:t.firstChild)}));(n=this.host.querySelector('[slot="adv"]'))===null||n===void 0?void 0:n.remove();e({targets:this.host,opacity:[0,1],duration:300,height:[0,this.host.clientHeight],easing:"easeInOutQuad"})};Object.defineProperty(t.prototype,"host",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-e46999d5.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-BGDvJS4B.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-e6cc54d8.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-BGDvJS4B.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-e7efe7d1.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-DgU841Ht.system.js","sources":["../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","src/Helpers/masonry-layout.ts","src/components/salla-reviews-page/salla-reviews-page.css?tag=salla-reviews-page","src/components/salla-reviews-page/salla-reviews-page.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from \"lodash/throttle\";\n\nexport class MasonryLayout {\n\tprivate mutationObserver: MutationObserver;\n\tprivate resizeObserver: ResizeObserver;\n\n\tconstructor(private grid: Element) {\n\t\tthis.mutationObserver = new MutationObserver(this.onContainerMutation);\n\t\tthis.resizeObserver = new ResizeObserver(this.onChildrenResize);\n\n\t\tif (CSS.supports(\"grid-template-rows\", \"masonry\") === false) {\n\t\t\tthis.create();\n\t\t}\n\t}\n\n\tprivate create = () => {\n\t\tthis.mutationObserver.observe(this.grid, {\n\t\t\tchildList: true,\n\t\t});\n\n\t\tfor (const item of Array.from(this.grid.children)){\n\t\t\tthis.resizeObserver.observe(item);\n\t\t};\n\t};\n\n\tprivate onContainerMutation = (mutations: MutationRecord[]) => {\n\t\tconst removedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.removedNodes),\n\t\t);\n\t\tconst addedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.addedNodes),\n\t\t);\n\n\t\tfor (const node of removedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.unobserve(node);\n\t\t\t}\n\t\t}\n\n\t\tfor (const node of addedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.observe(node);\n\t\t\t}\n\t\t}\n\n\t\tif (removedNodes.length > 0 && addedNodes.length === 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tprivate onChildrenResize = (entries: ResizeObserverEntry[]) => {\n\t\tconst entriesToUpdate = entries.filter(\n\t\t\t(entry) => entry.target.parentElement !== null,\n\t\t);\n\n\t\tif (entriesToUpdate.length > 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tupdate = throttle(() => {\n\t\tconst computedStyle = window.getComputedStyle(this.grid);\n\n\t\tif (computedStyle.getPropertyValue(\"display\").includes(\"grid\") === false) {\n\t\t\tthis.clean();\n\t\t\treturn;\n\t\t}\n\n\t\tconst columns = parseGridTemplateColumns(this.grid);\n\n\t\tif (columns.length <= 1) {\n\t\t\tthis.clean();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst rowGap =\n\t\t\tNumber.parseFloat(computedStyle.getPropertyValue(\"row-gap\").trim()) || 0;\n\n\t\tconst items = Array.from(this.grid.children) as HTMLElement[];\n\n\t\tfor (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n\t\t\tconst firstItemInColumn = items[columnIndex];\n\n\t\t\tfirstItemInColumn?.style.removeProperty(\"margin-top\");\n\t\t}\n\n\t\tfor (let index = 0; index < items.length; index++) {\n\t\t\tconst prevItem = items[index - columns.length];\n\t\t\tconst nextItem = items[index];\n\n\t\t\tif (prevItem !== undefined && nextItem !== undefined) {\n\t\t\t\tconst prevBottom = prevItem.getBoundingClientRect().bottom;\n\n\t\t\t\tnextItem.style.removeProperty(\"margin-top\");\n\n\t\t\t\tconst nextTop = nextItem.getBoundingClientRect().top;\n\n\t\t\t\tif (nextTop - rowGap !== prevBottom) {\n\t\t\t\t\tconst margin =\n\t\t\t\t\t\tMath.round(\n\t\t\t\t\t\t\t(prevBottom - (nextTop - rowGap) + Number.EPSILON) * 100,\n\t\t\t\t\t\t) / 100;\n\n\t\t\t\t\tnextItem.style.setProperty(\"margin-top\", `${margin}px`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, 32);\n\n\tdestroy = () => {\n\t\tthis.resizeObserver.disconnect();\n\t\tthis.mutationObserver.disconnect();\n\t\tthis.clean();\n\t};\n\n\tprivate clean = () => {\n\t\tfor ( const item of (Array.from(this.grid.children) as HTMLElement[])){\n\t\t\titem.style.removeProperty(\"margin-top\");\n\t\t}\n\t};\n\n\t[Symbol.dispose]() {\n\t\tthis.destroy();\n\t}\n}\n\nfunction parseGridTemplateColumns(grid: Element) {\n\tconst computedStyle = window.getComputedStyle(grid);\n\n\tconst gridTemplateColumns = computedStyle.getPropertyValue(\n\t\t\"grid-template-columns\",\n\t);\n\n\treturn gridTemplateColumns\n\t\t.trim()\n\t\t.split(/\\s+(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/);\n}",":host {\n display: block;\n}","import { Component, State, Element, h } from '@stencil/core';\nimport type { Review } from '../salla-review-card/interfaces';\nimport type { Pagination } from '../../interfaces/common';\nimport ShoppingBag from '../../assets/svg/shopping-bag.svg';\nimport Helper from '../../Helpers/Helper';\nimport { MasonryLayout } from '../../Helpers/masonry-layout';\n\n\n@Component({\n tag: 'salla-reviews-page',\n styleUrl: 'salla-reviews-page.css',\n})\nexport class SallaReviewsPage {\n @Element() el: HTMLElement;\n @State() reviews: Partial<Review>[] = [];\n @State() isLoading = false;\n @State() pagination: Pagination = null;\n @State() sort: \"top_rating\" | \"bottom_rating\" | \"latest\" | \"oldest\" = \"latest\";\n\n // Language variables\n private langTitlesReviews: string;\n private langRatingReviews: string;\n private langSorting: string;\n private langSortByTopRating: string;\n private langSortByMostRecent: string;\n private langSortByLeastRecent: string;\n private langSortByLeastRated: string;\n\n private langLoadMore: string;\n private placeholderText: string;\n\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n private getUrlParams() {\n const params = new URLSearchParams(window.location.search);\n return {\n sort: params.get('sort') as typeof this.sort || null,\n page: Number.parseInt(params.get('page')) || 1\n };\n }\n\n private updateUrlParams(params: { sort?: string, page?: number }) {\n const url = new URL(window.location.href);\n for (const [key, value] of Object.entries(params)) {\n if (value) {\n url.searchParams.set(key, value.toString());\n } else {\n url.searchParams.delete(key);\n }\n };\n window.history.replaceState({}, '', url.toString());\n }\n\n private fetchReviews(sort?: typeof this.sort, page?: number) {\n const urlParams = this.getUrlParams();\n return salla.api.request('reviews', {\n params: {\n type: 'products',\n format: 'lite',\n per_page: 8,\n page: page || urlParams.page || 1,\n sort: sort || urlParams.sort || null\n }\n });\n }\n\n\n private async initializeMasonry() {\n const grid = this.el.querySelector('.s-reviews-page-grid');\n if (!grid) return;\n\n try {\n new MasonryLayout(grid);\n salla.logger.info('Masonry initialized successfully');\n } catch (error) {\n salla.logger.error('Masonry initialization failed:', error);\n }\n }\n private animateReviewCards() {\n const items = this.wrapper.querySelectorAll('salla-review-card:not(.animated)');\n Helper.animateItems(items);\n }\n\n private initiateInfiniteScroll() {\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.pagination?.links?.next || null,\n history: false,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', () => {\n this.isLoading = true;\n });\n\n this.infiniteScroll?.on('load', response => {\n this.pagination = response.pagination;\n this.reviews = [...this.reviews, ...response.data]\n this.isLoading = false;\n // Update URL with the current page\n this.updateUrlParams({ page: response.pagination.current_page });\n\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more reviews:', e);\n this.isLoading = false;\n });\n }\n\n\n componentDidRender() {\n setTimeout(() => {\n requestAnimationFrame(this.animateReviewCards.bind(this))\n }, 176)\n }\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n\n // Initialize language variables\n this.langTitlesReviews = salla.lang.get(\"common.titles.reviews\");\n this.langSorting = salla.lang.get('pages.categories.sorting');\n this.placeholderText = salla.lang.choice(\"pages.rating.reviews\", 0)\n this.langLoadMore = salla.lang.get('common.elements.load_more');\n this.langSortByTopRating = salla.lang.get('pages.testimonials.sort_by_rating_desc');\n this.langSortByMostRecent = salla.lang.get('pages.testimonials.sort_by_date_desc');\n this.langSortByLeastRated = salla.lang.get('pages.testimonials.sort_by_rating_asc');\n this.langSortByLeastRecent = salla.lang.get('pages.testimonials.sort_by_date_asc');\n\n const urlParams = this.getUrlParams();\n const response = await this.fetchReviews(urlParams.sort);\n this.sort = urlParams.sort;\n this.reviews = response.data\n this.pagination = response.pagination;\n this.langRatingReviews = salla.lang.choice(\"pages.rating.reviews\", this.pagination?.total);\n\n\n\n } catch (error) {\n salla.logger.error('Error loading reviews:', error);\n }\n }\n\n private async handleSorting(e: Event) {\n const value = (e.target as HTMLSelectElement).value as typeof this.sort;\n this.sort = value;\n this.updateUrlParams({ sort: value, page: 1 }); // Reset to page 1 when changing sort\n const response = await this.fetchReviews(value, 1);\n this.reviews = response.data\n this.pagination = response.pagination;\n }\n\n async componentDidLoad() {\n await this.initializeMasonry();\n this.initiateInfiniteScroll();\n this.sort = this.getUrlParams().sort || \"latest\";\n this.updateUrlParams({ sort: this.sort, page: 1 });\n }\n\n disconnectedCallback() {\n if (this.infiniteScroll) {\n this.infiniteScroll.destroy();\n }\n }\n\n private renderSortingOptions() {\n const options = [\n { value: 'latest', label: this.langSortByMostRecent },\n { value: 'oldest', label: this.langSortByLeastRecent },\n { value: 'top_rating', label: this.langSortByTopRating },\n { value: 'bottom_rating', label: this.langSortByLeastRated },\n ];\n return options.map(option => (\n <option key={option.value} value={option.value} selected={option.value === this.sort}>\n {option.label}\n </option>\n ));\n }\n\n\n render() {\n return (\n <host>\n <div class=\"s-reviews-page-header-wrapper\">\n <h2 class=\"s-reviews-page-title\">{this.langTitlesReviews}<span class=\"s-reviews-page-count\">({this.langRatingReviews})</span></h2>\n <div class=\"s-reviews-page-filter-wrapper\">\n <label class=\"s-reviews-page-filter-label\"\n htmlFor=\"testimonials-filter\">{this.langSorting}</label>\n <select onChange={(e) => this.handleSorting(e)} disabled={!this.reviews.length} class=\"s-reviews-page-filter\">\n {this.renderSortingOptions()}\n </select>\n </div>\n </div>\n {this.reviews.length ? <main class=\"s-reviews-page-grid\" ref={el => {\n this.wrapper = el\n }}>\n {this.reviews.map(review => (\n <salla-review-card\n key={review.id}\n review={review}\n />\n ))}\n </main>\n : <div class=\"s-products-list-placeholder\">\n <span innerHTML={ShoppingBag} />\n <p>{this.placeholderText}</p>\n </div>\n }\n {this.pagination?.links?.next && this.reviews.length ? (\n\n <div class=\"s-reviews-page-load-more-container\">\n <salla-button class=\"s-reviews-page-load-more-btn\" loading={this.isLoading} onClick={() => this.infiniteScroll?.loadNextPage()}\n onKeyUp={() => this.infiniteScroll?.loadNextPage()}>\n {this.langLoadMore}\n </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AAA,GAAA,EAAA,CAAA,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,KAAI,IAAI,CAAC,OAAO,CAAC,MAAM,IAElD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAK,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,EAC5H,OAAO,EAAE,QAAM,IAAA,EAAA,CAAA,CAAA,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,IACjD,IAAI,CAAC,YAAY,CACL,CACX,IACJ,IAAI,CACH;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
1
|
+
{"version":3,"file":"p-eeeXvpzF.system.js","sources":["../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/throttle.js","src/Helpers/masonry-layout.ts","src/components/salla-reviews-page/salla-reviews-page.css?tag=salla-reviews-page","src/components/salla-reviews-page/salla-reviews-page.tsx"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","import throttle from \"lodash/throttle\";\n\nexport class MasonryLayout {\n\tprivate mutationObserver: MutationObserver;\n\tprivate resizeObserver: ResizeObserver;\n\n\tconstructor(private grid: Element) {\n\t\tthis.mutationObserver = new MutationObserver(this.onContainerMutation);\n\t\tthis.resizeObserver = new ResizeObserver(this.onChildrenResize);\n\n\t\tif (CSS.supports(\"grid-template-rows\", \"masonry\") === false) {\n\t\t\tthis.create();\n\t\t}\n\t}\n\n\tprivate create = () => {\n\t\tthis.mutationObserver.observe(this.grid, {\n\t\t\tchildList: true,\n\t\t});\n\n\t\tfor (const item of Array.from(this.grid.children)){\n\t\t\tthis.resizeObserver.observe(item);\n\t\t};\n\t};\n\n\tprivate onContainerMutation = (mutations: MutationRecord[]) => {\n\t\tconst removedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.removedNodes),\n\t\t);\n\t\tconst addedNodes = mutations.flatMap((mutation) =>\n\t\t\tArray.from(mutation.addedNodes),\n\t\t);\n\n\t\tfor (const node of removedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.unobserve(node);\n\t\t\t}\n\t\t}\n\n\t\tfor (const node of addedNodes) {\n\t\t\tif (node instanceof Element) {\n\t\t\t\tthis.resizeObserver.observe(node);\n\t\t\t}\n\t\t}\n\n\t\tif (removedNodes.length > 0 && addedNodes.length === 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tprivate onChildrenResize = (entries: ResizeObserverEntry[]) => {\n\t\tconst entriesToUpdate = entries.filter(\n\t\t\t(entry) => entry.target.parentElement !== null,\n\t\t);\n\n\t\tif (entriesToUpdate.length > 0) {\n\t\t\tthis.update();\n\t\t}\n\t};\n\n\tupdate = throttle(() => {\n\t\tconst computedStyle = window.getComputedStyle(this.grid);\n\n\t\tif (computedStyle.getPropertyValue(\"display\").includes(\"grid\") === false) {\n\t\t\tthis.clean();\n\t\t\treturn;\n\t\t}\n\n\t\tconst columns = parseGridTemplateColumns(this.grid);\n\n\t\tif (columns.length <= 1) {\n\t\t\tthis.clean();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst rowGap =\n\t\t\tNumber.parseFloat(computedStyle.getPropertyValue(\"row-gap\").trim()) || 0;\n\n\t\tconst items = Array.from(this.grid.children) as HTMLElement[];\n\n\t\tfor (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {\n\t\t\tconst firstItemInColumn = items[columnIndex];\n\n\t\t\tfirstItemInColumn?.style.removeProperty(\"margin-top\");\n\t\t}\n\n\t\tfor (let index = 0; index < items.length; index++) {\n\t\t\tconst prevItem = items[index - columns.length];\n\t\t\tconst nextItem = items[index];\n\n\t\t\tif (prevItem !== undefined && nextItem !== undefined) {\n\t\t\t\tconst prevBottom = prevItem.getBoundingClientRect().bottom;\n\n\t\t\t\tnextItem.style.removeProperty(\"margin-top\");\n\n\t\t\t\tconst nextTop = nextItem.getBoundingClientRect().top;\n\n\t\t\t\tif (nextTop - rowGap !== prevBottom) {\n\t\t\t\t\tconst margin =\n\t\t\t\t\t\tMath.round(\n\t\t\t\t\t\t\t(prevBottom - (nextTop - rowGap) + Number.EPSILON) * 100,\n\t\t\t\t\t\t) / 100;\n\n\t\t\t\t\tnextItem.style.setProperty(\"margin-top\", `${margin}px`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, 32);\n\n\tdestroy = () => {\n\t\tthis.resizeObserver.disconnect();\n\t\tthis.mutationObserver.disconnect();\n\t\tthis.clean();\n\t};\n\n\tprivate clean = () => {\n\t\tfor ( const item of (Array.from(this.grid.children) as HTMLElement[])){\n\t\t\titem.style.removeProperty(\"margin-top\");\n\t\t}\n\t};\n\n\t[Symbol.dispose]() {\n\t\tthis.destroy();\n\t}\n}\n\nfunction parseGridTemplateColumns(grid: Element) {\n\tconst computedStyle = window.getComputedStyle(grid);\n\n\tconst gridTemplateColumns = computedStyle.getPropertyValue(\n\t\t\"grid-template-columns\",\n\t);\n\n\treturn gridTemplateColumns\n\t\t.trim()\n\t\t.split(/\\s+(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/);\n}",":host {\n display: block;\n}","import { Component, State, Element, h } from '@stencil/core';\nimport type { Review } from '../salla-review-card/interfaces';\nimport type { Pagination } from '../../interfaces/common';\nimport ShoppingBag from '../../assets/svg/shopping-bag.svg';\nimport Helper from '../../Helpers/Helper';\nimport { MasonryLayout } from '../../Helpers/masonry-layout';\n\n\n@Component({\n tag: 'salla-reviews-page',\n styleUrl: 'salla-reviews-page.css',\n})\nexport class SallaReviewsPage {\n @Element() el: HTMLElement;\n @State() reviews: Partial<Review>[] = [];\n @State() isLoading = false;\n @State() pagination: Pagination = null;\n @State() sort: \"top_rating\" | \"bottom_rating\" | \"latest\" | \"oldest\" = \"latest\";\n\n // Language variables\n private langTitlesReviews: string;\n private langRatingReviews: string;\n private langSorting: string;\n private langSortByTopRating: string;\n private langSortByMostRecent: string;\n private langSortByLeastRecent: string;\n private langSortByLeastRated: string;\n\n private langLoadMore: string;\n private placeholderText: string;\n\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n private getUrlParams() {\n const params = new URLSearchParams(window.location.search);\n return {\n sort: params.get('sort') as typeof this.sort || null,\n page: Number.parseInt(params.get('page')) || 1\n };\n }\n\n private updateUrlParams(params: { sort?: string, page?: number }) {\n const url = new URL(window.location.href);\n for (const [key, value] of Object.entries(params)) {\n if (value) {\n url.searchParams.set(key, value.toString());\n } else {\n url.searchParams.delete(key);\n }\n };\n window.history.replaceState({}, '', url.toString());\n }\n\n private fetchReviews(sort?: typeof this.sort, page?: number) {\n const urlParams = this.getUrlParams();\n return salla.api.request('reviews', {\n params: {\n type: 'products',\n format: 'lite',\n per_page: 8,\n page: page || urlParams.page || 1,\n sort: sort || urlParams.sort || null\n }\n });\n }\n\n\n private async initializeMasonry() {\n const grid = this.el.querySelector('.s-reviews-page-grid');\n if (!grid) return;\n\n try {\n new MasonryLayout(grid);\n salla.logger.info('Masonry initialized successfully');\n } catch (error) {\n salla.logger.error('Masonry initialization failed:', error);\n }\n }\n private animateReviewCards() {\n const items = this.wrapper.querySelectorAll('salla-review-card:not(.animated)');\n Helper.animateItems(items);\n }\n\n private initiateInfiniteScroll() {\n if (!this.wrapper) {\n salla.logger.error('Wrapper is undefined. Cannot initiate infinite scroll.');\n return;\n }\n\n this.infiniteScroll = salla.infiniteScroll.initiate(this.wrapper, this.wrapper, {\n path: () => this.pagination?.links?.next || null,\n history: false,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', () => {\n this.isLoading = true;\n });\n\n this.infiniteScroll?.on('load', response => {\n this.pagination = response.pagination;\n this.reviews = [...this.reviews, ...response.data]\n this.isLoading = false;\n // Update URL with the current page\n this.updateUrlParams({ page: response.pagination.current_page });\n\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more reviews:', e);\n this.isLoading = false;\n });\n }\n\n\n componentDidRender() {\n setTimeout(() => {\n requestAnimationFrame(this.animateReviewCards.bind(this))\n }, 176)\n }\n\n async componentWillLoad() {\n try {\n await salla.onReady();\n\n // Initialize language variables\n this.langTitlesReviews = salla.lang.get(\"common.titles.reviews\");\n this.langSorting = salla.lang.get('pages.categories.sorting');\n this.placeholderText = salla.lang.choice(\"pages.rating.reviews\", 0)\n this.langLoadMore = salla.lang.get('common.elements.load_more');\n this.langSortByTopRating = salla.lang.get('pages.testimonials.sort_by_rating_desc');\n this.langSortByMostRecent = salla.lang.get('pages.testimonials.sort_by_date_desc');\n this.langSortByLeastRated = salla.lang.get('pages.testimonials.sort_by_rating_asc');\n this.langSortByLeastRecent = salla.lang.get('pages.testimonials.sort_by_date_asc');\n\n const urlParams = this.getUrlParams();\n const response = await this.fetchReviews(urlParams.sort);\n this.sort = urlParams.sort;\n this.reviews = response.data\n this.pagination = response.pagination;\n this.langRatingReviews = salla.lang.choice(\"pages.rating.reviews\", this.pagination?.total);\n\n\n\n } catch (error) {\n salla.logger.error('Error loading reviews:', error);\n }\n }\n\n private async handleSorting(e: Event) {\n const value = (e.target as HTMLSelectElement).value as typeof this.sort;\n this.sort = value;\n this.updateUrlParams({ sort: value, page: 1 }); // Reset to page 1 when changing sort\n const response = await this.fetchReviews(value, 1);\n this.reviews = response.data\n this.pagination = response.pagination;\n }\n\n async componentDidLoad() {\n await this.initializeMasonry();\n this.initiateInfiniteScroll();\n this.sort = this.getUrlParams().sort || \"latest\";\n this.updateUrlParams({ sort: this.sort, page: 1 });\n }\n\n disconnectedCallback() {\n if (this.infiniteScroll) {\n this.infiniteScroll.destroy();\n }\n }\n\n private renderSortingOptions() {\n const options = [\n { value: 'latest', label: this.langSortByMostRecent },\n { value: 'oldest', label: this.langSortByLeastRecent },\n { value: 'top_rating', label: this.langSortByTopRating },\n { value: 'bottom_rating', label: this.langSortByLeastRated },\n ];\n return options.map(option => (\n <option key={option.value} value={option.value} selected={option.value === this.sort}>\n {option.label}\n </option>\n ));\n }\n\n\n render() {\n return (\n <host>\n <div class=\"s-reviews-page-header-wrapper\">\n <h2 class=\"s-reviews-page-title\">{this.langTitlesReviews}<span class=\"s-reviews-page-count\">({this.langRatingReviews})</span></h2>\n <div class=\"s-reviews-page-filter-wrapper\">\n <label class=\"s-reviews-page-filter-label\"\n htmlFor=\"testimonials-filter\">{this.langSorting}</label>\n <select onChange={(e) => this.handleSorting(e)} disabled={!this.reviews.length} class=\"s-reviews-page-filter\">\n {this.renderSortingOptions()}\n </select>\n </div>\n </div>\n {this.reviews.length ? <main class=\"s-reviews-page-grid\" ref={el => {\n this.wrapper = el\n }}>\n {this.reviews.map(review => (\n <salla-review-card\n key={review.id}\n review={review}\n />\n ))}\n </main>\n : <div class=\"s-products-list-placeholder\">\n <span innerHTML={ShoppingBag} />\n <p>{this.placeholderText}</p>\n </div>\n }\n {this.pagination?.links?.next && this.reviews.length ? (\n\n <div class=\"s-reviews-page-load-more-container\">\n <salla-button class=\"s-reviews-page-load-more-btn\" loading={this.isLoading} onClick={() => this.infiniteScroll?.loadNextPage()}\n onKeyUp={() => this.infiniteScroll?.loadNextPage()}>\n {this.langLoadMore}\n </salla-button>\n </div>\n ) : null}\n </host>\n );\n }\n}"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;;;;;;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AA,CAAA,IAAI,KAAI,IAAI,CAAC,OAAO,CAAC,MAAM,IAElD,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,oCAAoC,EAAA,EAC7C,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAK,EAAA,IAAA,EAAA,CAAA,CAAC,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,EAC5H,OAAO,EAAE,QAAM,IAAA,EAAA,CAAA,CAAA,OAAA,CAAA,EAAA,GAAA,IAAI,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,YAAY,EAAE,CAAA,EAAA,IACjD,IAAI,CAAC,YAAY,CACL,CACX,IACJ,IAAI,CACH;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,r,i){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,s){function o(t){try{l(i.next(t))}catch(t){s(t)}}function a(t){try{l(i["throw"](t))}catch(t){s(t)}}function l(t){t.done?r(t.value):n(t.value).then(o,a)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(r=0)),r)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;n=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1];s=a;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(a);break}if(s[2])r.ops.pop();r.trys.pop();continue}a=e.call(t,r)}catch(t){a=[6,t];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++){if(s||!(i in e)){if(!s)s=Array.prototype.slice.call(e,0,i);s[i]=e[i]}}return t.concat(s||Array.prototype.slice.call(e))};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-C7BKMKUF.system.js"],(function(t){"use strict";var e,r,i;return{setters:[function(t){e=t.r;r=t.h;i=t.H}],execute:function(){var n;(function(t){t["PERCENTAGE"]="percentage";t["FIXED"]="fixed"})(n||(n={}));var s='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>';var o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>';var a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>';var f={staticIcons:[s,o,a,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var u=function(){function t(){}t.findTierByIndex=function(t,e){return t.find((function(t){return t.index===e}))||null};t.findTierByName=function(t,e){return t.find((function(t){return t.tier_name===e}))||null};t.getTierNameByIndex=function(t,e){var r;return(r=this.findTierByIndex(t,e))===null||r===void 0?void 0:r.tier_name};t.findCurrentTierIndex=function(t,e){if(!e)return 0;for(var r=e.length-1;r>=0;r--){if(t>=e[r].threshold){return e[r].index}}return 0};return t}();var c=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";var d=t("salla_tiered_offer",function(){function t(t){var r=this;e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(t){r.activeTabTier=t};salla.lang.onLoaded((function(){r.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");r.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");r.discountText=salla.lang.get("blocks.tiered_offer.discount");r.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:r.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:t=r.sent();if(!t){return[2]}this.initializeComponent(t);return[3,5];case 3:e=r.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.checkFeatureEnabled=function(){var t;return(t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("tiered-offer")};t.prototype.checkCartExists=function(){var t,e;return!!((e=(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.summary)===null||e===void 0?void 0:e.count)};t.prototype.validateCouponCompatibility=function(t,e){var r;return!(e&&!((r=t.details)===null||r===void 0?void 0:r.applied_with_coupon))};t.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:e=n.sent().data;r=e.find((function(t){return t.type==="tiered_offer"}));if(!r){return[2,null]}if(!this.validateCouponCompatibility(r,(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.coupon)){this.canRender=false;return[2,null]}return[2,r];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};t.prototype.initializeComponent=function(t){var e;this.apiOfferData=t;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var r=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;var i=this.findCurrentTierIndex(r);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};t.prototype.componentDidLoad=function(){var t=this;salla.event.on("cart::updated",(function(e){t.updateOfferValues(e)}))};t.prototype.mapApiDataToTiers=function(t){var e=__spreadArray([],t.details.discounts,true).sort((function(t,e){return t.min_spend-e.min_spend}));var r=e.map((function(t,e){return{name:t.name,tier_name:t.name,discount:t.type===n.PERCENTAGE?"".concat(salla.helpers.number(t.value),"%"):salla.money(t.value),icon:f.staticIcons[e]||f.staticIcons[0],threshold:t.min_spend,text_color:f.staticColors[e],index:e+1}}));return{current_tier:u.getTierNameByIndex(r,this.findCurrentTierIndex(t.details.current_value,r)),tiers:r}};t.prototype.findCurrentTierIndex=function(t,e){var r;if(e===void 0){e=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return u.findCurrentTierIndex(t,e||[])};t.prototype.updateOfferValues=function(t){var e;if(!this.apiOfferData||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(this.apiOfferData,t.coupon)){this.canRender=false;return}this.canRender=true;if(((e=this.apiOfferData.details)===null||e===void 0?void 0:e.with_current_cart)===false){return}var r=t.sub_total;this.apiOfferData=Object.assign(Object.assign({},this.apiOfferData),{details:Object.assign(Object.assign({},this.apiOfferData.details),{current_value:r})});var i=this.findCurrentTierIndex(r);if(i===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};t.prototype.getLoadingSkeletonView=function(){return r(i,null,r("div",{class:"s-tiered-offer-container"},r("div",{class:"s-tiered-offer-skeleton-wrapper"},r("div",{class:"s-tiered-offer-skeleton-title"},r("salla-skeleton",{height:"16px",width:"40%"})),r("div",{class:"s-tiered-offer-skeleton-subtitle"},r("salla-skeleton",{height:"20px",width:"60%"})),r("div",{class:"s-tiered-offer-skeleton-progress"},r("salla-skeleton",{height:"16px",width:"100%"})),r("div",{class:"s-tiered-offer-skeleton-tabs"},r("salla-skeleton",{height:"50px",width:"100%"})))))};t.prototype.getCurrentTierData=function(){return u.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};t.prototype.getProgressWidth=function(){var t;var e=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;var r=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(e);var n=i;return n/r*100};t.prototype.calculateMilestonePosition=function(t,e){if(e===1){return"calc(100% - 18px)"}var r=(t+1)/e*100;var i=8/e;return"".concat(Math.max(2,Math.min(95,r-i)),"%")};t.prototype.getMilestoneStyles=function(t,e,r){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(e,r);var o=t.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};t.prototype.getMilestoneIconStyles=function(t,e,r){if(e){return{color:t.text_color}}if(r){return{color:"var(--color-primary)"}}return{}};t.prototype.renderProgressBarBackground=function(t){return[r("div",{class:"s-tiered-offer-progress-bg"}),r("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(t,"%")}})]};t.prototype.renderMilestoneIcon=function(t,e,i){var n=["s-tiered-offer-milestone-icon",e?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return r("div",{class:n,style:this.getMilestoneIconStyles(t,e,i)},r("span",{innerHTML:t.icon}))};t.prototype.renderMilestoneName=function(t,e){return r("div",{class:"s-tiered-offer-milestone-name"},e&&r("span",{style:{color:t.text_color}},t.name))};t.prototype.renderMilestones=function(t,e){var i=this;var n=e===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return r("div",{class:"s-tiered-offer-milestones-wrapper"},r("div",{class:n},this.tieredOfferData.tiers.map((function(n,s){var o=t>=n.threshold;var a=n.tier_name===i.currentTier;return r("div",{class:"s-tiered-offer-milestone",style:i.getMilestoneStyles(n,s,e)},i.renderMilestoneIcon(n,a,o),i.renderMilestoneName(n,a))}))))};t.prototype.renderProgressBar=function(){var t;var e=this.getProgressWidth();var i=this.tieredOfferData.tiers.length;var n=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;return r("div",{class:"s-tiered-offer-progress-container"},r("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(n,i)))};t.prototype.renderTabs=function(){var t=this;return r("div",{class:"s-tiered-offer-tabs-container"},r("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(e){var i=e.tier_name===t.activeTabTier;return r("button",{class:"s-tiered-offer-tab-header ".concat(i?"s-tiered-offer-tab-active":""),onClick:function(){return t.handleTabClick(e.tier_name)}},r("span",null,e.name))}))),r("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var e=u.findTierByName(t.tieredOfferData.tiers,t.activeTabTier);if(!e)return null;return r("div",{class:"s-tiered-offer-tab-content"},r("div",{class:"s-tiered-offer-tab-content-inner"},r("div",{class:"s-tiered-offer-discount-section"},r("p",{class:"s-tiered-offer-discount-title"},t.discountText," ",r("span",{innerHTML:e.discount})),r("p",{class:"s-tiered-offer-benefit-description"},t.benefitText," ",e.name))))}()))};t.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var t=this.getCurrentTierData();return r(i,null,r("div",{class:"s-tiered-offer-container"},r("div",{class:"s-tiered-offer-header"},r("div",{class:"s-tiered-offer-header-content"},r("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),r("div",{class:"s-tiered-offer-current-tier-name-wrapper"},r("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",r("span",{class:"s-tiered-offer-tier-name"},t.name)),r("span",{innerHTML:t.icon})))),this.renderProgressBar(),this.renderTabs()))};return t}());d.style=c}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-Ccha-ZJF.system.js"],(function(t){"use strict";var e,r,i;return{setters:[function(t){e=t.r;r=t.h;i=t.H}],execute:function(){var n;(function(t){t["PERCENTAGE"]="percentage";t["FIXED"]="fixed"})(n||(n={}));var s='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>';var o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M3 12C7.5 12 12 7.5 12 3C12 7.5 16.5 12 21 12C16.5 12 12 16.5 12 21C12 16.5 7.5 12 3 12Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M2 19.5C2.83333 19.5 4.5 17.8333 4.5 17C4.5 17.8333 6.16667 19.5 7 19.5C6.16667 19.5 4.5 21.1667 4.5 22C4.5 21.1667 2.83333 19.5 2 19.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n <path d="M16 5C17 5 19 3 19 2C19 3 21 5 22 5C21 5 19 7 19 8C19 7 17 5 16 5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path>\n</svg>';var a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="40" height="40" color="#000000" fill="none">\n <path d="M14.2644 18.3717C14.5806 17.407 14.7387 16.9247 15.0616 16.593C15.215 16.4354 15.3932 16.3048 15.5887 16.2066C16.0003 16 16.5003 16 17.5002 16C18.5001 16 19.0001 16 19.4116 16.2066C19.6072 16.3048 19.7853 16.4354 19.9388 16.593C20.2617 16.9247 20.4198 17.407 20.736 18.3717L21.0624 19.3675C21.4561 20.5688 21.653 21.1694 21.3587 21.5847C21.0643 22 20.4418 22 19.1966 22H15.8038C14.5586 22 13.936 22 13.6417 21.5847C13.3473 21.1694 13.5442 20.5688 13.938 19.3675L14.2644 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M8.76421 10.3717C9.08041 9.40705 9.23851 8.92471 9.56143 8.59298C9.71485 8.43537 9.89299 8.3048 10.0885 8.20663C10.5001 8 11.0001 8 12 8C12.9999 8 13.4999 8 13.9115 8.20663C14.107 8.3048 14.2851 8.43537 14.4386 8.59298C14.7615 8.92471 14.9196 9.40705 15.2358 10.3717L15.5622 11.3675C15.956 12.5688 16.1528 13.1694 15.8585 13.5847C15.5642 14 14.9416 14 13.6964 14H10.3036C9.05842 14 8.43585 14 8.1415 13.5847C7.84716 13.1694 8.04404 12.5688 8.43779 11.3675L8.76421 10.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M3.26439 18.3717C3.58059 17.407 3.73869 16.9247 4.06162 16.593C4.21504 16.4354 4.39317 16.3048 4.58872 16.2066C5.00031 16 5.50027 16 6.50018 16C7.5001 16 8.00006 16 8.41165 16.2066C8.6072 16.3048 8.78533 16.4354 8.93875 16.593C9.26167 16.9247 9.41977 17.407 9.73597 18.3717L10.0624 19.3675C10.4561 20.5688 10.653 21.1694 10.3587 21.5847C10.0643 22 9.44176 22 8.19661 22H4.80375C3.5586 22 2.93603 22 2.64169 21.5847C2.34735 21.1694 2.54422 20.5688 2.93797 19.3675L3.26439 18.3717Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M12 2V4M7.5 3.5L9 5M16.5 3.5L15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>\n</svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" color="#000000" fill="none">\n <path d="M5.78223 4.18192C6.43007 3.68319 6.754 3.43383 7.12788 3.27323C7.29741 3.20041 7.47367 3.14158 7.65459 3.09741C8.0536 3 8.4767 3 9.32289 3H14.6771C15.5233 3 15.9464 3 16.3454 3.09741C16.5263 3.14158 16.7026 3.20041 16.8721 3.27323C17.246 3.43383 17.5699 3.68319 18.2178 4.18192C20.3644 5.83448 21.4378 6.66077 21.8057 7.73078C21.9694 8.20673 22.0305 8.70728 21.9858 9.20461C21.8852 10.3227 21.0379 11.346 19.3433 13.3925L15.3498 18.2153C13.8126 20.0718 13.044 21 12 21C10.956 21 10.1874 20.0718 8.65018 18.2153L4.65671 13.3925C2.96208 11.346 2.11476 10.3227 2.0142 9.20461C1.96947 8.70728 2.03064 8.20673 2.1943 7.73078C2.56224 6.66077 3.63557 5.83448 5.78223 4.18192Z" stroke="currentColor" stroke-width="1.5"></path>\n <path d="M10 8.5H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>\n</svg>';var f={staticIcons:[s,o,a,l],staticColors:["#993018","#444444","#D18F36","#315F9C"]};var u=function(){function t(){}t.findTierByIndex=function(t,e){return t.find((function(t){return t.index===e}))||null};t.findTierByName=function(t,e){return t.find((function(t){return t.tier_name===e}))||null};t.getTierNameByIndex=function(t,e){var r;return(r=this.findTierByIndex(t,e))===null||r===void 0?void 0:r.tier_name};t.findCurrentTierIndex=function(t,e){if(!e)return 0;for(var r=e.length-1;r>=0;r--){if(t>=e[r].threshold){return e[r].index}}return 0};return t}();var c=".s-tiered-offer-milestone-icon svg{color:currentColor}.s-tiered-offer-milestone-icon svg path{stroke:currentColor;fill:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg path{fill:currentColor;stroke:none}.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-active svg[fill=none] path,.s-tiered-offer-milestone-icon.s-tiered-offer-milestone-completed svg[fill=none] path{fill:none;stroke:currentColor}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-bg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[dir=rtl] .s-tiered-offer-progress-wrapper .s-tiered-offer-progress-fill{-webkit-transform:scaleX(-1);transform:scaleX(-1);left:auto}[dir=rtl] .flip-x{-webkit-transform:scaleX(-1);transform:scaleX(-1)}";var d=t("salla_tiered_offer",function(){function t(t){var r=this;e(this,t);this.currentTierIndex=0;this.canRender=false;this.isLoading=false;this.handleTabClick=function(t){r.activeTabTier=t};salla.lang.onLoaded((function(){r.loyaltyProgramText=salla.lang.get("blocks.tiered_offer.program_title");r.currentTierText=salla.lang.get("blocks.tiered_offer.current_tier");r.discountText=salla.lang.get("blocks.tiered_offer.discount");r.benefitText=salla.lang.get("blocks.tiered_offer.tier_description")}))}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,3,4,5]);return[4,salla.onReady()];case 1:r.sent();if(!this.checkFeatureEnabled()){return[2]}if(!this.checkCartExists()){return[2]}this.isLoading=true;return[4,this.fetchTieredOfferData()];case 2:t=r.sent();if(!t){return[2]}this.initializeComponent(t);return[3,5];case 3:e=r.sent();this.canRender=false;salla.logger.warn("salla-tiered-offer:: ",e);return[3,5];case 4:this.isLoading=false;return[7];case 5:return[2]}}))}))};t.prototype.checkFeatureEnabled=function(){var t;return(t=salla.config.get("store.features"))===null||t===void 0?void 0:t.includes("tiered-offer")};t.prototype.checkCartExists=function(){var t,e;return!!((e=(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.summary)===null||e===void 0?void 0:e.count)};t.prototype.validateCouponCompatibility=function(t,e){var r;return!(e&&!((r=t.details)===null||r===void 0?void 0:r.applied_with_coupon))};t.prototype.fetchTieredOfferData=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,r,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,salla.api.cart.offers()];case 1:e=n.sent().data;r=e.find((function(t){return t.type==="tiered_offer"}));if(!r){return[2,null]}if(!this.validateCouponCompatibility(r,(t=salla.storage.get("cart"))===null||t===void 0?void 0:t.coupon)){this.canRender=false;return[2,null]}return[2,r];case 2:i=n.sent();throw i;case 3:return[2]}}))}))};t.prototype.initializeComponent=function(t){var e;this.apiOfferData=t;this.tieredOfferData=this.mapApiDataToTiers(this.apiOfferData);this.loyaltyProgramText=this.apiOfferData.title||this.loyaltyProgramText;var r=((e=this.apiOfferData.details)===null||e===void 0?void 0:e.current_value)||0;var i=this.findCurrentTierIndex(r);if(i===0){this.canRender=false;return}this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);this.activeTabTier=this.currentTier;this.canRender=true};t.prototype.componentDidLoad=function(){var t=this;salla.event.on("cart::updated",(function(e){t.updateOfferValues(e)}))};t.prototype.mapApiDataToTiers=function(t){var e=__spreadArray([],t.details.discounts,true).sort((function(t,e){return t.min_spend-e.min_spend}));var r=e.map((function(t,e){return{name:t.name,tier_name:t.name,discount:t.type===n.PERCENTAGE?"".concat(salla.helpers.number(t.value),"%"):salla.money(t.value),icon:f.staticIcons[e]||f.staticIcons[0],threshold:t.min_spend,text_color:f.staticColors[e],index:e+1}}));return{current_tier:u.getTierNameByIndex(r,this.findCurrentTierIndex(t.details.current_value,r)),tiers:r}};t.prototype.findCurrentTierIndex=function(t,e){var r;if(e===void 0){e=(r=this.tieredOfferData)===null||r===void 0?void 0:r.tiers}return u.findCurrentTierIndex(t,e||[])};t.prototype.updateOfferValues=function(t){var e;if(!this.apiOfferData||!this.tieredOfferData){return}if(!this.validateCouponCompatibility(this.apiOfferData,t.coupon)){this.canRender=false;return}this.canRender=true;if(((e=this.apiOfferData.details)===null||e===void 0?void 0:e.with_current_cart)===false){return}var r=t.sub_total;this.apiOfferData=Object.assign(Object.assign({},this.apiOfferData),{details:Object.assign(Object.assign({},this.apiOfferData.details),{current_value:r})});var i=this.findCurrentTierIndex(r);if(i===0){this.canRender=false;return}this.canRender=true;this.currentTierIndex=i;this.currentTier=u.getTierNameByIndex(this.tieredOfferData.tiers,i);if(this.activeTabTier!==this.currentTier){this.activeTabTier=this.currentTier}};t.prototype.getLoadingSkeletonView=function(){return r(i,null,r("div",{class:"s-tiered-offer-container"},r("div",{class:"s-tiered-offer-skeleton-wrapper"},r("div",{class:"s-tiered-offer-skeleton-title"},r("salla-skeleton",{height:"16px",width:"40%"})),r("div",{class:"s-tiered-offer-skeleton-subtitle"},r("salla-skeleton",{height:"20px",width:"60%"})),r("div",{class:"s-tiered-offer-skeleton-progress"},r("salla-skeleton",{height:"16px",width:"100%"})),r("div",{class:"s-tiered-offer-skeleton-tabs"},r("salla-skeleton",{height:"50px",width:"100%"})))))};t.prototype.getCurrentTierData=function(){return u.findTierByIndex(this.tieredOfferData.tiers,this.currentTierIndex)||this.tieredOfferData.tiers[0]};t.prototype.getProgressWidth=function(){var t;var e=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;var r=this.tieredOfferData.tiers.length;var i=this.findCurrentTierIndex(e);var n=i;return n/r*100};t.prototype.calculateMilestonePosition=function(t,e){if(e===1){return"calc(100% - 18px)"}var r=(t+1)/e*100;var i=8/e;return"".concat(Math.max(2,Math.min(95,r-i)),"%")};t.prototype.getMilestoneStyles=function(t,e,r){var i;var n=document.documentElement.dir==="rtl";var s=this.calculateMilestonePosition(e,r);var o=t.name.length>6?"flex-end":"center";return i={},i[n?"right":"left"]=s,i.alignItems=o,i.position="absolute",i.transform=n?"translateX(50%)":"translateX(-50%)",i};t.prototype.getMilestoneIconStyles=function(t,e,r){if(e){return{color:t.text_color}}if(r){return{color:"var(--color-primary)"}}return{}};t.prototype.renderProgressBarBackground=function(t){return[r("div",{class:"s-tiered-offer-progress-bg"}),r("div",{class:"s-tiered-offer-progress-fill",style:{width:"".concat(t,"%")}})]};t.prototype.renderMilestoneIcon=function(t,e,i){var n=["s-tiered-offer-milestone-icon",e?"s-tiered-offer-milestone-active":"",i?"s-tiered-offer-milestone-completed":""].filter(Boolean).join(" ");return r("div",{class:n,style:this.getMilestoneIconStyles(t,e,i)},r("span",{innerHTML:t.icon}))};t.prototype.renderMilestoneName=function(t,e){return r("div",{class:"s-tiered-offer-milestone-name"},e&&r("span",{style:{color:t.text_color}},t.name))};t.prototype.renderMilestones=function(t,e){var i=this;var n=e===1?"s-tiered-offer-single-milestone-justify-end":"s-tiered-offer-milestones";return r("div",{class:"s-tiered-offer-milestones-wrapper"},r("div",{class:n},this.tieredOfferData.tiers.map((function(n,s){var o=t>=n.threshold;var a=n.tier_name===i.currentTier;return r("div",{class:"s-tiered-offer-milestone",style:i.getMilestoneStyles(n,s,e)},i.renderMilestoneIcon(n,a,o),i.renderMilestoneName(n,a))}))))};t.prototype.renderProgressBar=function(){var t;var e=this.getProgressWidth();var i=this.tieredOfferData.tiers.length;var n=((t=this.apiOfferData.details)===null||t===void 0?void 0:t.current_value)||0;return r("div",{class:"s-tiered-offer-progress-container"},r("div",{class:"s-tiered-offer-progress-wrapper"},this.renderProgressBarBackground(e),this.renderMilestones(n,i)))};t.prototype.renderTabs=function(){var t=this;return r("div",{class:"s-tiered-offer-tabs-container"},r("div",{class:"s-tiered-offer-tab-headers"},this.tieredOfferData.tiers.map((function(e){var i=e.tier_name===t.activeTabTier;return r("button",{class:"s-tiered-offer-tab-header ".concat(i?"s-tiered-offer-tab-active":""),onClick:function(){return t.handleTabClick(e.tier_name)}},r("span",null,e.name))}))),r("div",{class:"s-tiered-offer-tab-content-wrapper"},function(){var e=u.findTierByName(t.tieredOfferData.tiers,t.activeTabTier);if(!e)return null;return r("div",{class:"s-tiered-offer-tab-content"},r("div",{class:"s-tiered-offer-tab-content-inner"},r("div",{class:"s-tiered-offer-discount-section"},r("p",{class:"s-tiered-offer-discount-title"},t.discountText," ",r("span",{innerHTML:e.discount})),r("p",{class:"s-tiered-offer-benefit-description"},t.benefitText," ",e.name))))}()))};t.prototype.render=function(){if(this.isLoading){return this.getLoadingSkeletonView()}if(!this.canRender||!this.tieredOfferData){return null}var t=this.getCurrentTierData();return r(i,null,r("div",{class:"s-tiered-offer-container"},r("div",{class:"s-tiered-offer-header"},r("div",{class:"s-tiered-offer-header-content"},r("p",{class:"s-tiered-offer-program-title"},this.loyaltyProgramText),r("div",{class:"s-tiered-offer-current-tier-name-wrapper"},r("h2",{class:"s-tiered-offer-current-tier"},this.currentTierText," ",r("span",{class:"s-tiered-offer-tier-name"},t.name)),r("span",{innerHTML:t.icon})))),this.renderProgressBar(),this.renderTabs()))};return t}());d.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-ef6326a6.system.entry.js.map
|