@salla.sa/twilight-components 2.14.251 → 2.14.253
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-0qyY-ElC.js → app-globals-BoVwS_2u.js} +3 -3
- package/dist/cjs/{app-globals-0qyY-ElC.js.map → app-globals-BoVwS_2u.js.map} +1 -1
- package/dist/cjs/{index-CxIOfeMA.js → index-DxXe1Ylr.js} +16 -16
- package/dist/cjs/index-DxXe1Ylr.js.map +1 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.cjs.js.map +1 -0
- package/dist/cjs/salla-accordion_4.cjs.entry.js +202 -0
- package/dist/cjs/salla-accordion_4.cjs.entry.js.map +1 -0
- package/dist/cjs/salla-add-product-button_51.cjs.entry.js +48 -48
- 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 +3 -3
- 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 +3 -3
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
- 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-details-multiple-bundle-product.cjs.entry.js +80 -0
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js.map +1 -0
- package/dist/cjs/salla-order-details-multiple-bundle-product.entry.cjs.js.map +1 -0
- package/dist/cjs/salla-order-details.cjs.entry.js +53 -0
- package/dist/cjs/salla-order-details.cjs.entry.js.map +1 -0
- package/dist/cjs/salla-order-details.entry.cjs.js.map +1 -0
- package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +3 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
- package/dist/cjs/salla-product-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
- package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/salla-accordion/salla-accordion-head.js +2 -2
- package/dist/collection/components/salla-accordion/salla-accordion-head.js.map +1 -1
- package/dist/collection/components/salla-accordion/salla-accordion.js +43 -1
- package/dist/collection/components/salla-accordion/salla-accordion.js.map +1 -1
- package/dist/collection/components/salla-alert/salla-alert.js +1 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +1 -1
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +2 -2
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +1 -1
- package/dist/collection/components/salla-color-picker/salla-color-picker.js +1 -1
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +1 -1
- package/dist/collection/components/salla-comments/salla-comment-item.js +3 -3
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +1 -1
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +2 -2
- package/dist/collection/components/salla-filters/salla-filters.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
- package/dist/collection/components/salla-gifting/salla-gifting.js +2 -2
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
- package/dist/collection/components/salla-loading/salla-loading.js +1 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
- package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
- package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
- package/dist/collection/components/salla-map/salla-map.js +3 -3
- package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
- package/dist/collection/components/salla-order-details/interfaces.js +2 -0
- package/dist/collection/components/salla-order-details/interfaces.js.map +1 -0
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.css +0 -0
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +152 -0
- package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js.map +1 -0
- package/dist/collection/components/salla-order-details/salla-order-details-options.css +0 -0
- package/dist/collection/components/salla-order-details/salla-order-details-options.js +177 -0
- package/dist/collection/components/salla-order-details/salla-order-details-options.js.map +1 -0
- package/dist/collection/components/salla-order-details/salla-order-details.css +0 -0
- package/dist/collection/components/salla-order-details/salla-order-details.js +93 -0
- package/dist/collection/components/salla-order-details/salla-order-details.js.map +1 -0
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
- package/dist/collection/components/salla-payments/salla-payments.js +2 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
- package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
- package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
- package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +1 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +1 -1
- package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/components/salla-search/salla-search.js +3 -3
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-slider/salla-slider.js +2 -2
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-accordion-body.js +1 -27
- package/dist/components/salla-accordion-body.js.map +1 -1
- package/dist/components/salla-accordion-body2.js +35 -0
- package/dist/components/salla-accordion-body2.js.map +1 -0
- package/dist/components/salla-accordion-head.js +1 -59
- package/dist/components/salla-accordion-head.js.map +1 -1
- package/dist/components/salla-accordion-head2.js +67 -0
- package/dist/components/salla-accordion-head2.js.map +1 -0
- package/dist/components/salla-accordion.js +1 -59
- package/dist/components/salla-accordion.js.map +1 -1
- package/dist/components/salla-accordion2.js +71 -0
- package/dist/components/salla-accordion2.js.map +1 -0
- package/dist/components/salla-alert.js +1 -1
- package/dist/components/salla-booking-field2.js +1 -1
- package/dist/components/salla-bottom-alert.js +2 -2
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-color-picker2.js +1 -1
- package/dist/components/salla-comment-form2.js +1 -1
- package/dist/components/salla-comment-item2.js +3 -3
- package/dist/components/salla-conditional-fields2.js +1 -1
- package/dist/components/salla-count-down2.js +1 -1
- package/dist/components/salla-datetime-picker2.js +1 -1
- package/dist/components/salla-file-upload2.js +2 -2
- package/dist/components/salla-filters-widget2.js +2 -2
- package/dist/components/salla-filters.js +1 -1
- package/dist/components/salla-gifting.js +2 -2
- package/dist/components/salla-list-tile2.js +1 -1
- package/dist/components/salla-loading2.js +1 -1
- package/dist/components/salla-localization-modal.js +1 -1
- package/dist/components/salla-loyalty-prize-item.js +1 -1
- package/dist/components/salla-loyalty-program.js +1 -1
- package/dist/components/salla-maintenance-alert.js +1 -1
- package/dist/components/salla-map2.js +3 -3
- package/dist/components/salla-notification-item2.js +1 -1
- package/dist/components/salla-offer-modal.js +1 -1
- package/dist/components/salla-order-details-multiple-bundle-product.d.ts +11 -0
- package/dist/components/salla-order-details-multiple-bundle-product.js +12 -0
- package/dist/components/salla-order-details-multiple-bundle-product.js.map +1 -0
- package/dist/components/salla-order-details-multiple-bundle-product2.js +144 -0
- package/dist/components/salla-order-details-multiple-bundle-product2.js.map +1 -0
- package/dist/components/salla-order-details-options.d.ts +11 -0
- package/dist/components/salla-order-details-options.js +12 -0
- package/dist/components/salla-order-details-options.js.map +1 -0
- package/dist/components/salla-order-details-options2.js +145 -0
- package/dist/components/salla-order-details-options2.js.map +1 -0
- package/dist/components/salla-order-details.d.ts +11 -0
- package/dist/components/salla-order-details.js +127 -0
- package/dist/components/salla-order-details.js.map +1 -0
- package/dist/components/salla-order-summary.js +1 -1
- package/dist/components/salla-payments.js +2 -2
- package/dist/components/salla-placeholder2.js +1 -1
- package/dist/components/salla-price-range2.js +2 -2
- package/dist/components/salla-product-availability2.js +1 -1
- package/dist/components/salla-product-card2.js +5 -5
- package/dist/components/salla-product-size-guide.js +2 -2
- package/dist/components/salla-quantity-input.js +1 -1
- package/dist/components/salla-quick-buy2.js +1 -1
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-scopes.js +1 -1
- package/dist/components/salla-search.js +3 -3
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-slider2.js +2 -2
- package/dist/components/salla-social-share.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/esm/{app-globals-BBUHVW9U.js → app-globals-5yxEmkuB.js} +3 -3
- package/dist/esm/{app-globals-BBUHVW9U.js.map → app-globals-5yxEmkuB.js.map} +1 -1
- package/dist/esm/{index-aC-cHVMV.js → index-Hw2jlaNN.js} +16 -16
- package/dist/esm/index-Hw2jlaNN.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.js.map +1 -0
- package/dist/esm/salla-accordion_4.entry.js +197 -0
- package/dist/esm/salla-accordion_4.entry.js.map +1 -0
- package/dist/esm/salla-add-product-button_51.entry.js +48 -48
- 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 +3 -3
- 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 +3 -3
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
- package/dist/esm/salla-loyalty-program.entry.js +2 -2
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +2 -2
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +78 -0
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js.map +1 -0
- package/dist/esm/salla-order-details.entry.js +51 -0
- package/dist/esm/salla-order-details.entry.js.map +1 -0
- package/dist/esm/salla-order-summary.entry.js +2 -2
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +3 -3
- package/dist/esm/salla-price-range.entry.js +3 -3
- package/dist/esm/salla-product-options.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +2 -2
- package/dist/esm/salla-reviews-page.entry.js +2 -2
- package/dist/esm/salla-reviews.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +4 -4
- package/dist/esm-es5/{app-globals-BBUHVW9U.js → app-globals-5yxEmkuB.js} +2 -2
- package/dist/esm-es5/{app-globals-BBUHVW9U.js.map → app-globals-5yxEmkuB.js.map} +1 -1
- package/dist/esm-es5/{index-aC-cHVMV.js → index-Hw2jlaNN.js} +3 -3
- package/dist/esm-es5/index-Hw2jlaNN.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.js.map +1 -0
- package/dist/esm-es5/salla-accordion_4.entry.js +5 -0
- package/dist/esm-es5/salla-accordion_4.entry.js.map +1 -0
- package/dist/esm-es5/salla-add-product-button_51.entry.js +3 -3
- 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 +1 -1
- package/dist/esm-es5/salla-metadata.entry.js +2 -2
- package/dist/esm-es5/salla-notification-item.entry.js +1 -1
- package/dist/esm-es5/salla-notifications.entry.js +2 -2
- package/dist/esm-es5/salla-offer.entry.js +1 -1
- package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js +5 -0
- package/dist/esm-es5/salla-order-details-multiple-bundle-product.entry.js.map +1 -0
- package/dist/esm-es5/salla-order-details.entry.js +5 -0
- package/dist/esm-es5/salla-order-details.entry.js.map +1 -0
- package/dist/esm-es5/salla-order-summary.entry.js +2 -2
- 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 +2 -2
- 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-04b3d375.entry.js → p-0065a55b.entry.js} +2 -2
- package/dist/twilight/{p-6a16b86d.system.entry.js → p-05cf8f0f.system.entry.js} +2 -2
- package/dist/twilight/p-066a5e95.system.entry.js +5 -0
- package/dist/twilight/{p-342eda73.entry.js → p-0a58ecb2.entry.js} +2 -2
- package/dist/twilight/{p-1d08e23e.system.entry.js → p-0ab8c50f.system.entry.js} +2 -2
- package/dist/twilight/{p-3407c5ef.entry.js → p-13efdbe3.entry.js} +2 -2
- package/dist/twilight/{p-94b99a34.entry.js → p-13f1a287.entry.js} +2 -2
- package/dist/twilight/{p-e29eb090.system.entry.js → p-15c42251.system.entry.js} +2 -2
- package/dist/twilight/{p-09117f81.system.entry.js → p-17567b38.system.entry.js} +2 -2
- package/dist/twilight/p-184bc156.system.entry.js +5 -0
- package/dist/twilight/p-184bc156.system.entry.js.map +1 -0
- package/dist/twilight/{p-21c35fec.entry.js → p-204e0ad2.entry.js} +2 -2
- package/dist/twilight/{p-d01c0575.entry.js → p-210ccdae.entry.js} +2 -2
- package/dist/twilight/{p-9c2bf5c2.entry.js → p-240b86ef.entry.js} +2 -2
- package/dist/twilight/{p-18bd19bd.entry.js → p-27206d63.entry.js} +2 -2
- package/dist/twilight/{p-779536eb.entry.js → p-35dd7512.entry.js} +4 -4
- package/dist/twilight/{p-fabacea5.system.entry.js → p-38675c42.system.entry.js} +2 -2
- package/dist/twilight/{p-4d318ffc.system.entry.js → p-3cdd4d44.system.entry.js} +2 -2
- package/dist/twilight/{p-56074b1e.entry.js → p-3e9ceed0.entry.js} +2 -2
- package/dist/twilight/{p-b75d729a.system.entry.js → p-447f03b5.system.entry.js} +2 -2
- package/dist/twilight/{p-9f75e64f.entry.js → p-4b7e613a.entry.js} +2 -2
- package/dist/twilight/{p-a94e5163.entry.js → p-4d5387e9.entry.js} +2 -2
- package/dist/twilight/{p-b9a992c8.system.entry.js → p-53fb14d0.system.entry.js} +2 -2
- package/dist/twilight/p-5db51240.system.entry.js +5 -0
- package/dist/twilight/{p-f777295c.system.entry.js → p-61f590ca.system.entry.js} +2 -2
- package/dist/twilight/p-6a179bc3.system.entry.js +5 -0
- package/dist/twilight/p-6a179bc3.system.entry.js.map +1 -0
- package/dist/twilight/{p-9297d5d0.system.entry.js → p-6a51cb91.system.entry.js} +2 -2
- package/dist/twilight/{p-5dda0431.entry.js → p-6abfa7ed.entry.js} +2 -2
- package/dist/twilight/{p-8a55a076.entry.js → p-6f66faea.entry.js} +2 -2
- package/dist/twilight/{p-efcf803a.entry.js → p-7187b729.entry.js} +2 -2
- package/dist/twilight/{p-49051076.system.entry.js → p-765562b8.system.entry.js} +4 -4
- package/dist/twilight/p-76d92026.entry.js +5 -0
- package/dist/twilight/p-76d92026.entry.js.map +1 -0
- package/dist/twilight/{p-70688702.entry.js → p-78deca48.entry.js} +2 -2
- package/dist/twilight/{p-7f9f9400.system.entry.js → p-7dce6627.system.entry.js} +2 -2
- package/dist/twilight/p-7f28b72e.entry.js +5 -0
- package/dist/twilight/p-7f28b72e.entry.js.map +1 -0
- package/dist/twilight/{p-0d0836f3.entry.js → p-83f6408a.entry.js} +2 -2
- package/dist/twilight/{p-b7bb5a85.system.entry.js → p-888de4b8.system.entry.js} +2 -2
- package/dist/twilight/{p-CHKd1ZbK.system.js.map → p-8SAlNoQ7.system.js.map} +1 -1
- package/dist/twilight/{p-DoomSogT.system.js.map → p-8cuU9AcW.system.js.map} +1 -1
- package/dist/twilight/{p-29440936.system.entry.js → p-8e807035.system.entry.js} +2 -2
- package/dist/twilight/{p-08b3ea63.system.entry.js → p-8fcff962.system.entry.js} +2 -2
- package/dist/twilight/p-9a8a57f0.entry.js +5 -0
- package/dist/twilight/{p-1b9e31b1.system.entry.js → p-9cb1a11d.system.entry.js} +2 -2
- package/dist/twilight/{p-Chh9LXws.system.js.map → p-B10yx9se.system.js.map} +1 -1
- package/dist/twilight/{p-sLrIToFR.system.js.map → p-BKsOE9n5.system.js.map} +1 -1
- package/dist/twilight/{p-24T5fnEM.system.js.map → p-BzHfWaAI.system.js.map} +1 -1
- package/dist/twilight/{p-C3l3EpVC.system.js.map → p-C0IcnmR-.system.js.map} +1 -1
- package/dist/twilight/{p-81UxRwTN.system.js.map → p-C0Tc4qY_.system.js.map} +1 -1
- package/dist/twilight/{p-D1othg3r.system.js.map → p-C72wuhae.system.js.map} +1 -1
- package/dist/twilight/{p-fkQosYiP.system.js.map → p-CDuCVzYE.system.js.map} +1 -1
- package/dist/twilight/{p-YRdrauTw.system.js.map → p-CK7f65RE.system.js.map} +1 -1
- package/dist/twilight/{p-9cvlynxW.system.js → p-CQDiSGcm.system.js} +3 -3
- package/dist/twilight/p-CQDiSGcm.system.js.map +1 -0
- package/dist/twilight/{p-63hxYOEG.system.js.map → p-Crz5Om7F.system.js.map} +1 -1
- package/dist/twilight/p-D6vllM1-.system.js.map +1 -0
- package/dist/twilight/{p-o3nk7iqR.system.js.map → p-DHIqW0kb.system.js.map} +1 -1
- package/dist/twilight/{p-Bl7BRAvB.system.js → p-DHVFvgH-.system.js} +2 -2
- package/dist/twilight/{p-Bl7BRAvB.system.js.map → p-DHVFvgH-.system.js.map} +1 -1
- package/dist/twilight/{p-Cie2T8Bo.system.js.map → p-DNXP15r0.system.js.map} +1 -1
- package/dist/twilight/{p-3etOZ9ok.system.js.map → p-DNsqaxY7.system.js.map} +1 -1
- package/dist/twilight/{p-gyc8toCS.system.js.map → p-DTx9WCBY.system.js.map} +1 -1
- package/dist/twilight/{p-a3gxDXSb.system.js.map → p-DVKxP5is.system.js.map} +1 -1
- package/dist/twilight/p-DVpqfl3D.system.js.map +1 -0
- package/dist/twilight/{p-Craz4PUF.system.js.map → p-DZTRKwds.system.js.map} +1 -1
- package/dist/twilight/{p-Dohhf_R_.system.js.map → p-DZajWqW2.system.js.map} +1 -1
- package/dist/twilight/{p-Uzujt2uQ.system.js.map → p-Da2A-hsX.system.js.map} +1 -1
- package/dist/twilight/{p-CbFmk86R.system.js.map → p-DgVuWfs6.system.js.map} +1 -1
- package/dist/twilight/p-Dhlfiere.system.js +5 -0
- package/dist/twilight/{p-CBqvheHa.system.js.map → p-Dhlfiere.system.js.map} +1 -1
- package/dist/twilight/{p-DOCHKq2e.system.js.map → p-DkCrulih.system.js.map} +1 -1
- package/dist/twilight/{p-7HslI1sO.system.js.map → p-Du8MMxWf.system.js.map} +1 -1
- package/dist/twilight/{p-De28Pl5h.system.js.map → p-DvSX1guT.system.js.map} +1 -1
- package/dist/twilight/{p-aC-cHVMV.js → p-Hw2jlaNN.js} +3 -3
- package/dist/twilight/p-Hw2jlaNN.js.map +1 -0
- package/dist/twilight/{p-DbkDylL6.system.js.map → p-N45BdAU8.system.js.map} +1 -1
- package/dist/twilight/{p-cW_hSk8i.js → p-NSLkL4Dn.js} +2 -2
- package/dist/twilight/{p-cW_hSk8i.js.map → p-NSLkL4Dn.js.map} +1 -1
- package/dist/twilight/{p-BZAlfa8A.system.js.map → p-QNwQUqLM.system.js.map} +1 -1
- package/dist/twilight/{p-DobF7Qkv.system.js.map → p-XDYW48AK.system.js.map} +1 -1
- package/dist/twilight/{p-75203eae.entry.js → p-a8cf78c0.entry.js} +2 -2
- package/dist/twilight/p-a9c9a4ac.entry.js +5 -0
- package/dist/twilight/p-a9c9a4ac.entry.js.map +1 -0
- package/dist/twilight/{p-65d9d657.entry.js → p-b13ef44c.entry.js} +2 -2
- package/dist/twilight/{p-47fc4553.entry.js → p-b492c336.entry.js} +2 -2
- package/dist/twilight/{p-b0584206.entry.js → p-b51bb42b.entry.js} +2 -2
- package/dist/twilight/{p-3fb416fa.entry.js → p-bb1a0f6b.entry.js} +2 -2
- package/dist/twilight/{p-92fb3adc.entry.js → p-bca6b6b2.entry.js} +2 -2
- package/dist/twilight/{p-af7ace10.entry.js → p-bdca9c9c.entry.js} +2 -2
- package/dist/twilight/p-be2938da.entry.js +5 -0
- package/dist/twilight/{p-3438bc0c.entry.js → p-c5b5a947.entry.js} +2 -2
- package/dist/twilight/{p-DOHYAySQ.system.js.map → p-cK_8A-PC.system.js.map} +1 -1
- package/dist/twilight/{p-BaUsKGrq.system.js.map → p-cR7gWxFU.system.js.map} +1 -1
- package/dist/twilight/p-d314110a.system.entry.js +5 -0
- package/dist/twilight/p-d314110a.system.entry.js.map +1 -0
- package/dist/twilight/{p-8c2a97cf.system.entry.js → p-d33197dc.system.entry.js} +3 -3
- package/dist/twilight/{p-2d2fce30.system.entry.js → p-d3c9cfbb.system.entry.js} +2 -2
- package/dist/twilight/{p-56628b3c.system.entry.js → p-d4017888.system.entry.js} +2 -2
- package/dist/twilight/{p-0e931dd0.system.entry.js → p-d43b5d6a.system.entry.js} +2 -2
- package/dist/twilight/{p-a3c00836.entry.js → p-d7604122.entry.js} +2 -2
- package/dist/twilight/{p-e5cd34c3.system.entry.js → p-d8039b97.system.entry.js} +2 -2
- package/dist/twilight/{p-4a4cad07.system.entry.js → p-db9674c2.system.entry.js} +2 -2
- package/dist/twilight/{p-92a2ce11.system.entry.js → p-eb292930.system.entry.js} +2 -2
- package/dist/twilight/{p-f9735e19.system.entry.js → p-ec034bd2.system.entry.js} +3 -3
- package/dist/twilight/{p-2f85174e.system.entry.js → p-f07ad750.system.entry.js} +2 -2
- package/dist/twilight/{p-939b203a.system.entry.js → p-f0b1ceef.system.entry.js} +2 -2
- package/dist/twilight/p-f5aefbca.system.entry.js +5 -0
- package/dist/twilight/{p-7e1c3fd9.entry.js → p-fb399776.entry.js} +2 -2
- package/dist/twilight/{p-5054fc18.entry.js → p-fe81524d.entry.js} +2 -2
- package/dist/twilight/p-fed7a7a5.system.entry.js +5 -0
- package/dist/twilight/{p-BSHk_PNC.system.js.map → p-jx7CG3rj.system.js.map} +1 -1
- package/dist/twilight/{p-DFTLMdWL.system.js.map → p-lRCsnz7i.system.js.map} +1 -1
- package/dist/twilight/p-oqUqe5ch.system.js.map +1 -0
- package/dist/twilight/{p-B-6fJi1f.system.js.map → p-xRJ6wvh1.system.js.map} +1 -1
- package/dist/twilight/salla-accordion.salla-accordion-body.salla-accordion-head.salla-order-details-options.entry.esm.js.map +1 -0
- package/dist/twilight/salla-order-details-multiple-bundle-product.entry.esm.js.map +1 -0
- package/dist/twilight/salla-order-details.entry.esm.js.map +1 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-accordion/salla-accordion.d.ts +2 -0
- package/dist/types/components/salla-order-details/interfaces.d.ts +55 -0
- package/dist/types/components/salla-order-details/salla-order-details-multiple-bundle-product.d.ts +22 -0
- package/dist/types/components/salla-order-details/salla-order-details-options.d.ts +23 -0
- package/dist/types/components/salla-order-details/salla-order-details.d.ts +14 -0
- package/dist/types/components.d.ts +173 -0
- package/package.json +5 -5
- package/dist/cjs/index-CxIOfeMA.js.map +0 -1
- package/dist/cjs/salla-accordion-body.cjs.entry.js +0 -23
- package/dist/cjs/salla-accordion-body.cjs.entry.js.map +0 -1
- package/dist/cjs/salla-accordion-body.entry.cjs.js.map +0 -1
- package/dist/cjs/salla-accordion-head.cjs.entry.js +0 -52
- package/dist/cjs/salla-accordion-head.cjs.entry.js.map +0 -1
- package/dist/cjs/salla-accordion-head.entry.cjs.js.map +0 -1
- package/dist/cjs/salla-accordion.cjs.entry.js +0 -51
- package/dist/cjs/salla-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/salla-accordion.entry.cjs.js.map +0 -1
- package/dist/esm/index-aC-cHVMV.js.map +0 -1
- package/dist/esm/salla-accordion-body.entry.js +0 -21
- package/dist/esm/salla-accordion-body.entry.js.map +0 -1
- package/dist/esm/salla-accordion-head.entry.js +0 -50
- package/dist/esm/salla-accordion-head.entry.js.map +0 -1
- package/dist/esm/salla-accordion.entry.js +0 -49
- package/dist/esm/salla-accordion.entry.js.map +0 -1
- package/dist/esm-es5/index-aC-cHVMV.js.map +0 -1
- package/dist/esm-es5/salla-accordion-body.entry.js +0 -5
- package/dist/esm-es5/salla-accordion-body.entry.js.map +0 -1
- package/dist/esm-es5/salla-accordion-head.entry.js +0 -5
- package/dist/esm-es5/salla-accordion-head.entry.js.map +0 -1
- package/dist/esm-es5/salla-accordion.entry.js +0 -5
- package/dist/esm-es5/salla-accordion.entry.js.map +0 -1
- package/dist/twilight/p-03f5a937.entry.js +0 -5
- package/dist/twilight/p-0443edb2.entry.js +0 -5
- package/dist/twilight/p-0443edb2.entry.js.map +0 -1
- package/dist/twilight/p-3b207dc4.system.entry.js +0 -5
- package/dist/twilight/p-3e82f611.entry.js +0 -5
- package/dist/twilight/p-3e82f611.entry.js.map +0 -1
- package/dist/twilight/p-61471a8d.system.entry.js +0 -5
- package/dist/twilight/p-61471a8d.system.entry.js.map +0 -1
- package/dist/twilight/p-6943af29.system.entry.js +0 -5
- package/dist/twilight/p-6943af29.system.entry.js.map +0 -1
- package/dist/twilight/p-8d02af0b.system.entry.js +0 -5
- package/dist/twilight/p-98ca67d7.entry.js +0 -5
- package/dist/twilight/p-9b7b035c.entry.js +0 -5
- package/dist/twilight/p-9b7b035c.entry.js.map +0 -1
- package/dist/twilight/p-9cvlynxW.system.js.map +0 -1
- package/dist/twilight/p-B6pAHU4P.system.js.map +0 -1
- package/dist/twilight/p-CBqvheHa.system.js +0 -5
- package/dist/twilight/p-D74Dhmc1.system.js.map +0 -1
- package/dist/twilight/p-QCD41AKz.system.js.map +0 -1
- package/dist/twilight/p-a5b4c38f.system.entry.js +0 -5
- package/dist/twilight/p-aC-cHVMV.js.map +0 -1
- package/dist/twilight/p-b1f25cb5.system.entry.js +0 -5
- package/dist/twilight/p-e1a599fb.system.entry.js +0 -5
- package/dist/twilight/p-e1a599fb.system.entry.js.map +0 -1
- package/dist/twilight/salla-accordion-body.entry.esm.js.map +0 -1
- package/dist/twilight/salla-accordion-head.entry.esm.js.map +0 -1
- package/dist/twilight/salla-accordion.entry.esm.js.map +0 -1
- /package/dist/twilight/{p-04b3d375.entry.js.map → p-0065a55b.entry.js.map} +0 -0
- /package/dist/twilight/{p-6a16b86d.system.entry.js.map → p-05cf8f0f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-8d02af0b.system.entry.js.map → p-066a5e95.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-342eda73.entry.js.map → p-0a58ecb2.entry.js.map} +0 -0
- /package/dist/twilight/{p-1d08e23e.system.entry.js.map → p-0ab8c50f.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3407c5ef.entry.js.map → p-13efdbe3.entry.js.map} +0 -0
- /package/dist/twilight/{p-94b99a34.entry.js.map → p-13f1a287.entry.js.map} +0 -0
- /package/dist/twilight/{p-e29eb090.system.entry.js.map → p-15c42251.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-09117f81.system.entry.js.map → p-17567b38.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-21c35fec.entry.js.map → p-204e0ad2.entry.js.map} +0 -0
- /package/dist/twilight/{p-d01c0575.entry.js.map → p-210ccdae.entry.js.map} +0 -0
- /package/dist/twilight/{p-9c2bf5c2.entry.js.map → p-240b86ef.entry.js.map} +0 -0
- /package/dist/twilight/{p-18bd19bd.entry.js.map → p-27206d63.entry.js.map} +0 -0
- /package/dist/twilight/{p-779536eb.entry.js.map → p-35dd7512.entry.js.map} +0 -0
- /package/dist/twilight/{p-fabacea5.system.entry.js.map → p-38675c42.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4d318ffc.system.entry.js.map → p-3cdd4d44.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-56074b1e.entry.js.map → p-3e9ceed0.entry.js.map} +0 -0
- /package/dist/twilight/{p-b75d729a.system.entry.js.map → p-447f03b5.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9f75e64f.entry.js.map → p-4b7e613a.entry.js.map} +0 -0
- /package/dist/twilight/{p-a94e5163.entry.js.map → p-4d5387e9.entry.js.map} +0 -0
- /package/dist/twilight/{p-b9a992c8.system.entry.js.map → p-53fb14d0.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-3b207dc4.system.entry.js.map → p-5db51240.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f777295c.system.entry.js.map → p-61f590ca.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-9297d5d0.system.entry.js.map → p-6a51cb91.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-5dda0431.entry.js.map → p-6abfa7ed.entry.js.map} +0 -0
- /package/dist/twilight/{p-8a55a076.entry.js.map → p-6f66faea.entry.js.map} +0 -0
- /package/dist/twilight/{p-efcf803a.entry.js.map → p-7187b729.entry.js.map} +0 -0
- /package/dist/twilight/{p-49051076.system.entry.js.map → p-765562b8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-70688702.entry.js.map → p-78deca48.entry.js.map} +0 -0
- /package/dist/twilight/{p-7f9f9400.system.entry.js.map → p-7dce6627.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0d0836f3.entry.js.map → p-83f6408a.entry.js.map} +0 -0
- /package/dist/twilight/{p-b7bb5a85.system.entry.js.map → p-888de4b8.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-29440936.system.entry.js.map → p-8e807035.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-08b3ea63.system.entry.js.map → p-8fcff962.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-98ca67d7.entry.js.map → p-9a8a57f0.entry.js.map} +0 -0
- /package/dist/twilight/{p-1b9e31b1.system.entry.js.map → p-9cb1a11d.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-75203eae.entry.js.map → p-a8cf78c0.entry.js.map} +0 -0
- /package/dist/twilight/{p-65d9d657.entry.js.map → p-b13ef44c.entry.js.map} +0 -0
- /package/dist/twilight/{p-47fc4553.entry.js.map → p-b492c336.entry.js.map} +0 -0
- /package/dist/twilight/{p-b0584206.entry.js.map → p-b51bb42b.entry.js.map} +0 -0
- /package/dist/twilight/{p-3fb416fa.entry.js.map → p-bb1a0f6b.entry.js.map} +0 -0
- /package/dist/twilight/{p-92fb3adc.entry.js.map → p-bca6b6b2.entry.js.map} +0 -0
- /package/dist/twilight/{p-af7ace10.entry.js.map → p-bdca9c9c.entry.js.map} +0 -0
- /package/dist/twilight/{p-03f5a937.entry.js.map → p-be2938da.entry.js.map} +0 -0
- /package/dist/twilight/{p-3438bc0c.entry.js.map → p-c5b5a947.entry.js.map} +0 -0
- /package/dist/twilight/{p-8c2a97cf.system.entry.js.map → p-d33197dc.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2d2fce30.system.entry.js.map → p-d3c9cfbb.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-56628b3c.system.entry.js.map → p-d4017888.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-0e931dd0.system.entry.js.map → p-d43b5d6a.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a3c00836.entry.js.map → p-d7604122.entry.js.map} +0 -0
- /package/dist/twilight/{p-e5cd34c3.system.entry.js.map → p-d8039b97.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-4a4cad07.system.entry.js.map → p-db9674c2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-92a2ce11.system.entry.js.map → p-eb292930.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-f9735e19.system.entry.js.map → p-ec034bd2.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-2f85174e.system.entry.js.map → p-f07ad750.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-939b203a.system.entry.js.map → p-f0b1ceef.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-a5b4c38f.system.entry.js.map → p-f5aefbca.system.entry.js.map} +0 -0
- /package/dist/twilight/{p-7e1c3fd9.entry.js.map → p-fb399776.entry.js.map} +0 -0
- /package/dist/twilight/{p-5054fc18.entry.js.map → p-fe81524d.entry.js.map} +0 -0
- /package/dist/twilight/{p-b1f25cb5.system.entry.js.map → p-fed7a7a5.system.entry.js.map} +0 -0
|
@@ -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-Hw2jlaNN.js";import{S as o}from"./p-DiKTtDW5.js";import{H as l}from"./p-CGaH6V1S.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 y;function b(){if(y)return w;y=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=b();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 y(t){var e=c,s=u;c=u=undefined;p=t;h=i.apply(s,e);return h}function b(t){p=t;d=setTimeout(T,o);return m?y(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 y(t)}c=u=undefined;return h}function S(){if(d!==undefined){clearTimeout(d)}p=0;c=v=u=d=undefined}function C(){return d===undefined?h:E(e())}function M(){var t=e(),i=k(t);c=arguments;u=this;v=t;if(i){if(d===undefined){return b(v)}if(g){clearTimeout(d);d=setTimeout(T,o);return y(v)}}if(d===undefined){d=setTimeout(T,o)}return h}M.cancel=S;M.flush=C;return M}_=o;return _}var E;var S;function C(){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 M=C();var x=s(M);class j{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=x((()=>{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 j(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:"f3b06307322a56ad320374a50e13161be4e7cc8a"},a("div",{key:"3dcabdae4ee87de5c62873f327657991a56bc0e1",class:"s-reviews-page-header-wrapper"},a("h2",{key:"61bca34f24c52440fd8f736f9a6ab2b37be65c34",class:"s-reviews-page-title"},this.langTitlesReviews,a("span",{key:"c29228eaa51e9c202c6031e5f69b95905aa5485a",class:"s-reviews-page-count"},"(",this.langRatingReviews,")")),a("div",{key:"81f964be39231e21cd7c994e7e241e755af54c86",class:"s-reviews-page-filter-wrapper"},a("label",{key:"d408952ef5ffba3bedd5e01b5c6edec1aeb34f28",class:"s-reviews-page-filter-label",htmlFor:"testimonials-filter"},this.langSorting),a("select",{key:"5138fdf478aed6fea544dd1adf4d32f715f89532",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-c5b5a947.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-DOHYAySQ.system.js","sources":["src/components/salla-orders/salla-orders.scss?tag=salla-orders","src/components/salla-orders/salla-orders.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, State, h, Prop, Element } from '@stencil/core';\nimport { Order, OrderQueryParameters } from './interface'\nimport {Pagination} from \"../../interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n@Component({\n tag: 'salla-orders',\n styleUrl: 'salla-orders.scss',\n})\nexport class SallaOrder {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.languageCode = salla.lang.locale\n this.orderNumberText = salla.lang.get('pages.thank_you.order_id');\n this.totalOrderText = salla.lang.get('pages.orders.total')\n this.orderDateText = salla.lang.get('pages.orders.date')\n this.orderStatusText = salla.lang.get('pages.orders.status')\n this.noOrderText = salla.lang.get('pages.orders.non_orders')\n this.load_more_text_trans = salla.lang.get('common.elements.load_more')\n })\n }\n\n /**\n * Query Parameter to send along with the fetch request\n */\n @Prop() params: OrderQueryParameters;\n\n /**\n * Load more text\n */\n @Prop() loadMoreText: string;\n\n @State() orderNumberText: string = salla.lang.get('pages.thank_you.order_id')\n @State() totalOrderText: string = salla.lang.get('pages.orders.total')\n @State() orderDateText: string = salla.lang.get('pages.orders.date')\n @State() orderStatusText: string = salla.lang.get('pages.orders.status')\n @State() noOrderText: string = salla.lang.get('pages.orders.non_orders')\n @State() load_more_text_trans = salla.lang.get('common.elements.load_more');\n @State() languageCode: string = salla.lang.locale\n\n @State() orders: Array<Order> = [];\n @State() pagination: Pagination;\n @State() hasInfiniteScroll: boolean;\n @State() total: number;\n @State() nextPage: string;\n @State() showPlaceholder: boolean;\n\n private status: any;\n private btnLoader: any;\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n @Element() host: HTMLElement;\n\n // Show/hide loading\n private loading(isLoading = true) {\n let btnText = this.status?.querySelector('.s-button-text');\n if (btnText) {\n Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);\n this.btnLoader.style.display = isLoading ? 'inherit' : 'none';\n }\n }\n\n private initiateInfiniteScroll() {\n if (!this.hasInfiniteScroll) {\n return;\n }\n\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.nextPage,\n history: false,\n nextPage: this.nextPage,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', _response => {\n this.loading();\n });\n\n this.infiniteScroll?.on('load', response => {\n this.loading(false);\n this.pagination = response.pagination;\n this.nextPage = response.pagination?.links?.next || null;\n this.handleResponse(response.data).forEach(data => {\n this.wrapper.append(data)\n })\n let items = this.host.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more comments:', e);\n });\n\n }\n\n // Get next page\n async loadMore() {\n this.infiniteScroll.loadNextPage();\n }\n\n private handleResponse(orderList: Array<Order>) {\n return orderList.map(order => this.getSingleOrderItem(order));\n }\n\n private async loadInitialData() {\n const url = new URL(window.location.href);\n \n await salla.order.api.fetch({ ...this.params, types: [\"\"], feedback_status: url.searchParams.get('feedback_status') }).then((resp) => {\n this.orders = resp.data\n this.hasInfiniteScroll = !!resp.pagination?.links.next;\n this.pagination = resp.pagination;\n this.total = resp.pagination?.total;\n this.nextPage = resp.pagination?.links?.next || null;\n if (!this.orders.length) {\n this.showPlaceholder = true;\n return this.loading(false);\n }\n setTimeout(() => {\n this.handleResponse(resp.data).forEach(data => {\n this.wrapper.append(data)\n })\n this.initiateInfiniteScroll();\n let items = this.wrapper.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n }, 100)\n }).catch(error => {\n this.showPlaceholder = true;\n this.loading(false)\n salla.logger.error(error)\n })\n }\n\n private getSingleOrderItem(order: Order): HTMLTableRowElement {\n const tr = document.createElement('tr');\n tr.classList.add('s-orders-table-tbody-tr', 's-orders-table-tbody-tr-shadow'); \n \n const td1 = document.createElement('td');\n td1.classList.add('s-orders-table-tbody-tr-td');\n const div1 = document.createElement('div');\n div1.classList.add('s-orders-table-tbody-tr-td-content');\n const span1 = document.createElement('span');\n span1.classList.add('s-orders-mobile-title');\n span1.textContent = this.orderNumberText + ':';\n const span2 = document.createElement('span');\n span2.classList.add('s-orders-reference-id');\n span2.textContent = '#' + order.reference_id;\n div1.appendChild(span1);\n div1.appendChild(span2);\n if (order.source == 'buy_as_gift') {\n const giftIcon = document.createElement('i');\n giftIcon.classList.add('sicon-gift-sharing', 's-orders-buy-as-gift-icon');\n div1.appendChild(giftIcon);\n }\n const anchor1 = document.createElement('a');\n anchor1.href = order.url;\n div1.appendChild(anchor1);\n const div2 = document.createElement('div');\n div2.classList.add('s-orders-copy-to-clipboard-button');\n const sallaButton = document.createElement('salla-button');\n sallaButton.classList.add('relative');\n sallaButton.setAttribute('color', 'dark');\n sallaButton.setAttribute('shape', 'link');\n sallaButton.dataset.content = order.reference_id.toString();\n sallaButton.addEventListener('click', (event) => {\n Helper.copyToClipboard(event)\n Helper.toggleElementClassIf(sallaButton, 'copied', 'code-to-copy', () => true);\n setTimeout(() => {\n Helper.toggleElementClassIf(sallaButton, 'code-to-copy', 'copied', () => true)\n }, 1000);\n });\n const span3 = document.createElement('span');\n span3.textContent = '#' + order.reference_id;\n const copyIcon = document.createElement('i');\n copyIcon.classList.add('sicon-swap-stroke', 's-orders-copy-to-clipboard-button-icon');\n // Check the text direction\n let isRTL = salla.config.get('theme.is_rtl', true);\n if (isRTL) {\n // Append the icon and then the span\n sallaButton.appendChild(copyIcon);\n sallaButton.appendChild(span3);\n } else {\n // Append the span and then the icon\n sallaButton.appendChild(span3);\n sallaButton.appendChild(copyIcon);\n }\n\n div2.appendChild(sallaButton);\n div1.appendChild(div2);\n td1.appendChild(div1);\n tr.appendChild(td1);\n\n const td2 = document.createElement('td');\n td2.classList.add('s-orders-table-tbody-tr-td');\n const div3 = document.createElement('div');\n div3.classList.add('s-orders-table-tbody-tr-td-content');\n const span4 = document.createElement('span');\n span4.classList.add('s-orders-mobile-title');\n span4.textContent = this.totalOrderText + ':';\n const div4 = document.createElement('div');\n div4.innerHTML = salla.money(order.total);\n const anchor2 = document.createElement('a');\n anchor2.href = order.url;\n div3.appendChild(span4);\n div3.appendChild(div4);\n div3.appendChild(anchor2);\n td2.appendChild(div3);\n tr.appendChild(td2);\n\n const td3 = document.createElement('td');\n td3.classList.add('s-orders-table-tbody-tr-td');\n const div5 = document.createElement('div');\n div5.classList.add('s-orders-table-tbody-tr-td-content');\n const span5 = document.createElement('span');\n span5.classList.add('s-orders-mobile-title');\n span5.textContent = this.orderDateText + ':';\n const div6 = document.createElement('div');\n div6.textContent = Helper.formatDateFromString(order.created_at.date, salla.helpers.number, this.languageCode);\n const anchor3 = document.createElement('a');\n anchor3.href = order.url;\n div5.appendChild(span5);\n div5.appendChild(div6);\n div5.appendChild(anchor3);\n td3.appendChild(div5);\n tr.appendChild(td3);\n\n const td4 = document.createElement('td');\n td4.classList.add('s-orders-table-tbody-tr-td');\n const div7 = document.createElement('div');\n div7.classList.add('s-orders-table-tbody-tr-td-content');\n const span6 = document.createElement('span');\n span6.classList.add('s-orders-mobile-title');\n span6.textContent = this.orderStatusText + ':';\n const statusSpan = document.createElement('span');\n statusSpan.classList.add('s-orders-status-container');\n statusSpan.style.color = order.status.color;\n const statusIcon = document.createElement('i');\n statusIcon.classList.add(order.status.icon);\n const statusName = document.createElement('span');\n statusName.textContent = order.status.name;\n statusSpan.appendChild(statusIcon);\n statusSpan.appendChild(statusName);\n div7.appendChild(span6);\n div7.appendChild(statusSpan);\n const starIcon = document.createElement('i');\n starIcon.classList.add('sicon-star2', 's-orders-status-rated', order.is_rated ? 's-orders-rated-text' : 's-orders-unrated-text');\n div7.appendChild(starIcon);\n const anchor4 = document.createElement('a');\n anchor4.href = order.url;\n div7.appendChild(anchor4);\n td4.appendChild(div7);\n tr.appendChild(td4);\n\n return tr;\n }\n\n render() {\n if (this.showPlaceholder) {\n return <div class=\"s-orders-no-content\">\n <i class=\"sicon-packed-box icon\"></i>\n <p>{this.noOrderText}</p>\n </div>\n }\n return <div class=\"s-orders-wrapper\">\n <table class=\"s-orders-table\">\n <thead class=\"s-orders-table-head\">\n <tr class=\"s-orders-table-head-tr\">\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderNumberText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.totalOrderText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderDateText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderStatusText}\n </th>\n </tr>\n </thead>\n <tbody class=\"s-orders-table-tbody\" ref={(el) => (this.wrapper = el)}>\n\n </tbody>\n </table>\n\n {this.nextPage && (\n <div class=\"s-infinite-scroll-wrapper\" ref={status => this.status = status}>\n <button onClick={() => this.loadMore()} class=\"s-infinite-scroll-btn s-button-btn s-button-primary\">\n <span class=\"s-button-text s-infinite-scroll-btn-text\">{this.loadMoreText ?? this.load_more_text_trans}</span>\n <span class=\"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader\" ref={btnLoader => this.btnLoader = btnLoader} style={{ \"display\": \"none\" }}></span>\n </button>\n </div>\n )}\n </div>\n }\n\n componentWillLoad() {\n return salla.onReady()\n .then(() => this.loadInitialData())\n .then( () => this.initiateInfiniteScroll())\n }\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAA,MAAM,cAAc,GAAG,sBAAsB;;YCShC,UAAU,2BAAA,MAAA;MAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;cAsBS,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;cACpE,IAAc,CAAA,cAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;cAC7D,IAAa,CAAA,aAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC;cAC3D,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC;cAC/D,IAAW,CAAA,WAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC;cAC/D,IAAoB,CAAA,oBAAA,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,2B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KAAK,EAAA,EAC9C,IAAI,CAAC,eAAe,CAClB,CACF,CACC,EACR,CAAA,CAAA,OAAA,EAAA,EAAO,KAAK,EAAC,sBAAsB,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,GAE5D,CACF,EAEP,IAAI,CAAC,QAAQ,KACZ,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,2BAA2B,EAAC,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,EAAA,EACxE,CAAA,CAAA,QAAA,EAAA,EAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAC,qDAAqD,EAAA,EACjG,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,0CAA0C,EAAA,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,CAAC,oBAAoB,CAAQ,EAC9G,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,qEAAqE,EAAC,GAAG,EAAE,SAAS,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAA,CAAS,CAC9J,CACL,CACP,CACG;;UAGR,iBAAiB,GAAA;cACf,OAAO,KAAK,CAAC,OAAO;mBACnB,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE;mBACjC,IAAI,CAAE,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-cK_8A-PC.system.js","sources":["src/components/salla-orders/salla-orders.scss?tag=salla-orders","src/components/salla-orders/salla-orders.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, State, h, Prop, Element } from '@stencil/core';\nimport { Order, OrderQueryParameters } from './interface'\nimport {Pagination} from \"../../interfaces\"\nimport Helper from '../../Helpers/Helper';\n\n@Component({\n tag: 'salla-orders',\n styleUrl: 'salla-orders.scss',\n})\nexport class SallaOrder {\n\n constructor() {\n salla.lang.onLoaded(() => {\n this.languageCode = salla.lang.locale\n this.orderNumberText = salla.lang.get('pages.thank_you.order_id');\n this.totalOrderText = salla.lang.get('pages.orders.total')\n this.orderDateText = salla.lang.get('pages.orders.date')\n this.orderStatusText = salla.lang.get('pages.orders.status')\n this.noOrderText = salla.lang.get('pages.orders.non_orders')\n this.load_more_text_trans = salla.lang.get('common.elements.load_more')\n })\n }\n\n /**\n * Query Parameter to send along with the fetch request\n */\n @Prop() params: OrderQueryParameters;\n\n /**\n * Load more text\n */\n @Prop() loadMoreText: string;\n\n @State() orderNumberText: string = salla.lang.get('pages.thank_you.order_id')\n @State() totalOrderText: string = salla.lang.get('pages.orders.total')\n @State() orderDateText: string = salla.lang.get('pages.orders.date')\n @State() orderStatusText: string = salla.lang.get('pages.orders.status')\n @State() noOrderText: string = salla.lang.get('pages.orders.non_orders')\n @State() load_more_text_trans = salla.lang.get('common.elements.load_more');\n @State() languageCode: string = salla.lang.locale\n\n @State() orders: Array<Order> = [];\n @State() pagination: Pagination;\n @State() hasInfiniteScroll: boolean;\n @State() total: number;\n @State() nextPage: string;\n @State() showPlaceholder: boolean;\n\n private status: any;\n private btnLoader: any;\n private infiniteScroll: any;\n private wrapper: HTMLElement;\n\n @Element() host: HTMLElement;\n\n // Show/hide loading\n private loading(isLoading = true) {\n let btnText = this.status?.querySelector('.s-button-text');\n if (btnText) {\n Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);\n this.btnLoader.style.display = isLoading ? 'inherit' : 'none';\n }\n }\n\n private initiateInfiniteScroll() {\n if (!this.hasInfiniteScroll) {\n return;\n }\n\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.nextPage,\n history: false,\n nextPage: this.nextPage,\n scrollThreshold: false,\n }, true);\n\n this.infiniteScroll?.on('request', _response => {\n this.loading();\n });\n\n this.infiniteScroll?.on('load', response => {\n this.loading(false);\n this.pagination = response.pagination;\n this.nextPage = response.pagination?.links?.next || null;\n this.handleResponse(response.data).forEach(data => {\n this.wrapper.append(data)\n })\n let items = this.host.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n });\n\n this.infiniteScroll?.on('error', (e) => {\n salla.logger.error('Error loading more comments:', e);\n });\n\n }\n\n // Get next page\n async loadMore() {\n this.infiniteScroll.loadNextPage();\n }\n\n private handleResponse(orderList: Array<Order>) {\n return orderList.map(order => this.getSingleOrderItem(order));\n }\n\n private async loadInitialData() {\n const url = new URL(window.location.href);\n \n await salla.order.api.fetch({ ...this.params, types: [\"\"], feedback_status: url.searchParams.get('feedback_status') }).then((resp) => {\n this.orders = resp.data\n this.hasInfiniteScroll = !!resp.pagination?.links.next;\n this.pagination = resp.pagination;\n this.total = resp.pagination?.total;\n this.nextPage = resp.pagination?.links?.next || null;\n if (!this.orders.length) {\n this.showPlaceholder = true;\n return this.loading(false);\n }\n setTimeout(() => {\n this.handleResponse(resp.data).forEach(data => {\n this.wrapper.append(data)\n })\n this.initiateInfiniteScroll();\n let items = this.wrapper.querySelectorAll('.s-orders-table-tbody-tr:not(.animated)');\n Helper.animateItems(items);\n }, 100)\n }).catch(error => {\n this.showPlaceholder = true;\n this.loading(false)\n salla.logger.error(error)\n })\n }\n\n private getSingleOrderItem(order: Order): HTMLTableRowElement {\n const tr = document.createElement('tr');\n tr.classList.add('s-orders-table-tbody-tr', 's-orders-table-tbody-tr-shadow'); \n \n const td1 = document.createElement('td');\n td1.classList.add('s-orders-table-tbody-tr-td');\n const div1 = document.createElement('div');\n div1.classList.add('s-orders-table-tbody-tr-td-content');\n const span1 = document.createElement('span');\n span1.classList.add('s-orders-mobile-title');\n span1.textContent = this.orderNumberText + ':';\n const span2 = document.createElement('span');\n span2.classList.add('s-orders-reference-id');\n span2.textContent = '#' + order.reference_id;\n div1.appendChild(span1);\n div1.appendChild(span2);\n if (order.source == 'buy_as_gift') {\n const giftIcon = document.createElement('i');\n giftIcon.classList.add('sicon-gift-sharing', 's-orders-buy-as-gift-icon');\n div1.appendChild(giftIcon);\n }\n const anchor1 = document.createElement('a');\n anchor1.href = order.url;\n div1.appendChild(anchor1);\n const div2 = document.createElement('div');\n div2.classList.add('s-orders-copy-to-clipboard-button');\n const sallaButton = document.createElement('salla-button');\n sallaButton.classList.add('relative');\n sallaButton.setAttribute('color', 'dark');\n sallaButton.setAttribute('shape', 'link');\n sallaButton.dataset.content = order.reference_id.toString();\n sallaButton.addEventListener('click', (event) => {\n Helper.copyToClipboard(event)\n Helper.toggleElementClassIf(sallaButton, 'copied', 'code-to-copy', () => true);\n setTimeout(() => {\n Helper.toggleElementClassIf(sallaButton, 'code-to-copy', 'copied', () => true)\n }, 1000);\n });\n const span3 = document.createElement('span');\n span3.textContent = '#' + order.reference_id;\n const copyIcon = document.createElement('i');\n copyIcon.classList.add('sicon-swap-stroke', 's-orders-copy-to-clipboard-button-icon');\n // Check the text direction\n let isRTL = salla.config.get('theme.is_rtl', true);\n if (isRTL) {\n // Append the icon and then the span\n sallaButton.appendChild(copyIcon);\n sallaButton.appendChild(span3);\n } else {\n // Append the span and then the icon\n sallaButton.appendChild(span3);\n sallaButton.appendChild(copyIcon);\n }\n\n div2.appendChild(sallaButton);\n div1.appendChild(div2);\n td1.appendChild(div1);\n tr.appendChild(td1);\n\n const td2 = document.createElement('td');\n td2.classList.add('s-orders-table-tbody-tr-td');\n const div3 = document.createElement('div');\n div3.classList.add('s-orders-table-tbody-tr-td-content');\n const span4 = document.createElement('span');\n span4.classList.add('s-orders-mobile-title');\n span4.textContent = this.totalOrderText + ':';\n const div4 = document.createElement('div');\n div4.innerHTML = salla.money(order.total);\n const anchor2 = document.createElement('a');\n anchor2.href = order.url;\n div3.appendChild(span4);\n div3.appendChild(div4);\n div3.appendChild(anchor2);\n td2.appendChild(div3);\n tr.appendChild(td2);\n\n const td3 = document.createElement('td');\n td3.classList.add('s-orders-table-tbody-tr-td');\n const div5 = document.createElement('div');\n div5.classList.add('s-orders-table-tbody-tr-td-content');\n const span5 = document.createElement('span');\n span5.classList.add('s-orders-mobile-title');\n span5.textContent = this.orderDateText + ':';\n const div6 = document.createElement('div');\n div6.textContent = Helper.formatDateFromString(order.created_at.date, salla.helpers.number, this.languageCode);\n const anchor3 = document.createElement('a');\n anchor3.href = order.url;\n div5.appendChild(span5);\n div5.appendChild(div6);\n div5.appendChild(anchor3);\n td3.appendChild(div5);\n tr.appendChild(td3);\n\n const td4 = document.createElement('td');\n td4.classList.add('s-orders-table-tbody-tr-td');\n const div7 = document.createElement('div');\n div7.classList.add('s-orders-table-tbody-tr-td-content');\n const span6 = document.createElement('span');\n span6.classList.add('s-orders-mobile-title');\n span6.textContent = this.orderStatusText + ':';\n const statusSpan = document.createElement('span');\n statusSpan.classList.add('s-orders-status-container');\n statusSpan.style.color = order.status.color;\n const statusIcon = document.createElement('i');\n statusIcon.classList.add(order.status.icon);\n const statusName = document.createElement('span');\n statusName.textContent = order.status.name;\n statusSpan.appendChild(statusIcon);\n statusSpan.appendChild(statusName);\n div7.appendChild(span6);\n div7.appendChild(statusSpan);\n const starIcon = document.createElement('i');\n starIcon.classList.add('sicon-star2', 's-orders-status-rated', order.is_rated ? 's-orders-rated-text' : 's-orders-unrated-text');\n div7.appendChild(starIcon);\n const anchor4 = document.createElement('a');\n anchor4.href = order.url;\n div7.appendChild(anchor4);\n td4.appendChild(div7);\n tr.appendChild(td4);\n\n return tr;\n }\n\n render() {\n if (this.showPlaceholder) {\n return <div class=\"s-orders-no-content\">\n <i class=\"sicon-packed-box icon\"></i>\n <p>{this.noOrderText}</p>\n </div>\n }\n return <div class=\"s-orders-wrapper\">\n <table class=\"s-orders-table\">\n <thead class=\"s-orders-table-head\">\n <tr class=\"s-orders-table-head-tr\">\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderNumberText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.totalOrderText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderDateText}\n </th>\n <th class=\"s-orders-table-head-tr-th\" scope=\"col\">\n {this.orderStatusText}\n </th>\n </tr>\n </thead>\n <tbody class=\"s-orders-table-tbody\" ref={(el) => (this.wrapper = el)}>\n\n </tbody>\n </table>\n\n {this.nextPage && (\n <div class=\"s-infinite-scroll-wrapper\" ref={status => this.status = status}>\n <button onClick={() => this.loadMore()} class=\"s-infinite-scroll-btn s-button-btn s-button-primary\">\n <span class=\"s-button-text s-infinite-scroll-btn-text\">{this.loadMoreText ?? this.load_more_text_trans}</span>\n <span class=\"s-button-loader s-button-loader-center s-infinite-scroll-btn-loader\" ref={btnLoader => this.btnLoader = btnLoader} style={{ \"display\": \"none\" }}></span>\n </button>\n </div>\n )}\n </div>\n }\n\n componentWillLoad() {\n return salla.onReady()\n .then(() => this.loadInitialData())\n .then( () => this.initiateInfiniteScroll())\n }\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAAA,MAAM,cAAc,GAAG,sBAAsB;;YCShC,UAAU,2BAAA,MAAA;MAErB,IAAA,WAAA,CAAA,OAAA,EAAA;;cAsBS,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC;cACpE,IAAc,CAAA,cAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC;cAC7D,IAAa,CAAA,aAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC;cAC3D,IAAe,CAAA,eAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC;cAC/D,IAAW,CAAA,WAAA,GAAW,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,yBA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Aa,CAChB,EACL,CAAA,CAAA,IAAA,EAAA,EAAI,KAAK,EAAC,2BAA2B,EAAC,KAAK,EAAC,KAAK,EAAA,EAC9C,IAAI,CAAC,eAAe,CAClB,CACF,CACC,EACR,CAAA,CAAA,OAAA,EAAA,EAAO,KAAK,EAAC,sBAAsB,EAAC,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,GAE5D,CACF,EAEP,IAAI,CAAC,QAAQ,KACZ,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,2BAA2B,EAAC,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,EAAA,EACxE,CAAA,CAAA,QAAA,EAAA,EAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAC,qDAAqD,EAAA,EACjG,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,0CAA0C,EAAA,EAAE,CAAA,EAAA,GAAA,IAAI,CAAC,YAAY,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI,CAAC,oBAAoB,CAAQ,EAC9G,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,qEAAqE,EAAC,GAAG,EAAE,SAAS,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAA,CAAS,CAC9J,CACL,CACP,CACG;;UAGR,iBAAiB,GAAA;cACf,OAAO,KAAK,CAAC,OAAO;mBACnB,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE;mBACjC,IAAI,CAAE,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAC;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-BaUsKGrq.system.js","sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\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GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAE,EAAA,EACtE,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EAEN,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,iBAAiB,CAAC;oBACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM;oBACnC,CAAmB,CAAA,mBAAA,EAAA,EAAA,SAAS,EAAE,CAAC,KAAK,KAAI;0BACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;MACjC,iBAAC,EACC,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,GAAG,KAAK,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,CAAI,CAEzB,EACL,IAAI,CAAC,YAAY;MAChB,YAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,uBAAuB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,EAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"p-cR7gWxFU.system.js","sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.scrollHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAAA,MAAM,qBAAqB,GAAG,sBAAsB;;YCQvC,kBAAkB,mCAAA,MAAA;MAJ/B,IAAA,WAAA,CAAA,OAAA,EAAA;;;MA4BU,QAAA,IAAU,CAAA,UAAA,GAAW,GAAG;MAEvB,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;MACtB,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;oBACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM;oBACnC,CAAmB,CAAA,mBAAA,EAAA,EAAA,SAAS,EAAE,CAAC,KAAK,KAAI;0BACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;MACjC,iBAAC,EACC,GAAG,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,GAAG,KAAK,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAA,CAAI,CAEzB,EACL,IAAI,CAAC,YAAY;MAChB,YAAA,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,uBAAuB,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAA,EAAG,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
System.register(["./p-CQDiSGcm.system.js"],(function(t){"use strict";var e,s,r,i;return{setters:[function(t){e=t.r;s=t.h;r=t.F;i=t.H}],execute:function(){var a="";var n=t("salla_order_details",function(){function t(t){e(this,t)}t.prototype.parseOrderDetailsData=function(t){this.parsedOrderDetailsData=t;if(typeof this.orderDetails==="string"){this.parsedOrderDetailsData=JSON.parse(t)}else{this.parsedOrderDetailsData=t}};t.prototype.componentWillLoad=function(){this.parseOrderDetailsData(this.orderDetails);console.log("Parent componentWillLoad - parsedOrderDetailsData:",this.parsedOrderDetailsData)};t.prototype.renderOrderDetailsContent=function(){if(!this.parsedOrderDetailsData){console.warn("No parsedOrderDetailsData available");return null}return[this.parsedOrderDetailsData.options&&this.parsedOrderDetailsData.options.length>0&&s("salla-order-details-options",{options:this.parsedOrderDetailsData.options}),this.parsedOrderDetailsData.sub_products&&this.parsedOrderDetailsData.sub_products.length>0&&s(r,null,s("h2",{class:"s-order-details-bundle-title"},salla.lang.get("pages.orders.sub_products")),s("div",{class:"s-order-details-bundle-content"},this.parsedOrderDetailsData.sub_products.map((function(t){return s("salla-order-details-multiple-bundle-product",{key:t===null||t===void 0?void 0:t.id,productDetails:t})}))))]};t.prototype.render=function(){return s(i,{key:"d76fce6a442aca11f3544a9f101ea4245a9317db",class:"s-order-details-wrapper"},this.renderOrderDetailsContent())};Object.defineProperty(t,"watchers",{get:function(){return{orderDetails:["parseOrderDetailsData"]}},enumerable:false,configurable:true});return t}());n.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-d314110a.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sallaOrderDetailsCss","SallaOrderDetails","exports","class_1","prototype","parseOrderDetailsData","newValue","this","parsedOrderDetailsData","orderDetails","JSON","parse","componentWillLoad","console","log","renderOrderDetailsContent","warn","options","length","h","sub_products","Fragment","class","salla","lang","get","map","product","key","id","productDetails","render","Host"],"sources":["src/components/salla-order-details/salla-order-details.scss?tag=salla-order-details","src/components/salla-order-details/salla-order-details.tsx"],"sourcesContent":[null,"import { Component, Host, h, Prop, State, Watch, Fragment } from '@stencil/core';\nimport { OrderProduct } from './interfaces';\n\n/**\n * @salla/ui-components\n * The `salla-order-details` component renders a collapsible summary for an order product with optional options list.\n * It uses the salla-accordion component to provide collapsible functionality.\n */\n@Component({\n tag: 'salla-order-details',\n styleUrl: 'salla-order-details.scss',\n})\nexport class SallaOrderDetails {\n @Prop() orderDetails: string | OrderProduct;\n\n @State() parsedOrderDetailsData: OrderProduct;\n\n @Watch('orderDetails')\n private parseOrderDetailsData(newValue: string | OrderProduct) {\n this.parsedOrderDetailsData = newValue as OrderProduct;\n if (typeof this.orderDetails === 'string') {\n this.parsedOrderDetailsData = JSON.parse(newValue as string);\n } else {\n this.parsedOrderDetailsData = newValue as OrderProduct;\n }\n }\n\n componentWillLoad() {\n this.parseOrderDetailsData(this.orderDetails);\n console.log('Parent componentWillLoad - parsedOrderDetailsData:', this.parsedOrderDetailsData);\n }\n\n private renderOrderDetailsContent() {\n // Check if we have parsed data\n if (!this.parsedOrderDetailsData) {\n console.warn('No parsedOrderDetailsData available');\n return null;\n }\n\n return [\n /* Product Options */\n this.parsedOrderDetailsData.options && this.parsedOrderDetailsData.options.length > 0 && (\n <salla-order-details-options options={this.parsedOrderDetailsData.options} />\n ),\n\n /* Bundle Subproducts */\n this.parsedOrderDetailsData.sub_products &&\n this.parsedOrderDetailsData.sub_products.length > 0 && (\n <Fragment>\n <h2 class=\"s-order-details-bundle-title\">\n {salla.lang.get('pages.orders.sub_products')}\n </h2>\n <div class=\"s-order-details-bundle-content\">\n {this.parsedOrderDetailsData.sub_products.map(product => (\n <salla-order-details-multiple-bundle-product\n key={product?.id}\n productDetails={product}\n />\n ))}\n </div>\n </Fragment>\n ),\n ];\n }\n\n render() {\n return <Host class=\"s-order-details-wrapper\">{this.renderOrderDetailsContent()}</Host>;\n }\n}\n"],"mappings":";;;0JAAA,IAAMA,EAAuB,G,ICYhBC,EAAiBC,EAAA,iC,wBAMpBC,EAAAC,UAAAC,sBAAA,SAAsBC,GAC5BC,KAAKC,uBAAyBF,EAC9B,UAAWC,KAAKE,eAAiB,SAAU,CACzCF,KAAKC,uBAAyBE,KAAKC,MAAML,E,KACpC,CACLC,KAAKC,uBAAyBF,C,GAIlCH,EAAAC,UAAAQ,kBAAA,WACEL,KAAKF,sBAAsBE,KAAKE,cAChCI,QAAQC,IAAI,qDAAsDP,KAAKC,uB,EAGjEL,EAAAC,UAAAW,0BAAA,WAEN,IAAKR,KAAKC,uBAAwB,CAChCK,QAAQG,KAAK,uCACb,OAAO,I,CAGT,MAAO,CAELT,KAAKC,uBAAuBS,SAAWV,KAAKC,uBAAuBS,QAAQC,OAAS,GAClFC,EAAA,+BAA6BF,QAASV,KAAKC,uBAAuBS,UAIpEV,KAAKC,uBAAuBY,cAC1Bb,KAAKC,uBAAuBY,aAAaF,OAAS,GAChDC,EAACE,EAAQ,KACPF,EAAA,MAAIG,MAAM,gCACPC,MAAMC,KAAKC,IAAI,8BAElBN,EAAA,OAAKG,MAAM,kCACRf,KAAKC,uBAAuBY,aAAaM,KAAI,SAAAC,GAAO,OACnDR,EAAA,+CACES,IAAKD,IAAA,MAAAA,SAAA,SAAAA,EAASE,GACdC,eAAgBH,GAHiC,M,EAYjExB,EAAAC,UAAA2B,OAAA,WACE,OAAOZ,EAACa,EAAK,CAAAJ,IAAA,2CAAAN,MAAM,2BAA2Bf,KAAKQ,4B,mJAtDzB,I","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function s(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,r){function a(t){try{
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function s(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,r){function a(t){try{c(n.next(t))}catch(t){r(t)}}function u(t){try{c(n["throw"](t))}catch(t){r(t)}}function c(t){t.done?e(t.value):s(t.value).then(a,u)}c((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(t){return function(i){return c([t,i])}}function c(u){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(n=1,s&&(r=u[0]&2?s["return"]:u[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,u[1])).done)return r;if(s=0,r)u=[u[0]&2,r.value];switch(u[0]){case 0:case 1:r=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;s=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){e.label=u[1];break}if(u[0]===6&&e.label<r[1]){e.label=r[1];r=u;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(u);break}if(r[2])e.ops.pop();e.trys.pop();continue}u=i.call(t,e)}catch(t){u=[6,t];s=0}finally{n=r=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-CQDiSGcm.system.js","./p-CzwwMHuN.system.js","./p-Bnro4LR3.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var i,e,n,s,r,a,u;return{setters:[function(t){i=t.r;e=t.c;n=t.h;s=t.H;r=t.g},function(t){a=t.H},function(t){u=t.F},null],execute:function(){var c=":host{display:block}";var o=t("salla_filters_widget",function(){function t(t){i(this,t);this.changed=e(this,"changed");this.initHeight=195;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}t.prototype.connectedCallback=function(){var t=this;this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((function(){t.page=salla.config.get("page")}));salla.lang.onLoaded((function(){t.showMoreLabel=salla.lang.getWithDefault("common.titles.more",t.showMoreLabel);t.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",t.showLessLabel)}))};t.prototype.componentDidLoad=function(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight="".concat(this.initHeight,"px"));this.widgetContent.style.height="".concat(this.widgetContent.scrollHeight,"px")};t.prototype.setWidgetHeight=function(){return __awaiter(this,arguments,void 0,(function(t){var i=this;if(t===void 0){t=250}return __generator(this,(function(e){this.widgetContent.removeAttribute("style");setTimeout((function(){var t=i.widgetContent.scrollHeight;i.widgetContent.style.height=t+"px"}),t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.option.type===u.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((function(t){return t.checked=false}));return[2]}))}))};t.prototype.showMore=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?"".concat(this.widgetValues.scrollHeight,"px"):"".concat(this.initHeight,"px");setTimeout((function(){t.widgetContent.style.height="".concat(t.widgetContent.scrollHeight,"px")}),400);return[2]}))}))};t.prototype.toggleWidget=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){this.isOpen=!this.isOpen;a.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(function(){return t.isOpen}));return[2]}))}))};t.prototype.renderFilterOption=function(t){var i=this;if(![u.VALUES,u.MINIMUM,u.VARIANTS].includes(t.type)){return""}return t.values.map((function(e,s){var r=typeof e=="number"?e:e.key||e.value;return n("label",{class:"s-filters-label",htmlFor:"".concat(t.key,"-option-").concat(r),key:"".concat(t.key,"-option-").concat(r)},n("input",{id:"".concat(t.key,"-option-").concat(r),name:t.key,type:"radio",checked:i.isSelectedOption(t,r),class:"s-filters-radio",onChange:function(e){return i.changed.emit({event:e,option:t,value:r})}}),i.getOptionLabel(t,e))}))};t.prototype.isSelectedOption=function(t,i){if(t.type===u.MINIMUM){return this.filtersData[t.key]==i}if(t.type===u.VARIANTS){return this.filtersData[t.type]&&this.filtersData[t.type][Object.keys(this.filtersData[t.type])[0]]==i}if(t.type===u.RANGE){return this.filtersData[t.key]&&this.filtersData[t.key].min==i.min&&this.filtersData[t.key].max==i.max}if(t.type===u.VALUES){return this.filtersData[t.key]&&Number(this.filtersData[t.key])==Number(i)}return false};t.prototype.getOptionLabel=function(t,i){if(t.key=="rating"){return n("salla-rating-stars",{size:"small",value:i})}var e=i.value||"null";return n("span",{class:"s-filters-option-name"},e)};t.prototype.render=function(){var t=this;return n(s,{key:"1987fec03cfe48cddc60af2d81bbc30a476dcb61",class:"s-filters-widget-container"},n("h3",{key:"4232775c4012d1be8bb3036d9d09e5d29d951ee4",class:"s-filters-widget-title",onClick:function(){return t.toggleWidget()}},n("span",{key:"61cf9ea5a69f3ab5377502a396cc84478c6152a1"},this.option.label),n("span",{key:"b75914eb06f9d419d0a89da2a8f2da2f891f3d27",class:"s-filters-widget-plusminus ".concat(this.isOpen?"s-filters-widget-plusminus-active":"")})),n("div",{key:"f65e2f8a44648b034dacf1bda1aa64b5398627b7",class:"s-filters-widget-content",ref:function(i){return t.widgetContent=i}},n("div",{key:"adcafe169ce8cbef671263f3624bce071b168c36",class:"s-filters-widget-values",ref:function(i){return t.widgetValues=i}},n("slot",{key:"fa006556e44e508c3c64cc5ae76cc826b7e7601e"}),this.option.type!==u.RANGE?this.renderFilterOption(this.option):n("salla-price-range",{onChanged:function(i){t.changed.emit(i.detail)},ref:function(i){return t.priceRange=i},filtersData:this.filtersData,option:this.option})),this.withLoadMore&&n("a",{key:"16a4ddeb365dc1d52fc51a8999fc6d7dbe094658",class:"s-filters-widget-more",onClick:function(){return t.showMore()}},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());o.style=c}}}));
|
|
5
|
+
//# sourceMappingURL=p-d33197dc.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
System.register(["./p-9cvlynxW.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"7ce07166eab2f88497fadd8f7a103c7afb431fd3"},t("ul",{key:"6d60b95f8268b717d92117217a385baf45b83a16",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
System.register(["./p-CQDiSGcm.system.js","./p-CKompMo1.system.js"],(function(c){"use strict";var l,t,n,s,i,e;return{setters:[function(c){l=c.r;t=c.h;n=c.H;s=c.g},function(c){i=c.f;e=c.t}],execute:function(){var o='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>instagram</title>\n<path d="M23 32h-14c-4.971 0-9-4.029-9-9v0-14c0-4.971 4.029-9 9-9v0h14c4.971 0 9 4.029 9 9v0 14c0 4.971-4.029 9-9 9v0zM9 2c-3.866 0-7 3.134-7 7v0 14c0 3.866 3.134 7 7 7v0h14c3.866 0 7-3.134 7-7v0-14c0-3.866-3.134-7-7-7v0zM16 24c-4.418 0-8-3.582-8-8s3.582-8 8-8c4.418 0 8 3.582 8 8v0c0 4.418-3.582 8-8 8v0zM16 10c-3.314 0-6 2.686-6 6s2.686 6 6 6c3.314 0 6-2.686 6-6v0c0-3.314-2.686-6-6-6v0zM25 9c-1.105 0-2-0.895-2-2s0.895-2 2-2c1.105 0 2 0.895 2 2v0c0 1.105-0.895 2-2 2v0zM25 7v0z"></path>\n</svg>\n';var a='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>youtube</title>\n<path d="M16 28c-3.666 0-8.376-0.056-10.29-0.162-0.113 0.010-0.244 0.016-0.376 0.016-1.676 0-3.139-0.91-3.922-2.264l-0.012-0.022c-0.97-1.6-1.4-4.248-1.4-8.558s0.436-6.962 1.412-8.6c0.782-1.36 2.227-2.262 3.883-2.262 0.148 0 0.293 0.007 0.437 0.021l-0.018-0.001c1.872-0.124 6.544-0.168 10.286-0.168s8.4 0.044 10.292 0.168c0.124-0.012 0.267-0.019 0.412-0.019 1.656 0 3.101 0.905 3.866 2.247l0.012 0.022c0.982 1.624 1.418 4.27 1.418 8.582 0 4.338-0.438 6.982-1.422 8.6-0.789 1.364-2.241 2.268-3.904 2.268-0.133 0-0.265-0.006-0.395-0.017l0.017 0.001c-1.926 0.092-6.632 0.148-10.296 0.148zM16 8c-3.712 0-8.334 0.042-10.168 0.164-1.688 0.094-2.14 0.306-2.702 1.268-0.756 1.81-1.195 3.913-1.195 6.119 0 0.51 0.024 1.015 0.069 1.513l-0.005-0.064c-0.042 0.435-0.065 0.941-0.065 1.453 0 2.198 0.438 4.294 1.231 6.205l-0.039-0.107c0.566 0.968 1.022 1.184 2.708 1.296 3.29 0.184 17.022 0.184 20.34 0 1.678-0.11 2.132-0.326 2.684-1.28 0.764-1.803 1.208-3.899 1.208-6.1 0-0.513-0.024-1.020-0.071-1.52l0.005 0.064c0.042-0.436 0.065-0.943 0.065-1.455 0-2.203-0.439-4.303-1.235-6.218l0.040 0.107v-0.016c-0.554-0.958-1-1.17-2.684-1.264-1.862-0.122-6.644-0.164-10.186-0.164zM13 23c-0.552 0-1-0.448-1-1v0-10c0 0 0 0 0 0 0-0.552 0.448-1 1-1 0.196 0 0.38 0.057 0.534 0.154l-0.004-0.002 8 5c0.284 0.18 0.47 0.492 0.47 0.848s-0.186 0.668-0.466 0.846l-0.004 0.002-8 5c-0.15 0.095-0.334 0.152-0.53 0.152 0 0 0 0 0 0v0zM14 13.8v6.4l5.114-3.2z"></path>\n</svg>\n';var v='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>snapchat</title>\n<path d="M16.186 30h-0.266c-1.843-0.023-3.525-0.693-4.834-1.792l0.012 0.010c-0.476-0.405-1.043-0.72-1.665-0.909l-0.033-0.009c-0.287-0.044-0.617-0.069-0.954-0.069-0.492 0-0.972 0.053-1.434 0.155l0.044-0.008c-0.261 0.061-0.564 0.102-0.875 0.114l-0.009 0c-0.017 0.001-0.036 0.001-0.056 0.001-0.811 0-1.495-0.545-1.705-1.288l-0.003-0.012c-0.076-0.26-0.132-0.506-0.186-0.746-0.961-0.157-1.822-0.412-2.633-0.76l0.073 0.028c-0.667-0.259-1.199-0.745-1.509-1.362l-0.007-0.016c-0.082-0.189-0.135-0.409-0.146-0.64l-0-0.004c-0.002-0.031-0.003-0.067-0.003-0.103 0-0.841 0.614-1.538 1.417-1.668l0.010-0.001c0.822-0.141 1.555-0.438 2.198-0.859l-0.022 0.013c0.611-0.405 1.138-0.872 1.591-1.404l0.009-0.010c0.526-0.595 0.98-1.273 1.337-2.007l0.023-0.053c0.060-0.102 0.107-0.22 0.135-0.346l0.001-0.008c-0.092-0.020-0.73-0.222-0.972-0.298s-0.374-0.12-0.506-0.17c-0.546-0.205-1.016-0.487-1.424-0.839l0.006 0.005c-0.471-0.388-0.768-0.971-0.768-1.624 0-0.126 0.011-0.249 0.032-0.369l-0.002 0.013c0.143-0.644 0.551-1.172 1.1-1.474l0.011-0.006c0.389-0.241 0.861-0.384 1.366-0.384 0.347 0 0.678 0.067 0.982 0.19l-0.018-0.006c0.128 0.060 0.242 0.106 0.344 0.142-0.082-0.573-0.129-1.235-0.129-1.908 0-1.482 0.227-2.91 0.648-4.253l-0.027 0.101c0.512-1.142 1.207-2.114 2.056-2.925l0.004-0.003c0.7-0.664 1.516-1.214 2.413-1.616l0.055-0.022c1.128-0.5 2.444-0.794 3.828-0.8h0.592c1.386 0.007 2.701 0.301 3.893 0.825l-0.063-0.025c0.956 0.42 1.777 0.967 2.485 1.632l-0.005-0.004c0.855 0.815 1.55 1.789 2.039 2.876l0.023 0.058c0.396 1.237 0.625 2.659 0.625 4.135 0 0.658-0.045 1.304-0.133 1.938l0.008-0.073 0.172-0.076c0.303-0.16 0.661-0.253 1.042-0.253 0.374 0 0.728 0.091 1.039 0.251l-0.013-0.006c0.886 0.274 1.528 1.063 1.582 2.008l0 0.006c-0.001 0.602-0.25 1.146-0.65 1.536l-0 0c-0.429 0.408-0.945 0.73-1.516 0.935l-0.030 0.009c-0.144 0.056-0.316 0.112-0.504 0.17-0.367 0.103-0.686 0.235-0.984 0.398l0.024-0.012c0.018 0.030 0.042 0.094 0.086 0.18 0.963 2.174 2.834 3.796 5.118 4.4l0.054 0.012c0.814 0.133 1.427 0.83 1.427 1.671 0 0.036-0.001 0.072-0.003 0.108l0-0.005c-0.012 0.241-0.070 0.465-0.165 0.669l0.005-0.011c-0.319 0.624-0.847 1.103-1.489 1.352l-0.019 0.006c-0.739 0.323-1.6 0.578-2.497 0.724l-0.063 0.008c-0.056 0.264-0.112 0.496-0.186 0.742-0.215 0.747-0.893 1.284-1.696 1.284-0.011 0-0.021-0-0.032-0l0.002 0c-0.328-0.004-0.644-0.042-0.949-0.11l0.031 0.006c-0.404-0.090-0.869-0.142-1.345-0.142-0.353 0-0.7 0.029-1.038 0.083l0.037-0.005c-0.653 0.195-1.218 0.508-1.699 0.917l0.007-0.005c-1.275 1.065-2.916 1.731-4.71 1.788l-0.012 0zM8.444 25.218c0.457 0.001 0.904 0.041 1.339 0.117l-0.047-0.007c0.966 0.232 1.808 0.664 2.516 1.252l-0.010-0.008c0.96 0.829 2.199 1.357 3.56 1.427l0.014 0.001h0.37c1.373-0.070 2.61-0.597 3.576-1.43l-0.008 0.006c0.701-0.583 1.546-1.016 2.474-1.239l0.042-0.009c0.394-0.063 0.849-0.1 1.312-0.1 0.615 0 1.216 0.064 1.795 0.186l-0.057-0.010c0.105 0.023 0.238 0.045 0.372 0.059l0.016 0.001c0.042-0.162 0.076-0.314 0.11-0.47 0.059-0.339 0.156-0.641 0.287-0.924l-0.009 0.023 0.234-0.44 0.492-0.078c0.99-0.119 1.892-0.359 2.738-0.705l-0.070 0.025c0.086-0.040 0.158-0.076 0.216-0.11-2.748-0.86-4.933-2.816-6.081-5.342l-0.025-0.062c-0.184-0.31-0.294-0.684-0.294-1.083 0-0.27 0.050-0.528 0.14-0.765l-0.005 0.015c0.492-0.783 1.284-1.339 2.212-1.507l0.020-0.003c0.14-0.044 0.27-0.084 0.376-0.126 0.327-0.108 0.609-0.272 0.849-0.482l-0.003 0.002c0.074-0.106 0-0.2-0.216-0.284-0.094-0.041-0.203-0.065-0.318-0.066h-0c-0.529 0.242-1.142 0.411-1.786 0.474l-0.024 0.002c-0.313-0-0.612-0.064-0.883-0.18l0.015 0.006-0.628-0.28 0.072-1.272c0.093-0.623 0.146-1.342 0.146-2.074 0-1.269-0.16-2.501-0.46-3.677l0.022 0.103c-0.396-0.896-0.936-1.659-1.598-2.296l-0.002-0.002c-0.541-0.508-1.172-0.928-1.865-1.233l-0.043-0.017c-0.895-0.396-1.939-0.629-3.036-0.634h-0.002l-0.218-1v1h-0.348c-1.105 0.003-2.155 0.237-3.106 0.656l0.050-0.020c-0.733 0.322-1.361 0.742-1.903 1.253l0.003-0.003c-0.663 0.638-1.203 1.398-1.582 2.247l-0.018 0.045c-0.279 1.065-0.44 2.287-0.44 3.547 0 0.704 0.050 1.395 0.147 2.072l-0.009-0.078 0.080 1.372-0.618 0.284c-0.31 0.108-0.666 0.17-1.038 0.17-0.6 0-1.163-0.163-1.645-0.446l0.015 0.008c-0.019-0.001-0.041-0.002-0.064-0.002-0.154 0-0.299 0.039-0.425 0.109l0.005-0.002c-0.063 0.032-0.115 0.078-0.153 0.135l-0.001 0.001c0.258 0.244 0.567 0.435 0.91 0.556l0.018 0.006c0.094 0.036 0.2 0.070 0.32 0.108 0.971 0.167 1.784 0.732 2.282 1.516l0.008 0.014c0.087 0.225 0.137 0.486 0.137 0.758 0 0.403-0.11 0.781-0.303 1.104l0.005-0.010c-0.459 0.983-1.016 1.829-1.677 2.582l0.011-0.012c-0.588 0.687-1.26 1.279-2.004 1.768l-0.036 0.022c-0.689 0.451-1.49 0.805-2.346 1.017l-0.054 0.011c0.060 0.034 0.132 0.072 0.218 0.112 0.776 0.322 1.678 0.561 2.618 0.675l0.050 0.005 0.498 0.078 0.234 0.446c0.116 0.255 0.209 0.553 0.265 0.863l0.003 0.023c0.038 0.164 0.072 0.328 0.118 0.496 0.12-0.014 0.242-0.042 0.378-0.068 0.528-0.12 1.138-0.192 1.762-0.2l0.006-0zM30.244 22.892v0z"></path>\n</svg>\n';var r='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>tiktok</title>\n<path d="M29.046 7.029c-3.359 0-6.092-2.733-6.092-6.092 0-0.518-0.42-0.938-0.938-0.938h-5.021c-0.518 0-0.938 0.42-0.938 0.938v20.585c0 1.975-1.606 3.581-3.581 3.581s-3.581-1.606-3.581-3.581c0-1.975 1.606-3.581 3.581-3.581 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938-5.777 0-10.477 4.7-10.477 10.477s4.7 10.477 10.477 10.477c5.777 0 10.477-4.7 10.477-10.477v-9.112c1.866 0.995 3.942 1.514 6.092 1.514 0.518 0 0.938-0.42 0.938-0.938v-5.021c0-0.518-0.42-0.938-0.938-0.938zM28.108 12.011c-2.001-0.166-3.902-0.866-5.544-2.047-0.285-0.206-0.662-0.234-0.975-0.073s-0.51 0.482-0.51 0.834v10.798c0 4.743-3.859 8.602-8.602 8.602s-8.602-3.859-8.602-8.602c0-4.427 3.361-8.083 7.665-8.552v3.176c-2.563 0.446-4.519 2.687-4.519 5.376 0 3.009 2.447 5.456 5.456 5.456s5.456-2.448 5.456-5.456v-19.648h3.201c0.429 3.645 3.329 6.545 6.974 6.974z"></path>\n</svg>\n';var h=":host{display:block}";var u=c("salla_social",function(){function c(c){var t=this;l(this,c);var n;this.links=salla.config.get("store.social");this.iconsList={instagram:o,twitter:e,facebook:i,youtube:a,snapchat:v,tiktok:r};this.socialSlot=((n=this.host.querySelector('[slot="social-item"]'))===null||n===void 0?void 0:n.innerHTML)||'<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>';salla.lang.onLoaded((function(){t.links=salla.config.get("store.social")}))}c.prototype.getLinksArray=function(){return this.links?Object.entries(this.links).filter((function(c){var l=c[0],t=c[1];return!!t&&l!=="whatsapp"})).map((function(c){var l=c[0],t=c[1];return{type:l,value:t}})):[]};c.prototype.componentWillLoad=function(){return new Promise((function(c){return salla.onReady(c)}))};c.prototype.render=function(){var c=this;var l=this.getLinksArray();return t(n,{key:"499e2f4c68034191143f53bb4d4581e85e4066b0"},t("ul",{key:"17053219a16087c96e1d9e5c15d1478729f43954",class:"s-social-list"},l.map((function(l){return t("li",{class:"s-social-link"},t("div",{id:"social-slot",innerHTML:c.socialSlot.replace(/\{icon\}/g,c.iconsList[l.type]).replace(/\{type\}/g,l.type).replace(/\{link\}/g,l.value.toString())}))}))))};c.prototype.componentDidRender=function(){var c;this.host.querySelectorAll("#social-slot").forEach((function(c){return c.replaceWith(c.firstChild)}));(c=this.host.querySelector('[slot="social-item"]'))===null||c===void 0?void 0:c.remove()};Object.defineProperty(c.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return c}());u.style=h}}}));
|
|
5
|
+
//# sourceMappingURL=p-d3c9cfbb.system.entry.js.map
|
|
@@ -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-CQDiSGcm.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-d4017888.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(i,t,e,n){function r(i){return i instanceof e?i:new e((function(t){t(i)}))}return new(e||(e=Promise))((function(e,s){function a(i){try{u(n.next(i))}catch(i){s(i)}}function o(i){try{u(n["throw"](i))}catch(i){s(i)}}function u(i){i.done?e(i.value):r(i.value).then(a,o)}u((n=n.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(i){return function(t){return u([i,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,o[0]&&(e=0)),e)try{if(n=1,r&&(s=o[0]&2?r["return"]:o[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;if(r=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;r=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){e.label=o[1];break}if(o[0]===6&&e.label<s[1]){e.label=s[1];s=o;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(o);break}if(s[2])e.ops.pop();e.trys.pop();continue}o=t.call(i,e)}catch(i){o=[6,i];r=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* Crafted with ❤ by Salla
|
|
4
|
-
*/System.register(["./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-CQDiSGcm.system.js","./p-Dxc5oJG6.system.js"],(function(i){"use strict";var t,e,n,r;return{setters:[function(i){t=i.r;e=i.h;n=i.g},function(i){r=i.I}],execute:function(){var s=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>';var a=' <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>';var o=' <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>';var u=":host{display:block}";var c=i("salla_review_card",function(){function i(i){var e=this;t(this,i);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=function(i){var t;if(!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.setPointerCapture(i.pointerId);e.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=function(i){if(!e.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=function(i){var t;if(!e.isSwiping||!i.isPrimary)return;(t=e.sliderElement)===null||t===void 0?void 0:t.releasePointerCapture(i.pointerId);e.isSwiping=false};this.goToSlide=function(i){e.currentSlide=Math.max(0,Math.min(i,e.images.length-1))}}i.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var i,t;return __generator(this,(function(e){switch(e.label){case 0:return[4,salla.onReady()];case 1:e.sent();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?" تم شراءه ".concat((i=this.review.product)===null||i===void 0?void 0:i.sold_quantity," مرة"):"Purchased ".concat(this.review.product.sold_quantity," times"),{count:(t=this.review.product)===null||t===void 0?void 0:t.sold_quantity});this.initializeSlider();return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.removeEventListeners()};Object.defineProperty(i.prototype,"images",{get:function(){var i,t;var e=this.review;return((i=e===null||e===void 0?void 0:e.images)===null||i===void 0?void 0:i.length)>1?e.images.map((function(i,t){return{url:i,alt:"",id:t}})):((t=e===null||e===void 0?void 0:e.product)===null||t===void 0?void 0:t.images)||[]},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasMultipleImages",{get:function(){return this.images.length>1},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"slideTransform",{get:function(){var i=this.isRTL?1:-1;return"translateX(".concat(this.currentSlide*100*i,"%)")},enumerable:false,configurable:true});i.prototype.initializeSlider=function(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()};i.prototype.addEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})};i.prototype.removeEventListeners=function(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)};i.prototype.startSwipe=function(i,t){this.startPoint={x:i,y:t};this.isSwiping=true};i.prototype.componentDidRender=function(){this.removeEventListeners();this.addEventListeners()};i.prototype.endSwipe=function(i,t){this.isSwiping=false;var e=i-this.startPoint.x;var n=t-this.startPoint.y;this.processSwipe(e,n)};i.prototype.processSwipe=function(i,t){var e=10;if(Math.abs(i)<e||Math.abs(t)>Math.abs(i))return;var n=i<0;var r=this.isRTL?!n:n;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}};i.prototype.goToNextSlide=function(){if(this.currentSlide<this.images.length-1){this.currentSlide++}};i.prototype.goToPrevSlide=function(){if(this.currentSlide>0){this.currentSlide--}};i.prototype.renderStars=function(){var i=this;return Array(5).fill(null).map((function(t,n){return e("span",{key:n,innerHTML:i.review.stars>=n+1?s:a})}))};i.prototype.renderDots=function(){var i=this;return this.images.map((function(t,n){var r=t.url;return e("button",{key:r||n,type:"button",class:"s-review-card-slider-dot ".concat(i.currentSlide===n?"active":""),onClick:function(){return i.goToSlide(n)},"aria-label":"Go to slide ".concat(n+1),onPointerDown:function(){return i.goToSlide(n)}})}))};i.prototype.renderSlider=function(){if(!this.hasMultipleImages)return null;return e("div",{class:"s-review-card-slider-container"},e("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((function(i){return e("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},e("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))}))),e("div",{class:"s-review-card-slider-dots"},this.renderDots()))};i.prototype.renderSingleImage=function(){var i,t;var n=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!n||this.hasMultipleImages)return null;return e("img",{src:n.url,alt:n.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})};i.prototype.renderHeader=function(){var i,t;return e("div",{class:"s-review-card-header"},e("div",{class:"s-review-card-reviewer-name"},e("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&e("span",{class:"s-review-card-verified-icon",innerHTML:r})),e("div",{class:"s-review-card-stars"},this.renderStars()))};i.prototype.renderProductInfo=function(){var i,t,n,r,s;var a=(i=this.review)===null||i===void 0?void 0:i.product;if(!a)return null;return e("a",{href:(n=(t=this.review)===null||t===void 0?void 0:t.product)===null||n===void 0?void 0:n.url,class:"s-review-card-product-container"},e("img",{alt:((r=a.image)===null||r===void 0?void 0:r.alt)||"Product",src:(s=a.image)===null||s===void 0?void 0:s.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),e("div",{class:"s-review-card-product-details"},e("p",{class:"s-review-card-product-details-name"},a.name),this.showPurchaseCount?e("p",{class:"s-review-card-product-details-purchase-count"},e("span",{innerHTML:o}),this.purchasedCount):null))};i.prototype.render=function(){var i;return e("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),l(),e("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),e("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),l(),this.renderProductInfo()))};Object.defineProperty(i.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return i}());var l=function(i){return e("div",{class:"s-review-card-divider ".concat("")})};c.style=u}}}));
|
|
5
|
+
//# sourceMappingURL=p-d43b5d6a.system.entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as s,g as t}from"./p-
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
import{r as i,h as s,g as t}from"./p-Hw2jlaNN.js";import{I as e}from"./p-uTyAzPSy.js";var r=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="currentcolor" />\n</svg>`;var a=` <svg width="18" height="17" view-box="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M9.00045 13.6951L3.71036 16.6563L4.89186 10.71L0.440918 6.59397L6.4612 5.88017L9.00045 0.375122L11.5396 5.88017L17.5599 6.59397L13.109 10.71L14.2905 16.6563L9.00045 13.6951Z" fill="#DDDDDD" />\n</svg>`;var l=` <svg width="12" height="17" view-box="0 0 12 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M6 16.2501C9.10658 16.2501 11.625 13.7317 11.625 10.6251C11.625 9.976 11.4523 9.35252 11.25 8.77232C9.99998 10.0075 9.05002 10.6251 8.4 10.6251C11.3966 5.37512 9.75 3.12512 5.25 0.125122C5.625 3.87475 3.15302 5.58043 2.14634 6.52757C1.0559 7.5535 0.375 9.00977 0.375 10.6251C0.375 13.7317 2.89339 16.2501 6 16.2501ZM6.53205 2.92636C8.96333 4.98908 8.97495 6.59185 7.09725 9.88157C6.5265 10.8815 7.2486 12.1251 8.4 12.1251C8.9163 12.1251 9.43807 11.9745 9.98917 11.6789C9.52342 13.4466 7.91393 14.7501 6 14.7501C3.72182 14.7501 1.875 12.9033 1.875 10.6251C1.875 9.47072 2.34959 8.39582 3.17419 7.62002C3.2687 7.53115 3.74812 7.1062 3.76858 7.08782C4.08646 6.8017 4.34835 6.54985 4.60718 6.2727C5.52998 5.28461 6.19283 4.18735 6.53205 2.92636Z" fill="currentcolor" />\n </svg>`;const n=":host{display:block}";const d=class{constructor(s){i(this,s);this.currentSlide=0;this.showPurchaseCount=false;this.startPoint={x:0,y:0};this.isSwiping=false;this.isRTL="rtl";this.handlePointerDown=i=>{var s;if(!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.setPointerCapture(i.pointerId);this.startSwipe(i.clientX,i.clientY);i.preventDefault()};this.handlePointerMove=i=>{if(!this.isSwiping||!i.isPrimary)return;i.preventDefault()};this.handlePointerUp=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.endSwipe(i.clientX,i.clientY)};this.handlePointerCancel=i=>{var s;if(!this.isSwiping||!i.isPrimary)return;(s=this.sliderElement)===null||s===void 0?void 0:s.releasePointerCapture(i.pointerId);this.isSwiping=false};this.goToSlide=i=>{this.currentSlide=Math.max(0,Math.min(i,this.images.length-1))}}async componentDidLoad(){var i,s;await salla.onReady();this.showPurchaseCount=!!salla.config.get("store.settings.product.total_sold_enabled",false);this.isRTL=salla.config.get("theme.is_rtl",true);this.purchasedCount=salla.lang.getWithDefault("blocks.home.reviews.purchased_count",this.isRTL?` تم شراءه ${(i=this.review.product)===null||i===void 0?void 0:i.sold_quantity} مرة`:`Purchased ${this.review.product.sold_quantity} times`,{count:(s=this.review.product)===null||s===void 0?void 0:s.sold_quantity});this.initializeSlider()}disconnectedCallback(){this.removeEventListeners()}get images(){var i,s;const{review:t}=this;return((i=t===null||t===void 0?void 0:t.images)===null||i===void 0?void 0:i.length)>1?t.images.map(((i,s)=>({url:i,alt:"",id:s}))):((s=t===null||t===void 0?void 0:t.product)===null||s===void 0?void 0:s.images)||[]}get hasMultipleImages(){return this.images.length>1}get slideTransform(){const i=this.isRTL?1:-1;return`translateX(${this.currentSlide*100*i}%)`}initializeSlider(){if(!this.hasMultipleImages)return;this.sliderElement=this.el.querySelector(".s-review-card-slider-container");if(!this.sliderElement)return;this.sliderElement.style.touchAction="pan-y pinch-zoom";this.addEventListeners()}addEventListeners(){if(!this.sliderElement)return;this.sliderElement.addEventListener("pointerdown",this.handlePointerDown,{passive:false});this.sliderElement.addEventListener("pointermove",this.handlePointerMove,{passive:false});this.sliderElement.addEventListener("pointerup",this.handlePointerUp,{passive:true});this.sliderElement.addEventListener("pointercancel",this.handlePointerCancel,{passive:true})}removeEventListeners(){if(!this.sliderElement)return;this.sliderElement.removeEventListener("pointerdown",this.handlePointerDown);this.sliderElement.removeEventListener("pointermove",this.handlePointerMove);this.sliderElement.removeEventListener("pointerup",this.handlePointerUp);this.sliderElement.removeEventListener("pointercancel",this.handlePointerCancel)}startSwipe(i,s){this.startPoint={x:i,y:s};this.isSwiping=true}componentDidRender(){this.removeEventListeners();this.addEventListeners()}endSwipe(i,s){this.isSwiping=false;const t=i-this.startPoint.x;const e=s-this.startPoint.y;this.processSwipe(t,e)}processSwipe(i,s){const t=10;if(Math.abs(i)<t||Math.abs(s)>Math.abs(i))return;const e=i<0;const r=this.isRTL?!e:e;if(r){this.goToNextSlide()}else{this.goToPrevSlide()}}goToNextSlide(){if(this.currentSlide<this.images.length-1){this.currentSlide++}}goToPrevSlide(){if(this.currentSlide>0){this.currentSlide--}}renderStars(){return Array(5).fill(null).map(((i,t)=>s("span",{key:t,innerHTML:this.review.stars>=t+1?r:a})))}renderDots(){return this.images.map((({url:i},t)=>s("button",{key:i||t,type:"button",class:`s-review-card-slider-dot ${this.currentSlide===t?"active":""}`,onClick:()=>this.goToSlide(t),"aria-label":`Go to slide ${t+1}`,onPointerDown:()=>this.goToSlide(t)})))}renderSlider(){if(!this.hasMultipleImages)return null;return s("div",{class:"s-review-card-slider-container"},s("div",{class:"s-review-card-slides",style:{transform:this.slideTransform}},this.images.map((i=>s("div",{key:i===null||i===void 0?void 0:i.id,class:"s-review-card-slider-slide"},s("img",{src:i.url,alt:i.alt||"Product image",width:275,height:275,loading:"lazy",draggable:false}))))),s("div",{class:"s-review-card-slider-dots"},this.renderDots()))}renderSingleImage(){var i,t;const e=(t=(i=this.review)===null||i===void 0?void 0:i.product)===null||t===void 0?void 0:t.image;if(!e||this.hasMultipleImages)return null;return s("img",{src:e.url,alt:e.alt||"Product image",class:"s-review-card-image",width:275,height:275,loading:"lazy",decoding:"async",draggable:false})}renderHeader(){var i,t;return s("div",{class:"s-review-card-header"},s("div",{class:"s-review-card-reviewer-name"},s("p",null,(i=this.review)===null||i===void 0?void 0:i.name),((t=this.review)===null||t===void 0?void 0:t.has_order)&&s("span",{class:"s-review-card-verified-icon",innerHTML:e})),s("div",{class:"s-review-card-stars"},this.renderStars()))}renderProductInfo(){var i,t,e,r,a;const n=(i=this.review)===null||i===void 0?void 0:i.product;if(!n)return null;return s("a",{href:(e=(t=this.review)===null||t===void 0?void 0:t.product)===null||e===void 0?void 0:e.url,class:"s-review-card-product-container"},s("img",{alt:((r=n.image)===null||r===void 0?void 0:r.alt)||"Product",src:(a=n.image)===null||a===void 0?void 0:a.url,class:"s-review-card-product-image",width:60,height:60,loading:"lazy",decoding:"async",draggable:false}),s("div",{class:"s-review-card-product-details"},s("p",{class:"s-review-card-product-details-name"},n.name),this.showPurchaseCount?s("p",{class:"s-review-card-product-details-purchase-count"},s("span",{innerHTML:l}),this.purchasedCount):null))}render(){var i;return s("div",{key:"22c0b4997b5eaa3eee23c642aa8fc778cff7fd22",class:"s-review-card-container"},this.renderSlider(),this.renderSingleImage(),o(),s("div",{key:"db1391a8d4ddad808f54551b39d9bfeb55466225",class:"s-review-card-content"},this.renderHeader(),s("p",{key:"4c6e9af60e480f5c9f840e7ba95f7c59ba12e172",class:"s-review-card-review-content",innerHTML:(i=this.review)===null||i===void 0?void 0:i.content}),o(),this.renderProductInfo()))}get el(){return t(this)}};const o=i=>s("div",{class:`s-review-card-divider ${""}`});d.style=n;export{d as salla_review_card};
|
|
5
|
+
//# sourceMappingURL=p-d7604122.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-CQDiSGcm.system.js","./p-CLqFzsVe.system.js"],(function(t){"use strict";var n,i,s,e;return{setters:[function(t){n=t.r;i=t.h;s=t.g},function(t){e=t.a}],execute:function(){var a=":host{display:block}";var r=t("salla_advertisement",function(){function t(t){var i=this;n(this,t);var s;this.currentSlug=salla.config.get("page.slug");salla.onReady((function(){i.currentSlug=salla.config.get("page.slug")}));this.advSlot=((s=this.host.querySelector('[slot="adv"]'))===null||s===void 0?void 0:s.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 i("div",{class:{"s-hidden":t.isNotVisible(n),"s-advertisement":true},"data-id":n.id,style:{"background-color":n.colors.bg,color:n.colors.text}},i("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 s(this)},enumerable:false,configurable:true});return t}());r.style=a}}}));
|
|
5
|
+
//# sourceMappingURL=p-d8039b97.system.entry.js.map
|