@salla.sa/twilight-components 2.14.377 → 2.14.379
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/{filepond-Ds5SboGX.js → filepond-DeK1JlYj.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CiuOM8Vm.js → filepond-plugin-file-poster-CKwue0gw.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-voKg0Usf.js → filepond-plugin-file-validate-size-DOyErYLM.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DTD5zuEB.js → filepond-plugin-file-validate-type-CU1RpQcp.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-9AlDikBO.js → filepond-plugin-image-edit-B9HP-QyX.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CwrQWSUK.js → filepond-plugin-image-exif-orientation-ChkDsVpW.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Cn3dM1Mv.js → filepond-plugin-image-preview-yVWAKO74.js} +1 -1
- package/dist/cjs/{index-DUzQ48hR.js → index-DJeWXRgb.js} +1 -1
- package/dist/cjs/{index-BRmyjxh8.js → index-DbXsJQgp.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion-body_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_4.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.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_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.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-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.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 +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-B1kN8AK-.js → vanilla-picker-_efxLFRc.js} +1 -1
- package/dist/components/index.js +2 -2
- package/dist/esm/{filepond-JF8hYPuh.js → filepond-Dc2yPlyl.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CTJ4szfB.js → filepond-plugin-file-poster-BDl4PvAQ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Jh8Ua3zk.js → filepond-plugin-file-validate-size-CuAcfGXW.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-wRcUPSd7.js → filepond-plugin-file-validate-type-Nae1uVmb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-C9oJ-3Xm.js → filepond-plugin-image-edit-CMwEVunH.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-D2PoXzFu.js → filepond-plugin-image-exif-orientation-DjUH5Di_.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BzYVseWH.js → filepond-plugin-image-preview-p7Vgot5R.js} +1 -1
- package/dist/esm/{index-BydBx2Hz.js → index-DYl9MMu1.js} +2 -2
- package/dist/esm/{index-BbsvNFsp.js → index-Db2IiLsV.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion-body_3.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_4.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.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_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.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-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down_2.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-B_HpR2sR.js → vanilla-picker-DvNGHEcJ.js} +1 -1
- package/dist/twilight/{p-70a78ebf.entry.js → p-09415a32.entry.js} +1 -1
- package/dist/twilight/{p-269b7ccb.entry.js → p-0dbee06d.entry.js} +1 -1
- package/dist/twilight/{p-f3ed92ab.entry.js → p-0fe06f81.entry.js} +1 -1
- package/dist/twilight/{p-2488dc2d.entry.js → p-1016de73.entry.js} +1 -1
- package/dist/twilight/{p-c9f697b2.entry.js → p-16a67ed0.entry.js} +1 -1
- package/dist/twilight/{p-d88f8d71.entry.js → p-17791661.entry.js} +1 -1
- package/dist/twilight/{p-072e0f0e.entry.js → p-19e99ec3.entry.js} +1 -1
- package/dist/twilight/{p-33bdb6b4.entry.js → p-1ad5ec25.entry.js} +1 -1
- package/dist/twilight/{p-d88dace7.entry.js → p-1b4691d2.entry.js} +1 -1
- package/dist/twilight/{p-35315e94.entry.js → p-1f14f108.entry.js} +1 -1
- package/dist/twilight/{p-48b131d7.entry.js → p-26a40803.entry.js} +1 -1
- package/dist/twilight/{p-0b809343.entry.js → p-2ae41025.entry.js} +1 -1
- package/dist/twilight/{p-7764a304.entry.js → p-2cfbfd3d.entry.js} +1 -1
- package/dist/twilight/{p-7b489e5d.entry.js → p-2d0dcb74.entry.js} +1 -1
- package/dist/twilight/{p-1d67ec26.entry.js → p-31070fc5.entry.js} +1 -1
- package/dist/twilight/{p-2ebecee9.entry.js → p-31aeba33.entry.js} +1 -1
- package/dist/twilight/{p-f485d95f.entry.js → p-32a24cc8.entry.js} +1 -1
- package/dist/twilight/{p-fcc47e94.entry.js → p-3a1093a4.entry.js} +1 -1
- package/dist/twilight/{p-13f00911.entry.js → p-3f4b353c.entry.js} +1 -1
- package/dist/twilight/{p-6b9ff7c8.entry.js → p-4004a6c3.entry.js} +1 -1
- package/dist/twilight/{p-2fd30bc5.entry.js → p-45ecda7a.entry.js} +1 -1
- package/dist/twilight/{p-d9744d75.entry.js → p-4cdd88f8.entry.js} +1 -1
- package/dist/twilight/{p-84c24cbf.entry.js → p-4f51f5d7.entry.js} +1 -1
- package/dist/twilight/{p-4b9f4269.entry.js → p-5134f712.entry.js} +1 -1
- package/dist/twilight/{p-ac899f06.entry.js → p-51378710.entry.js} +1 -1
- package/dist/twilight/{p-342e085d.entry.js → p-54b2bc53.entry.js} +1 -1
- package/dist/twilight/{p-57600606.entry.js → p-57cb15c8.entry.js} +1 -1
- package/dist/twilight/{p-COyNuZga.js → p-5XDdT3iZ.js} +1 -1
- package/dist/twilight/{p-5cde0413.entry.js → p-5a064ede.entry.js} +1 -1
- package/dist/twilight/{p-ae950f3d.entry.js → p-5da28879.entry.js} +1 -1
- package/dist/twilight/{p-16dd2422.entry.js → p-609121b5.entry.js} +1 -1
- package/dist/twilight/{p-83429697.entry.js → p-6972fb2a.entry.js} +1 -1
- package/dist/twilight/{p-74e64863.entry.js → p-6cb3f083.entry.js} +1 -1
- package/dist/twilight/{p-644fce9b.entry.js → p-6e82a20a.entry.js} +1 -1
- package/dist/twilight/{p-17513005.entry.js → p-72b7b339.entry.js} +1 -1
- package/dist/twilight/{p-d75e1e5f.entry.js → p-72eb3395.entry.js} +1 -1
- package/dist/twilight/{p-663b99b7.entry.js → p-74304f2e.entry.js} +1 -1
- package/dist/twilight/{p-c121bf62.entry.js → p-7fa2b846.entry.js} +1 -1
- package/dist/twilight/{p-7bfdbe2c.entry.js → p-8046e1a3.entry.js} +1 -1
- package/dist/twilight/{p-669987db.entry.js → p-83964eae.entry.js} +1 -1
- package/dist/twilight/{p-034b4c1a.entry.js → p-863b82f7.entry.js} +1 -1
- package/dist/twilight/{p-eac472ee.entry.js → p-899e93da.entry.js} +1 -1
- package/dist/twilight/{p-fac74a09.entry.js → p-97a32190.entry.js} +1 -1
- package/dist/twilight/{p-d682c191.entry.js → p-9b03fd43.entry.js} +1 -1
- package/dist/twilight/{p-gzTMnCaL.js → p-BCV9dZdC.js} +1 -1
- package/dist/twilight/{p-D9pFfS0x.js → p-BfWVI6fY.js} +1 -1
- package/dist/twilight/{p-BW4PTXIV.js → p-C49HEFSR.js} +1 -1
- package/dist/twilight/{p-xFAL2vxu.js → p-C5iTLACj.js} +1 -1
- package/dist/twilight/{p-BQGxkpNf.js → p-CL4h7m8M.js} +1 -1
- package/dist/twilight/{p-BuVkzZPJ.js → p-CNY9yekJ.js} +1 -1
- package/dist/twilight/{p-BydBx2Hz.js → p-DYl9MMu1.js} +1 -1
- package/dist/twilight/{p-BaaWLUWL.js → p-Ki-83_QV.js} +1 -1
- package/dist/twilight/{p-B4cEhvSn.js → p-XUmgs20v.js} +1 -1
- package/dist/twilight/{p-0cfd02ac.entry.js → p-a0fbbde1.entry.js} +1 -1
- package/dist/twilight/{p-f5aabe58.entry.js → p-a4a182ee.entry.js} +1 -1
- package/dist/twilight/{p-7a0a5ee5.entry.js → p-a95f88c8.entry.js} +1 -1
- package/dist/twilight/{p-bf0da096.entry.js → p-ab89dd28.entry.js} +1 -1
- package/dist/twilight/{p-ae717169.entry.js → p-b31bfad8.entry.js} +1 -1
- package/dist/twilight/{p-bdd30dd8.entry.js → p-b5fd2061.entry.js} +1 -1
- package/dist/twilight/{p-6eb7a1c9.entry.js → p-c2164b2c.entry.js} +1 -1
- package/dist/twilight/{p-6211929d.entry.js → p-c8bc7ca0.entry.js} +1 -1
- package/dist/twilight/{p-d7e8d463.entry.js → p-c920468e.entry.js} +1 -1
- package/dist/twilight/{p-96152b9c.entry.js → p-d1b17d65.entry.js} +1 -1
- package/dist/twilight/{p-ada6c43e.entry.js → p-d3e64710.entry.js} +1 -1
- package/dist/twilight/{p-bed51089.entry.js → p-d58f488d.entry.js} +1 -1
- package/dist/twilight/{p-f2dfe3b8.entry.js → p-d7c141c5.entry.js} +1 -1
- package/dist/twilight/{p-9a2094af.entry.js → p-da83b567.entry.js} +1 -1
- package/dist/twilight/{p-f0cc775f.entry.js → p-dba15861.entry.js} +1 -1
- package/dist/twilight/{p-a0306fe1.entry.js → p-dc73f4bb.entry.js} +1 -1
- package/dist/twilight/{p-a42a1b2e.entry.js → p-dfa5509d.entry.js} +1 -1
- package/dist/twilight/{p-0e672192.entry.js → p-e1708f19.entry.js} +1 -1
- package/dist/twilight/{p-d403d4ee.entry.js → p-e43d3c28.entry.js} +1 -1
- package/dist/twilight/{p-aeefa78e.entry.js → p-ed43b042.entry.js} +1 -1
- package/dist/twilight/{p-4e2337a5.entry.js → p-ef4e02a6.entry.js} +1 -1
- package/dist/twilight/{p-f146c8a6.entry.js → p-f5496ae9.entry.js} +1 -1
- package/dist/twilight/{p-f312e8c3.entry.js → p-fb7a5504.entry.js} +1 -1
- package/dist/twilight/{p-ff69f252.entry.js → p-fba9bcb7.entry.js} +1 -1
- package/dist/twilight/{p-01ef4e51.entry.js → p-fe5d6165.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as s,H as a}from"./p-
|
|
4
|
+
import{r as e,h as s,H as a}from"./p-DYl9MMu1.js";const t=class{constructor(s){e(this,s),this.dark=!1,this.commercialRegisterLabel="",this.freelanceLabel=""}componentWillLoad(){this.initializeTranslations()}initializeTranslations(){salla.lang.onLoaded((()=>{const e=(e,s,a)=>{salla.helpers.setNested(salla.lang.messages[e],s,a)};e("ar.trans","blocks.footer.commercial_register","السجل التجاري"),e("en.trans","blocks.footer.commercial_register","Commercial Register"),e("ar.trans","blocks.footer.freelance","وثيقة العمل الحر"),e("en.trans","blocks.footer.freelance","Freelance Certificate"),this.commercialRegisterLabel=salla.lang.getWithDefault("blocks.footer.commercial_register","السجل التجاري"),this.freelanceLabel=salla.lang.getWithDefault("blocks.footer.freelance","وثيقة العمل الحر")}))}getBadgeData(){const e=salla.config.get("store.settings.commercial_number"),s=salla.config.get("store.settings.freelance_number");return e?{number:e,label:this.commercialRegisterLabel||"السجل التجاري",imageUrl:salla.url.cdn("images/commercial-register.png",70,70),type:"commercial"}:s?{number:s,label:this.freelanceLabel||"وثيقة العمل الحر",imageUrl:this.dark?salla.url.cdn("images/freelance-white.png"):salla.url.cdn("images/freelance.png"),type:"freelance"}:null}render(){const e=this.getBadgeData();return e?s(a,{class:"s-trust-badges-wrapper "+(this.dark?"dark":"")},s("img",{class:"s-trust-badges-image",width:"55",height:"55",src:e.imageUrl,alt:e.label}),s("div",{class:"s-trust-badges-content"},s("p",{class:"s-trust-badges-label"},e.label),s("b",{class:"s-trust-badges-number"},e.number))):null}};t.style="";export{t as salla_trust_badges}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as s,H as o,a as t}from"./p-
|
|
4
|
+
import{r as a,h as s,H as o,a as t}from"./p-DYl9MMu1.js";const n=class{constructor(s){a(this,s)}async mount(a){this.host.before(a)}render(){return s(o,{key:"61a0a169011899bd7c2bcc0e1ddd1376da071d1d"})}async componentDidLoad(){await Salla.hooks.registerComponent("salla-hook",this)}get host(){return t(this)}};n.style=":host {\n all: unset;\n display: none; /* marker only */\n }";export{n as salla_hook}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as o,a as e}from"./p-
|
|
4
|
+
import{r as t,h as o,a as e}from"./p-DYl9MMu1.js";const i=class{constructor(o){t(this,o),this.theme="default",this.show=!1,this.targetElement=null}handleMouseOver(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!0)}handleMouseOut(t){this.targetElement&&this.targetElement.contains(t.target)&&(this.show=!1)}componentDidLoad(){this.targetElement=document.getElementById(this.targetId)}render(){const t=["default","dark"].includes(this.theme)?this.theme:"default";return o("div",{key:"52b272aea520c20cdd3a46847a003c5acd099ba7",class:"s-tooltip-container"},o("div",{key:"b7b5663370e9c5976ffeac9325e7c871156244d1",class:`s-tooltip-item s-tooltip-item--${t}`,style:{display:this.show?"block":"none"}},this.text?o("span",null,this.text):o("slot",null)))}get el(){return e(this)}};i.style='.s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:"";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}';export{i as salla_tooltip}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./p-
|
|
4
|
+
import{d as e}from"./p-DYl9MMu1.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n,i,E={exports:{}},r=n?E.exports:(n=1,E.exports=(i=function(e){var t=e.addFilter,n=e.utils,i=n.Type,E=n.isString,r=n.replaceInString,T=n.guesstimateMimeType,u=n.getExtensionFromFilename,o=n.getFilenameFromURL,_=function(e,t){return e.some((function(e){return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n}))},a=function(e,t,n){if(0===t.length)return!0;var i=function(e){var t="";if(E(e)){var n=o(e),i=u(n);i&&(t=T(i))}else t=e.type;return t}(e);return n?new Promise((function(E,r){n(e,i).then((function(e){_(t,e)?E():r()})).catch(r)})):_(t,i)};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||a(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,i){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var E=n("GET_ACCEPTED_FILE_TYPES"),T=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),u=a(e,E,T),o=function(){var e,t=E.map((e=n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(t){return null!==e[t]&&(e[t]||t)})).filter((function(e){return!1!==e})),T=t.filter((function(e,n){return t.indexOf(e)===n}));i({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:T.join(", "),allButLastType:T.slice(0,-1).join(", "),lastType:T[t.length-1]})}})};if("boolean"==typeof u)return u?t(e):o();u.then((function(){t(e)})).catch(o)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:i})),i)),T=t({__proto__:null,default:e(r)},[r]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginFileValidateType 1.2.8
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,c as t,h as i,H as e,a as h}from"./p-
|
|
4
|
+
import{r as s,c as t,h as i,H as e,a as h}from"./p-DYl9MMu1.js";import{M as r}from"./p-DmgxDvXL.js";const l=class{constructor(i){s(this,i),this.verified=t(this,"verified"),this.translationLoaded=!1,this.display="modal",this.type="mobile",this.autoReload=!0,this.supportWebAuth=!0,this.resendAfter=30,this.isProfileVerify=!1,salla.lang.onLoaded((()=>{this.translationLoaded=!0,this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+this.type),this.modal?.setTitle(this.title)})),"inline"!=this.display?(salla.event.on("profile::verification",(s=>{let t=Array.isArray(s)?s[0]:s;this.isProfileVerify=!0,this.open(t),this.title=salla.lang.get("pages.profile.verify_title")+salla.lang.get("common.elements."+t.type),this.modal?.setTitle(this.title)})),salla.event.on("modalClosed",(()=>{this.resendAfter=0,this.timer.innerHTML="30 : 00"}))):this.modal={open:()=>"",close:()=>"",setTitle:()=>""}}splitNumber(s){this.resetError();let t=s.data||s.target.value;t&&1!==t.length&&this.modifyNext(s.target,t)}modifyNext(s,t){s.value=t[0],t=t.substring(1),s.nextElementSibling&&t.length?this.modifyNext(s.nextElementSibling,t):s.nextElementSibling||0!==t.length?s.nextElementSibling&&0===t.length&&s.nextElementSibling.focus():s.focus()}checkAllInputs(){let s=!0;for(let t=0;t<this.otpInputs.length;t++)""===this.otpInputs[t].value&&(s=!1);return s}handleKeyUp(s){if(this.resetError(),["Alt","Shift","Control","AltGraph","Ctrl"].includes(s.key))return;let t=s.keyCode||s.charCode;s.target.value?(s.target.nextElementSibling?.focus(),s.target.nextElementSibling?.select()):[8,46].includes(t)&&(s.target.previousElementSibling?.focus(),s.target.previousElementSibling?.select()),s.target.value.length>1&&this.splitNumber(s)}handlePaste(s){this.resetError();let t=(salla.helpers.number(s.clipboardData.getData("text"))||"").replace(/[^0-9]/g,"");t=t.substring(0,this.otpInputs.length),this.otpInputs.forEach((s=>s.value="")),this.modifyNext(this.otpInputs[0],t)}handleInput(s){this.resetError(),salla.helpers.inputDigitsOnly(s.target),this.checkAllInputs()&&setTimeout((()=>{this.toggleOTPSubmit()}),100)}resetError(){this.hasError=!1,this.errorMessage=""}handleFocus(s){s.target!==this.firstOtpInput&&(""==this.firstOtpInput?.value&&this.firstOtpInput.focus(),""==s.target.previousElementSibling.value&&s.target.previousElementSibling.focus())}async getCode(){return this.code.value}async open(s){this.data=s,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(),"modal"==this.display&&this.modal?.setTitle(this.title),this.modal.open(),this.firstOtpInput?.addEventListener("input",(s=>this.splitNumber(s))),setTimeout((()=>this.otpInputs[0].focus()),100)}toggleOTPSubmit(){let s=[];if(this.otpInputs.forEach((t=>t.value&&s.push(t.value))),this.code.value=s.join(""),4===s.length)return this.btn.disable(),void this.btn.click();this.btn.enable()}reset(){this.otpInputs.forEach((s=>s.value="")),this.code.value="",this.otpInputs[0].focus()}resendTimer(){this.resendMessage.style.display="block",this.resend.style.display="none",this.resendAfter=30;let s=setInterval((()=>{this.resendAfter<=0?(clearInterval(s),this.resend.style.display="block",this.resendMessage.style.display="none"):(this.timer.innerHTML=`${this.resendAfter>=10?this.resendAfter:"0"+this.resendAfter} : 00`,this.resendAfter--)}),1e3)}resendCode(){return this.btn.stop().then((()=>this.btn.disable())).then((()=>{this.otpInputs.forEach((s=>s.value="")),this.otpInputs[0].focus()})).then((()=>salla.api.auth.resend(this.data))).finally((()=>this.resendTimer()))}submit(){if(this.code.value.length<4)return this.otpInputs[this.code.value.length].focus(),void salla.log("Trying to submit without 4 digits!");let s={code:this.code.value,...this.data};return this.btn.load().then((()=>this.btn.disable())).then((()=>this.isProfileVerify?salla.profile.verify(s):salla.auth.verify(s,this.supportWebAuth))).then((s=>this.verified.emit(s))).then((()=>this.btn.stop()&&this.btn.disable())).then((()=>this.modal.close())).then((()=>this.autoReload&&window.location.reload())).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||salla.lang.get("common.errors.error_occurred"),s.response?salla.logger.error(s):console.log("Unexpected error",s),this.btn.stop()&&this.btn.enable()&&this.reset()}))}render(){return"inline"==this.display?i(e,null,this.myBody()):i("salla-modal",{width:"xs",class:"s-verify",ref:s=>this.modal=s,"modal-title":this.title},i("span",{slot:"icon",class:"s-verify-header-icon",innerHTML:"mobile"==this.type?'\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':r}),this.myBody())}myBody(){return i("div",{class:"s-verify-body",ref:s=>this.body=s},i("div",{class:"s-verify-message",innerHTML:salla.lang.get("pages.profile.verify_message")}),i("slot",{name:"mobile"}),i("slot",{name:"email"}),i("input",{type:"hidden",name:"code",maxlength:"4",required:!0,ref:s=>this.code=s}),i("div",{class:{"s-verify-codes":!0,"has-error":this.hasError},dir:"ltr"},[1,2,3,4].map((s=>i("input",{type:"number",autocomplete:"one-time-code",pattern:"[0-9]*",inputmode:"numeric",maxlength:"1",value:"",id:`otp-${s}`,class:{"s-verify-input":!0,"s-has-error":this.hasError},onInput:s=>this.handleInput(s),onPaste:s=>this.handlePaste(s),onKeyUp:s=>this.handleKeyUp(s),onFocus:s=>this.handleFocus(s),required:!0})))),this.hasError&&this.errorMessage?i("span",{class:"s-verify-error-message"},this.errorMessage):"",i("div",{slot:"footer",class:"s-verify-footer"},i("salla-button",{class:"s-verify-submit","loader-position":"center",disabled:!0,onClick:()=>this.submit(),ref:s=>this.btn=s},salla.lang.get("pages.profile.verify")),i("p",{class:"s-verify-resend-message",ref:s=>this.resendMessage=s},salla.lang.get("blocks.header.resend_after"),i("b",{class:"s-verify-timer",ref:s=>this.timer=s})),i("a",{href:"#",class:"s-verify-resend",onClick:()=>this.resendCode(),ref:s=>this.resend=s},salla.lang.get("blocks.comments.submit"))),i("slot",{name:"after-footer"}))}get host(){return h(this)}};l.style="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}";export{l as salla_verify}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,c as t,h as s,H as i}from"./p-
|
|
4
|
+
import{r as e,c as t,h as s,H as i}from"./p-DYl9MMu1.js";import{a}from"./p-BedNk7k1.js";const l=class{constructor(s){e(this,s),this.changed=t(this,"changed"),this.min=0,this.max=1e4,this.moreThanLabel="أكثر من",this.lessThanLabel="أقل من",this.toLabel="الى",this.fromLabel="من",this.typing=!1,this.isMin=!1,this.isRTL=salla.config.get("theme.is_rtl",!0),this.filterValues=[]}connectedCallback(){if(this.filtersData&&this.filtersData?.price&&(this.minPrice=this.filtersData.price.min,this.maxPrice=this.filtersData.price.max),salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.getWithDefault("common.elements.more_than",this.moreThanLabel),this.lessThanLabel=salla.lang.getWithDefault("common.elements.less_than",this.lessThanLabel),this.toLabel=salla.lang.getWithDefault("common.elements.to",this.toLabel),this.fromLabel=salla.lang.getWithDefault("common.elements.from",this.fromLabel)})),1==this.option.values.length)return;if(this.option.values.length<=5)return void(this.filterValues=this.option.values);const e=Math.ceil(this.option.values.length/5);for(let t=0;t<this.option.values.length;t+=e)this.filterValues.push(this.option.values.slice(t,t+e).reduce(((e,t)=>(e.to=t.to,e.count+=t.count,e))))}async reset(){this.minInput.value=null,this.maxInput.value=null,this.minPrice=null,this.maxPrice=null}getPriceLabel(e){return isNaN(e.from)||e.from<1?`${this.lessThanLabel} ${salla.money(e.to)}`:isNaN(e.to)||e.to<1?`${this.moreThanLabel} ${salla.money(e.from)}`:`${salla.money(e.from)} ${this.toLabel} ${salla.money(e.to)}`}minInputValidation(e){e&&(e>this.max||this.maxPrice&&e>this.maxPrice)||(e<this.min?this.minPrice=this.min:e&&(this.minPrice=e))}maxInputValidation(e){e&&(e<this.min||this.minPrice&&e<this.minPrice)||e>this.max&&(this.maxPrice=this.max)}async changedEventHandler(e){salla.helpers.inputDigitsOnly(this.minInput),salla.helpers.inputDigitsOnly(this.maxInput);const t=this.minPrice?1*+this.minPrice:null,s=this.maxPrice?1*+this.maxPrice:null;this.maxPrice||(this.maxPrice=""),this.isMin?this.minInputValidation(t):(this.minPrice||(this.minPrice=0),this.maxInputValidation(s)),this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}handleMinMaxPrice(e,t){this.minPrice=t.from,this.maxPrice="*"!==t.to?t.to:"",this.changedEventHandler(e)}isChecked(e){return!(!this.minPrice&&!this.maxPrice)&&(((e.from<1||"*"==e.from)&&0==this.minPrice||e.from==this.minPrice)&&("*"==e.to||!e.to||e.to==this.maxPrice))}handleMinPrice(e){this.isMin=!0;const t=e.target.value;this.minPrice=""===t?0:t}handleMaxPrice(e){this.isMin=!1;const t=e.target.value;this.maxPrice=void 0===t?"":t}render(){return s(i,{key:"e925357a9ad305bcdcb45e08b47328fe0551e966"},this.filterValues.map(((e,t)=>s("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${t}`,key:t},s("input",{id:`${this.option.key}-${t}`,name:"price",type:"radio",checked:this.isChecked(e),class:"s-filters-radio",onChange:t=>this.handleMinMaxPrice(t,e)}),s("span",{innerHTML:this.getPriceLabel(e)})))),s("div",{key:"402f820f0b39da9351495ef274b50508bc20df94",class:"flex justify-center items-center"},s("div",{key:"9207efd9b9629b9167a0fe373ddb035c7ae319f9",class:"relative max-w-xl w-full"},s("div",{key:"aeac9d75de4cf783d03a53fd4c87d32e4dd7175d",class:"s-price-range-inputs"},s("div",{key:"b339efed61f4bcfe4553b0a7256cc8bf87b2a52f",class:"s-price-range-relative"},s("div",{key:"68bee590d6b8a2201cde80044f91bcfcb738ead6",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"3f74c22f11c4b4e770e8ed729c845cee0496cb12",type:"number",maxlength:"5",ref:e=>this.minInput=e,onBlur:e=>this.handleMinPrice(e),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),s("div",{key:"3e7dc99a3404a6f8498466a9be3b71db856c23f4",class:"s-price-range-gray-text"}," -"),s("div",{key:"fa2703140f2346df311bf329c40f67b4a16df247",class:"s-price-range-relative"},s("div",{key:"e0ac6ee63329b64b320c8fb12c4a94b903785443",class:"s-price-range-currency"}," ",salla.config.currency().symbol),s("input",{key:"5aeab39a70a9ff02654b2c04b4db908672ca2dd8",type:"number",maxlength:"5",ref:e=>this.maxInput=e,onBlur:e=>this.handleMaxPrice(e),value:this.maxPrice,placeholder:this.toLabel,class:"s-price-range-number-input","aria-describedby":"price-currency"})),s("salla-button",{key:"6b27214991ebac764b2220beb4cb31a339203657",color:"gray",shape:"icon",size:"small",fill:"outline",onClick:e=>this.changedEventHandler(e)},s("span",{key:"7713e50bc43c1be0610f5f64e7513c0bbe5ec249",innerHTML:this.isRTL?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>arrow-right</title>\n<path d="M29.217 15.465c-0.019-0.044-0.056-0.077-0.080-0.119-0.067-0.116-0.139-0.227-0.236-0.317-0.011-0.009-0.013-0.024-0.024-0.033l-10.667-9.333c-0.553-0.484-1.396-0.429-1.881 0.125-0.484 0.555-0.428 1.396 0.127 1.881l7.996 6.997h-20.452c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h20.452l-7.996 6.997c-0.555 0.485-0.611 1.327-0.127 1.881 0.264 0.3 0.633 0.455 1.004 0.455 0.312 0 0.625-0.109 0.877-0.331l10.667-9.333c0.011-0.009 0.015-0.024 0.024-0.033 0.097-0.091 0.169-0.201 0.236-0.317 0.024-0.041 0.060-0.075 0.080-0.119 0.073-0.163 0.116-0.343 0.116-0.533s-0.043-0.371-0.116-0.535z"></path>\n</svg>\n'}))))))}componentDidLoad(){this.isReady=!0}};l.style=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";export{l as salla_price_range}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as s,H as t,a as i}from"./p-BydBx2Hz.js";import{W as e}from"./p-ZT7ehBBk.js";import{C as l}from"./p-BV4kqbdL.js";import{H as n}from"./p-CHf8XdiS.js";import{I as r}from"./p-C-tzSDxw.js";import{W as o}from"./p-CgR-T_ZS.js";import{M as d}from"./p-DmgxDvXL.js";import{a as h}from"./p-CgtvEd63.js";var g='\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>shipping-fast</title>\n<path d="M10.667 14.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h8c0.736 0 1.333-0.596 1.333-1.333zM9.333 18.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM9.333 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM1.333 10.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.123 13.103l-3.147-3.935c-1.273-1.589-3.171-2.501-5.205-2.501h-1.437c0-2.205-1.795-4-4-4h-13.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.737 0.597 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.664-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.491 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.736 0 1.333-0.596 1.333-1.333v-8.399c0-0.905-0.311-1.792-0.877-2.499zM21.333 13.333v-4h1.437c1.221 0 2.36 0.547 3.124 1.501l1.997 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n';const m=class{constructor(s){a(this,s),this.hasError=!1,this.showContactWidget=!0,this.images=[],this.productImages={},this.editItemImages=[],this.contact_body=(a,s,t)=>salla.lang.get("pages.rating.contact_subject",{store:a,id:s,customer:t}),this.editMode=!1,this.defaultMode=!1,this.deleteMode=!1,this.shouldOpenDeleteModal=!1,this.editItem=null,this.dragAndDropFilesLabel=salla.lang.get("common.uploader.drag_and_drop_files"),this.contactSubjectLabel=salla.lang.get("pages.rating.contact_subject"),this.editReviewLabel=salla.lang.get("pages.rating.edit_review"),this.allowedImagesTypesLabel=salla.lang.get("common.uploader.allowed_images_types"),this.addImagesLabel=salla.lang.get("pages.rating.add_images"),this.editImagesLabel=salla.lang.get("pages.rating.edit_images"),this.threeImagesMax=salla.lang.get("common.uploader.max_three_images"),this.areYouSureLabel=salla.lang.get("pages.rating.are_you_sure_you_want_to_delete_review"),this.confirmDeletionLabel=salla.lang.get("pages.rating.confirm_deletion"),this.cancelLabel=salla.lang.get("common.elements.cancel"),this.confirmDeleteBtn=salla.lang.get("common.elements.confirm_delete"),this.updatedSuccessfullyLabel=salla.lang.get("pages.rating.review_updated_successfully"),this.deletedSuccessfullyLabel=salla.lang.get("pages.rating.review_deleted_successfully"),this.contactUsLabel=salla.lang.get("blocks.footer.social"),this.allowAttachImages=salla.config.get("store.settings.rating.allow_attach_images"),this.allowContactSupport=salla.config.get("store.settings.rating.allow_contact_support"),this.contentRefs=[],this.hiddenInputs=[],this.isOpen=[],this.stepsCount=0,this.currentIndex=0,this.submitted=[],this.MAX_UPLOAD_LIMIT=3,this.onOpen=a=>new Promise((s=>{h({targets:this.contentRefs[a],duration:100,height:this.contentRefs[a].scrollHeight,opacity:[0,1],easing:"easeOutQuart",complete:()=>s()})})),this.onClose=a=>new Promise((s=>{h({targets:this.contentRefs[a],duration:100,height:0,opacity:[1,0],easing:"easeOutQuart",complete:()=>s()})})),this.toggleUploader=async a=>{this.isOpen[a]=!this.isOpen[a],n.toggleElementClassIf(this.contentRefs[a],"is-closed","is-opened",(()=>!this.isOpen[a])),await(this.isOpen[a]?this.onOpen(a):this.onClose(a)),await new Promise((a=>setTimeout(a,101))),this.body&&this.currentTab&&setTimeout((()=>this.body.setAttribute("style",`height:${this.currentTab.offsetHeight+(this.editMode?60:0)}px`)))},salla.onReady((()=>{this.orderId=salla.config.get("page.id")})),salla.lang.onLoaded((()=>{this.contactUsLabel=salla.lang.get("blocks.footer.social");const a=(a,s,t)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[a],s,t),i(!0)}));(async()=>{await a("ar.trans","common.uploader.drag_and_drop_files","اسحب الملفات وأفلتها هنا"),await a("en.trans","common.uploader.drag_and_drop_files","Drag and drop files here"),await a("ar.trans","common.uploader.allowed_images_types"," .jpg أو jpeg أو png يُسمح بإضافة صور بصيغة"),await a("en.trans","common.uploader.allowed_images_types","Images in jpg, jpeg, or png format are allowed."),await a("ar.trans","pages.rating.add_images","اضافة صور"),await a("en.trans","pages.rating.add_images","Add Images"),await a("ar.trans","pages.rating.edit_images","تعديل الصور"),await a("en.trans","pages.rating.edit_images","Edit Images"),await a("ar.trans","pages.rating.edit_review","تعديل التقييم"),await a("en.trans","pages.rating.edit_review","Edit review"),await a("ar.trans","pages.rating.confirm_deletion","تأكيد حذف التقييم"),await a("en.trans","pages.rating.confirm_deletion","Confirm review deletion"),await a("ar.trans","pages.rating.are_you_sure_you_want_to_delete_review","هل أنت متأكد من حذف تقييمك؟"),await a("en.trans","pages.rating.are_you_sure_you_want_to_delete_review","Are you sure you want to delete your review?"),await a("ar.trans","pages.rating.review_updated_successfully","تم تعديل التقييم بنجاح"),await a("en.trans","pages.rating.review_updated_successfully","The review has been successfully updated."),await a("ar.trans","pages.rating.review_deleted_successfully","تم حذف التقييم بنجاح"),await a("en.trans","pages.rating.review_deleted_successfully","The review has been successfully deleted."),await a("ar.trans","pages.rating.images_count","الصور ( :current من أصل :total )"),await a("en.trans","pages.rating.images_count","Images ( :current of :total )"),await a("ar.trans","common.uploader.max_three_images",`.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`),await a("en.trans","common.uploader.max_three_images",`Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`),await a("ar.trans","common.elements.confirm_delete","تأكيد الحذف"),await a("en.trans","common.elements.confirm_delete","Confirm deletion"),this.dragAndDropFilesLabel=salla.lang.get("common.uploader.drag_and_drop_files"),this.allowedImagesTypesLabel=salla.lang.get("common.uploader.allowed_images_types"),this.addImagesLabel=salla.lang.get("pages.rating.add_images"),this.threeImagesMax=salla.lang.get("common.uploader.max_three_images"),this.contactSubjectLabel=salla.lang.get("pages.rating.contact_subject"),this.editReviewLabel=salla.lang.get("pages.rating.edit_review"),this.editImagesLabel=salla.lang.get("pages.rating.edit_images"),this.areYouSureLabel=salla.lang.get("pages.rating.are_you_sure_you_want_to_delete_review"),this.confirmDeletionLabel=salla.lang.get("pages.rating.confirm_deletion"),this.cancelLabel=salla.lang.get("common.elements.cancel"),this.updatedSuccessfullyLabel=salla.lang.get("pages.rating.review_updated_successfully"),this.deletedSuccessfullyLabel=salla.lang.get("pages.rating.review_deleted_successfully"),this.confirmDeleteBtn=salla.lang.get("common.elements.confirm_delete"),this.contact_body=(a,s,t)=>salla.lang.get("pages.rating.contact_body",{store:a,id:s,customer:t})})()}))}async open(){return this.defaultMode=!0,new Promise((a=>{setTimeout((()=>{this.modal.open().then((()=>this.order||salla.api.withoutNotifier((()=>salla.rating.api.order(this.orderId?this.orderId:salla.config.get("page.id")))).then((a=>this.order=a.data)))).then((()=>this.modal.setTitle(`${salla.lang.get("pages.rating.rate_order")} <span class="unicode">(#${this.order.id})</span>`))).then((()=>{const a={};if(this.order?.products)for(const s of this.order.products)a[s.product.id]=[];this.productImages=a})).then((()=>this.modal.stopLoading())).then((()=>this.stepsCount=[this.order.testimonials_enabled,this.order.products_enabled,this.order.shipping_enabled].filter((a=>a)).length)).then((()=>setTimeout((()=>this.handleWizard()),100))).catch((s=>{a(!1),this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data,this.modal.stopLoading()})),a(!0)}),50)}))}async openEditModal(a){this.defaultMode=!1,this.editMode=!0,this.editType=a.type,this.editFeedbackId=a.feedback_id;try{await this.fetchEditItem(a.feedback_id),this.editModal.open()}catch(a){this.hasError=!0,this.errorMessage=a.response?.data?.error?.message||a.response?.data}}async fetchEditItem(a){const s=`rating/${a}/show`,t=await salla.api.request(s);this.editItem=t.data,this.allowAttachImages&&"product"==this.editType&&this.editItem.images.length&&(this.editItemImages=this.editItem.images.map((a=>({id:`${Math.floor(100+900*Math.random())}`,url:a}))))}async editReview(){const a={};this.editModal.querySelectorAll("[name]").forEach((s=>{const t=salla.helpers.inputData(s.name,s.value,a);a[t.name]=t.value})),a.images&&(a.images=a.images.split(","));const s=`rating/${this.editFeedbackId}`;await salla.api.request(s,a,"put").then((a=>{this.editModal.close(),salla.notify.success(a.message||this.updatedSuccessfullyLabel),setTimeout((()=>{window.location.reload()}),500)}))}async openDeleteModal(a){return this.defaultMode=!1,this.deleteMode=!0,this.deleteFeedbackId=a.feedback_id,this.shouldOpenDeleteModal=!0,new Promise((a=>{setTimeout((()=>{this.deleteModal.open().then((()=>a(!0)))}),50)}))}async deleteReview(){const a=`rating/${this.deleteFeedbackId}`;await salla.api.request(a,null,"delete").then((()=>{this.deleteModal.close(),salla.notify.success(this.deletedSuccessfullyLabel),setTimeout((()=>{window.location.reload()}),500)}))}async close(){return this.modal.close()}handleWizard(){this.steps=this.modal.querySelectorAll(".s-rating-modal-step"),this.dots=this.modal.querySelectorAll(".s-rating-modal-step-dot"),this.showActiveStep()}showActiveStep(a=null){this.currentTab=a||this.steps[this.currentIndex],n.toggleClassIf(".s-rating-modal-step-dot","s-rating-modal-bg-gray","s-rating-modal-bg-primary",(a=>a!=this.dots[this.currentIndex])).toggleClassIf(".s-rating-modal-step","s-rating-modal-active","s-rating-modal-hidden",(a=>a==this.currentTab)),0!==this.currentIndex&&(n.toggleElementClassIf(this.currentTab,"s-rating-modal-unactive","s-rating-modal-hidden",(()=>!0)),setTimeout((()=>n.toggleElementClassIf(this.currentTab,"s-rating-modal-active","s-rating-modal-unactive",(()=>!0))),300));const s=this.steps[this.currentIndex+1]?.dataset.type;this.nextBtn?.setText(s?`${salla.lang.get("pages.rating.rate")} ${salla.lang.get(`pages.rating.${s}`)}`:salla.lang.get("pages.rating.send_ratings")),setTimeout((()=>this.body?.setAttribute("style",`height:${this.currentTab?.offsetHeight}px`)))}previousTab(){this.currentIndex>0&&this.currentIndex--,n.toggleElementClassIf(this.backBtn,"s-rating-modal-unvisiable","block",(()=>0==this.currentIndex)),this.showActiveStep()}submit(){this.submittedBefore()||this.validate(),salla.config.canLeave=!1,this.nextBtn.load().then((()=>this.submittedBefore()||this.sendFeedback())).then((()=>this.currentTab.querySelectorAll("[name],.s-rating-modal-btn-star").forEach((a=>a.setAttribute("disabled",""))))).then((()=>this.currentIndex<this.stepsCount&&this.currentIndex++)).then((()=>this.showActiveStep())).then((()=>n.toggleClassIf("#prev-btn","block","s-rating-modal-unvisiable",(()=>!0)))).finally((()=>{this.nextBtn.stop(),salla.config.canLeave=!0,this.currentIndex==this.stepsCount&&(this.showThankYou(),this.showContactWidget=!1)}))}submittedBefore(){return this.submitted.includes(this.currentIndex)}validate(a=null,s=null){if(!a&&"products"===this.currentTab.dataset.type)return void this.currentTab.querySelectorAll(".rating-outer-form").forEach((a=>this.validate(a,"product")));const t=(a=a||this.currentTab).querySelector(".rating_hidden_input").value,i=a.querySelector(".s-rating-modal-validation-msg");if(s=s||a.dataset.type,!t)throw i.innerHTML=salla.lang.get(`pages.rating.rate_${s}_stars`).replace(" (:item)",""),new Error(i.innerHTML);i.innerHTML=""}sendFeedback(){const a={};if(this.currentTab.querySelectorAll("[name]").forEach((s=>{const t=salla.helpers.inputData(s.name,s.value,a);a[t.name]=t.value})),this.allowAttachImages&&a.products)for(let s in a.products)a.products[s].images&&(a.products[s].images=a.products[s].images.split(","));if(0!=Object.keys(a).length)return a.order_id=this.orderId,a.type=this.currentTab.dataset.type,this.submitted.push(this.currentIndex),salla.rating.api[this.currentTab.dataset.type](a)}showThankYou(){let a=10,s=setInterval((()=>{this.thanksTime.innerHTML="00:0"+a--,a>0||(clearInterval(s),this.thanksTime.remove(),this.close().then((()=>window.location.reload())))}),1e3);this.modal.querySelector(".s-rating-modal-footer").classList.add("s-rating-modal-unvisiable"),this.showActiveStep(this.thanksTab)}getFilepondPlaceholder(){return`<div class="s-rating-modal-filepond-placeholder"><span class="s-rating-modal-filepond-placeholder-icon">${r}</span><p class="s-rating-modal-filepond-placeholder-text">${this.dragAndDropFilesLabel}<br>\n <span> ${this.allowedImagesTypesLabel} <br> ${this.threeImagesMax} </span></p></div>`}getCustomerName(){return`${salla.config.get("user.first_name")||salla.storage.get("user.first_name")||""} ${salla.config.get("user.last_name")||salla.storage.get("user.last_name")||""}`}handleSendEmail(){const a=`${this.contactSubjectLabel} #${this.order.id}`,s=this.contact_body(salla.config.get("store.name"),this.order.id,this.getCustomerName()),t=`mailto:${salla.config.get("store.contacts.email")}?subject=${encodeURIComponent(a)}&body=${encodeURIComponent(s)}`;window.open(t,"_blank")}handleSendWhatsApp(){const a=this.contact_body(salla.config.get("store.name"),this.order.id,this.getCustomerName()),s=`https://wa.me/${salla.config.get("store.contacts.whatsapp")}?text=${encodeURIComponent(a)}`;window.open(s,"_blank")}resetData(a){a.detail||(this.modal?.close(),this.editItem=null,this.editItemImages=[],this.hiddenInputs[1]&&(this.hiddenInputs[1].value=""),this.deleteFeedbackId=null,this.editFeedbackId=null,this.shouldOpenDeleteModal=!1,this.editMode=!1,this.deleteMode=!1,this.defaultMode=!1)}getDeleteModal(){return s("salla-modal",{ref:a=>this.deleteModal=a,width:"xs",onModalVisibilityChanged:a=>this.resetData(a)},s("div",{class:"s-rating-modal-delete-wrapper",ref:a=>this.body=a},s("h3",null,this.confirmDeletionLabel),s("p",null,this.areYouSureLabel),s("div",{class:"s-rating-modal-delete-actions"},s("salla-button",{loaderPosition:"center",onClick:()=>this.deleteReview()},this.confirmDeleteBtn),s("salla-button",{color:"danger",fill:"outline",onClick:()=>this.deleteModal.close()},this.cancelLabel))))}renderUploadedImagesCount(a){const t=this.editMode?this.editItemImages.length:(this.productImages[a]||[]).length;return s("span",{class:"s-rating-modal-upload-count"},salla.lang.choice("pages.rating.images_count",t,{current:t,total:this.MAX_UPLOAD_LIMIT}))}getEditModal(){return s("salla-modal",{ref:a=>this.editModal=a,width:"md",onModalVisibilityChanged:a=>this.resetData(a)},s("div",{class:"s-rating-modal-edit-wrapper",ref:a=>this.body=a},"store"===this.editType&&this.editItem?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step","data-type":"store",ref:a=>this.currentTab=a},s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:salla.config.get("store.logo","https://assets.salla.sa/cp/assets/images/logo-new.png"),alt:"store name",class:"s-rating-modal-store-logo"})),s("h2",{class:"s-rating-modal-title"},salla.lang.get("pages.rating.rate_the_store")),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large",editable:!0,value:this.editItem.stars})),s("textarea",{name:"content",value:this.editItem.content,class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_store_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):null,"shipping"===this.editType&&this.editItem?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step","data-type":"shipping",ref:a=>this.currentTab=a},this.editItem.shipping.logo?s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:this.editItem.shipping.logo,class:"s-rating-modal-shipping-logo",alt:this.editItem.shipping.name})):s("span",{class:"s-rating-modal-icon",innerHTML:g}),s("div",{class:"s-rating-modal-title"}," ",`${salla.lang.get("pages.rating.rate_shipping")} ${this.editItem.shipping.name}`),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large",editable:!0,value:this.editItem.stars})),s("textarea",{name:"content",class:"s-rating-modal-comment",value:this.editItem.content,placeholder:salla.lang.get("pages.rating.write_shipping_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):null,"product"==this.editType&&this.editItem?s("section",{class:"s-rating-modal-step","data-type":"products",ref:a=>this.currentTab=a},s("div",{class:"s-rating-modal-product"},s("div",{class:"rating-outer-form","data-stars-error":salla.lang.get("pages.rating.rate_product_stars")},s("div",{class:"s-rating-modal-product-img-wrap"},s("img",{src:this.editItem.product.image.url,alt:this.editItem.product.name,class:"s-rating-modal-product-img"})),s("div",{class:"s-rating-modal-product-details"},s("div",{class:"s-rating-modal-product-details-main"},s("div",null,s("h3",{class:"s-rating-modal-product-title"}," ",this.editItem.product.name),s("div",{class:"s-rating-modal-stars-product"},s("salla-rating-stars",{withLabel:!0,size:"small",editable:!0,value:this.editItem.stars}))),this.allowAttachImages&&s("salla-button",{class:"s-comments-item-like-btn mt-0",loaderPosition:"center",fill:"outline",size:"small",onClick:()=>this.toggleUploader(1)},s("span",null,this.editItemImages.length?this.editImagesLabel:this.addImagesLabel),s("span",{innerHTML:r}))),s("textarea",{value:this.editItem.content,placeholder:salla.lang.get("pages.rating.write_product_rate"),name:"content",class:"s-rating-modal-comment"}),s("small",{class:"s-rating-modal-validation-msg"}))),this.allowAttachImages&&s("div",{class:"s-rating-modal-uploader is-closed",ref:a=>this.contentRefs[1]=a},s("salla-file-upload",{name:"images",allowMultiple:!0,maxFilesCount:this.MAX_UPLOAD_LIMIT,imagePreviewHeight:117,filePosterHeight:117,"instant-upload":!0,type:"feedback",files:JSON.stringify(this.editItemImages),payloadName:"files[]",id:`file-${this.editItem.product.id}`,title:this.editItem.product.name,instantUpload:!0,accept:"image/png, image/jpeg, image/jpg",url:salla.url.api("upload"),onUploaded:a=>{this.editItemImages=[...this.editItemImages,a.detail],this.hiddenInputs[1].value=this.editItemImages.map((a=>a.url)).join()},onRemoved:a=>{const s=a.detail;s&&(this.editItemImages=this.editItemImages.filter((a=>a.id!==s)),this.hiddenInputs[1].value=this.editItemImages.map((a=>a.url)).join())},labelIdle:this.getFilepondPlaceholder()}),s("input",{type:"hidden",name:"images",value:this.editItem.images.join(","),ref:a=>this.hiddenInputs[1]=a}),this.renderUploadedImagesCount(this.editItem.product.id)))):null,s("div",{class:"s-rating-modal-footer s-rating-modal-footer-end"},s("salla-button",{"loader-position":"center",onClick:()=>this.editReview()},this.editReviewLabel))))}render(){return this.deleteMode?s(t,{class:"s-rating-modal"},this.getDeleteModal()):this.editMode?s(t,{class:"s-rating-modal"},this.getEditModal()):this.defaultMode?s(t,{class:"s-rating-modal"},s("salla-modal",{class:"s-rating-modal-wrap",onModalVisibilityChanged:a=>this.resetData(a),isLoading:!0,width:"md",ref:a=>this.modal=a},s("div",{slot:"loading"},s("div",{class:"s-rating-modal-skeleton"},s("salla-skeleton",{type:"circle",height:"80px",width:"80px"}),s("salla-skeleton",{height:"15px",width:"60%"}),s("salla-skeleton",{height:"10px",width:"30%"}),s("div",{class:"s-rating-modal-skeleton-stars"},[...Array(5)].map((a=>s("div",{key:a,innerHTML:e})))),s("salla-skeleton",{height:"100px",width:"100%"}),s("div",{class:"s-rating-modal-skeleton-footer"},s("salla-skeleton",{height:"40px",width:"30%"})))),!this.hasError&&this.order?[s("div",{class:"s-rating-modal-wrapper",ref:a=>this.body=a},this.order?.testimonials_enabled?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"store"},s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:salla.config.get("store.logo","https://assets.salla.sa/cp/assets/images/logo-new.png"),alt:"store name",class:"s-rating-modal-store-logo"})),s("h2",{class:"s-rating-modal-title"},salla.lang.get("pages.rating.rate_the_store")),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large"})),s("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_store_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):"",this.order.products_enabled?s("section",{class:"s-rating-modal-step s-rating-modal-hidden","data-type":"products"},this.order.products.map(((a,t)=>s("div",{class:"s-rating-modal-product",key:t},s("div",{class:"rating-outer-form","data-stars-error":salla.lang.get("pages.rating.rate_product_stars")},s("div",{class:"s-rating-modal-product-img-wrap"},s("img",{src:a.product.thumbnail,alt:a.product.name,class:"s-rating-modal-product-img"})),s("div",{class:"s-rating-modal-product-details"},s("div",{class:"s-rating-modal-product-details-main"},s("div",null,s("h3",{class:"s-rating-modal-product-title"}," ",a.product.name),s("div",{class:"s-rating-modal-stars-product"},s("salla-rating-stars",{withLabel:!0,size:"small",name:`products[${t}][rating]`}))),this.allowAttachImages&&s("salla-button",{class:"s-comments-item-like-btn mt-0",loaderPosition:"center",fill:"outline",size:"small",onClick:()=>this.toggleUploader(t)},s("span",null,this.addImagesLabel),s("span",{innerHTML:r}))),s("input",{type:"hidden",name:`products[${t}][product_id]`,value:a.product.id}),s("textarea",{placeholder:salla.lang.get("pages.rating.write_product_rate"),name:`products[${t}][comment]`,class:"s-rating-modal-comment"}),s("small",{class:"s-rating-modal-validation-msg"}))),this.allowAttachImages&&s("div",{class:"s-rating-modal-uploader is-closed",ref:a=>this.contentRefs[t]=a},s("salla-file-upload",{name:"image",maxFilesCount:this.MAX_UPLOAD_LIMIT,imagePreviewHeight:117,"instant-upload":!0,type:"feedback",payloadName:"files[]",id:`file-${a.product.id}`,title:a.product.name,allowMultiple:!0,instantUpload:!0,accept:"image/png, image/jpeg, image/jpg",url:salla.url.api("upload"),onUploaded:s=>{this.productImages={...this.productImages,[a.product.id]:[...this.productImages[a.product.id]||[],s.detail]},this.hiddenInputs[t].value=this.productImages[a.product.id].map((a=>a.url)).join(",")},onRemoved:s=>{const i=s.detail;i&&this.productImages[a.product.id]&&(this.productImages={...this.productImages,[a.product.id]:this.productImages[a.product.id].filter((a=>a.id!==i))},this.hiddenInputs[t].value=this.productImages[a.product.id].map((a=>a.url)).join(","))},labelIdle:this.getFilepondPlaceholder()}),s("input",{type:"hidden",name:`products[${t}][images]`,value:(this.productImages[a.product.id]||[]).map((a=>a.url)).join(","),ref:a=>this.hiddenInputs[t]=a}),this.renderUploadedImagesCount(a.product.id)))))):"",this.order.shipping_enabled&&this.order.shipping?.company?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"shipping"},s("input",{type:"hidden",name:"shipping_company_id",value:this.order.shipping.company.id}),this.order.shipping.company.logo?s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:this.order.shipping.company.logo,class:"s-rating-modal-shipping-logo",alt:this.order.shipping.company.name})):s("span",{class:"s-rating-modal-icon",innerHTML:g}),s("div",{class:"s-rating-modal-title"}," ",`${salla.lang.get("pages.rating.rate_shipping")} ${this.order.shipping.company.name}`),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large"})),s("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_shipping_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):"",s("div",{class:"s-rating-modal-thanks s-rating-modal-hidden",ref:a=>this.thanksTab=a},s("span",{class:"s-rating-modal-icon",innerHTML:l}),s("h3",{class:"s-rating-modal-thanks-title"},salla.lang.get("pages.rating.thanks")),s("div",{class:"s-rating-modal-thanks-msg",innerHTML:this.order.thanks_message}),s("time",{class:"s-rating-modal-thanks-time",ref:a=>this.thanksTime=a}))),this.allowContactSupport&&this.showContactWidget&&(salla.config.get("store.contacts.whatsapp")||salla.config.get("store.contacts.email"))?s("div",{class:"s-rating-modal-contact"},s("p",null,this.contactUsLabel),s("div",{class:"s-rating-modal-contact-icons"},salla.config.get("store.contacts.whatsapp")&&s("span",{onClick:()=>this.handleSendWhatsApp(),innerHTML:o}),salla.config.get("store.contacts.email")&&s("span",{onClick:()=>this.handleSendEmail(),innerHTML:d}))):"",s("div",{class:"s-rating-modal-footer"},s("button",{ref:a=>this.backBtn=a,onClick:()=>this.previousTab(),class:"s-rating-modal-btn s-rating-modal-unvisiable"},salla.lang.get("common.elements.back")),this.stepsCount>1?s("ul",{class:"s-rating-modal-dots"},[0,1,2].slice(0,this.stepsCount).map((a=>s("li",{key:a,class:"s-rating-modal-bg-gray s-rating-modal-step-dot"})))):"",s("salla-button",{"loader-position":"center",ref:a=>this.nextBtn=a,onClick:()=>this.submit()},salla.lang.get("common.elements.next")))]:s("salla-placeholder",{alignment:"center"}))):void 0}componentWillLoad(){salla.event.on("rating::open",(()=>this.open())),salla.event.on("rating::edit",(a=>this.openEditModal(a))),salla.event.on("rating::delete",(a=>this.openDeleteModal(a)))}componentDidLoad(){salla.event.dispatch("rating::ready",this)}get host(){return i(this)}};m.style="";export{m as salla_rating_modal}
|
|
4
|
+
import{r as a,h as s,H as t,a as i}from"./p-DYl9MMu1.js";import{W as e}from"./p-ZT7ehBBk.js";import{C as l}from"./p-BV4kqbdL.js";import{H as n}from"./p-CHf8XdiS.js";import{I as r}from"./p-C-tzSDxw.js";import{W as o}from"./p-CgR-T_ZS.js";import{M as d}from"./p-DmgxDvXL.js";import{a as h}from"./p-CgtvEd63.js";var g='\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>shipping-fast</title>\n<path d="M10.667 14.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h8c0.736 0 1.333-0.596 1.333-1.333zM9.333 18.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM9.333 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM1.333 10.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.123 13.103l-3.147-3.935c-1.273-1.589-3.171-2.501-5.205-2.501h-1.437c0-2.205-1.795-4-4-4h-13.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.737 0.597 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.664-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.491 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.736 0 1.333-0.596 1.333-1.333v-8.399c0-0.905-0.311-1.792-0.877-2.499zM21.333 13.333v-4h1.437c1.221 0 2.36 0.547 3.124 1.501l1.997 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>\n</svg>\n';const m=class{constructor(s){a(this,s),this.hasError=!1,this.showContactWidget=!0,this.images=[],this.productImages={},this.editItemImages=[],this.contact_body=(a,s,t)=>salla.lang.get("pages.rating.contact_subject",{store:a,id:s,customer:t}),this.editMode=!1,this.defaultMode=!1,this.deleteMode=!1,this.shouldOpenDeleteModal=!1,this.editItem=null,this.dragAndDropFilesLabel=salla.lang.get("common.uploader.drag_and_drop_files"),this.contactSubjectLabel=salla.lang.get("pages.rating.contact_subject"),this.editReviewLabel=salla.lang.get("pages.rating.edit_review"),this.allowedImagesTypesLabel=salla.lang.get("common.uploader.allowed_images_types"),this.addImagesLabel=salla.lang.get("pages.rating.add_images"),this.editImagesLabel=salla.lang.get("pages.rating.edit_images"),this.threeImagesMax=salla.lang.get("common.uploader.max_three_images"),this.areYouSureLabel=salla.lang.get("pages.rating.are_you_sure_you_want_to_delete_review"),this.confirmDeletionLabel=salla.lang.get("pages.rating.confirm_deletion"),this.cancelLabel=salla.lang.get("common.elements.cancel"),this.confirmDeleteBtn=salla.lang.get("common.elements.confirm_delete"),this.updatedSuccessfullyLabel=salla.lang.get("pages.rating.review_updated_successfully"),this.deletedSuccessfullyLabel=salla.lang.get("pages.rating.review_deleted_successfully"),this.contactUsLabel=salla.lang.get("blocks.footer.social"),this.allowAttachImages=salla.config.get("store.settings.rating.allow_attach_images"),this.allowContactSupport=salla.config.get("store.settings.rating.allow_contact_support"),this.contentRefs=[],this.hiddenInputs=[],this.isOpen=[],this.stepsCount=0,this.currentIndex=0,this.submitted=[],this.MAX_UPLOAD_LIMIT=3,this.onOpen=a=>new Promise((s=>{h({targets:this.contentRefs[a],duration:100,height:this.contentRefs[a].scrollHeight,opacity:[0,1],easing:"easeOutQuart",complete:()=>s()})})),this.onClose=a=>new Promise((s=>{h({targets:this.contentRefs[a],duration:100,height:0,opacity:[1,0],easing:"easeOutQuart",complete:()=>s()})})),this.toggleUploader=async a=>{this.isOpen[a]=!this.isOpen[a],n.toggleElementClassIf(this.contentRefs[a],"is-closed","is-opened",(()=>!this.isOpen[a])),await(this.isOpen[a]?this.onOpen(a):this.onClose(a)),await new Promise((a=>setTimeout(a,101))),this.body&&this.currentTab&&setTimeout((()=>this.body.setAttribute("style",`height:${this.currentTab.offsetHeight+(this.editMode?60:0)}px`)))},salla.onReady((()=>{this.orderId=salla.config.get("page.id")})),salla.lang.onLoaded((()=>{this.contactUsLabel=salla.lang.get("blocks.footer.social");const a=(a,s,t)=>new Promise((i=>{salla.helpers.setNested(salla.lang.messages[a],s,t),i(!0)}));(async()=>{await a("ar.trans","common.uploader.drag_and_drop_files","اسحب الملفات وأفلتها هنا"),await a("en.trans","common.uploader.drag_and_drop_files","Drag and drop files here"),await a("ar.trans","common.uploader.allowed_images_types"," .jpg أو jpeg أو png يُسمح بإضافة صور بصيغة"),await a("en.trans","common.uploader.allowed_images_types","Images in jpg, jpeg, or png format are allowed."),await a("ar.trans","pages.rating.add_images","اضافة صور"),await a("en.trans","pages.rating.add_images","Add Images"),await a("ar.trans","pages.rating.edit_images","تعديل الصور"),await a("en.trans","pages.rating.edit_images","Edit Images"),await a("ar.trans","pages.rating.edit_review","تعديل التقييم"),await a("en.trans","pages.rating.edit_review","Edit review"),await a("ar.trans","pages.rating.confirm_deletion","تأكيد حذف التقييم"),await a("en.trans","pages.rating.confirm_deletion","Confirm review deletion"),await a("ar.trans","pages.rating.are_you_sure_you_want_to_delete_review","هل أنت متأكد من حذف تقييمك؟"),await a("en.trans","pages.rating.are_you_sure_you_want_to_delete_review","Are you sure you want to delete your review?"),await a("ar.trans","pages.rating.review_updated_successfully","تم تعديل التقييم بنجاح"),await a("en.trans","pages.rating.review_updated_successfully","The review has been successfully updated."),await a("ar.trans","pages.rating.review_deleted_successfully","تم حذف التقييم بنجاح"),await a("en.trans","pages.rating.review_deleted_successfully","The review has been successfully deleted."),await a("ar.trans","pages.rating.images_count","الصور ( :current من أصل :total )"),await a("en.trans","pages.rating.images_count","Images ( :current of :total )"),await a("ar.trans","common.uploader.max_three_images",`.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`),await a("en.trans","common.uploader.max_three_images",`Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`),await a("ar.trans","common.elements.confirm_delete","تأكيد الحذف"),await a("en.trans","common.elements.confirm_delete","Confirm deletion"),this.dragAndDropFilesLabel=salla.lang.get("common.uploader.drag_and_drop_files"),this.allowedImagesTypesLabel=salla.lang.get("common.uploader.allowed_images_types"),this.addImagesLabel=salla.lang.get("pages.rating.add_images"),this.threeImagesMax=salla.lang.get("common.uploader.max_three_images"),this.contactSubjectLabel=salla.lang.get("pages.rating.contact_subject"),this.editReviewLabel=salla.lang.get("pages.rating.edit_review"),this.editImagesLabel=salla.lang.get("pages.rating.edit_images"),this.areYouSureLabel=salla.lang.get("pages.rating.are_you_sure_you_want_to_delete_review"),this.confirmDeletionLabel=salla.lang.get("pages.rating.confirm_deletion"),this.cancelLabel=salla.lang.get("common.elements.cancel"),this.updatedSuccessfullyLabel=salla.lang.get("pages.rating.review_updated_successfully"),this.deletedSuccessfullyLabel=salla.lang.get("pages.rating.review_deleted_successfully"),this.confirmDeleteBtn=salla.lang.get("common.elements.confirm_delete"),this.contact_body=(a,s,t)=>salla.lang.get("pages.rating.contact_body",{store:a,id:s,customer:t})})()}))}async open(){return this.defaultMode=!0,new Promise((a=>{setTimeout((()=>{this.modal.open().then((()=>this.order||salla.api.withoutNotifier((()=>salla.rating.api.order(this.orderId?this.orderId:salla.config.get("page.id")))).then((a=>this.order=a.data)))).then((()=>this.modal.setTitle(`${salla.lang.get("pages.rating.rate_order")} <span class="unicode">(#${this.order.id})</span>`))).then((()=>{const a={};if(this.order?.products)for(const s of this.order.products)a[s.product.id]=[];this.productImages=a})).then((()=>this.modal.stopLoading())).then((()=>this.stepsCount=[this.order.testimonials_enabled,this.order.products_enabled,this.order.shipping_enabled].filter((a=>a)).length)).then((()=>setTimeout((()=>this.handleWizard()),100))).catch((s=>{a(!1),this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data,this.modal.stopLoading()})),a(!0)}),50)}))}async openEditModal(a){this.defaultMode=!1,this.editMode=!0,this.editType=a.type,this.editFeedbackId=a.feedback_id;try{await this.fetchEditItem(a.feedback_id),this.editModal.open()}catch(a){this.hasError=!0,this.errorMessage=a.response?.data?.error?.message||a.response?.data}}async fetchEditItem(a){const s=`rating/${a}/show`,t=await salla.api.request(s);this.editItem=t.data,this.allowAttachImages&&"product"==this.editType&&this.editItem.images.length&&(this.editItemImages=this.editItem.images.map((a=>({id:`${Math.floor(100+900*Math.random())}`,url:a}))))}async editReview(){const a={};this.editModal.querySelectorAll("[name]").forEach((s=>{const t=salla.helpers.inputData(s.name,s.value,a);a[t.name]=t.value})),a.images&&(a.images=a.images.split(","));const s=`rating/${this.editFeedbackId}`;await salla.api.request(s,a,"put").then((a=>{this.editModal.close(),salla.notify.success(a.message||this.updatedSuccessfullyLabel),setTimeout((()=>{window.location.reload()}),500)}))}async openDeleteModal(a){return this.defaultMode=!1,this.deleteMode=!0,this.deleteFeedbackId=a.feedback_id,this.shouldOpenDeleteModal=!0,new Promise((a=>{setTimeout((()=>{this.deleteModal.open().then((()=>a(!0)))}),50)}))}async deleteReview(){const a=`rating/${this.deleteFeedbackId}`;await salla.api.request(a,null,"delete").then((()=>{this.deleteModal.close(),salla.notify.success(this.deletedSuccessfullyLabel),setTimeout((()=>{window.location.reload()}),500)}))}async close(){return this.modal.close()}handleWizard(){this.steps=this.modal.querySelectorAll(".s-rating-modal-step"),this.dots=this.modal.querySelectorAll(".s-rating-modal-step-dot"),this.showActiveStep()}showActiveStep(a=null){this.currentTab=a||this.steps[this.currentIndex],n.toggleClassIf(".s-rating-modal-step-dot","s-rating-modal-bg-gray","s-rating-modal-bg-primary",(a=>a!=this.dots[this.currentIndex])).toggleClassIf(".s-rating-modal-step","s-rating-modal-active","s-rating-modal-hidden",(a=>a==this.currentTab)),0!==this.currentIndex&&(n.toggleElementClassIf(this.currentTab,"s-rating-modal-unactive","s-rating-modal-hidden",(()=>!0)),setTimeout((()=>n.toggleElementClassIf(this.currentTab,"s-rating-modal-active","s-rating-modal-unactive",(()=>!0))),300));const s=this.steps[this.currentIndex+1]?.dataset.type;this.nextBtn?.setText(s?`${salla.lang.get("pages.rating.rate")} ${salla.lang.get(`pages.rating.${s}`)}`:salla.lang.get("pages.rating.send_ratings")),setTimeout((()=>this.body?.setAttribute("style",`height:${this.currentTab?.offsetHeight}px`)))}previousTab(){this.currentIndex>0&&this.currentIndex--,n.toggleElementClassIf(this.backBtn,"s-rating-modal-unvisiable","block",(()=>0==this.currentIndex)),this.showActiveStep()}submit(){this.submittedBefore()||this.validate(),salla.config.canLeave=!1,this.nextBtn.load().then((()=>this.submittedBefore()||this.sendFeedback())).then((()=>this.currentTab.querySelectorAll("[name],.s-rating-modal-btn-star").forEach((a=>a.setAttribute("disabled",""))))).then((()=>this.currentIndex<this.stepsCount&&this.currentIndex++)).then((()=>this.showActiveStep())).then((()=>n.toggleClassIf("#prev-btn","block","s-rating-modal-unvisiable",(()=>!0)))).finally((()=>{this.nextBtn.stop(),salla.config.canLeave=!0,this.currentIndex==this.stepsCount&&(this.showThankYou(),this.showContactWidget=!1)}))}submittedBefore(){return this.submitted.includes(this.currentIndex)}validate(a=null,s=null){if(!a&&"products"===this.currentTab.dataset.type)return void this.currentTab.querySelectorAll(".rating-outer-form").forEach((a=>this.validate(a,"product")));const t=(a=a||this.currentTab).querySelector(".rating_hidden_input").value,i=a.querySelector(".s-rating-modal-validation-msg");if(s=s||a.dataset.type,!t)throw i.innerHTML=salla.lang.get(`pages.rating.rate_${s}_stars`).replace(" (:item)",""),new Error(i.innerHTML);i.innerHTML=""}sendFeedback(){const a={};if(this.currentTab.querySelectorAll("[name]").forEach((s=>{const t=salla.helpers.inputData(s.name,s.value,a);a[t.name]=t.value})),this.allowAttachImages&&a.products)for(let s in a.products)a.products[s].images&&(a.products[s].images=a.products[s].images.split(","));if(0!=Object.keys(a).length)return a.order_id=this.orderId,a.type=this.currentTab.dataset.type,this.submitted.push(this.currentIndex),salla.rating.api[this.currentTab.dataset.type](a)}showThankYou(){let a=10,s=setInterval((()=>{this.thanksTime.innerHTML="00:0"+a--,a>0||(clearInterval(s),this.thanksTime.remove(),this.close().then((()=>window.location.reload())))}),1e3);this.modal.querySelector(".s-rating-modal-footer").classList.add("s-rating-modal-unvisiable"),this.showActiveStep(this.thanksTab)}getFilepondPlaceholder(){return`<div class="s-rating-modal-filepond-placeholder"><span class="s-rating-modal-filepond-placeholder-icon">${r}</span><p class="s-rating-modal-filepond-placeholder-text">${this.dragAndDropFilesLabel}<br>\n <span> ${this.allowedImagesTypesLabel} <br> ${this.threeImagesMax} </span></p></div>`}getCustomerName(){return`${salla.config.get("user.first_name")||salla.storage.get("user.first_name")||""} ${salla.config.get("user.last_name")||salla.storage.get("user.last_name")||""}`}handleSendEmail(){const a=`${this.contactSubjectLabel} #${this.order.id}`,s=this.contact_body(salla.config.get("store.name"),this.order.id,this.getCustomerName()),t=`mailto:${salla.config.get("store.contacts.email")}?subject=${encodeURIComponent(a)}&body=${encodeURIComponent(s)}`;window.open(t,"_blank")}handleSendWhatsApp(){const a=this.contact_body(salla.config.get("store.name"),this.order.id,this.getCustomerName()),s=`https://wa.me/${salla.config.get("store.contacts.whatsapp")}?text=${encodeURIComponent(a)}`;window.open(s,"_blank")}resetData(a){a.detail||(this.modal?.close(),this.editItem=null,this.editItemImages=[],this.hiddenInputs[1]&&(this.hiddenInputs[1].value=""),this.deleteFeedbackId=null,this.editFeedbackId=null,this.shouldOpenDeleteModal=!1,this.editMode=!1,this.deleteMode=!1,this.defaultMode=!1)}getDeleteModal(){return s("salla-modal",{ref:a=>this.deleteModal=a,width:"xs",onModalVisibilityChanged:a=>this.resetData(a)},s("div",{class:"s-rating-modal-delete-wrapper",ref:a=>this.body=a},s("h3",null,this.confirmDeletionLabel),s("p",null,this.areYouSureLabel),s("div",{class:"s-rating-modal-delete-actions"},s("salla-button",{loaderPosition:"center",onClick:()=>this.deleteReview()},this.confirmDeleteBtn),s("salla-button",{color:"danger",fill:"outline",onClick:()=>this.deleteModal.close()},this.cancelLabel))))}renderUploadedImagesCount(a){const t=this.editMode?this.editItemImages.length:(this.productImages[a]||[]).length;return s("span",{class:"s-rating-modal-upload-count"},salla.lang.choice("pages.rating.images_count",t,{current:t,total:this.MAX_UPLOAD_LIMIT}))}getEditModal(){return s("salla-modal",{ref:a=>this.editModal=a,width:"md",onModalVisibilityChanged:a=>this.resetData(a)},s("div",{class:"s-rating-modal-edit-wrapper",ref:a=>this.body=a},"store"===this.editType&&this.editItem?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step","data-type":"store",ref:a=>this.currentTab=a},s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:salla.config.get("store.logo","https://assets.salla.sa/cp/assets/images/logo-new.png"),alt:"store name",class:"s-rating-modal-store-logo"})),s("h2",{class:"s-rating-modal-title"},salla.lang.get("pages.rating.rate_the_store")),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large",editable:!0,value:this.editItem.stars})),s("textarea",{name:"content",value:this.editItem.content,class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_store_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):null,"shipping"===this.editType&&this.editItem?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step","data-type":"shipping",ref:a=>this.currentTab=a},this.editItem.shipping.logo?s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:this.editItem.shipping.logo,class:"s-rating-modal-shipping-logo",alt:this.editItem.shipping.name})):s("span",{class:"s-rating-modal-icon",innerHTML:g}),s("div",{class:"s-rating-modal-title"}," ",`${salla.lang.get("pages.rating.rate_shipping")} ${this.editItem.shipping.name}`),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large",editable:!0,value:this.editItem.stars})),s("textarea",{name:"content",class:"s-rating-modal-comment",value:this.editItem.content,placeholder:salla.lang.get("pages.rating.write_shipping_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):null,"product"==this.editType&&this.editItem?s("section",{class:"s-rating-modal-step","data-type":"products",ref:a=>this.currentTab=a},s("div",{class:"s-rating-modal-product"},s("div",{class:"rating-outer-form","data-stars-error":salla.lang.get("pages.rating.rate_product_stars")},s("div",{class:"s-rating-modal-product-img-wrap"},s("img",{src:this.editItem.product.image.url,alt:this.editItem.product.name,class:"s-rating-modal-product-img"})),s("div",{class:"s-rating-modal-product-details"},s("div",{class:"s-rating-modal-product-details-main"},s("div",null,s("h3",{class:"s-rating-modal-product-title"}," ",this.editItem.product.name),s("div",{class:"s-rating-modal-stars-product"},s("salla-rating-stars",{withLabel:!0,size:"small",editable:!0,value:this.editItem.stars}))),this.allowAttachImages&&s("salla-button",{class:"s-comments-item-like-btn mt-0",loaderPosition:"center",fill:"outline",size:"small",onClick:()=>this.toggleUploader(1)},s("span",null,this.editItemImages.length?this.editImagesLabel:this.addImagesLabel),s("span",{innerHTML:r}))),s("textarea",{value:this.editItem.content,placeholder:salla.lang.get("pages.rating.write_product_rate"),name:"content",class:"s-rating-modal-comment"}),s("small",{class:"s-rating-modal-validation-msg"}))),this.allowAttachImages&&s("div",{class:"s-rating-modal-uploader is-closed",ref:a=>this.contentRefs[1]=a},s("salla-file-upload",{name:"images",allowMultiple:!0,maxFilesCount:this.MAX_UPLOAD_LIMIT,imagePreviewHeight:117,filePosterHeight:117,"instant-upload":!0,type:"feedback",files:JSON.stringify(this.editItemImages),payloadName:"files[]",id:`file-${this.editItem.product.id}`,title:this.editItem.product.name,instantUpload:!0,accept:"image/png, image/jpeg, image/jpg",url:salla.url.api("upload"),onUploaded:a=>{this.editItemImages=[...this.editItemImages,a.detail],this.hiddenInputs[1].value=this.editItemImages.map((a=>a.url)).join()},onRemoved:a=>{const s=a.detail;s&&(this.editItemImages=this.editItemImages.filter((a=>a.id!==s)),this.hiddenInputs[1].value=this.editItemImages.map((a=>a.url)).join())},labelIdle:this.getFilepondPlaceholder()}),s("input",{type:"hidden",name:"images",value:this.editItem.images.join(","),ref:a=>this.hiddenInputs[1]=a}),this.renderUploadedImagesCount(this.editItem.product.id)))):null,s("div",{class:"s-rating-modal-footer s-rating-modal-footer-end"},s("salla-button",{"loader-position":"center",onClick:()=>this.editReview()},this.editReviewLabel))))}render(){return this.deleteMode?s(t,{class:"s-rating-modal"},this.getDeleteModal()):this.editMode?s(t,{class:"s-rating-modal"},this.getEditModal()):this.defaultMode?s(t,{class:"s-rating-modal"},s("salla-modal",{class:"s-rating-modal-wrap",onModalVisibilityChanged:a=>this.resetData(a),isLoading:!0,width:"md",ref:a=>this.modal=a},s("div",{slot:"loading"},s("div",{class:"s-rating-modal-skeleton"},s("salla-skeleton",{type:"circle",height:"80px",width:"80px"}),s("salla-skeleton",{height:"15px",width:"60%"}),s("salla-skeleton",{height:"10px",width:"30%"}),s("div",{class:"s-rating-modal-skeleton-stars"},[...Array(5)].map((a=>s("div",{key:a,innerHTML:e})))),s("salla-skeleton",{height:"100px",width:"100%"}),s("div",{class:"s-rating-modal-skeleton-footer"},s("salla-skeleton",{height:"40px",width:"30%"})))),!this.hasError&&this.order?[s("div",{class:"s-rating-modal-wrapper",ref:a=>this.body=a},this.order?.testimonials_enabled?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"store"},s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:salla.config.get("store.logo","https://assets.salla.sa/cp/assets/images/logo-new.png"),alt:"store name",class:"s-rating-modal-store-logo"})),s("h2",{class:"s-rating-modal-title"},salla.lang.get("pages.rating.rate_the_store")),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large"})),s("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_store_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):"",this.order.products_enabled?s("section",{class:"s-rating-modal-step s-rating-modal-hidden","data-type":"products"},this.order.products.map(((a,t)=>s("div",{class:"s-rating-modal-product",key:t},s("div",{class:"rating-outer-form","data-stars-error":salla.lang.get("pages.rating.rate_product_stars")},s("div",{class:"s-rating-modal-product-img-wrap"},s("img",{src:a.product.thumbnail,alt:a.product.name,class:"s-rating-modal-product-img"})),s("div",{class:"s-rating-modal-product-details"},s("div",{class:"s-rating-modal-product-details-main"},s("div",null,s("h3",{class:"s-rating-modal-product-title"}," ",a.product.name),s("div",{class:"s-rating-modal-stars-product"},s("salla-rating-stars",{withLabel:!0,size:"small",name:`products[${t}][rating]`}))),this.allowAttachImages&&s("salla-button",{class:"s-comments-item-like-btn mt-0",loaderPosition:"center",fill:"outline",size:"small",onClick:()=>this.toggleUploader(t)},s("span",null,this.addImagesLabel),s("span",{innerHTML:r}))),s("input",{type:"hidden",name:`products[${t}][product_id]`,value:a.product.id}),s("textarea",{placeholder:salla.lang.get("pages.rating.write_product_rate"),name:`products[${t}][comment]`,class:"s-rating-modal-comment"}),s("small",{class:"s-rating-modal-validation-msg"}))),this.allowAttachImages&&s("div",{class:"s-rating-modal-uploader is-closed",ref:a=>this.contentRefs[t]=a},s("salla-file-upload",{name:"image",maxFilesCount:this.MAX_UPLOAD_LIMIT,imagePreviewHeight:117,"instant-upload":!0,type:"feedback",payloadName:"files[]",id:`file-${a.product.id}`,title:a.product.name,allowMultiple:!0,instantUpload:!0,accept:"image/png, image/jpeg, image/jpg",url:salla.url.api("upload"),onUploaded:s=>{this.productImages={...this.productImages,[a.product.id]:[...this.productImages[a.product.id]||[],s.detail]},this.hiddenInputs[t].value=this.productImages[a.product.id].map((a=>a.url)).join(",")},onRemoved:s=>{const i=s.detail;i&&this.productImages[a.product.id]&&(this.productImages={...this.productImages,[a.product.id]:this.productImages[a.product.id].filter((a=>a.id!==i))},this.hiddenInputs[t].value=this.productImages[a.product.id].map((a=>a.url)).join(","))},labelIdle:this.getFilepondPlaceholder()}),s("input",{type:"hidden",name:`products[${t}][images]`,value:(this.productImages[a.product.id]||[]).map((a=>a.url)).join(","),ref:a=>this.hiddenInputs[t]=a}),this.renderUploadedImagesCount(a.product.id)))))):"",this.order.shipping_enabled&&this.order.shipping?.company?s("div",{class:"rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden","data-type":"shipping"},s("input",{type:"hidden",name:"shipping_company_id",value:this.order.shipping.company.id}),this.order.shipping.company.logo?s("div",{class:"s-rating-modal-rounded-icon"},s("img",{src:this.order.shipping.company.logo,class:"s-rating-modal-shipping-logo",alt:this.order.shipping.company.name})):s("span",{class:"s-rating-modal-icon",innerHTML:g}),s("div",{class:"s-rating-modal-title"}," ",`${salla.lang.get("pages.rating.rate_shipping")} ${this.order.shipping.company.name}`),s("div",{class:"s-rating-modal-stars-company"},s("salla-rating-stars",{withLabel:!0,size:"large"})),s("textarea",{name:"comment",class:"s-rating-modal-comment",placeholder:salla.lang.get("pages.rating.write_shipping_rate")}),s("small",{class:"s-rating-modal-validation-msg"})):"",s("div",{class:"s-rating-modal-thanks s-rating-modal-hidden",ref:a=>this.thanksTab=a},s("span",{class:"s-rating-modal-icon",innerHTML:l}),s("h3",{class:"s-rating-modal-thanks-title"},salla.lang.get("pages.rating.thanks")),s("div",{class:"s-rating-modal-thanks-msg",innerHTML:this.order.thanks_message}),s("time",{class:"s-rating-modal-thanks-time",ref:a=>this.thanksTime=a}))),this.allowContactSupport&&this.showContactWidget&&(salla.config.get("store.contacts.whatsapp")||salla.config.get("store.contacts.email"))?s("div",{class:"s-rating-modal-contact"},s("p",null,this.contactUsLabel),s("div",{class:"s-rating-modal-contact-icons"},salla.config.get("store.contacts.whatsapp")&&s("span",{onClick:()=>this.handleSendWhatsApp(),innerHTML:o}),salla.config.get("store.contacts.email")&&s("span",{onClick:()=>this.handleSendEmail(),innerHTML:d}))):"",s("div",{class:"s-rating-modal-footer"},s("button",{ref:a=>this.backBtn=a,onClick:()=>this.previousTab(),class:"s-rating-modal-btn s-rating-modal-unvisiable"},salla.lang.get("common.elements.back")),this.stepsCount>1?s("ul",{class:"s-rating-modal-dots"},[0,1,2].slice(0,this.stepsCount).map((a=>s("li",{key:a,class:"s-rating-modal-bg-gray s-rating-modal-step-dot"})))):"",s("salla-button",{"loader-position":"center",ref:a=>this.nextBtn=a,onClick:()=>this.submit()},salla.lang.get("common.elements.next")))]:s("salla-placeholder",{alignment:"center"}))):void 0}componentWillLoad(){salla.event.on("rating::open",(()=>this.open())),salla.event.on("rating::edit",(a=>this.openEditModal(a))),salla.event.on("rating::delete",(a=>this.openDeleteModal(a)))}componentDidLoad(){salla.event.dispatch("rating::ready",this)}get host(){return i(this)}};m.style="";export{m as salla_rating_modal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as s,a}from"./p-BydBx2Hz.js";import{P as l}from"./p-DY4LZmNP.js";import{I as o}from"./p-C-tzSDxw.js";const i=class{constructor(t){e(this,t),this.variant="info"}renderIcon(){const e=this.icon||this.variant;if("none"===e)return null;switch(e){case"success":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.5-1.5z"}));case"warning":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));case"error":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 \n 10 10 10-4.48 10-10S17.52 2 12 2zm5 \n 13.59L15.59 17 12 13.41 8.41 17 \n 7 15.59 10.59 12 7 8.41 8.41 7 \n 12 10.59 15.59 7 17 8.41 13.41 \n 12 17 15.59z"}));default:return t("span",{innerHTML:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.99935 18.3332C5.39697 18.3332 1.66602 14.6022 1.66602 9.99984C1.66602 5.39746 5.39697 1.6665 9.99935 1.6665C14.6017 1.6665 18.3327 5.39746 18.3327 9.99984C18.3327 14.6022 14.6017 18.3332 9.99935 18.3332ZM9.99935 16.6665C13.6813 16.6665 16.666 13.6818 16.666 9.99984C16.666 6.31794 13.6813 3.33317 9.99935 3.33317C6.31745 3.33317 3.33268 6.31794 3.33268 9.99984C3.33268 13.6818 6.31745 16.6665 9.99935 16.6665ZM9.16602 5.83317H10.8327V7.49984H9.16602V5.83317ZM9.16602 9.1665H10.8327V14.1665H9.16602V9.1665Z" fill="#417AC8"/>\n</svg>\n'})}}render(){return t(s,{key:"3b5dd808399eeda5d930454542cd41cca26b0cc3",class:`s-alert-wrapper s-alert-${this.variant}`},t("span",{key:"4f58234774d1afc790fb83bff983ca9366faa349",class:"s-alert-icon"},this.renderIcon()),t("span",{key:"10eb3f87e6e77dcc5406a24f866feee1cc1f46ef",class:"s-alert-text"},this.message,t("slot",{key:"3656e15aeb25fb7285e88f694c090bad3b32dfbd"})))}};i.style=":host{display:block}";const n=class{constructor(t){e(this,t),this.storeId=salla.config.get("store.id"),this.template=salla.config.get("store.template"),this.loading=!1,this.templateData={},this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.storePrice=salla.lang.getWithDefault("common.elements.store_price","سعر المتجر"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),this.isRtl=salla.config.get("theme.is_rtl",!0),this.storeName=salla.config.get("store.name"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","تفاصيل أكثر"),this.type="popup",salla.lang.onLoaded((()=>{this.defaultMessage=salla.lang.get("common.elements.experimental_and_available_store"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.more_details","تفاصيل أكثر"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.more_details","More Details"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_price","سعر المتجر"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_price","Store Price"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.the_developer","المطور"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.the_developer","the developer"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_price_details","السعر يشمل"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_price_details","Price Includes"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.salla","سلة"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.salla","Salla"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_is_available_for_purchase","This ready store is available for purchase from"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.ready_stores","المتاجر الجاهزة"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.ready_stores","Ready Stores"),setTimeout((()=>{this.storePrice=salla.lang.get("common.elements.store_price"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","More Details")}),100)}))}componentDidLoad(){this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0&&this.fetchTemplateData()}open(){return this.drawer.open()}fetchTemplateData(){if(!Object.keys(this.templateData).length)return this.loading=!0,salla.api.request("/store/template",{},"get",{"Store-Identifier":this.storeId}).then((e=>{this.templateData=e.data,this.loading=!1})).catch((()=>{this.loading=!1}))}handleAction(){"link"===this.type&&(window.location.href=this.actionUrl),"popup"===this.type&&this.open()}popup(){return t("salla-drawer",{class:"s-bottom-alert-modal",ref:e=>this.drawer=e,"no-padding":!0,onLoad:()=>{this.drawer&&Object.keys(this.templateData).length&&this.drawer.setTitle(this.storeDetails+" "+this.storeName)}},Object.keys(this.templateData).length?[t("div",{class:"s-bottom-alert-modal-inner s-scrollbar"},t("div",{class:{"s-bottom-alert-modal-content":!0}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:o,class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storeFeatures)),t("div",{class:"s-bottom-alert-modal-content-features",innerHTML:this.templateData?.features})]:""),t("div",{class:{"s-bottom-alert-modal-content":!0,"s-bottom-alert-modal-content-extra-padding":this.templateData?.price}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:'\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>money-card</title>\n<path d="M17.333 14.667h-2.667c-0.736 0-1.333-0.599-1.333-1.333s0.597-1.333 1.333-1.333h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-1.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333c-2.205 0-4 1.795-4 4s1.795 4 4 4h2.667c0.736 0 1.333 0.597 1.333 1.333s-0.597 1.333-1.333 1.333h-4c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h1.333v1.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-1.333c2.205 0 4-1.795 4-4s-1.795-4-4-4zM28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.736-0.597 1.333-1.333 1.333h-24c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.735 0.597-1.333 1.333-1.333h24c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storePriceDetails)),t("div",{class:"s-bottom-alert-modal-content-price-details"},this.templateData?.price_details?.items.map((e=>t("div",{class:"s-bottom-alert-modal-content-price-details-item"},t("i",{innerHTML:'\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>check-circle</title>\n<path d="M19.557 11.26l-4.593 6.891-2.891-1.927c-0.616-0.411-1.441-0.243-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l4 2.667c0.228 0.152 0.485 0.224 0.739 0.224 0.431 0 0.855-0.208 1.111-0.593l5.333-8c0.409-0.612 0.244-1.441-0.369-1.849-0.616-0.411-1.443-0.243-1.849 0.369zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-price-details-item-icon"}),t("span",{class:"s-bottom-alert-modal-content-price-details-item-name"},e.name),t("span",{class:"s-bottom-alert-modal-content-price-details-item-price",innerHTML:salla.money(e.price)})))))]:""),this.templateData?.link?t("div",{class:"s-bottom-alert-modal-content-footer"},t("salla-button",{color:"primary",size:"medium",width:"wide",href:this.templateData?.link},t("i",{innerHTML:l}),this.buyTheTemplate)):"")]:"")}render(){const e=this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0;return t(s,{key:"e5f273d72875760e30d99d419b247137583bc450",class:"s-bottom-alert-wrapper "+(e?"s-bottom-alert-wrapper-with-template":"")},e&&t("div",{key:"1db37d7c67aae449f41a9a3ed83489b2a0653cef",class:"s-bottom-alert-logo-section"},t("img",{key:"18701cd3d807042b4d852f283d43a6855282f791",src:"https://cdn.salla.network/images/logo/logo-light.svg",alt:"Salla",class:"s-bottom-alert-logo"}),t("span",{key:"66bb3f9b3c00aee5c2694d5ddb142e753ae7fa1a",class:"s-bottom-alert-logo-text"},this.readyStores)),t("div",{key:"01d47c9ec38370b83bdb3fdc29291f55e1b3aa42",class:"s-bottom-alert-content"},t("div",{key:"5380873bf9d393c0fa18da196e1bfb675a8c9c9b",class:"flex items-center gap-2"},t("div",{key:"882382de35a7c9a767e2eb90305c8a973d01ac21",class:"s-bottom-alert-icon"},t("i",this.icon?{class:this.icon}:{innerHTML:'\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>info</title>\n<path d="M16 13.333c-0.737 0-1.333 0.596-1.333 1.333v9.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-9.333c0-0.737-0.596-1.333-1.333-1.333zM16 7.987c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n'})),t("div",{key:"dfbaa427fd4e8b755a479e0b5459422e44a95f59",class:"s-bottom-alert-message"},this.message?this.message:e?t("span",{class:"flex flex-wrap items-center gap-1"},this.defaultMessage,t("span",{class:{"s-bottom-alert-message-highlight":!0},"aria-label":"Developer"},this.salla),t("span",{innerHTML:salla.money(this.template.price)})):this.defaultMessage)),"banner"!==this.type&&t("div",{key:"327ef4b5ecdab7d994418c033a78c2531eb28de5",class:e?"s-bottom-alert-actions-group":"s-bottom-alert-action"},e?this.loading?t("salla-loading",{size:"20"}):t("div",{class:"s-bottom-alert-actions-group-container"},t("a",{class:"s-bottom-alert-action-link",onClick:()=>this.handleAction()},this.actionLabel||this.moreDetailsLabel),this.templateData?.link?t("button",{type:"button",class:"s-bottom-alert-action-purchase-button",onClick:()=>window.open(this.templateData?.link,"_blank")},this.buyTheTemplate):null):t("salla-button",{href:this.actionUrl,size:"medium",onClick:()=>this.handleAction(),width:"normal"},this.actionLabel||this.defaultActionLabel)),"popup"===this.type&&this.popup()))}get host(){return a(this)}};n.style=":host{display:block}";export{i as salla_alert,n as salla_bottom_alert}
|
|
4
|
+
import{r as e,h as t,H as s,a}from"./p-DYl9MMu1.js";import{P as l}from"./p-DY4LZmNP.js";import{I as o}from"./p-C-tzSDxw.js";const i=class{constructor(t){e(this,t),this.variant="info"}renderIcon(){const e=this.icon||this.variant;if("none"===e)return null;switch(e){case"success":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.5-1.5z"}));case"warning":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}));case"error":return t("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},t("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 \n 10 10 10-4.48 10-10S17.52 2 12 2zm5 \n 13.59L15.59 17 12 13.41 8.41 17 \n 7 15.59 10.59 12 7 8.41 8.41 7 \n 12 10.59 15.59 7 17 8.41 13.41 \n 12 17 15.59z"}));default:return t("span",{innerHTML:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.99935 18.3332C5.39697 18.3332 1.66602 14.6022 1.66602 9.99984C1.66602 5.39746 5.39697 1.6665 9.99935 1.6665C14.6017 1.6665 18.3327 5.39746 18.3327 9.99984C18.3327 14.6022 14.6017 18.3332 9.99935 18.3332ZM9.99935 16.6665C13.6813 16.6665 16.666 13.6818 16.666 9.99984C16.666 6.31794 13.6813 3.33317 9.99935 3.33317C6.31745 3.33317 3.33268 6.31794 3.33268 9.99984C3.33268 13.6818 6.31745 16.6665 9.99935 16.6665ZM9.16602 5.83317H10.8327V7.49984H9.16602V5.83317ZM9.16602 9.1665H10.8327V14.1665H9.16602V9.1665Z" fill="#417AC8"/>\n</svg>\n'})}}render(){return t(s,{key:"3b5dd808399eeda5d930454542cd41cca26b0cc3",class:`s-alert-wrapper s-alert-${this.variant}`},t("span",{key:"4f58234774d1afc790fb83bff983ca9366faa349",class:"s-alert-icon"},this.renderIcon()),t("span",{key:"10eb3f87e6e77dcc5406a24f866feee1cc1f46ef",class:"s-alert-text"},this.message,t("slot",{key:"3656e15aeb25fb7285e88f694c090bad3b32dfbd"})))}};i.style=":host{display:block}";const n=class{constructor(t){e(this,t),this.storeId=salla.config.get("store.id"),this.template=salla.config.get("store.template"),this.loading=!1,this.templateData={},this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.storePrice=salla.lang.getWithDefault("common.elements.store_price","سعر المتجر"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),this.isRtl=salla.config.get("theme.is_rtl",!0),this.storeName=salla.config.get("store.name"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","تفاصيل أكثر"),this.type="popup",salla.lang.onLoaded((()=>{this.defaultMessage=salla.lang.get("common.elements.experimental_and_available_store"),this.defaultActionLabel=salla.lang.get("common.elements.know_more"),this.storeFeatures=salla.lang.get("common.elements.store_features"),this.storeDetails=salla.lang.get("common.elements.store_details"),this.templateInformation=salla.lang.get("common.elements.template_information"),this.buyTheTemplate=salla.lang.get("common.elements.buy_the_template"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.more_details","تفاصيل أكثر"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.more_details","More Details"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_price","سعر المتجر"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_price","Store Price"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.the_developer","المطور"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.the_developer","the developer"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_price_details","السعر يشمل"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_price_details","Price Includes"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.salla","سلة"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.salla","Salla"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.store_is_available_for_purchase","This ready store is available for purchase from"),salla.helpers.setNested(salla.lang.messages["ar.trans"],"common.elements.ready_stores","المتاجر الجاهزة"),salla.helpers.setNested(salla.lang.messages["en.trans"],"common.elements.ready_stores","Ready Stores"),setTimeout((()=>{this.storePrice=salla.lang.get("common.elements.store_price"),this.theDeveloper=salla.lang.get("common.elements.the_developer"),this.storePriceDetails=salla.lang.getWithDefault("common.elements.store_price_details","السعر يشمل"),this.salla=salla.lang.getWithDefault("common.elements.salla","سلة"),this.defaultMessage=salla.lang.getWithDefault("common.elements.store_is_available_for_purchase","هذا المتجر تطويري ومتاح للشراء من"),this.readyStores=salla.lang.getWithDefault("common.elements.ready_stores","المتاجر الجاهزة"),this.moreDetailsLabel=salla.lang.getWithDefault("common.elements.more_details","More Details")}),100)}))}componentDidLoad(){this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0&&this.fetchTemplateData()}open(){return this.drawer.open()}fetchTemplateData(){if(!Object.keys(this.templateData).length)return this.loading=!0,salla.api.request("/store/template",{},"get",{"Store-Identifier":this.storeId}).then((e=>{this.templateData=e.data,this.loading=!1})).catch((()=>{this.loading=!1}))}handleAction(){"link"===this.type&&(window.location.href=this.actionUrl),"popup"===this.type&&this.open()}popup(){return t("salla-drawer",{class:"s-bottom-alert-modal",ref:e=>this.drawer=e,"no-padding":!0,onLoad:()=>{this.drawer&&Object.keys(this.templateData).length&&this.drawer.setTitle(this.storeDetails+" "+this.storeName)}},Object.keys(this.templateData).length?[t("div",{class:"s-bottom-alert-modal-inner s-scrollbar"},t("div",{class:{"s-bottom-alert-modal-content":!0}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:o,class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storeFeatures)),t("div",{class:"s-bottom-alert-modal-content-features",innerHTML:this.templateData?.features})]:""),t("div",{class:{"s-bottom-alert-modal-content":!0,"s-bottom-alert-modal-content-extra-padding":this.templateData?.price}},this.templateData?.features?[t("div",{class:"s-bottom-alert-modal-content-title"},t("i",{innerHTML:'\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>money-card</title>\n<path d="M17.333 14.667h-2.667c-0.736 0-1.333-0.599-1.333-1.333s0.597-1.333 1.333-1.333h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-1.333v-1.333c0-0.736-0.596-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.333c-2.205 0-4 1.795-4 4s1.795 4 4 4h2.667c0.736 0 1.333 0.597 1.333 1.333s-0.597 1.333-1.333 1.333h-4c-0.737 0-1.333 0.596-1.333 1.333s0.596 1.333 1.333 1.333h1.333v1.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-1.333c2.205 0 4-1.795 4-4s-1.795-4-4-4zM28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.736-0.597 1.333-1.333 1.333h-24c-0.736 0-1.333-0.597-1.333-1.333v-18.667c0-0.735 0.597-1.333 1.333-1.333h24c0.736 0 1.333 0.599 1.333 1.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-icon"}),t("span",null,this.storePriceDetails)),t("div",{class:"s-bottom-alert-modal-content-price-details"},this.templateData?.price_details?.items.map((e=>t("div",{class:"s-bottom-alert-modal-content-price-details-item"},t("i",{innerHTML:'\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>check-circle</title>\n<path d="M19.557 11.26l-4.593 6.891-2.891-1.927c-0.616-0.411-1.441-0.243-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l4 2.667c0.228 0.152 0.485 0.224 0.739 0.224 0.431 0 0.855-0.208 1.111-0.593l5.333-8c0.409-0.612 0.244-1.441-0.369-1.849-0.616-0.411-1.443-0.243-1.849 0.369zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n',class:"s-bottom-alert-modal-content-price-details-item-icon"}),t("span",{class:"s-bottom-alert-modal-content-price-details-item-name"},e.name),t("span",{class:"s-bottom-alert-modal-content-price-details-item-price",innerHTML:salla.money(e.price)})))))]:""),this.templateData?.link?t("div",{class:"s-bottom-alert-modal-content-footer"},t("salla-button",{color:"primary",size:"medium",width:"wide",href:this.templateData?.link},t("i",{innerHTML:l}),this.buyTheTemplate)):"")]:"")}render(){const e=this.template&&"object"==typeof this.template&&Object.keys(this.template).length>0;return t(s,{key:"e5f273d72875760e30d99d419b247137583bc450",class:"s-bottom-alert-wrapper "+(e?"s-bottom-alert-wrapper-with-template":"")},e&&t("div",{key:"1db37d7c67aae449f41a9a3ed83489b2a0653cef",class:"s-bottom-alert-logo-section"},t("img",{key:"18701cd3d807042b4d852f283d43a6855282f791",src:"https://cdn.salla.network/images/logo/logo-light.svg",alt:"Salla",class:"s-bottom-alert-logo"}),t("span",{key:"66bb3f9b3c00aee5c2694d5ddb142e753ae7fa1a",class:"s-bottom-alert-logo-text"},this.readyStores)),t("div",{key:"01d47c9ec38370b83bdb3fdc29291f55e1b3aa42",class:"s-bottom-alert-content"},t("div",{key:"5380873bf9d393c0fa18da196e1bfb675a8c9c9b",class:"flex items-center gap-2"},t("div",{key:"882382de35a7c9a767e2eb90305c8a973d01ac21",class:"s-bottom-alert-icon"},t("i",this.icon?{class:this.icon}:{innerHTML:'\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>info</title>\n<path d="M16 13.333c-0.737 0-1.333 0.596-1.333 1.333v9.333c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-9.333c0-0.737-0.596-1.333-1.333-1.333zM16 7.987c-0.737 0-1.333 0.596-1.333 1.333v0.013c0 0.737 0.596 1.327 1.333 1.327s1.333-0.603 1.333-1.34-0.596-1.333-1.333-1.333zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>\n</svg>\n'})),t("div",{key:"dfbaa427fd4e8b755a479e0b5459422e44a95f59",class:"s-bottom-alert-message"},this.message?this.message:e?t("span",{class:"flex flex-wrap items-center gap-1"},this.defaultMessage,t("span",{class:{"s-bottom-alert-message-highlight":!0},"aria-label":"Developer"},this.salla),t("span",{innerHTML:salla.money(this.template.price)})):this.defaultMessage)),"banner"!==this.type&&t("div",{key:"327ef4b5ecdab7d994418c033a78c2531eb28de5",class:e?"s-bottom-alert-actions-group":"s-bottom-alert-action"},e?this.loading?t("salla-loading",{size:"20"}):t("div",{class:"s-bottom-alert-actions-group-container"},t("a",{class:"s-bottom-alert-action-link",onClick:()=>this.handleAction()},this.actionLabel||this.moreDetailsLabel),this.templateData?.link?t("button",{type:"button",class:"s-bottom-alert-action-purchase-button",onClick:()=>window.open(this.templateData?.link,"_blank")},this.buyTheTemplate):null):t("salla-button",{href:this.actionUrl,size:"medium",onClick:()=>this.handleAction(),width:"normal"},this.actionLabel||this.defaultActionLabel)),"popup"===this.type&&this.popup()))}get host(){return a(this)}};n.style=":host{display:block}";export{i as salla_alert,n as salla_bottom_alert}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as e,h as t,H as s,c as a,a as i}from"./p-BydBx2Hz.js";import{p as l,m as o}from"./p-DfeagqF1.js";import{L as r}from"./p-BO5AoBAP.js";const h=class{constructor(t){e(this,t)}render(){return t(s,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))}};h.style="";const c=class{constructor(t){e(this,t),this.accordionToggle=a(this,"accordionToggle"),this.collapsible=!1,this.collapsed=!0}emitCollapsePanel(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})}toggleCollapse(){this.collapsible&&(this.collapsed=!this.collapsed,this.host.parentElement?.setAttribute("data-collapsed",this.collapsed.toString()),this.host.parentElement?.querySelector("salla-accordion-body")?.setAttribute("data-collapsed",this.collapsed.toString()),this.emitCollapsePanel())}render(){return t(s,{key:"9d88d243306cdf451c20d7068fbb9f48807b22e9","data-collapsed":this.collapsed.toString(),onClick:()=>this.toggleCollapse(),class:"s-accordion-head-wrapper"},t("div",{key:"bad4c5a913ce1c4581b09c0b6d96fcbdb4236638",class:"s-accordion-head-wrapper-start"},t("slot",{key:"acb83cec8cbca5771a9f84e81c0b955c3edad731",name:"title"}),t("slot",{key:"a4ad42ea6fad4f452c4c218a9ee02dca0adb4a67",name:"progress"}),t("slot",{key:"96ab95d413dc906ac299079f4008816f01881990",name:"html"})),(this.collapsible||this.host.querySelector('[slot="note"]'))&&t("div",{key:"8f9666a5038cd7b1ac6e357c6920ea26d31c5f03",class:"s-accordion-head-wrapper-end"},t("slot",{key:"14895e8c1385e91c14f046c9ae38ce5e4a4c9a60",name:"note"}),this.collapsible&&t("button",{key:"97dc7fabbb207fcc8b68ebf0a86f6c8a980dca13",class:{"s-accordion-head-wrapper-toggle":!0,active:!this.collapsed},onClick:e=>{e.stopPropagation(),this.toggleCollapse()}},t("span",{key:"3b24faf71dcd332663a354310b2ce09f7879eddc",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?l:o}))))}get host(){return i(this)}};c.style="";var n={light:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}],dark:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]};class d{constructor(e=null,t={}){if(this.apiKey=e,this.options=t,"undefined"==typeof window)throw new Error("google-maps is supported only in browser environment")}load(){return void 0!==this.api?Promise.resolve(this.api):void 0!==this.loader?this.loader:(window[d.CALLBACK_NAME]=()=>{if(this.api=window.google,void 0===this.resolve)throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(void 0===this.reject)throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise(((e,t)=>{this.resolve=e,this.reject=t;const s=document.createElement("script");s.src=this.createUrl(),s.async=!0,s.onerror=e=>t(e),document.head.appendChild(s)})))}createUrl(){const e=[`callback=${d.CALLBACK_NAME}`];this.apiKey&&e.push(`key=${this.apiKey}`);for(let t in this.options)if(this.options.hasOwnProperty(t)){let s=this.options[t];"version"===t&&(t="v"),"libraries"===t&&(s=s.join(",")),e.push(`${t}=${s}`)}return`https://maps.googleapis.com/maps/api/js?${e.join("&")}`}}d.CALLBACK_NAME="_dk_google_maps_loader_cb";const p=class{constructor(t){e(this,t),this.selected=a(this,"selected"),this.mapClicked=a(this,"mapClicked"),this.currentLocationChanged=a(this,"currentLocationChanged"),this.invalidInput=a(this,"invalidInput"),this.defaultLat=21.419421,this.defaultLng=39.82553,this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address"),this.searchInputValue=null,this.formattedAddress="",this.geolocationError=!1,this.name="location",this.required=!1,this.readonly=!1,this.searchable=!1,this.zoom=10,this.theme="light",salla.lang.onLoaded((()=>{this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address")})),salla.onReady((()=>{this.apiKey=salla.config.get("store.settings.keys.maps","AIzaSyBFgFISAizDP3YVWj0y5rF8JKKNQ2vohdc")}))}formatAddress(e){return e.length>25?e.substring(0,25)+"...":e}getLatLng(){return this.selectedLat&&this.selectedLng?`${this.selectedLat}, ${this.selectedLng}`:null}getPositionAddress(e,t=!1){(new google.maps.Geocoder).geocode({location:e},((e,s)=>{s===google.maps.GeocoderStatus.OK&&(this.searchable&&(this.searchInputValue=e[0].formatted_address,this.searchInput.value=e[0].formatted_address),t&&(this.formattedAddress=e[0].formatted_address))}))}initGoogleMaps(e,t){new d(this.apiKey,e).load().then((e=>{if(this.map=new e.maps.Map(t,{center:this.lat||this.lng?{lat:this.lat,lng:this.lng}:{lat:this.defaultLat,lng:this.defaultLng},zoom:this.zoom,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,disableDefaultUI:!1}),this.map.setOptions({styles:"light"===this.theme?n.light:n.dark}),this.marker=new e.maps.Marker({position:this.map.getCenter(),map:this.map,icon:{url:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="36" height="36" rx="18" fill="#5CD5C4"/>\n<path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>\n</svg>\n'),scaledSize:new e.maps.Size(30,30)}}),this.searchable){const t=new e.maps.places.SearchBox(this.searchInput);e.maps.event.addListener(t,"places_changed",(()=>{const e=t.getPlaces();e.length>0&&this.map&&(this.map.setCenter(e[0].geometry.location),this.lat=e[0].geometry.location.lat(),this.lng=e[0].geometry.location.lng(),this.marker.setPosition(e[0].geometry.location),this.searchInputValue=e[0].formatted_address,this.formattedAddress=e[0].formatted_address)}))}e.maps.event.addListener(this.map,"click",(e=>{this.readonly||(this.marker.setPosition(e.latLng),this.lat=e.latLng.lat(),this.lng=e.latLng.lng(),this.getPositionAddress(e.latLng),this.mapClicked.emit({lat:e.latLng.lat(),lng:e.latLng.lng(),address:this.formattedAddress?this.formattedAddress:null}))})),this.lat||this.lng||(this.getCurrentLocation(),this.geolocationError&&(this.map.setCenter({lat:this.lat,lng:this.lng}),this.marker.setPosition({lat:this.lat,lng:this.lng})))}))}getCurrentLocation(){navigator.geolocation&&this.map?navigator.geolocation.getCurrentPosition((e=>{const t={center:new google.maps.LatLng(e.coords.latitude,e.coords.longitude),zoom:15};this.map.setOptions(t),this.marker.setPosition(t.center),this.getPositionAddress(t.center),this.lat=e.coords.latitude,this.lng=e.coords.longitude,this.currentLocationChanged.emit({lat:e.coords.latitude,lng:e.coords.longitude,address:this.formattedAddress?this.formattedAddress:null})}),this.handleLocationError.bind(this)):(salla.log("Geolocation is not supported by this browser."),this.geolocationError=!0)}handleLocationError(e){switch(this.geolocationError=!0,e.code){case e.PERMISSION_DENIED:salla.log("User denied the request for Geolocation.");break;case e.POSITION_UNAVAILABLE:salla.log("Location information is unavailable.");break;case e.TIMEOUT:salla.log("The request to get user location timed out.");break;case e.UNKNOWN_ERROR:salla.log("An unknown error occurred.")}}componentDidLoad(){this.lat&&this.lng&&fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get("user.language_code")||document.documentElement.lang||"ar"}`).then((e=>e.json())).then((e=>{"OK"===e.status&&(this.formattedAddress=e.results[0].formatted_address,this.searchInputValue=e.results[0].formatted_address,this.searchInput.value=e.results[0].formatted_address,this.selectedLng=this.lng,this.selectedLat=this.lat)})),this.mapInput.addEventListener("invalid",(e=>{this.invalidInput.emit(e)})),this.mapInput.addEventListener("input",(()=>{this.mapInput.setCustomValidity(""),this.mapInput.reportValidity()}))}async open(){return this.map||this.initGoogleMaps({libraries:this.searchable?["places","search"]:[],language:salla.config.get("user.language_code")||document.documentElement.lang||"ar"},this.mapElement),await this.locationModal.open()}getLocationModal(){return t("div",null,t("div",{class:"s-map-modal-title"},this.modalTitle?this.modalTitle:this.modalActivityTitle),t("div",{class:"s-map-modal-body"},t("div",{class:"s-map-element",ref:e=>this.mapElement=e}),this.readonly?"":[this.searchable&&t("div",{class:"s-map-search-wrapper"},t("input",{class:"s-map-search-input",ref:e=>this.searchInput=e,placeholder:this.searchPlaceholder})),t("salla-button",{class:"s-map-my-location-button",onClick:()=>{this.getCurrentLocation()},shape:"icon",color:"primary"},t("span",{innerHTML:'\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>location-target</title>\n<path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>\n</svg>\n'})),t("salla-button",{class:"s-map-submit-button",color:"primary",width:"wide",onClick:()=>{let e={lat:this.lat,lng:this.lng,address:this.formattedAddress?this.formattedAddress:null};salla.event.emit("salla-map::selected",e),this.selected.emit(e),this.selectedLat=e.lat,this.selectedLng=e.lng,this.getPositionAddress(new google.maps.LatLng(e.lat,e.lng),!0),this.mapInput.value=this.selectedLat&&this.selectedLng?`${this.selectedLat}, ${this.selectedLng}`:null,this.mapInput.dispatchEvent(new window.Event("change",{bubbles:!0})),this.locationModal.close()}},this.confirmButtonTitle)]))}render(){return t(s,{key:"7d4c5c9abf034d5568ab037dcb58e7fbeb98212c",class:"s-map-wrapper"},t("salla-modal",{key:"58b5cc9ec4377a9206485a435c198c30390982c4",class:"s-map-modal-wrapper",noPadding:!0,ref:e=>{this.locationModal=e}},this.getLocationModal()),t("slot",{key:"c32c39e9361dcbe8c0bc4830614aa98e00a76663",name:"button"},t("salla-button",{key:"0dda0709bb35f23d99394215aaf8c8b5344c641e",onClick:()=>{this.open()},color:"primary",class:"s-map-location-button"},t("span",{key:"367337f317474cf49665a14b5aca50f3daf6c6f8",class:"s-map-location-icon",innerHTML:this.formattedAddress?'\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>edit</title>\n<path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>\n</svg>\n':r}),this.formattedAddress?t("div",null,this.locateButtonEdit," | ",this.formatAddress(this.formattedAddress)):this.locateButtonTitle)),t("input",{key:"f3a1561cd74f089de4a09d2d9a72b73f1ebcfc13",class:"s-hidden",name:this.name,required:this.required,value:this.getLatLng(),ref:e=>this.mapInput=e}))}get host(){return i(this)}};p.style="";export{h as salla_accordion_body,c as salla_accordion_head,p as salla_map}
|
|
4
|
+
import{r as e,h as t,H as s,c as a,a as i}from"./p-DYl9MMu1.js";import{p as l,m as o}from"./p-DfeagqF1.js";import{L as r}from"./p-BO5AoBAP.js";const h=class{constructor(t){e(this,t)}render(){return t(s,{key:"298d42a5bf1bcefdb181ec35060220cf749b56ed",class:"s-accordion-body-wrapper"},t("slot",{key:"6ab081e8b71b5dc69fb66fbdec82b4725ab53b0d"}))}};h.style="";const c=class{constructor(t){e(this,t),this.accordionToggle=a(this,"accordionToggle"),this.collapsible=!1,this.collapsed=!0}emitCollapsePanel(){this.accordionToggle.emit({payload:{collapsed:this.collapsed}})}toggleCollapse(){this.collapsible&&(this.collapsed=!this.collapsed,this.host.parentElement?.setAttribute("data-collapsed",this.collapsed.toString()),this.host.parentElement?.querySelector("salla-accordion-body")?.setAttribute("data-collapsed",this.collapsed.toString()),this.emitCollapsePanel())}render(){return t(s,{key:"9d88d243306cdf451c20d7068fbb9f48807b22e9","data-collapsed":this.collapsed.toString(),onClick:()=>this.toggleCollapse(),class:"s-accordion-head-wrapper"},t("div",{key:"bad4c5a913ce1c4581b09c0b6d96fcbdb4236638",class:"s-accordion-head-wrapper-start"},t("slot",{key:"acb83cec8cbca5771a9f84e81c0b955c3edad731",name:"title"}),t("slot",{key:"a4ad42ea6fad4f452c4c218a9ee02dca0adb4a67",name:"progress"}),t("slot",{key:"96ab95d413dc906ac299079f4008816f01881990",name:"html"})),(this.collapsible||this.host.querySelector('[slot="note"]'))&&t("div",{key:"8f9666a5038cd7b1ac6e357c6920ea26d31c5f03",class:"s-accordion-head-wrapper-end"},t("slot",{key:"14895e8c1385e91c14f046c9ae38ce5e4a4c9a60",name:"note"}),this.collapsible&&t("button",{key:"97dc7fabbb207fcc8b68ebf0a86f6c8a980dca13",class:{"s-accordion-head-wrapper-toggle":!0,active:!this.collapsed},onClick:e=>{e.stopPropagation(),this.toggleCollapse()}},t("span",{key:"3b24faf71dcd332663a354310b2ce09f7879eddc",class:"s-accordion-head-wrapper-toggle-icon",innerHTML:this.collapsed?l:o}))))}get host(){return i(this)}};c.style="";var n={light:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}],dark:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]};class d{constructor(e=null,t={}){if(this.apiKey=e,this.options=t,"undefined"==typeof window)throw new Error("google-maps is supported only in browser environment")}load(){return void 0!==this.api?Promise.resolve(this.api):void 0!==this.loader?this.loader:(window[d.CALLBACK_NAME]=()=>{if(this.api=window.google,void 0===this.resolve)throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(void 0===this.reject)throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise(((e,t)=>{this.resolve=e,this.reject=t;const s=document.createElement("script");s.src=this.createUrl(),s.async=!0,s.onerror=e=>t(e),document.head.appendChild(s)})))}createUrl(){const e=[`callback=${d.CALLBACK_NAME}`];this.apiKey&&e.push(`key=${this.apiKey}`);for(let t in this.options)if(this.options.hasOwnProperty(t)){let s=this.options[t];"version"===t&&(t="v"),"libraries"===t&&(s=s.join(",")),e.push(`${t}=${s}`)}return`https://maps.googleapis.com/maps/api/js?${e.join("&")}`}}d.CALLBACK_NAME="_dk_google_maps_loader_cb";const p=class{constructor(t){e(this,t),this.selected=a(this,"selected"),this.mapClicked=a(this,"mapClicked"),this.currentLocationChanged=a(this,"currentLocationChanged"),this.invalidInput=a(this,"invalidInput"),this.defaultLat=21.419421,this.defaultLng=39.82553,this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address"),this.searchInputValue=null,this.formattedAddress="",this.geolocationError=!1,this.name="location",this.required=!1,this.readonly=!1,this.searchable=!1,this.zoom=10,this.theme="light",salla.lang.onLoaded((()=>{this.modalActivityTitle=salla.lang.get("pages.checkout.select_your_address_from_map"),this.confirmButtonTitle=salla.lang.get("pages.checkout.confirm_address"),this.locateButtonTitle=salla.lang.get("pages.cart.detect_location"),this.locateButtonEdit=salla.lang.get("common.elements.edit"),this.searchPlaceholder=salla.lang.get("pages.checkout.search_for_address")})),salla.onReady((()=>{this.apiKey=salla.config.get("store.settings.keys.maps","AIzaSyBFgFISAizDP3YVWj0y5rF8JKKNQ2vohdc")}))}formatAddress(e){return e.length>25?e.substring(0,25)+"...":e}getLatLng(){return this.selectedLat&&this.selectedLng?`${this.selectedLat}, ${this.selectedLng}`:null}getPositionAddress(e,t=!1){(new google.maps.Geocoder).geocode({location:e},((e,s)=>{s===google.maps.GeocoderStatus.OK&&(this.searchable&&(this.searchInputValue=e[0].formatted_address,this.searchInput.value=e[0].formatted_address),t&&(this.formattedAddress=e[0].formatted_address))}))}initGoogleMaps(e,t){new d(this.apiKey,e).load().then((e=>{if(this.map=new e.maps.Map(t,{center:this.lat||this.lng?{lat:this.lat,lng:this.lng}:{lat:this.defaultLat,lng:this.defaultLng},zoom:this.zoom,zoomControl:!0,mapTypeControl:!1,scaleControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1,disableDefaultUI:!1}),this.map.setOptions({styles:"light"===this.theme?n.light:n.dark}),this.marker=new e.maps.Marker({position:this.map.getCenter(),map:this.map,icon:{url:"data:image/svg+xml;utf8,"+encodeURIComponent('<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect width="36" height="36" rx="18" fill="#5CD5C4"/>\n<path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>\n</svg>\n'),scaledSize:new e.maps.Size(30,30)}}),this.searchable){const t=new e.maps.places.SearchBox(this.searchInput);e.maps.event.addListener(t,"places_changed",(()=>{const e=t.getPlaces();e.length>0&&this.map&&(this.map.setCenter(e[0].geometry.location),this.lat=e[0].geometry.location.lat(),this.lng=e[0].geometry.location.lng(),this.marker.setPosition(e[0].geometry.location),this.searchInputValue=e[0].formatted_address,this.formattedAddress=e[0].formatted_address)}))}e.maps.event.addListener(this.map,"click",(e=>{this.readonly||(this.marker.setPosition(e.latLng),this.lat=e.latLng.lat(),this.lng=e.latLng.lng(),this.getPositionAddress(e.latLng),this.mapClicked.emit({lat:e.latLng.lat(),lng:e.latLng.lng(),address:this.formattedAddress?this.formattedAddress:null}))})),this.lat||this.lng||(this.getCurrentLocation(),this.geolocationError&&(this.map.setCenter({lat:this.lat,lng:this.lng}),this.marker.setPosition({lat:this.lat,lng:this.lng})))}))}getCurrentLocation(){navigator.geolocation&&this.map?navigator.geolocation.getCurrentPosition((e=>{const t={center:new google.maps.LatLng(e.coords.latitude,e.coords.longitude),zoom:15};this.map.setOptions(t),this.marker.setPosition(t.center),this.getPositionAddress(t.center),this.lat=e.coords.latitude,this.lng=e.coords.longitude,this.currentLocationChanged.emit({lat:e.coords.latitude,lng:e.coords.longitude,address:this.formattedAddress?this.formattedAddress:null})}),this.handleLocationError.bind(this)):(salla.log("Geolocation is not supported by this browser."),this.geolocationError=!0)}handleLocationError(e){switch(this.geolocationError=!0,e.code){case e.PERMISSION_DENIED:salla.log("User denied the request for Geolocation.");break;case e.POSITION_UNAVAILABLE:salla.log("Location information is unavailable.");break;case e.TIMEOUT:salla.log("The request to get user location timed out.");break;case e.UNKNOWN_ERROR:salla.log("An unknown error occurred.")}}componentDidLoad(){this.lat&&this.lng&&fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get("user.language_code")||document.documentElement.lang||"ar"}`).then((e=>e.json())).then((e=>{"OK"===e.status&&(this.formattedAddress=e.results[0].formatted_address,this.searchInputValue=e.results[0].formatted_address,this.searchInput.value=e.results[0].formatted_address,this.selectedLng=this.lng,this.selectedLat=this.lat)})),this.mapInput.addEventListener("invalid",(e=>{this.invalidInput.emit(e)})),this.mapInput.addEventListener("input",(()=>{this.mapInput.setCustomValidity(""),this.mapInput.reportValidity()}))}async open(){return this.map||this.initGoogleMaps({libraries:this.searchable?["places","search"]:[],language:salla.config.get("user.language_code")||document.documentElement.lang||"ar"},this.mapElement),await this.locationModal.open()}getLocationModal(){return t("div",null,t("div",{class:"s-map-modal-title"},this.modalTitle?this.modalTitle:this.modalActivityTitle),t("div",{class:"s-map-modal-body"},t("div",{class:"s-map-element",ref:e=>this.mapElement=e}),this.readonly?"":[this.searchable&&t("div",{class:"s-map-search-wrapper"},t("input",{class:"s-map-search-input",ref:e=>this.searchInput=e,placeholder:this.searchPlaceholder})),t("salla-button",{class:"s-map-my-location-button",onClick:()=>{this.getCurrentLocation()},shape:"icon",color:"primary"},t("span",{innerHTML:'\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>location-target</title>\n<path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>\n</svg>\n'})),t("salla-button",{class:"s-map-submit-button",color:"primary",width:"wide",onClick:()=>{let e={lat:this.lat,lng:this.lng,address:this.formattedAddress?this.formattedAddress:null};salla.event.emit("salla-map::selected",e),this.selected.emit(e),this.selectedLat=e.lat,this.selectedLng=e.lng,this.getPositionAddress(new google.maps.LatLng(e.lat,e.lng),!0),this.mapInput.value=this.selectedLat&&this.selectedLng?`${this.selectedLat}, ${this.selectedLng}`:null,this.mapInput.dispatchEvent(new window.Event("change",{bubbles:!0})),this.locationModal.close()}},this.confirmButtonTitle)]))}render(){return t(s,{key:"7d4c5c9abf034d5568ab037dcb58e7fbeb98212c",class:"s-map-wrapper"},t("salla-modal",{key:"58b5cc9ec4377a9206485a435c198c30390982c4",class:"s-map-modal-wrapper",noPadding:!0,ref:e=>{this.locationModal=e}},this.getLocationModal()),t("slot",{key:"c32c39e9361dcbe8c0bc4830614aa98e00a76663",name:"button"},t("salla-button",{key:"0dda0709bb35f23d99394215aaf8c8b5344c641e",onClick:()=>{this.open()},color:"primary",class:"s-map-location-button"},t("span",{key:"367337f317474cf49665a14b5aca50f3daf6c6f8",class:"s-map-location-icon",innerHTML:this.formattedAddress?'\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>edit</title>\n<path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>\n</svg>\n':r}),this.formattedAddress?t("div",null,this.locateButtonEdit," | ",this.formatAddress(this.formattedAddress)):this.locateButtonTitle)),t("input",{key:"f3a1561cd74f089de4a09d2d9a72b73f1ebcfc13",class:"s-hidden",name:this.name,required:this.required,value:this.getLatLng(),ref:e=>this.mapInput=e}))}get host(){return i(this)}};p.style="";export{h as salla_accordion_body,c as salla_accordion_head,p as salla_map}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as s,h as i,H as e,a}from"./p-
|
|
4
|
+
import{r as t,c as s,h as i,H as e,a}from"./p-DYl9MMu1.js";import{F as l}from"./p-DL4h2bc3.js";import{H as r}from"./p-CHf8XdiS.js";import"./p-CgtvEd63.js";const o=class{constructor(i){t(this,i),this.changed=s(this,"changed"),this.isReady=!1,this.filtersData={},salla.event.on("filters::hidden",(()=>this.host.style.display="none")),salla.lang.onLoaded((()=>{this.apply=salla.lang.get("pages.checkout.apply"),this.reset=salla.lang.get("pages.categories.filters_reset")})),salla.event.on("filters::fetched",(({filters:t})=>{this.host.style.display="";let s={};this.filters=t.map((t=>{if(t.label={category_id:salla.lang.get("common.titles.categories"),brand_id:salla.lang.get("common.titles.brands"),rating:salla.lang.get("pages.categories.filter_rating"),price:salla.lang.get("pages.categories.filter_price")}[t.key]||t.label,"rating"==t.key){t.type=l.VALUES;let{max:s,min:i}=t.values;t.values=[5,4,3,2,1].filter((t=>t>=i||t<=s))}this.filtersData.variants&&t.type==l.VARIANTS&&(s.variants=this.filtersData.variants),this.filtersData[t.key]&&t.type!==l.VARIANTS&&(s[t.key]=this.filtersData[t.key]);let i=new URLSearchParams(window.location.search),e=!1;for(let t of i.keys())if(t.includes("filters")){e=!0;break}if("product.index"==salla.config.get("page.slug")&&0==Object.keys(s).length&&!e){let t=window.location.href,i=salla.config.get("page.id"),e=-1!==t.indexOf("?")?"&":"?",a=t+e+"filters[category_id]="+i;s.category_id=i,window.history.pushState({path:a},"",a)}return t})),this.filtersData=s,this.host.childNodes.forEach((async t=>t.setWidgetHeight&&await t.setWidgetHeight()))}))}async componentWillLoad(){try{const t=new URLSearchParams(window.location.search);this.filtersData=await r.extractFiltersFromUrl(t)}catch(t){console.warn("failed to get filters from URL",t.message)}}async getFilters(){return this.filtersData}async applyFilters(){if(!this.isReady)return;let t=Object.keys(this.filtersData).length>0;setTimeout((()=>{if(t){let t=new URL(window.location.href);for(const[s]of t.searchParams.entries())s.startsWith("filters")&&t.searchParams.delete(s);let s=this.encodeFilters(this.filtersData),i=t.search.split("&").filter((t=>!t.includes("filters"))).join("&");t.search=i?t.search.split("&filters")[0]+"&"+s:`?${s}`,window.history.pushState({},"",t.href)}else{let t=new URL(window.location.href);t.searchParams?.delete("filters"),window.history.pushState({},"",t.toString())}salla.event.emit("salla-filters::changed",this.filtersData),this.changed.emit(this.filtersData)}),300)}encodeFilters(t,s="filters"){const i=[];for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const a=t[e],l=s?`${s}[${e}]`:e;if(Array.isArray(a))for(let t=0;t<a.length;t++)i.push(`${l}[${t}]=${a[t]}`);else i.push("object"==typeof a&&null!==a?this.encodeFilters(a,l):`${l}=${a}`)}return i.join("&")}async resetFilters(){return this.removeFiltersQueryParams(),this.filtersData={},this.host.childNodes.forEach((t=>t.reset&&t.reset())),salla.event.emit("salla-filters::reset"),this.applyFilters()}removeFiltersQueryParams(){const t=new URLSearchParams(window.location.search),s=Array.from(t.keys()).filter((t=>!t.startsWith("filters["))).map((s=>`${encodeURIComponent(s)}=${encodeURIComponent(t.get(s))}`)).join("&"),i=s?`${window.location.pathname}?${s}`:window.location.pathname;window.history.pushState({},"",i)}handleOptionChange(t,s,i){s.type===l.RANGE&&(this.filtersData[s.key]=i);let e=t.target.checked;s.type===l.VARIANTS?(this.filtersData.variants=this.filtersData.variants||{},e&&(this.filtersData.variants[s.key]=i),e||delete this.filtersData.variants[s.key]):"radio"==t.target.type?(e&&(this.filtersData[s.key]=i),e||delete this.filtersData[s.key]):"checkbox"==t.target.type&&(this.filtersData[s.key]=this.filtersData[s.key]||[],e&&this.filtersData[s.key].push(i),this.filtersData[s.key]=this.filtersData[s.key].filter((t=>t!=i))),this.applyFilters()}render(){return i(e,{key:"3b38160573591da8249606b8c12b72b58d03551d"},this.filters?.map((t=>i("salla-filters-widget",{option:t,filtersData:this.filtersData,onChanged:({detail:{event:t,option:s,value:i}})=>{this.handleOptionChange(t,s,i)}}))),this.filters?.length?i("div",{class:"s-filters-footer"},i("salla-button",{color:"gray",fill:"outline",onClick:()=>this.resetFilters()},this.reset)):"")}componentDidLoad(){this.isReady=!0}get host(){return a(this)}};o.style=":host{display:block}.s-rating-stars-small{line-height:12px}.s-filters-radio{background-image:none !important}";export{o as salla_filters}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-
|
|
4
|
+
import{r as s,h as t}from"./p-DYl9MMu1.js";import{i as a}from"./p-BsXh13x8.js";const e=class{constructor(t){s(this,t),this.codeCopied=null,this.noItemFound=!0,this.order_items=[],this.isDigitalCard=s=>"codes"===s.product.type,this.isDigitalProduct=s=>"digital"===s.product.type}async componentWillLoad(){return salla.lang.onLoaded((()=>{this.codes_text=salla.lang.get("pages.thank_you.codes"),this.copy_text=salla.lang.get("common.elements.copy"),this.files_text=salla.lang.get("pages.thank_you.files"),this.download_text=salla.lang.get("pages.thank_you.download")})),await this.getOrderItems()}copyToClipboardHandler(s){if(navigator&&"clipboard"in navigator)try{navigator.clipboard.writeText(s).then((()=>{this.codeCopied=s,this.copyCodeButtonTimeout=setTimeout((()=>{this.codeCopied=null}),3e3)}))}catch(s){salla.loggers.error("copy functionality is not supported by the browser")}}async getOrderItems(){const s=this.orderId||salla.config.get("page.id"),t="Failed to fetch order items";if(!s)throw salla.logger.error(t),new Error(t);try{const{data:{items:t=[]}}=await salla.api.request(`orders/${s}`);t.some((s=>this.isDigitalCard(s)||this.isDigitalProduct(s)))&&(this.order_items=t,this.noItemFound=!1)}catch(s){salla.logger.error(t)}}disconnectedCallback(){this.copyCodeButtonTimeout&&clearTimeout(this.copyCodeButtonTimeout)}render(){return t("ul",{key:"8556d2c3fcefa4c71584ae8bbc9e724e8bba7c25",class:"s-order-summary-wrapper"},this.noItemFound?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"})):this.order_items.map((s=>this.isDigitalCard(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.codes_text," (",s.name,")"),s.codes.map((s=>t("div",{key:s.code,class:"s-order-summary-code-item-wrapper"},t("p",null,t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>debit-card-back</title>\n<path d="M30 28h-28c-1.105 0-2-0.895-2-2v0-18c0-1.105 0.895-2 2-2v0h28c1.105 0 2 0.895 2 2v0 18c0 1.105-0.895 2-2 2v0zM30 26v0zM2 8v18h28v-18zM31 14h-30c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h30c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM11 22h-6c-0.552 0-1-0.448-1-1s0.448-1 1-1v0h6c0.552 0 1 0.448 1 1s-0.448 1-1 1v0zM24 24c-2.209 0-4-1.791-4-4s1.791-4 4-4c2.209 0 4 1.791 4 4v0c0 2.209-1.791 4-4 4v0zM24 18c-1.105 0-2 0.895-2 2s0.895 2 2 2c1.105 0 2-0.895 2-2v0c0-1.105-0.895-2-2-2v0zM20 24c-2.209 0-4-1.791-4-4s1.791-4 4-4v0c0.002 0 0.005 0 0.007 0 1.032 0 1.972 0.398 2.673 1.048l-0.003-0.002c0.191 0.183 0.311 0.439 0.311 0.724 0 0.552-0.448 1-1 1-0.257 0-0.492-0.097-0.669-0.257l0.001 0.001c-0.345-0.319-0.807-0.514-1.315-0.514-0.002 0-0.003 0-0.005 0h0c-1.105 0-2 0.895-2 2s0.895 2 2 2v0c0.002 0 0.004 0 0.007 0 0.508 0 0.971-0.195 1.317-0.515l-0.001 0.001c0.179-0.171 0.422-0.276 0.689-0.276 0.552 0 1 0.448 1 1 0 0.295-0.128 0.56-0.331 0.743l-0.001 0.001c-0.699 0.648-1.638 1.046-2.671 1.046-0.003 0-0.007 0-0.010 0h0.001z"></path>\n</svg>\n'}),t("span",null,s.code)),t("salla-button",{class:"s-order-summary-item-copy-button "+(this.codeCopied===s.code?"copied":""),onClick:()=>this.copyToClipboardHandler(s.code),shape:"link"},t("span",{innerHTML:this.codeCopied===s.code?a:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>swap-stroke</title>\n<path d="M6.667 18.667h-2.667c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333v2.667c0 0.737 0.596 1.333 1.333 1.333s1.333-0.596 1.333-1.333v-2.667c0-2.205-1.795-4-4-4h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h2.667c0.737 0 1.333-0.596 1.333-1.333s-0.596-1.333-1.333-1.333zM28 10.667h-13.333c-2.205 0-4 1.795-4 4v13.333c0 2.205 1.795 4 4 4h13.333c2.205 0 4-1.795 4-4v-13.333c0-2.205-1.795-4-4-4zM29.333 28c0 0.736-0.597 1.333-1.333 1.333h-13.333c-0.736 0-1.333-0.597-1.333-1.333v-13.333c0-0.736 0.597-1.333 1.333-1.333h13.333c0.736 0 1.333 0.597 1.333 1.333z"></path>\n</svg>\n'}),t("span",null,this.copy_text)))))):this.isDigitalProduct(s)?t("li",{key:s.product.id,class:"s-order-summary-item"},t("h2",{class:"s-order-summary-item-title"},this.files_text," (",s.name,")"),t("ul",null,s.files.map((s=>t("li",{class:"s-order-summary-digital-item-wrapper"},t("div",null,t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>file-archive</title>\n<path d="M17.333 16h-5.333c-0.737 0-1.333 0.597-1.333 1.333v2.667c0 2.205 1.795 4 4 4s4-1.795 4-4v-2.667c0-0.736-0.596-1.333-1.333-1.333zM16 20c0 0.735-0.597 1.333-1.333 1.333s-1.333-0.599-1.333-1.333v-1.333h2.667zM17.333 12h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM28.943 8.391l-8-8c-0.249-0.251-0.588-0.391-0.943-0.391h-13.333c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h18.667c2.205 0 4-1.795 4-4v-18.667c0-0.353-0.14-0.693-0.391-0.943zM26.667 28c0 0.735-0.597 1.333-1.333 1.333h-18.667c-0.736 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.597-1.333 1.333-1.333h12.781l7.219 7.219zM17.333 8h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333zM17.333 4h-5.333c-0.737 0-1.333 0.597-1.333 1.333s0.596 1.333 1.333 1.333h5.333c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,s.name)),t("a",{href:s.url,target:"_blank",class:"s-order-summary-item-download"},t("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>download</title>\n<path d="M15.056 20.941c0.123 0.124 0.271 0.221 0.435 0.289 0.163 0.067 0.336 0.103 0.509 0.103s0.347-0.036 0.509-0.103c0.164-0.068 0.311-0.165 0.435-0.289l5.332-5.332c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-3.057 3.057v-12.781c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v12.781l-3.057-3.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885zM25.333 26.667h-18.667c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h18.667c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>\n</svg>\n'}),t("span",null,this.download_text))))))):null)))}};e.style=":host{display:block}";export{e as salla_order_summary}
|