@perevorot/shop 2.0.25 → 2.0.29

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/app.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),o=require("vanilla-lazyload"),t=require("maska"),a=require("@perevorot/shop/dist/global"),i=require("vue-toastification");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(o),l=r(t),s=r(i),d=e.createApp({});d.use(l.default),d.use(s.default,{transition:"Vue-Toastification__fade",icon:!1,position:"top-center",hideProgressBar:!0,showCloseButtonOnHover:!1}),window.$http=a.http,d.config.globalProperties.$filters=a.filters,d.config.globalProperties.$env=$env,"#_=_"===window.location.hash&&(history.replaceState?history.replaceState(null,null,window.location.href.split("#")[0]):window.location.hash="",window.localStorage&&window.localStorage.clear()),window.addEventListener("DOMContentLoaded",(function(){window.lazyImages=new n.default({unobserve_entered:!0,callback_enter:function(e){e.parentElement.classList.add("is-lazy-loaded")}})})),$env.loggerUrl&&a.logger.init($env.loggerUrl),module.exports=d;
1
+ "use strict";var e=require("vue"),o=require("vanilla-lazyload"),t=require("maska"),a=require("@perevorot/shop/dist/global"),r=require("vue-toastification");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(o),l=i(t),s=i(r),d=e.createApp({});d.use(l.default),d.use(s.default,{transition:"Vue-Toastification__fade",icon:!1,position:"top-center",hideProgressBar:!0,showCloseButtonOnHover:!1}),window.$http=a.http,d.config.globalProperties.$filters=a.filters,d.config.globalProperties.$env=$env,"#_=_"===window.location.hash&&(history.replaceState?history.replaceState(null,null,window.location.href.split("#")[0]):window.location.hash="",window.localStorage&&window.localStorage.clear()),window.addEventListener("DOMContentLoaded",(function(){window.lazyImages=new n.default({unobserve_entered:!0,callback_enter:function(e){e.parentElement.classList.add("is-lazy-loaded")}})})),$env.loggerUrl&&a.logger($env.loggerUrl),module.exports=d;
2
2
  //# sourceMappingURL=app.js.map
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sources":["../src/app.js"],"sourcesContent":["import {\n createApp\n} from 'vue';\n\nimport LazyLoad from 'vanilla-lazyload';\nimport Maska from 'maska';\nimport {\n http,\n filters,\n logger\n} from '@perevorot/shop/dist/global';\n\nimport Toast from \"vue-toastification\";\n\nconst app = createApp({});\n\napp.use(Maska);\n\napp.use(Toast, {\n transition: \"Vue-Toastification__fade\",\n icon: false,\n position: \"top-center\",\n hideProgressBar: true,\n showCloseButtonOnHover: false,\n});\n\nwindow.$http = http;\n\napp.config.globalProperties.$filters = filters;\napp.config.globalProperties.$env = $env;\n\nif (window.location.hash === \"#_=_\") {\n history.replaceState ? history.replaceState(null, null, window.location.href.split(\"#\")[0]) : window.location.hash = \"\";\n\n if (window.localStorage) {\n window.localStorage.clear();\n }\n}\n\nwindow.addEventListener('DOMContentLoaded', () => {\n window.lazyImages = new LazyLoad({\n unobserve_entered: true,\n callback_enter: (element) => {\n element.parentElement.classList.add('is-lazy-loaded');\n }\n });\n});\n\nif ($env.loggerUrl) {\n logger.init($env.loggerUrl);\n}\n\nexport default app;"],"names":["app","createApp","use","Maska","Toast","transition","icon","position","hideProgressBar","showCloseButtonOnHover","window","$http","http","config","globalProperties","$filters","filters","$env","location","hash","history","replaceState","href","split","localStorage","clear","addEventListener","lazyImages","LazyLoad","unobserve_entered","callback_enter","element","parentElement","classList","add","loggerUrl","logger","init"],"mappings":"6PAcMA,EAAMC,YAAU,IAEtBD,EAAIE,IAAIC,WAERH,EAAIE,IAAIE,UAAO,CACXC,WAAY,2BACZC,MAAM,EACNC,SAAU,aACVC,iBAAiB,EACjBC,wBAAwB,IAG5BC,OAAOC,MAAQC,OAEfZ,EAAIa,OAAOC,iBAAiBC,SAAWC,UACvChB,EAAIa,OAAOC,iBAAiBG,KAAOA,KAEN,SAAzBP,OAAOQ,SAASC,OAChBC,QAAQC,aAAeD,QAAQC,aAAa,KAAM,KAAMX,OAAOQ,SAASI,KAAKC,MAAM,KAAK,IAAMb,OAAOQ,SAASC,KAAO,GAEjHT,OAAOc,cACPd,OAAOc,aAAaC,SAI5Bf,OAAOgB,iBAAiB,oBAAoB,WACxChB,OAAOiB,WAAa,IAAIC,UAAS,CAC7BC,mBAAmB,EACnBC,eAAgB,SAACC,GACbA,EAAQC,cAAcC,UAAUC,IAAI,wBAK5CjB,KAAKkB,WACLC,SAAOC,KAAKpB,KAAKkB"}
1
+ {"version":3,"file":"app.js","sources":["../src/app.js"],"sourcesContent":["import {\n createApp\n} from 'vue';\n\nimport LazyLoad from 'vanilla-lazyload';\nimport Maska from 'maska';\nimport {\n http,\n filters,\n logger\n} from '@perevorot/shop/dist/global';\n\nimport Toast from \"vue-toastification\";\n\nconst app = createApp({});\n\napp.use(Maska);\n\napp.use(Toast, {\n transition: \"Vue-Toastification__fade\",\n icon: false,\n position: \"top-center\",\n hideProgressBar: true,\n showCloseButtonOnHover: false,\n});\n\nwindow.$http = http;\n\napp.config.globalProperties.$filters = filters;\napp.config.globalProperties.$env = $env;\n\nif (window.location.hash === \"#_=_\") {\n history.replaceState ? history.replaceState(null, null, window.location.href.split(\"#\")[0]) : window.location.hash = \"\";\n\n if (window.localStorage) {\n window.localStorage.clear();\n }\n}\n\nwindow.addEventListener('DOMContentLoaded', () => {\n window.lazyImages = new LazyLoad({\n unobserve_entered: true,\n callback_enter: (element) => {\n element.parentElement.classList.add('is-lazy-loaded');\n }\n });\n});\n\nif ($env.loggerUrl) {\n logger($env.loggerUrl);\n}\n\nexport default app;"],"names":["app","createApp","use","Maska","Toast","transition","icon","position","hideProgressBar","showCloseButtonOnHover","window","$http","http","config","globalProperties","$filters","filters","$env","location","hash","history","replaceState","href","split","localStorage","clear","addEventListener","lazyImages","LazyLoad","unobserve_entered","callback_enter","element","parentElement","classList","add","loggerUrl","logger"],"mappings":"6PAcMA,EAAMC,YAAU,IAEtBD,EAAIE,IAAIC,WAERH,EAAIE,IAAIE,UAAO,CACXC,WAAY,2BACZC,MAAM,EACNC,SAAU,aACVC,iBAAiB,EACjBC,wBAAwB,IAG5BC,OAAOC,MAAQC,OAEfZ,EAAIa,OAAOC,iBAAiBC,SAAWC,UACvChB,EAAIa,OAAOC,iBAAiBG,KAAOA,KAEN,SAAzBP,OAAOQ,SAASC,OAChBC,QAAQC,aAAeD,QAAQC,aAAa,KAAM,KAAMX,OAAOQ,SAASI,KAAKC,MAAM,KAAK,IAAMb,OAAOQ,SAASC,KAAO,GAEjHT,OAAOc,cACPd,OAAOc,aAAaC,SAI5Bf,OAAOgB,iBAAiB,oBAAoB,WACxChB,OAAOiB,WAAa,IAAIC,UAAS,CAC7BC,mBAAmB,EACnBC,eAAgB,SAACC,GACbA,EAAQC,cAAcC,UAAUC,IAAI,wBAK5CjB,KAAKkB,WACLC,SAAOnB,KAAKkB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),n=require("@perevorot/shop/dist/helpers"),l=require("swiper");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(l),r=e.defineComponent({name:"cart",props:{isModal:{type:Boolean,default:!0}},setup:function(){var o=t.useStore(),r=e.ref(!1),a=e.computed((function(){return o.getters["cart/items"]})),s=e.computed((function(){return o.getters["cart/modal"]})),i=e.computed((function(){return o.getters["cart/total"]})),d=e.computed((function(){return o.getters["cart/quantity"]})),u=function(){o.commit("cart/modal",!1)};o.dispatch("cart/get",{finally:function(){}}),window.addEventListener("keyup",(function(e){s.value&&"Escape"===e.key&&u()}));var m,p,v=e.ref(null),E=e.ref(null),k=e.ref(null),N=e.computed((function(){var e=o.getters["cart/cross"];return v.value&&(m&&m.destroy(),e.length&&(m=new c.default(v.value,{slidesPerView:2,slidesPerGroup:2,spaceBetween:0,allowTouchMove:!0,modules:[l.Navigation],mousewheel:{forceToAxis:!0},navigation:{nextEl:E.value,prevEl:k.value}}))),e})),V=e.ref(null),f=e.ref(null),g=e.ref(null),h=e.computed((function(){var e=o.getters["cart/bundles"];return V.value&&(p&&p.destroy(),e.length&&(p=new c.default(V.value,{slidesPerView:1,spaceBetween:0,allowTouchMove:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:f.value,prevEl:g.value}}))),e}));window.addEventListener("beforeunload",(function(){o.commit("cart/modal",null)}));return{loading:r,items:a,modal:s,total:i,quantity:d,open:function(){o.commit("cart/modal",!0)},close:u,clear:function(){r.value=!0,o.dispatch("cart/clear",{finally:function(){r.value=!1}})},pluralize:n.pluralize,goto:function(e){window.addEventListener("beforeunload",(function(){o.commit("cart/modal",!1)})),window.location.href=e},cross:N,crossSlider:v,crossSliderPrev:k,crossSliderNext:E,bundles:h,bundlesSlider:V,bundlesSliderPrev:g,bundlesSliderNext:f,checkout:function(){var e=[];a.value.forEach((function(t){e.push({name:t.name,id:t.attributes.code,price:t.attributes.price,brand:t.attributes.brand,category:t.attributes.category,quantity:t.quantity})}));var t={event:"checkout",ecommerce:{checkout:{products:[e]}},eventCallback:function(){window.location.href=$ziggy("shop.checkout")}};window.dataLayer?(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t)):window.location.href=$ziggy("shop.checkout")}}}}),a={class:"cart"},s={class:"dropdown is-right is-hoverable"},i={class:"dropdown-trigger"},d=e.createElementVNode("i",{class:"fas fa-shopping-cart"},null,-1),u=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),m={class:"dropdown-menu",role:"menu"},p={key:0,class:"dropdown-content"},v={class:"dropdown-item"},E={class:"columns"},k={class:"column"},N=["innerHTML"],V=e.createElementVNode("div",{class:"dropdown-divider"},null,-1),f={class:"dropdown-item has-text-centered"},g={class:"dropdown-item has-text-centered"},h={key:1,class:"dropdown-content"},w=e.createElementVNode("div",{class:"dropdown-item"},"Ваша корзина пуста",-1),B={class:"modal-content"},y=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],b={class:"box"},C={class:"cart-title"},x=e.createTextVNode(" Корзина "),T=["textContent"],L={key:0,class:"items-wrapper"},M={class:"items"},S={class:"columns is-gapless is-vcentered main-actions"},H={class:"column"},q={class:"column has-text-right"},$={class:"totals"},z={class:"title"},D=e.createTextVNode(" Итого: "),P=["innerHTML"],_={class:"column is-narrow"},F={key:0,class:"cross"},O=e.createElementVNode("div",{class:"title"},"С товарами из вашей корзины часто покупают",-1),A={class:"swiper",ref:"crossSlider"},j={class:"swiper-wrapper"},G={class:"columns is-gapless"},I={class:"column is-narrow"},J=["onClick"],K=["src"],Q={key:1},R=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],U={class:"column"},W=["data-code"],X={class:"name"},Y=["onClick"],Z={class:"columns is-gapless is-vcentered"},ee={class:"column is-narrow"},te={class:"prices"},ne=["innerHTML"],le=["innerHTML"],oe={class:"column"},ce=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-alternate"})],-1),re={class:"swiper-nav prev",ref:"crossSliderPrev"},ae=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],se={class:"swiper-nav next",ref:"crossSliderNext"},ie=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],de={key:1,class:"bundles"},ue=e.createElementVNode("div",{class:"title"},"Вместе дешевле",-1),me={class:"swiper",ref:"bundlesSlider"},pe={class:"swiper-wrapper"},ve={class:"column is-narrow"},Ee=["onClick"],ke=["src"],Ne={key:1},Ve=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],fe={class:"column"},ge={class:"product"},he={class:"name"},we=["onClick"],Be={class:"columns is-gapless is-vcentered"},ye={class:"prices"},be=["innerHTML"],Ce=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})])],-1),xe={class:"column is-narrow"},Te=["onClick"],Le=["src"],Me={key:1},Se=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],He={class:"column"},qe={class:"product"},$e={class:"name"},ze=["onClick"],De={class:"columns is-gapless is-vcentered"},Pe={class:"prices"},_e=["innerHTML"],Fe={key:0,class:"column is-narrow"},Oe=[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1)],Ae={key:1,class:"column is-narrow"},je=["onClick"],Ge=["src"],Ie={key:1},Je=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Ke={key:2,class:"column"},Qe={class:"product"},Re={class:"name"},Ue=["onClick"],We={class:"columns is-gapless is-vcentered"},Xe={class:"prices"},Ye=["innerHTML"],Ze={class:"columns is-vcentered"},et={class:"column"},tt=["innerHTML"],nt=["innerHTML"],lt={class:"column"},ot={class:"is-flex is-align-items-center"},ct=["innerHTML"],rt={class:"swiper-nav prev",ref:"bundlesSliderPrev"},at=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],st={class:"swiper-nav next",ref:"bundlesSliderNext"},it=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],dt={key:1,class:"empty"},ut=e.createElementVNode("div",{class:"title"},"В корзине пока что нет товаров",-1),mt={class:"message"},pt=e.createTextVNode(" Посмотрите предложения на "),vt=e.createTextVNode(", "),Et=e.createElementVNode("br",null,null,-1),kt=e.createTextVNode("воспользуйтесь каталогом или поиском "),Nt={class:"viewed-wrapper"};r.render=function(t,n,l,o,c,r){var Vt=e.resolveComponent("cart-item"),ft=e.resolveComponent("cart-add"),gt=e.resolveComponent("bundle-add"),ht=e.resolveComponent("viewed");return e.openBlock(),e.createElementBlock("div",a,[e.createElementVNode("div",s,[e.createElementVNode("div",i,[e.renderSlot(t.$slots,"default",{total:t.quantity,open:t.open},(function(){return[e.createElementVNode("button",{class:"button",onClick:n[0]||(n[0]=function(){return t.open&&t.open.apply(t,arguments)})},[e.createElementVNode("span",null,[d,e.createTextVNode(" "+e.toDisplayString(t.quantity),1)]),u])]}))]),e.createElementVNode("div",m,[t.items.length?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",v,[e.createElementVNode("div",E,[e.createElementVNode("div",k,e.toDisplayString(t.__("shop.cart.total")),1),e.createElementVNode("div",{class:"column has-text-right",innerHTML:t.$filters.price(t.total)},null,8,N)])]),V,e.createElementVNode("div",f,[e.createElementVNode("a",{onClick:n[1]||(n[1]=function(){return t.checkout&&t.checkout.apply(t,arguments)}),class:"button is-link"},e.toDisplayString(t.__("shop.cart.checkout")),1)]),e.createElementVNode("div",g,[e.renderSlot(t.$slots,"open",{open:t.open},(function(){return[e.createElementVNode("a",{onClick:n[2]||(n[2]=function(){return t.open&&t.open.apply(t,arguments)})},"Открыть корзину")]}))])])):(e.openBlock(),e.createElementBlock("div",h,[e.renderSlot(t.$slots,"empty",{},(function(){return[w]}))]))])]),t.isModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal",{"is-active":t.modal}])},[e.createElementVNode("div",{class:"modal-background",onClick:n[3]||(n[3]=function(){return t.close&&t.close.apply(t,arguments)})}),e.createElementVNode("div",B,[e.createElementVNode("button",{class:"modal-close is-large",onClick:n[4]||(n[4]=function(){return t.close&&t.close.apply(t,arguments)})},y),e.createElementVNode("div",b,[e.createElementVNode("div",C,[x,t.quantity?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,T)):e.createCommentVNode("v-if",!0)]),t.items.length?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(Vt,{key:t.id,item:t},null,8,["item"])})),128))]),e.createElementVNode("div",S,[e.createElementVNode("div",H,[e.createElementVNode("button",{class:"button continue",onClick:n[5]||(n[5]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки")]),e.createElementVNode("div",q,[e.createElementVNode("div",$,[e.createElementVNode("div",z,[D,e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,P)])])]),e.createElementVNode("div",_,[e.createElementVNode("a",{onClick:n[6]||(n[6]=function(){return t.checkout&&t.checkout.apply(t,arguments)}),class:"button is-link checkout"},"Оформить заказ")])]),t.cross.length?(e.openBlock(),e.createElementBlock("div",F,[O,e.createElementVNode("div",A,[e.createElementVNode("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cross,(function(n){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:n.id},[e.createElementVNode("div",G,[e.createElementVNode("div",I,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.image}])},[n.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,R))],2)],8,J)]),e.createElementVNode("div",U,[e.createElementVNode("div",{class:"product","data-code":n.code,"shop-product":""},[e.createElementVNode("div",X,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)},"shop-product-name":""},e.toDisplayString(n.name),9,Y)]),e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[n.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(n.priceOld)},null,8,ne)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.price),"shop-product-price":""},null,8,le)])]),e.createElementVNode("div",oe,[e.createVNode(ft,{id:n.id,"is-simple":!0},{default:e.withCtx((function(){return[ce]})),_:2},1032,["id"])])])],8,W)])])])})),128))]),(e.openBlock(),e.createElementBlock("svg",re,ae,512)),(e.openBlock(),e.createElementBlock("svg",se,ie,512))],512)])):e.createCommentVNode("v-if",!0),t.bundles.length?(e.openBlock(),e.createElementBlock("div",de,[ue,e.createElementVNode("div",me,[e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bundles,(function(n){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["columns is-gapless is-vcentered",{"is-third":n.third}])},[e.createElementVNode("div",ve,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.image}])},[n.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.image},null,8,ke)):(e.openBlock(),e.createElementBlock("svg",Ne,Ve))],2)],8,Ee)]),e.createElementVNode("div",fe,[e.createElementVNode("div",ge,[e.createElementVNode("div",he,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},e.toDisplayString(n.name),9,we)]),e.createElementVNode("div",Be,[e.createElementVNode("div",ye,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.price)},null,8,be)])])])]),Ce,e.createElementVNode("div",xe,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.second.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.second.image}])},[n.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.second.image},null,8,Le)):(e.openBlock(),e.createElementBlock("svg",Me,Se))],2)],8,Te)]),e.createElementVNode("div",He,[e.createElementVNode("div",qe,[e.createElementVNode("div",$e,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.second.href)}},e.toDisplayString(n.second.name),9,ze)]),e.createElementVNode("div",De,[e.createElementVNode("div",Pe,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.second.price)},null,8,_e)])])])]),n.third?(e.openBlock(),e.createElementBlock("div",Fe,Oe)):e.createCommentVNode("v-if",!0),n.third?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.third.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.third.image}])},[n.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.third.image},null,8,Ge)):(e.openBlock(),e.createElementBlock("svg",Ie,Je))],2)],8,je)])):e.createCommentVNode("v-if",!0),n.third?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("div",Re,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.third.href)}},e.toDisplayString(n.third.name),9,Ue)]),e.createElementVNode("div",We,[e.createElementVNode("div",Xe,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.third.price)},null,8,Ye)])])])])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createElementVNode("span",{class:"total-old",innerHTML:t.$filters.price(n.bundle.priceOld)},null,8,tt),e.createElementVNode("span",{class:"bundle-amount",innerHTML:"Выгода "+n.bundle.amount},null,8,nt)]),e.createElementVNode("div",lt,[e.createElementVNode("div",ot,[e.createElementVNode("span",{class:"total",innerHTML:t.$filters.price(n.bundle.price)},null,8,ct),e.createVNode(gt,{id:n.id,second:n.second.id,third:n.third?n.third.id:null},null,8,["id","second","third"])])])])])})),128))])],512),(e.openBlock(),e.createElementBlock("svg",rt,at,512)),(e.openBlock(),e.createElementBlock("svg",st,it,512))])):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock("div",dt,[ut,e.createElementVNode("div",mt,[pt,e.createElementVNode("a",{onClick:n[7]||(n[7]=function(e){return t.goto(t.$env.locale.url+"/")})},"главной странице"),vt,Et,kt]),e.createElementVNode("button",{class:"button continue",onClick:n[8]||(n[8]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки"),e.createElementVNode("div",Nt,[e.createVNode(ht,{slider:!0})])]))])])],2)):e.createCommentVNode("v-if",!0)])},module.exports=r;
1
+ "use strict";var e=require("vue"),t=require("vuex"),n=require("@perevorot/shop/dist/helpers"),l=require("swiper");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(l),r=e.defineComponent({name:"cart",props:{isModal:{type:Boolean,default:!0}},setup:function(){var o=t.useStore(),r=e.ref(!1),a=e.computed((function(){return o.getters["cart/items"]})),s=e.computed((function(){return o.getters["cart/modal"]})),i=e.computed((function(){return o.getters["cart/total"]})),d=e.computed((function(){return o.getters["cart/quantity"]})),u=function(){o.commit("cart/modal",!1)};o.dispatch("cart/get",{finally:function(){}}),window.addEventListener("keyup",(function(e){s.value&&"Escape"===e.key&&u()}));var m,p,v=e.ref(null),E=e.ref(null),k=e.ref(null),N=e.computed((function(){var e=o.getters["cart/cross"];return v.value&&(m&&m.destroy(),e.length&&(m=new c.default(v.value,{slidesPerView:1,slidesPerGroup:1,breakpoints:{768:{slidesPerView:2,slidesPerGroup:2}},spaceBetween:0,allowTouchMove:!0,modules:[l.Navigation],mousewheel:{forceToAxis:!0},navigation:{nextEl:E.value,prevEl:k.value}}))),e})),V=e.ref(null),f=e.ref(null),g=e.ref(null),h=e.computed((function(){var e=o.getters["cart/bundles"];return V.value&&(p&&p.destroy(),e.length&&(p=new c.default(V.value,{slidesPerView:1,spaceBetween:0,allowTouchMove:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:f.value,prevEl:g.value}}))),e}));window.addEventListener("beforeunload",(function(){o.commit("cart/modal",null)}));return{loading:r,items:a,modal:s,total:i,quantity:d,open:function(){o.commit("cart/modal",!0)},close:u,clear:function(){r.value=!0,o.dispatch("cart/clear",{finally:function(){r.value=!1}})},pluralize:n.pluralize,goto:function(e){window.addEventListener("beforeunload",(function(){o.commit("cart/modal",!1)})),window.location.href=e},cross:N,crossSlider:v,crossSliderPrev:k,crossSliderNext:E,bundles:h,bundlesSlider:V,bundlesSliderPrev:g,bundlesSliderNext:f,checkout:function(){var e=[];a.value.forEach((function(t){e.push({name:t.name,id:t.attributes.code,price:t.attributes.price,brand:t.attributes.brand,category:t.attributes.category,quantity:t.quantity})}));var t={ecommerce:{checkout:{products:[e]}},event:"gtm-ee-event","gtm-ee-event-category":"Ecommerce","gtm-ee-event-action":"Checkout","gtm-ee-event-non-interaction":"False",eventCallback:function(){window.location.href=$ziggy("shop.checkout")}};window.dataLayer?(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(t)):window.location.href=$ziggy("shop.checkout")}}}}),a={class:"cart"},s={class:"dropdown is-right is-hoverable"},i={class:"dropdown-trigger"},d=e.createElementVNode("i",{class:"fas fa-shopping-cart"},null,-1),u=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),m={class:"dropdown-menu",role:"menu"},p={key:0,class:"dropdown-content"},v={class:"dropdown-item"},E={class:"columns"},k={class:"column"},N=["innerHTML"],V=e.createElementVNode("div",{class:"dropdown-divider"},null,-1),f={class:"dropdown-item has-text-centered"},g={class:"dropdown-item has-text-centered"},h={key:1,class:"dropdown-content"},w=e.createElementVNode("div",{class:"dropdown-item"},"Ваша корзина пуста",-1),y={class:"modal-content"},B=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],b={class:"box"},C={class:"cart-title"},x=e.createTextVNode(" Корзина "),T=["textContent"],L={key:0,class:"items-wrapper"},M={class:"items"},S={class:"columns is-gapless is-vcentered main-actions"},H={class:"column"},q={class:"column has-text-right"},$={class:"totals"},z={class:"title"},P=e.createTextVNode(" Итого: "),D=["innerHTML"],_={class:"column is-narrow"},F={key:0,class:"cross"},O=e.createElementVNode("div",{class:"title"},"С товарами из вашей корзины часто покупают",-1),A={class:"swiper",ref:"crossSlider"},G={class:"swiper-wrapper"},j={class:"columns is-gapless"},I={class:"column is-narrow"},J=["onClick"],K=["src"],Q={key:1},R=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],U={class:"column"},W=["data-code"],X={class:"name"},Y=["onClick"],Z={class:"columns is-gapless is-vcentered"},ee={class:"column is-narrow"},te={class:"prices"},ne=["innerHTML"],le=["innerHTML"],oe={class:"column"},ce=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-alternate"})],-1),re={class:"swiper-nav prev",ref:"crossSliderPrev"},ae=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],se={class:"swiper-nav next",ref:"crossSliderNext"},ie=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],de={key:1,class:"bundles"},ue=e.createElementVNode("div",{class:"title"},"Вместе дешевле",-1),me={class:"swiper",ref:"bundlesSlider"},pe={class:"swiper-wrapper"},ve={class:"column is-narrow"},Ee=["onClick"],ke=["src"],Ne={key:1},Ve=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],fe={class:"column"},ge={class:"product"},he={class:"name"},we=["onClick"],ye={class:"columns is-gapless is-vcentered"},Be={class:"prices"},be=["innerHTML"],Ce=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})])],-1),xe={class:"column is-narrow"},Te=["onClick"],Le=["src"],Me={key:1},Se=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],He={class:"column"},qe={class:"product"},$e={class:"name"},ze=["onClick"],Pe={class:"columns is-gapless is-vcentered"},De={class:"prices"},_e=["innerHTML"],Fe={key:0,class:"column is-narrow"},Oe=[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1)],Ae={key:1,class:"column is-narrow"},Ge=["onClick"],je=["src"],Ie={key:1},Je=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Ke={key:2,class:"column"},Qe={class:"product"},Re={class:"name"},Ue=["onClick"],We={class:"columns is-gapless is-vcentered"},Xe={class:"prices"},Ye=["innerHTML"],Ze={class:"columns is-vcentered"},et={class:"column"},tt=["innerHTML"],nt=["innerHTML"],lt={class:"column"},ot={class:"is-flex is-align-items-center"},ct=["innerHTML"],rt={class:"swiper-nav prev",ref:"bundlesSliderPrev"},at=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],st={class:"swiper-nav next",ref:"bundlesSliderNext"},it=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],dt={key:1,class:"empty"},ut=e.createElementVNode("div",{class:"title"},"В корзине пока что нет товаров",-1),mt={class:"message"},pt=e.createTextVNode(" Посмотрите предложения на "),vt=e.createTextVNode(", "),Et=e.createElementVNode("br",null,null,-1),kt=e.createTextVNode("воспользуйтесь каталогом или поиском "),Nt={class:"viewed-wrapper"};r.render=function(t,n,l,o,c,r){var Vt=e.resolveComponent("cart-item"),ft=e.resolveComponent("cart-add"),gt=e.resolveComponent("bundle-add"),ht=e.resolveComponent("viewed");return e.openBlock(),e.createElementBlock("div",a,[e.createElementVNode("div",s,[e.createElementVNode("div",i,[e.renderSlot(t.$slots,"default",{total:t.quantity,open:t.open},(function(){return[e.createElementVNode("button",{class:"button",onClick:n[0]||(n[0]=function(){return t.open&&t.open.apply(t,arguments)})},[e.createElementVNode("span",null,[d,e.createTextVNode(" "+e.toDisplayString(t.quantity),1)]),u])]}))]),e.createElementVNode("div",m,[t.items.length?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",v,[e.createElementVNode("div",E,[e.createElementVNode("div",k,e.toDisplayString(t.__("shop.cart.total")),1),e.createElementVNode("div",{class:"column has-text-right",innerHTML:t.$filters.price(t.total)},null,8,N)])]),V,e.createElementVNode("div",f,[e.createElementVNode("a",{onClick:n[1]||(n[1]=function(){return t.checkout&&t.checkout.apply(t,arguments)}),class:"button is-link"},e.toDisplayString(t.__("shop.cart.checkout")),1)]),e.createElementVNode("div",g,[e.renderSlot(t.$slots,"open",{open:t.open},(function(){return[e.createElementVNode("a",{onClick:n[2]||(n[2]=function(){return t.open&&t.open.apply(t,arguments)})},"Открыть корзину")]}))])])):(e.openBlock(),e.createElementBlock("div",h,[e.renderSlot(t.$slots,"empty",{},(function(){return[w]}))]))])]),t.isModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["modal",{"is-active":t.modal}])},[e.createElementVNode("div",{class:"modal-background",onClick:n[3]||(n[3]=function(){return t.close&&t.close.apply(t,arguments)})}),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"modal-close is-large",onClick:n[4]||(n[4]=function(){return t.close&&t.close.apply(t,arguments)})},B),e.createElementVNode("div",b,[e.createElementVNode("div",C,[x,t.quantity?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,T)):e.createCommentVNode("v-if",!0)]),t.items.length?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(Vt,{key:t.id,item:t},null,8,["item"])})),128))]),e.createElementVNode("div",S,[e.createElementVNode("div",H,[e.createElementVNode("button",{class:"button continue",onClick:n[5]||(n[5]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки")]),e.createElementVNode("div",q,[e.createElementVNode("div",$,[e.createElementVNode("div",z,[P,e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,D)])])]),e.createElementVNode("div",_,[e.createElementVNode("a",{onClick:n[6]||(n[6]=function(){return t.checkout&&t.checkout.apply(t,arguments)}),class:"button is-link checkout"},"Оформить заказ")])]),t.cross.length?(e.openBlock(),e.createElementBlock("div",F,[O,e.createElementVNode("div",A,[e.createElementVNode("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cross,(function(n){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:n.id},[e.createElementVNode("div",j,[e.createElementVNode("div",I,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.image}])},[n.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.image},null,8,K)):(e.openBlock(),e.createElementBlock("svg",Q,R))],2)],8,J)]),e.createElementVNode("div",U,[e.createElementVNode("div",{class:"product","data-code":n.code,"shop-product":""},[e.createElementVNode("div",X,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)},"shop-product-name":""},e.toDisplayString(n.name),9,Y)]),e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[n.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(n.priceOld)},null,8,ne)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.price),"shop-product-price":""},null,8,le)])]),e.createElementVNode("div",oe,[e.createVNode(ft,{id:n.id,"is-simple":!0},{default:e.withCtx((function(){return[ce]})),_:2},1032,["id"])])])],8,W)])])])})),128))]),(e.openBlock(),e.createElementBlock("svg",re,ae,512)),(e.openBlock(),e.createElementBlock("svg",se,ie,512))],512)])):e.createCommentVNode("v-if",!0),t.bundles.length?(e.openBlock(),e.createElementBlock("div",de,[ue,e.createElementVNode("div",me,[e.createElementVNode("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bundles,(function(n){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:n.id},[e.createElementVNode("div",{class:e.normalizeClass(["columns is-gapless is-vcentered",{"is-third":n.third}])},[e.createElementVNode("div",ve,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.image}])},[n.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.image},null,8,ke)):(e.openBlock(),e.createElementBlock("svg",Ne,Ve))],2)],8,Ee)]),e.createElementVNode("div",fe,[e.createElementVNode("div",ge,[e.createElementVNode("div",he,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.href)}},e.toDisplayString(n.name),9,we)]),e.createElementVNode("div",ye,[e.createElementVNode("div",Be,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.price)},null,8,be)])])])]),Ce,e.createElementVNode("div",xe,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.second.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.second.image}])},[n.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.second.image},null,8,Le)):(e.openBlock(),e.createElementBlock("svg",Me,Se))],2)],8,Te)]),e.createElementVNode("div",He,[e.createElementVNode("div",qe,[e.createElementVNode("div",$e,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.second.href)}},e.toDisplayString(n.second.name),9,ze)]),e.createElementVNode("div",Pe,[e.createElementVNode("div",De,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.second.price)},null,8,_e)])])])]),n.third?(e.openBlock(),e.createElementBlock("div",Fe,Oe)):e.createCommentVNode("v-if",!0),n.third?(e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.third.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!n.third.image}])},[n.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.third.image},null,8,je)):(e.openBlock(),e.createElementBlock("svg",Ie,Je))],2)],8,Ge)])):e.createCommentVNode("v-if",!0),n.third?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("div",Re,[e.createElementVNode("a",{onClick:function(e){return t.goto(n.third.href)}},e.toDisplayString(n.third.name),9,Ue)]),e.createElementVNode("div",We,[e.createElementVNode("div",Xe,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(n.third.price)},null,8,Ye)])])])])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createElementVNode("span",{class:"total-old",innerHTML:t.$filters.price(n.bundle.priceOld)},null,8,tt),e.createElementVNode("span",{class:"bundle-amount",innerHTML:"Выгода "+n.bundle.amount},null,8,nt)]),e.createElementVNode("div",lt,[e.createElementVNode("div",ot,[e.createElementVNode("span",{class:"total",innerHTML:t.$filters.price(n.bundle.price)},null,8,ct),e.createVNode(gt,{id:n.id,second:n.second.id,third:n.third?n.third.id:null},null,8,["id","second","third"])])])])])})),128))])],512),(e.openBlock(),e.createElementBlock("svg",rt,at,512)),(e.openBlock(),e.createElementBlock("svg",st,it,512))])):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock("div",dt,[ut,e.createElementVNode("div",mt,[pt,e.createElementVNode("a",{onClick:n[7]||(n[7]=function(e){return t.goto(t.$env.locale.url+"/")})},"главной странице"),vt,Et,kt]),e.createElementVNode("button",{class:"button continue",onClick:n[8]||(n[8]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки"),e.createElementVNode("div",Nt,[e.createVNode(ht,{slider:!0})])]))])])],2)):e.createCommentVNode("v-if",!0)])},module.exports=r;
2
2
  //# sourceMappingURL=Cart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cart.js","sources":["../../../../src/components/shop/cart/Cart.vue","../../../../src/components/shop/cart/Cart.vue?vue&type=template&id=1e0b198a&lang.js"],"sourcesContent":["<template>\n <div class=\"cart\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">Открыть корзину</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">Ваша корзина пуста</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"cart-title\">\n Корзина\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n Итого:\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">Оформить заказ</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">С товарами из вашей корзины часто покупают</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">Вместе дешевле</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"'Выгода ' + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">В корзине пока что нет товаров</div>\n <div class=\"message\">\n Посмотрите предложения на\n <a @click=\"goto($env.locale.url + '/')\">главной странице</a>,\n <br />воспользуйтесь каталогом или поиском\n </div>\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\n }\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n\n const items = computed(() => store.getters['cart/items']);\n const modal = computed(() => store.getters['cart/modal']);\n const total = computed(() => store.getters['cart/total']);\n const quantity = computed(() => store.getters['cart/quantity']);\n\n const open = () => {\n store.commit('cart/modal', true);\n };\n\n const close = () => {\n store.commit('cart/modal', false);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(\"cart/get\", {\n finally: () => {\n },\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', false);\n });\n\n window.location.href = href;\n };\n\n let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters['cart/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 2,\n slidesPerGroup: 2,\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters['cart/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', null);\n });\n\n const checkout = () => {\n let products = [];\n\n items.value.forEach((item) => {\n products.push({\n 'name': item.name,\n 'id': item.attributes.code,\n 'price': item.attributes.price,\n 'brand': item.attributes.brand,\n 'category': item.attributes.category,\n 'quantity': item.quantity\n });\n });\n\n const object = {\n 'event': 'checkout',\n 'ecommerce': {\n 'checkout': {\n 'products': [products]\n }\n },\n 'eventCallback': function () {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n } else {\n window.location.href = $ziggy('shop.checkout');\n }\n }\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n };\n }\n});\n</script>","<template>\n <div class=\"cart\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">Открыть корзину</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">Ваша корзина пуста</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"cart-title\">\n Корзина\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n Итого:\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">Оформить заказ</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">С товарами из вашей корзины часто покупают</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">Вместе дешевле</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"'Выгода ' + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">В корзине пока что нет товаров</div>\n <div class=\"message\">\n Посмотрите предложения на\n <a @click=\"goto($env.locale.url + '/')\">главной странице</a>,\n <br />воспользуйтесь каталогом или поиском\n </div>\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\n }\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n\n const items = computed(() => store.getters['cart/items']);\n const modal = computed(() => store.getters['cart/modal']);\n const total = computed(() => store.getters['cart/total']);\n const quantity = computed(() => store.getters['cart/quantity']);\n\n const open = () => {\n store.commit('cart/modal', true);\n };\n\n const close = () => {\n store.commit('cart/modal', false);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch(\"cart/get\", {\n finally: () => {\n },\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', false);\n });\n\n window.location.href = href;\n };\n\n let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters['cart/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 2,\n slidesPerGroup: 2,\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters['cart/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', null);\n });\n\n const checkout = () => {\n let products = [];\n\n items.value.forEach((item) => {\n products.push({\n 'name': item.name,\n 'id': item.attributes.code,\n 'price': item.attributes.price,\n 'brand': item.attributes.brand,\n 'category': item.attributes.category,\n 'quantity': item.quantity\n });\n });\n\n const object = {\n 'event': 'checkout',\n 'ecommerce': {\n 'checkout': {\n 'products': [products]\n }\n },\n 'eventCallback': function () {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n } else {\n window.location.href = $ziggy('shop.checkout');\n }\n }\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout,\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","isModal","type","Boolean","setup","store","useStore","loading","ref","items","computed","getters","modal","total","quantity","close","commit","dispatch","window","addEventListener","e","value","key","crossSwiper","bundlesSwiper","crossSlider","crossSliderNext","crossSliderPrev","cross","destroy","length","Swiper","slidesPerView","slidesPerGroup","spaceBetween","allowTouchMove","modules","Navigation","mousewheel","forceToAxis","navigation","nextEl","prevEl","bundlesSlider","bundlesSliderNext","bundlesSliderPrev","bundles","open","clear","pluralize","href","location","checkout","products","forEach","item","push","attributes","code","price","brand","category","object","$ziggy","dataLayer","ecommerce","_createElementVNode","role","_createElementBlock","_hoisted_1","_hoisted_2","_hoisted_3","_renderSlot","_ctx","onClick","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","innerHTML","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_20","_hoisted_21","_toDisplayString","_hoisted_24","_hoisted_25","_createBlock","id","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","image","src","_hoisted_45","_hoisted_47","_hoisted_49","_hoisted_50","_hoisted_51","priceOld","_hoisted_54","_createVNode","_hoisted_55","_hoisted_56","_hoisted_59","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","third","_hoisted_66","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_76","_hoisted_77","_hoisted_79","_hoisted_80","second","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_91","_hoisted_93","_hoisted_96","_hoisted_102","_hoisted_103","_hoisted_104","_hoisted_106","_hoisted_107","_hoisted_109","_hoisted_110","bundle","amount","_hoisted_113","_hoisted_114","_hoisted_116","_hoisted_119","_hoisted_122","_hoisted_123","_hoisted_124","locale","url","_hoisted_127","_hoisted_129","slider"],"mappings":"uMA+P6BA,kBAAgB,CACzCC,KAAM,OACNC,MAAO,CACHC,QAAS,CACLC,KAAMC,iBACG,IAGjBC,qBACUC,EAAQC,aACRC,EAAUC,OAAI,GAEdC,EAAQC,YAAS,kBAAML,EAAMM,QAAQ,iBACrCC,EAAQF,YAAS,kBAAML,EAAMM,QAAQ,iBACrCE,EAAQH,YAAS,kBAAML,EAAMM,QAAQ,iBACrCG,EAAWJ,YAAS,kBAAML,EAAMM,QAAQ,oBAMxCI,EAAQ,WACVV,EAAMW,OAAO,cAAc,IAa/BX,EAAMY,SAAS,WAAY,SACd,eAIbC,OAAOC,iBAAiB,SAAS,SAACC,GAC1BR,EAAMS,OAAmB,WAAVD,EAAEE,KACjBP,WAYJQ,EAkCAC,EAjCEC,EAAcjB,MAAI,MAClBkB,EAAkBlB,MAAI,MACtBmB,EAAkBnB,MAAI,MAEtBoB,EAAQlB,YAAS,eACbkB,EAAQvB,EAAMM,QAAQ,qBAExBc,EAAYJ,QACRE,GACAA,EAAYM,UAGZD,EAAME,SACNP,EAAc,IAAIQ,UAAON,EAAYJ,MAAO,CACxCW,cAAe,EACfC,eAAgB,EAChBC,aAAc,EACdC,gBAAgB,EAChBC,QAAS,CAACC,cACVC,WAAY,CACRC,aAAa,GAEjBC,WAAY,C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CAAOD,OAAKA,OAAKqF,OAAOC,YAAY,uBACxCC,QAEJ9F,qCAAc,kBAAmBQ,sCAAOD,uCAAO,sBAC/CP,2BAAA+F,IACI5C,kBAAS6C,QAAQ"}
1
+ {"version":3,"file":"Cart.js","sources":["../../../../src/components/shop/cart/Cart.vue","../../../../src/components/shop/cart/Cart.vue?vue&type=template&id=b1439c16&lang.js"],"sourcesContent":["<template>\n <div class=\"cart\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">Открыть корзину</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">Ваша корзина пуста</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"cart-title\">\n Корзина\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n Итого:\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">Оформить заказ</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">С товарами из вашей корзины часто покупают</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">Вместе дешевле</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"'Выгода ' + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">В корзине пока что нет товаров</div>\n <div class=\"message\">\n Посмотрите предложения на\n <a @click=\"goto($env.locale.url + '/')\">главной странице</a>, <br />воспользуйтесь каталогом или поиском\n </div>\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\n }\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n\n const items = computed(() => store.getters['cart/items']);\n const modal = computed(() => store.getters['cart/modal']);\n const total = computed(() => store.getters['cart/total']);\n const quantity = computed(() => store.getters['cart/quantity']);\n\n const open = () => {\n store.commit('cart/modal', true);\n };\n\n const close = () => {\n store.commit('cart/modal', false);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch('cart/get', {\n finally: () => {}\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', false);\n });\n\n window.location.href = href;\n };\n\n let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters['cart/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters['cart/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', null);\n });\n\n const checkout = () => {\n let products = [];\n\n items.value.forEach((item) => {\n products.push({\n name: item.name,\n id: item.attributes.code,\n price: item.attributes.price,\n brand: item.attributes.brand,\n category: item.attributes.category,\n quantity: item.quantity\n });\n });\n\n const object = {\n ecommerce: {\n checkout: {\n products: [products]\n }\n },\n event: 'gtm-ee-event',\n 'gtm-ee-event-category': 'Ecommerce',\n 'gtm-ee-event-action': 'Checkout',\n 'gtm-ee-event-non-interaction': 'False',\n eventCallback: function () {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n } else {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout\n };\n }\n});\n</script>","<template>\n <div class=\"cart\">\n <div class=\"dropdown is-right is-hoverable\">\n <div class=\"dropdown-trigger\">\n <slot :total=\"quantity\" :open=\"open\">\n <button class=\"button\" @click=\"open\">\n <span>\n <i class=\"fas fa-shopping-cart\"></i>\n {{ quantity }}\n </span>\n <span class=\"icon is-small\">\n <i class=\"fas fa-angle-down\" aria-hidden=\"true\"></i>\n </span>\n </button>\n </slot>\n </div>\n <div class=\"dropdown-menu\" role=\"menu\">\n <div class=\"dropdown-content\" v-if=\"items.length\">\n <div class=\"dropdown-item\">\n <div class=\"columns\">\n <div class=\"column\">{{ __('shop.cart.total') }}</div>\n <div class=\"column has-text-right\" v-html=\"$filters.price(total)\"></div>\n </div>\n </div>\n <div class=\"dropdown-divider\"></div>\n <div class=\"dropdown-item has-text-centered\">\n <a @click=\"checkout\" class=\"button is-link\">{{ __('shop.cart.checkout') }}</a>\n </div>\n <div class=\"dropdown-item has-text-centered\">\n <slot name=\"open\" :open=\"open\">\n <a @click=\"open\">Открыть корзину</a>\n </slot>\n </div>\n </div>\n <div class=\"dropdown-content\" v-else>\n <slot name=\"empty\">\n <div class=\"dropdown-item\">Ваша корзина пуста</div>\n </slot>\n </div>\n </div>\n </div>\n <div class=\"modal\" v-if=\"isModal\" v-bind:class=\"{ 'is-active': modal }\">\n <div class=\"modal-background\" @click=\"close\"></div>\n <div class=\"modal-content\">\n <button class=\"modal-close is-large\" @click=\"close\">\n <svg class=\"icon close\">\n <use xlink:href=\"#close\" />\n </svg>\n </button>\n <div class=\"box\">\n <div class=\"cart-title\">\n Корзина\n <span v-if=\"quantity\" v-text=\"pluralize(quantity, __('shop.pluralize.products'))\"></span>\n </div>\n <div class=\"items-wrapper\" v-if=\"items.length\">\n <div class=\"items\">\n <cart-item v-for=\"item in items\" v-bind:key=\"item.id\" :item=\"item\"></cart-item>\n </div>\n\n <div class=\"columns is-gapless is-vcentered main-actions\">\n <div class=\"column\">\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n </div>\n <div class=\"column has-text-right\">\n <div class=\"totals\">\n <div class=\"title\">\n Итого:\n <span v-html=\"$filters.price(total)\"></span>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"checkout\" class=\"button is-link checkout\">Оформить заказ</a>\n </div>\n </div>\n\n <div class=\"cross\" v-if=\"cross.length\">\n <div class=\"title\">С товарами из вашей корзины часто покупают</div>\n <div class=\"swiper\" ref=\"crossSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in cross\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\" :data-code=\"item.code\" shop-product>\n <div class=\"name\">\n <a @click=\"goto(item.href)\" shop-product-name>{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column is-narrow\">\n <div class=\"prices\">\n <div class=\"price-old\" v-if=\"item.priceOld\" v-html=\"$filters.price(item.priceOld)\"></div>\n <div class=\"price\" v-html=\"$filters.price(item.price)\" shop-product-price></div>\n </div>\n </div>\n <div class=\"column\">\n <cart-add :id=\"item.id\" :is-simple=\"true\">\n <svg>\n <use xlink:href=\"#cart-alternate\" />\n </svg>\n </cart-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"crossSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"crossSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div class=\"bundles\" v-if=\"bundles.length\">\n <div class=\"title\">Вместе дешевле</div>\n <div class=\"swiper\" ref=\"bundlesSlider\">\n <div class=\"swiper-wrapper\">\n <div class=\"swiper-slide\" v-for=\"item in bundles\" v-bind:key=\"item.id\">\n <div class=\"columns is-gapless is-vcentered\" v-bind:class=\"{ 'is-third': item.third }\">\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.image }\">\n <img :src=\"item.image\" v-if=\"item.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.href)\">{{ item.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\">\n <a @click=\"goto(item.second.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.second.image }\">\n <img :src=\"item.second.image\" v-if=\"item.second.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.second.href)\">{{ item.second.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.second.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <svg class=\"bundle-icon plus\">\n <use xlink:href=\"#bundle-plus\" />\n </svg>\n </div>\n <div class=\"column is-narrow\" v-if=\"item.third\">\n <a @click=\"goto(item.third.href)\">\n <figure class=\"image is-square\" v-bind:class=\"{ 'no-thumb': !item.third.image }\">\n <img :src=\"item.third.image\" v-if=\"item.third.image\" />\n <svg v-else>\n <use xlink:href=\"#logo\" />\n </svg>\n </figure>\n </a>\n </div>\n <div class=\"column\" v-if=\"item.third\">\n <div class=\"product\">\n <div class=\"name\">\n <a @click=\"goto(item.third.href)\">{{ item.third.name }}</a>\n </div>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"prices\">\n <div class=\"price\" v-html=\"$filters.price(item.third.price)\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"columns is-vcentered\">\n <div class=\"column\">\n <span class=\"total-old\" v-html=\"$filters.price(item.bundle.priceOld)\"></span>\n <span class=\"bundle-amount\" v-html=\"'Выгода ' + item.bundle.amount\"></span>\n </div>\n <div class=\"column\">\n <div class=\"is-flex is-align-items-center\">\n <span class=\"total\" v-html=\"$filters.price(item.bundle.price)\"></span>\n <bundle-add :id=\"item.id\" :second=\"item.second.id\" v-bind:third=\"item.third ? item.third.id : null\"></bundle-add>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <svg class=\"swiper-nav prev\" ref=\"bundlesSliderPrev\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n <svg class=\"swiper-nav next\" ref=\"bundlesSliderNext\">\n <use xlink:href=\"#arrow-submenu\" />\n </svg>\n </div>\n </div>\n <div v-else class=\"empty\">\n <div class=\"title\">В корзине пока что нет товаров</div>\n <div class=\"message\">\n Посмотрите предложения на\n <a @click=\"goto($env.locale.url + '/')\">главной странице</a>, <br />воспользуйтесь каталогом или поиском\n </div>\n <button class=\"button continue\" @click=\"close\">Продолжить покупки</button>\n <div class=\"viewed-wrapper\">\n <viewed :slider=\"true\"></viewed>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from 'vue';\nimport { useStore } from 'vuex';\nimport { pluralize } from '@perevorot/shop/dist/helpers';\nimport Swiper, { Navigation } from 'swiper';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'cart',\n props: {\n isModal: {\n type: Boolean,\n default: true\n }\n },\n setup() {\n const store = useStore();\n const loading = ref(false);\n\n const items = computed(() => store.getters['cart/items']);\n const modal = computed(() => store.getters['cart/modal']);\n const total = computed(() => store.getters['cart/total']);\n const quantity = computed(() => store.getters['cart/quantity']);\n\n const open = () => {\n store.commit('cart/modal', true);\n };\n\n const close = () => {\n store.commit('cart/modal', false);\n };\n\n const clear = () => {\n loading.value = true;\n\n store.dispatch('cart/clear', {\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n store.dispatch('cart/get', {\n finally: () => {}\n });\n\n window.addEventListener('keyup', (e) => {\n if (modal.value && e.key === 'Escape') {\n close();\n }\n });\n\n const goto = (href) => {\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', false);\n });\n\n window.location.href = href;\n };\n\n let crossSwiper;\n const crossSlider = ref(null);\n const crossSliderNext = ref(null);\n const crossSliderPrev = ref(null);\n\n const cross = computed(() => {\n const cross = store.getters['cart/cross'];\n\n if (crossSlider.value) {\n if (crossSwiper) {\n crossSwiper.destroy();\n }\n\n if (cross.length) {\n crossSwiper = new Swiper(crossSlider.value, {\n slidesPerView: 1,\n slidesPerGroup: 1,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n slidesPerGroup: 2\n }\n },\n spaceBetween: 0,\n allowTouchMove: true,\n modules: [Navigation],\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: crossSliderNext.value,\n prevEl: crossSliderPrev.value\n }\n });\n }\n }\n\n return cross;\n });\n\n let bundlesSwiper;\n const bundlesSlider = ref(null);\n const bundlesSliderNext = ref(null);\n const bundlesSliderPrev = ref(null);\n\n const bundles = computed(() => {\n const bundles = store.getters['cart/bundles'];\n\n if (bundlesSlider.value) {\n if (bundlesSwiper) {\n bundlesSwiper.destroy();\n }\n\n if (bundles.length) {\n bundlesSwiper = new Swiper(bundlesSlider.value, {\n slidesPerView: 1,\n spaceBetween: 0,\n allowTouchMove: true,\n mousewheel: {\n forceToAxis: true\n },\n navigation: {\n nextEl: bundlesSliderNext.value,\n prevEl: bundlesSliderPrev.value\n }\n });\n }\n }\n\n return bundles;\n });\n\n window.addEventListener('beforeunload', () => {\n store.commit('cart/modal', null);\n });\n\n const checkout = () => {\n let products = [];\n\n items.value.forEach((item) => {\n products.push({\n name: item.name,\n id: item.attributes.code,\n price: item.attributes.price,\n brand: item.attributes.brand,\n category: item.attributes.category,\n quantity: item.quantity\n });\n });\n\n const object = {\n ecommerce: {\n checkout: {\n products: [products]\n }\n },\n event: 'gtm-ee-event',\n 'gtm-ee-event-category': 'Ecommerce',\n 'gtm-ee-event-action': 'Checkout',\n 'gtm-ee-event-non-interaction': 'False',\n eventCallback: function () {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n } else {\n window.location.href = $ziggy('shop.checkout');\n }\n };\n\n return {\n loading,\n items,\n modal,\n total,\n quantity,\n open,\n close,\n clear,\n pluralize,\n goto,\n cross,\n crossSlider,\n crossSliderPrev,\n crossSliderNext,\n bundles,\n bundlesSlider,\n bundlesSliderPrev,\n bundlesSliderNext,\n checkout\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","isModal","type","Boolean","setup","store","useStore","loading","ref","items","computed","getters","modal","total","quantity","close","commit","dispatch","window","addEventListener","e","value","key","crossSwiper","bundlesSwiper","crossSlider","crossSliderNext","crossSliderPrev","cross","destroy","length","Swiper","slidesPerView","slidesPerGroup","breakpoints","spaceBetween","allowTouchMove","modules","Navigation","mousewheel","forceToAxis","navigation","nextEl","prevEl","bundlesSlider","bundlesSliderNext","bundlesSliderPrev","bundles","open","clear","pluralize","href","location","checkout","products","forEach","item","push","id","attributes","code","price","brand","category","object","ecommerce","event","eventCallback","$ziggy","dataLayer","_createElementVNode","role","_createElementBlock","_hoisted_1","_hoisted_2","_hoisted_3","_renderSlot","_ctx","onClick","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","innerHTML","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_20","_hoisted_21","_toDisplayString","_hoisted_24","_hoisted_25","_createBlock","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","image","src","_hoisted_45","_hoisted_47","_hoisted_49","_hoisted_50","_hoisted_51","priceOld","_hoisted_54","_createVNode","_hoisted_55","_hoisted_56","_hoisted_59","_hoisted_62","_hoisted_63","_hoisted_64","_hoisted_65","third","_hoisted_66","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_76","_hoisted_77","_hoisted_79","_hoisted_80","second","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_90","_hoisted_91","_hoisted_93","_hoisted_96","_hoisted_102","_hoisted_103","_hoisted_104","_hoisted_106","_hoisted_107","_hoisted_109","_hoisted_110","bundle","amount","_hoisted_113","_hoisted_114","_hoisted_116","_hoisted_119","_hoisted_122","_hoisted_123","_hoisted_124","locale","url","_hoisted_127","_hoisted_129","slider"],"mappings":"uMA8P6BA,kBAAgB,CACzCC,KAAM,OACNC,MAAO,CACHC,QAAS,CACLC,KAAMC,iBACG,IAGjBC,qBACUC,EAAQC,aACRC,EAAUC,OAAI,GAEdC,EAAQC,YAAS,kBAAML,EAAMM,QAAQ,iBACrCC,EAAQF,YAAS,kBAAML,EAAMM,QAAQ,iBACrCE,EAAQH,YAAS,kBAAML,EAAMM,QAAQ,iBACrCG,EAAWJ,YAAS,kBAAML,EAAMM,QAAQ,oBAMxCI,EAAQ,WACVV,EAAMW,OAAO,cAAc,IAa/BX,EAAMY,SAAS,WAAY,SACd,eAGbC,OAAOC,iBAAiB,SAAS,SAACC,GAC1BR,EAAMS,OAAmB,WAAVD,EAAEE,KACjBP,WAYJQ,EAwCAC,EAvCEC,EAAcjB,MAAI,MAClBkB,EAAkBlB,MAAI,MACtBmB,EAAkBnB,MAAI,MAEtBoB,EAAQlB,YAAS,eACbkB,EAAQvB,EAAMM,QAAQ,qBAExBc,EAAYJ,QACRE,GACAA,EAAYM,UAGZD,EAAME,SACNP,EAAc,IAAIQ,UAAON,EAAYJ,MAAO,CACxCW,cAAe,EACfC,eAAgB,EAChBC,YAAa,KACJ,CACDF,cAAe,EACfC,eAAgB,IAGxBE,aAAc,EACdC,gBAAgB,EAChBC,QAAS,CAACC,cACVC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQhB,EAAgBL,MACxBsB,OAAQhB,EAAgBN,W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BAAAsF,IACIC,GACAzF,2BAAA0F,OAEI1F,qBAA4D,KAAxDQ,uCAAOD,OAAKA,OAAKoF,OAAOC,YAAY,uBAAsBC,QAElE7F,qCAAc,kBAAmBQ,sCAAOD,uCAAO,sBAC/CP,2BAAA8F,IACI5C,kBAAS6C,QAAQ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),a=require("vue-toastification"),n={setup:function(){return{translate:window.__}}},o={class:"shop-cart-success-message"};n.render=function(t,a,n,r,l,i){return e.openBlock(),e.createElementBlock("div",o,e.toDisplayString(r.translate("shop.cart.message")),1)};var r=a.useToast(),l={name:"cart-add",props:{id:Number,isChangeQuantity:{type:Boolean,default:!0},isAlreadyInCart:{type:Boolean,default:!0},isSimple:{type:Boolean,default:!1},isPlusMinus:{type:Boolean,default:!1},after:{type:String,default:"modal"}},setup:function(a){var o=t.useStore(),l=e.ref(!1),i=e.ref(1),s=e.ref(null),c=e.computed((function(){return o.getters["cart/productQuantity"](a.id)})),d=a.isAlreadyInCart,u=a.isChangeQuantity,p=a.isPlusMinus;a.isSimple&&(d=!1,u=!1,p=!1);return{button:s,loading:l,quantity:i,add:function(){l.value=!0;var e=[];s.value.closest(".product-main")&&document.querySelectorAll("#options input[type=checkbox]:checked").forEach((function(t){e.push(parseInt(t.value))}));var t=Math.max(1,i.value),c=s.value.closest("[shop-product]"),d=c.querySelector("[shop-product-name]").textContent,u=c.querySelector("[shop-product-price]").childNodes[0].nodeValue.replace(/ /g,""),p=c.dataset.code;o.dispatch("cart/add",{product:{id:a.id,quantity:t,options:e},finally:function(){(l.value=!1,i.value=1,"message"==a.after)&&r({component:n},{type:"success-cart"});var e={event:"addToCart",ecommerce:{currencyCode:"UAH",add:{products:[{name:d,id:p,price:u,quantity:t}]}}};window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(e))}})},remove:function(){l.value=!0,o.dispatch("cart/remove",{id:a.id,finally:function(){l.value=!1}})},cart:c,increase:function(){i.value++},decrease:function(){i.value>1&&i.value--},isAlreadyInCart:d,isChangeQuantity:u,isPlusMinus:p}}},i={class:"cart-add",ref:"button"},s={class:"columns"},c={key:0,class:"column"},d={class:"cart-change-quantity"},u=["disabled"],p=["disabled"],m=["disabled"],y={class:"column is-narrow"},v=["disabled"],f=e.createElementVNode("svg",{class:"icon cart"},[e.createElementVNode("use",{"xlink:href":"#cart-add"})],-1),h={class:"cart-add-button-label"},b={key:0},k=e.createElementVNode("br",null,null,-1),C=["disabled","textContent"];l.render=function(t,a,n,o,r,l){return e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",s,[t.$env.shop.isCustomQuantity&&o.isChangeQuantity?(e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("div",d,[o.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:0,class:"button is-small decrease",onClick:a[0]||(a[0]=function(){return o.decrease&&o.decrease.apply(o,arguments)}),disabled:o.loading||1==o.quantity},"-",8,u)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":a[1]||(a[1]=function(e){return o.quantity=e}),disabled:o.loading},null,8,p),[[e.vModelText,o.quantity]]),o.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-small increase",onClick:a[2]||(a[2]=function(){return o.increase&&o.increase.apply(o,arguments)}),disabled:o.loading},"+",8,m)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"button is-link is-small",onClick:a[3]||(a[3]=function(){return o.add&&o.add.apply(o,arguments)}),disabled:o.loading},[e.renderSlot(t.$slots,"default",{label:t.__("shop.cart.add")},(function(){return[f,e.createElementVNode("span",h,e.toDisplayString(t.__("shop.cart.add")),1)]}))],8,v)])]),t.$env.shop.isAlreadyInCart&&o.isAlreadyInCart&&o.cart>0?(e.openBlock(),e.createElementBlock("div",b,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.already",{quantity:o.cart}))+" ",1),k,e.createElementVNode("a",{onClick:a[4]||(a[4]=e.withModifiers((function(){return o.remove&&o.remove.apply(o,arguments)}),["prevent"])),disabled:o.loading,textContent:e.toDisplayString(t.__("shop.cart.remove"))},null,8,C)])):e.createCommentVNode("v-if",!0)],512)},module.exports=l;
1
+ "use strict";var e=require("vue"),t=require("vuex"),a=require("vue-toastification"),n={setup:function(){return{translate:window.__}}},o={class:"shop-cart-success-message"};n.render=function(t,a,n,r,l,i){return e.openBlock(),e.createElementBlock("div",o,e.toDisplayString(r.translate("shop.cart.message")),1)};var r=a.useToast(),l={name:"cart-add",props:{id:Number,isChangeQuantity:{type:Boolean,default:!0},isAlreadyInCart:{type:Boolean,default:!0},isSimple:{type:Boolean,default:!1},isPlusMinus:{type:Boolean,default:!1},after:{type:String,default:"modal"}},setup:function(a){var o=t.useStore(),l=e.ref(!1),i=e.ref(1),c=e.ref(null),s=e.computed((function(){return o.getters["cart/productQuantity"](a.id)})),d=a.isAlreadyInCart,u=a.isChangeQuantity,p=a.isPlusMinus;a.isSimple&&(d=!1,u=!1,p=!1);return{button:c,loading:l,quantity:i,add:function(){l.value=!0;var e=[];c.value.closest(".product-main")&&document.querySelectorAll("#options input[type=checkbox]:checked").forEach((function(t){e.push(parseInt(t.value))}));var t=Math.max(1,i.value),s=c.value.closest("[shop-product]"),d=s.querySelector("[shop-product-name]").textContent,u=s.querySelector("[shop-product-price]").childNodes[0].nodeValue.replace(/ /g,""),p=s.dataset.code;o.dispatch("cart/add",{product:{id:a.id,quantity:t,options:e},finally:function(){(l.value=!1,i.value=1,"message"==a.after)&&r({component:n},{type:"success-cart"});var e={ecommerce:{currencyCode:"UAH",add:{products:[{name:d,id:p,price:u,quantity:t}]}},event:"gtm-ee-event","gtm-ee-event-category":"Ecommerce","gtm-ee-event-action":"Add to Cart","gtm-ee-event-non-interaction":"False"};window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(e))}})},remove:function(){l.value=!0,o.dispatch("cart/remove",{id:a.id,finally:function(){l.value=!1}})},cart:s,increase:function(){i.value++},decrease:function(){i.value>1&&i.value--},isAlreadyInCart:d,isChangeQuantity:u,isPlusMinus:p}}},i={class:"cart-add",ref:"button"},c={class:"columns"},s={key:0,class:"column"},d={class:"cart-change-quantity"},u=["disabled"],p=["disabled"],m=["disabled"],y={class:"column is-narrow"},v=["disabled"],f=e.createElementVNode("svg",{class:"icon cart"},[e.createElementVNode("use",{"xlink:href":"#cart-add"})],-1),h={class:"cart-add-button-label"},g={key:0},b=e.createElementVNode("br",null,null,-1),k=["disabled","textContent"];l.render=function(t,a,n,o,r,l){return e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",c,[t.$env.shop.isCustomQuantity&&o.isChangeQuantity?(e.openBlock(),e.createElementBlock("div",s,[e.createElementVNode("div",d,[o.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:0,class:"button is-small decrease",onClick:a[0]||(a[0]=function(){return o.decrease&&o.decrease.apply(o,arguments)}),disabled:o.loading||1==o.quantity},"-",8,u)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("input",{class:"input is-small",type:"number",min:"1","onUpdate:modelValue":a[1]||(a[1]=function(e){return o.quantity=e}),disabled:o.loading},null,8,p),[[e.vModelText,o.quantity]]),o.isPlusMinus?(e.openBlock(),e.createElementBlock("button",{key:1,class:"button is-small increase",onClick:a[2]||(a[2]=function(){return o.increase&&o.increase.apply(o,arguments)}),disabled:o.loading},"+",8,m)):e.createCommentVNode("v-if",!0)])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"button is-link is-small",onClick:a[3]||(a[3]=function(){return o.add&&o.add.apply(o,arguments)}),disabled:o.loading},[e.renderSlot(t.$slots,"default",{label:t.__("shop.cart.add")},(function(){return[f,e.createElementVNode("span",h,e.toDisplayString(t.__("shop.cart.add")),1)]}))],8,v)])]),t.$env.shop.isAlreadyInCart&&o.isAlreadyInCart&&o.cart>0?(e.openBlock(),e.createElementBlock("div",g,[e.createTextVNode(e.toDisplayString(t.__("shop.cart.already",{quantity:o.cart}))+" ",1),b,e.createElementVNode("a",{onClick:a[4]||(a[4]=e.withModifiers((function(){return o.remove&&o.remove.apply(o,arguments)}),["prevent"])),disabled:o.loading,textContent:e.toDisplayString(t.__("shop.cart.remove"))},null,8,k)])):e.createCommentVNode("v-if",!0)],512)},module.exports=l;
2
2
  //# sourceMappingURL=CartAdd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CartAdd.js","sources":["../../../../src/components/shop/cart/SuccessMessage.vue","../../../../src/components/shop/cart/SuccessMessage.vue?vue&type=template&id=75a41ddb&lang.js","../../../../src/components/shop/cart/CartAdd.vue","../../../../src/components/shop/cart/CartAdd.vue?vue&type=template&id=3f7690d4&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button\n class=\"button is-small decrease\"\n @click=\"decrease\"\n :disabled=\"loading || quantity == 1\"\n v-if=\"isPlusMinus\"\n >-</button>\n <input\n class=\"input is-small\"\n type=\"number\"\n min=\"1\"\n v-model=\"quantity\"\n :disabled=\"loading\"\n />\n <button\n class=\"button is-small increase\"\n @click=\"increase\"\n :disabled=\"loading\"\n v-if=\"isPlusMinus\"\n >+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{\n __(\"shop.cart.add\")\n }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __(\"shop.cart.already\", { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from \"vue\";\nimport { useStore } from \"vuex\";\nimport { useToast } from \"vue-toastification\";\nimport SuccessMessage from \"./SuccessMessage.vue\";\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true,\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true,\n },\n isSimple: {\n type: Boolean,\n default: false,\n },\n isPlusMinus: {\n type: Boolean,\n default: false,\n },\n after: {\n type: String,\n default: \"modal\",\n },\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n\n const cart = computed(() =>\n store.getters[\"cart/productQuantity\"](props.id)\n );\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll(\n \"#options input[type=checkbox]:checked\"\n );\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = product.querySelector('[shop-product-name]').textContent;\n const price = product.querySelector('[shop-product-price]').childNodes[0].nodeValue.replace(/ /g, '');\n const code = product.dataset.code;\n\n store.dispatch(\"cart/add\", {\n product: {\n id: props.id,\n quantity: q,\n options: options,\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == \"message\") {\n const component = {\n component: SuccessMessage,\n };\n\n toast(component, {\n type: \"success-cart\",\n });\n }\n\n const object = {\n 'event': 'addToCart',\n 'ecommerce': {\n 'currencyCode': 'UAH',\n 'add': {\n 'products': [{\n 'name': name,\n 'id': code,\n 'price': price,\n 'quantity': q\n }]\n }\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n },\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(\"cart/remove\", {\n id: props.id,\n finally: () => {\n loading.value = false;\n },\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus,\n };\n },\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button\n class=\"button is-small decrease\"\n @click=\"decrease\"\n :disabled=\"loading || quantity == 1\"\n v-if=\"isPlusMinus\"\n >-</button>\n <input\n class=\"input is-small\"\n type=\"number\"\n min=\"1\"\n v-model=\"quantity\"\n :disabled=\"loading\"\n />\n <button\n class=\"button is-small increase\"\n @click=\"increase\"\n :disabled=\"loading\"\n v-if=\"isPlusMinus\"\n >+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{\n __(\"shop.cart.add\")\n }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __(\"shop.cart.already\", { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from \"vue\";\nimport { useStore } from \"vuex\";\nimport { useToast } from \"vue-toastification\";\nimport SuccessMessage from \"./SuccessMessage.vue\";\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true,\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true,\n },\n isSimple: {\n type: Boolean,\n default: false,\n },\n isPlusMinus: {\n type: Boolean,\n default: false,\n },\n after: {\n type: String,\n default: \"modal\",\n },\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n\n const cart = computed(() =>\n store.getters[\"cart/productQuantity\"](props.id)\n );\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll(\n \"#options input[type=checkbox]:checked\"\n );\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = product.querySelector('[shop-product-name]').textContent;\n const price = product.querySelector('[shop-product-price]').childNodes[0].nodeValue.replace(/ /g, '');\n const code = product.dataset.code;\n\n store.dispatch(\"cart/add\", {\n product: {\n id: props.id,\n quantity: q,\n options: options,\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == \"message\") {\n const component = {\n component: SuccessMessage,\n };\n\n toast(component, {\n type: \"success-cart\",\n });\n }\n\n const object = {\n 'event': 'addToCart',\n 'ecommerce': {\n 'currencyCode': 'UAH',\n 'add': {\n 'products': [{\n 'name': name,\n 'id': code,\n 'price': price,\n 'quantity': q\n }]\n }\n }\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n },\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch(\"cart/remove\", {\n id: props.id,\n finally: () => {\n loading.value = false;\n },\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus,\n };\n },\n};\n</script>"],"names":["setup","translate","window","__","_createElementBlock","_hoisted_1","$setup","toast","useToast","name","props","id","Number","isChangeQuantity","type","Boolean","isAlreadyInCart","isSimple","isPlusMinus","after","String","store","useStore","loading","ref","quantity","button","cart","computed","getters","add","value","options","closest","document","querySelectorAll","forEach","element","push","parseInt","q","Math","max","product","querySelector","textContent","price","childNodes","nodeValue","replace","code","dataset","dispatch","component","SuccessMessage","object","dataLayer","ecommerce","remove","increase","decrease","_createElementVNode","_hoisted_2","_ctx","shop","isCustomQuantity","_hoisted_3","_hoisted_4","onClick","disabled","min","_hoisted_8","_renderSlot","label","_hoisted_10","_hoisted_11","_hoisted_13","_toDisplayString"],"mappings":"sFAMe,CACXA,uBAGW,CACHC,UAHcC,OAAOC,eCPlB,iFAAXC,2BAAAC,oBACOC,sCCoDX,IAAMC,EAAQC,eAEC,CACXC,KAAM,WACNC,MAAO,CACHC,GAAIC,OACJC,iBAAkB,CACdC,KAAMC,iBACG,GAEbC,gBAAiB,CACbF,KAAMC,iBACG,GAEbE,SAAU,CACNH,KAAMC,iBACG,GAEbG,YAAa,CACTJ,KAAMC,iBACG,GAEbI,MAAO,CACHL,KAAMM,eACG,UAGjBpB,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ASM,SAiBT6B,SAda,WACTnC,EAASM,MAAQ,GACjBN,EAASM,SAabf,gBAAAA,EACAH,iBAAAA,EACAK,YAAAA,cCvMG,WAAWM,IAAI,mBACX,0BACI,mBACI,8EAsBJ,qCAGCqC,kCAAW,cACPA,yCAAgB,4BAER,qCAWxBA,yHA1CRzD,2BAAAC,GACIwD,2BAAAC,GAC8BC,OAAKC,KAAKC,kBAAoB3D,kCAAxDF,2BAAA8D,GACIL,2BAAAM,GAKc7D,6BAJVF,2CACU,2BACLgE,sCAAO9D,4CACP+D,SAAU/D,cAAWA,YAEzB,2DACDuD,oCACU,iBACN/C,KAAK,SACLwD,IAAI,yDACKhE,eACR+D,SAAU/D,oCADFA,cAOHA,6BAJVF,2CACU,2BACLgE,sCAAO9D,4CACP+D,SAAU/D,WAEd,+EAGTuD,2BAAAU,GACIV,qCAAc,0BAA+BO,sCAAO9D,kCAAM+D,SAAU/D,YAChEkE,iCAAOC,MAAOV,wBAAd,kBACIW,EAGAb,4BAAAc,oBAEQZ,wCAObA,OAAKC,KAAKhD,iBAAmBV,mBAAmBA,wBAA3DF,kEACO2D,mCAAoCzD,iBACvCsE,EACAf,0BAAQO,uDAAe9D,sDAAS+D,SAAU/D,sBAASuE,kBAAQd"}
1
+ {"version":3,"file":"CartAdd.js","sources":["../../../../src/components/shop/cart/SuccessMessage.vue","../../../../src/components/shop/cart/SuccessMessage.vue?vue&type=template&id=75a41ddb&lang.js","../../../../src/components/shop/cart/CartAdd.vue","../../../../src/components/shop/cart/CartAdd.vue?vue&type=template&id=cd5783a4&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"shop-cart-success-message\">\n {{ translate(\"shop.cart.message\") }}\n </div>\n</template>\n<script>\nexport default {\n setup() {\n const translate = window.__;\n\n return {\n translate,\n };\n },\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n\n const cart = computed(() => store.getters['cart/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = product.querySelector('[shop-product-name]').textContent;\n const price = product.querySelector('[shop-product-price]').childNodes[0].nodeValue.replace(/ /g, '');\n const code = product.dataset.code;\n\n store.dispatch('cart/add', {\n product: {\n id: props.id,\n quantity: q,\n options: options\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n\n const object = {\n ecommerce: {\n currencyCode: 'UAH',\n add: {\n products: [\n {\n name: name,\n id: code,\n price: price,\n quantity: q\n }\n ]\n }\n },\n event: 'gtm-ee-event',\n 'gtm-ee-event-category': 'Ecommerce',\n 'gtm-ee-event-action': 'Add to Cart',\n 'gtm-ee-event-non-interaction': 'False'\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch('cart/remove', {\n id: props.id,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>","<template>\n <div class=\"cart-add\" ref=\"button\">\n <div class=\"columns\">\n <div class=\"column\" v-if=\"$env.shop.isCustomQuantity && isChangeQuantity\">\n <div class=\"cart-change-quantity\">\n <button class=\"button is-small decrease\" @click=\"decrease\" :disabled=\"loading || quantity == 1\" v-if=\"isPlusMinus\">-</button>\n <input class=\"input is-small\" type=\"number\" min=\"1\" v-model=\"quantity\" :disabled=\"loading\" />\n <button class=\"button is-small increase\" @click=\"increase\" :disabled=\"loading\" v-if=\"isPlusMinus\">+</button>\n </div>\n </div>\n <div class=\"column is-narrow\">\n <button class=\"button is-link is-small\" v-on:click=\"add\" :disabled=\"loading\">\n <slot :label=\"__('shop.cart.add')\">\n <svg class=\"icon cart\">\n <use xlink:href=\"#cart-add\" />\n </svg>\n <span class=\"cart-add-button-label\">\n {{ __('shop.cart.add') }}\n </span>\n </slot>\n </button>\n </div>\n </div>\n <div v-if=\"$env.shop.isAlreadyInCart && isAlreadyInCart && cart > 0\">\n {{ __('shop.cart.already', { quantity: cart }) }}\n <br />\n <a v-on:click.prevent=\"remove\" :disabled=\"loading\" v-text=\"__('shop.cart.remove')\"></a>\n </div>\n </div>\n</template>\n<script>\nimport { ref, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { useToast } from 'vue-toastification';\nimport SuccessMessage from './SuccessMessage.vue';\n\nconst toast = useToast();\n\nexport default {\n name: 'cart-add',\n props: {\n id: Number,\n isChangeQuantity: {\n type: Boolean,\n default: true\n },\n isAlreadyInCart: {\n type: Boolean,\n default: true\n },\n isSimple: {\n type: Boolean,\n default: false\n },\n isPlusMinus: {\n type: Boolean,\n default: false\n },\n after: {\n type: String,\n default: 'modal'\n }\n },\n setup(props) {\n const store = useStore();\n const loading = ref(false);\n const quantity = ref(1);\n const button = ref(null);\n\n const cart = computed(() => store.getters['cart/productQuantity'](props.id));\n\n let isAlreadyInCart = props.isAlreadyInCart;\n let isChangeQuantity = props.isChangeQuantity;\n let isPlusMinus = props.isPlusMinus;\n\n if (props.isSimple) {\n isAlreadyInCart = false;\n isChangeQuantity = false;\n isPlusMinus = false;\n }\n\n const add = () => {\n loading.value = true;\n\n let options = [];\n\n if (button.value.closest('.product-main')) {\n const checkedOptions = document.querySelectorAll('#options input[type=checkbox]:checked');\n\n checkedOptions.forEach((element) => {\n options.push(parseInt(element.value));\n });\n }\n\n const q = Math.max(1, quantity.value);\n const product = button.value.closest('[shop-product]');\n const name = product.querySelector('[shop-product-name]').textContent;\n const price = product.querySelector('[shop-product-price]').childNodes[0].nodeValue.replace(/ /g, '');\n const code = product.dataset.code;\n\n store.dispatch('cart/add', {\n product: {\n id: props.id,\n quantity: q,\n options: options\n },\n finally: () => {\n loading.value = false;\n quantity.value = 1;\n\n if (props.after == 'message') {\n const component = {\n component: SuccessMessage\n };\n\n toast(component, {\n type: 'success-cart'\n });\n }\n\n const object = {\n ecommerce: {\n currencyCode: 'UAH',\n add: {\n products: [\n {\n name: name,\n id: code,\n price: price,\n quantity: q\n }\n ]\n }\n },\n event: 'gtm-ee-event',\n 'gtm-ee-event-category': 'Ecommerce',\n 'gtm-ee-event-action': 'Add to Cart',\n 'gtm-ee-event-non-interaction': 'False'\n };\n\n if (window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n });\n };\n\n const remove = () => {\n loading.value = true;\n\n store.dispatch('cart/remove', {\n id: props.id,\n finally: () => {\n loading.value = false;\n }\n });\n };\n\n const increase = () => {\n quantity.value++;\n };\n\n const decrease = () => {\n if (quantity.value > 1) {\n quantity.value--;\n }\n };\n\n return {\n button,\n loading,\n quantity,\n add,\n remove,\n cart,\n increase,\n decrease,\n isAlreadyInCart,\n isChangeQuantity,\n isPlusMinus\n };\n }\n};\n</script>"],"names":["setup","translate","window","__","_createElementBlock","_hoisted_1","$setup","toast","useToast","name","props","id","Number","isChangeQuantity","type","Boolean","isAlreadyInCart","isSimple","isPlusMinus","after","String","store","useStore","loading","ref","quantity","button","cart","computed","getters","add","value","options","closest","document","querySelectorAll","forEach","element","push","parseInt","q","Math","max","product","querySelector","textContent","price","childNodes","nodeValue","replace","code","dataset","dispatch","component","SuccessMessage","object","ecommerce","currencyCode","products","event","dataLayer","remove","increase","decrease","_createElementVNode","_hoisted_2","_ctx","shop","isCustomQuantity","_hoisted_3","_hoisted_4","onClick","disabled","min","_hoisted_8","_renderSlot","label","_hoisted_10","_hoisted_11","_hoisted_13","_toDisplayString"],"mappings":"sFAMe,CACXA,uBAGW,CACHC,UAHcC,OAAOC,eCPlB,iFAAXC,2BAAAC,oBACOC,sCCkCX,IAAMC,EAAQC,eAEC,CACXC,KAAM,WACNC,MAAO,CACHC,GAAIC,OACJC,iBAAkB,CACdC,KAAMC,iBACG,GAEbC,gBAAiB,CACbF,KAAMC,iBACG,GAEbE,SAAU,CACNH,KAAMC,iBACG,GAEbG,YAAa,CACTJ,KAAMC,iBACG,GAEbI,MAAO,CACHL,KAAMM,eACG,UAGjBpB,eAAMU,OACIW,EAAQC,aACRC,EAAUC,OAAI,GACdC,EAAWD,MAAI,GACfE,EAASF,MAAI,MAEbG,EAAOC,YAAS,kBAAMP,EAAMQ,QAAQ,wBAAwBnB,EAAMC,OAEpEK,EAAkBN,EAAMM,gBACxBH,EAAmBH,EAAMG,iBACzBK,EAAcR,EAAMQ,YAEpBR,EAAMO,WACND,GAAkB,EAClBH,GAAmB,EACnBK,GAAc,SA8FX,CACHQ,OAAAA,EACAH,QAAAA,EACAE,SAAAA,EACAK,IA/FQ,WACRP,EAAQQ,OAAQ,MAEZC,EAAU,GAEVN,EAAOK,MAAME,QAAQ,kBACEC,SAASC,iBAAiB,yCAElCC,SAAQ,SAACC,GACpBL,EAAQM,KAAKC,SAASF,EAAQN,eAIhCS,EAAIC,KAAKC,IAAI,EAAGjB,EAASM,OACzBY,EAAUjB,EAAOK,MAAME,QAAQ,kBAC/BxB,EAAOkC,EAAQC,cAAc,uBAAuBC,YACpDC,EAAQH,EAAQC,cAAc,wBAAwBG,WAAW,GAAGC,UAAUC,QAAQ,KAAM,IAC5FC,EAAOP,EAAQQ,QAAQD,KAE7B7B,EAAM+B,SAAS,WAAY,CACvBT,QAAS,CACLhC,GAAID,EAAMC,GACVc,SAAUe,EACVR,QAASA,WAEJ,YACLT,E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