@perevorot/shop 2.0.0 → 2.0.4

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/api.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var t={auth:{me:function(){return $http.post($ziggy("auth.me"))},login:function(t){return $http.post($ziggy("auth.login"),t)},logout:function(){return $http.post($ziggy("auth.logout"))},reset:function(t){return $http.post($ziggy("auth.password.email"),t)},passwordUpdate:function(t){return $http.post($ziggy("auth.password.update"),t)},registerShort:function(t){return $http.post($ziggy("auth.register.short"),t)},registerFull:function(t){return $http.post($ziggy("auth.register.full"),t)},registerForm:function(){return $http.post($ziggy("auth.register.form"))},update:function(t){return $http.post($ziggy("auth.register.update"),t)}},cart:{items:function(){return $http.post($ziggy("api.cart"),{action:"get"})},add:function(t){return $http.post($ziggy("api.cart"),{action:"add",id:t.id,quantity:t.quantity,options:!!t.options&&t.options})},options:function(t){return $http.post($ziggy("api.cart"),{action:"options",id:t.id,options:t.options})},addBundle:function(t){return $http.post($ziggy("api.cart"),{action:"addBundle",id:t.id,second:t.second,third:t.third})},remove:function(t){return $http.post($ziggy("api.cart"),{action:"remove",id:t})},clear:function(){return $http.post($ziggy("api.cart"),{action:"clear"})},quantity:function(t){return $http.post($ziggy("api.cart"),{action:"quantity",id:t.id,exact:t.exact})}},compare:{items:function(){return $http.post($ziggy("api.compare"),{action:"get"})},category:function(t){return $http.post($ziggy("api.compare"),{action:"category",slug:t})},toggle:function(t){return $http.post($ziggy("api.compare"),{action:"toggle",id:t})},delete:function(t){return $http.post($ziggy("api.compare"),{action:"delete",id:t})}},shop:{search:function(t){return $http.post($ziggy("api.search"),{term:t})}},wishlist:{items:function(){return $http.post($ziggy("api.wishlist"),{action:"get"})},toggle:function(t){return $http.post($ziggy("api.wishlist"),{action:"toggle",id:t})}}};module.exports=t;
2
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sources":["../src/api/modules/auth.js","../src/api/index.js","../src/api/modules/cart.js","../src/api/modules/compare.js","../src/api/modules/shop.js","../src/api/modules/wishlist.js"],"sourcesContent":["export default {\n me() {\n return $http.post($ziggy(\"auth.me\"));\n },\n login(credentials) {\n return $http.post($ziggy(\"auth.login\"), credentials);\n },\n logout() {\n return $http.post($ziggy(\"auth.logout\"));\n },\n reset(credentials) {\n return $http.post($ziggy(\"auth.password.email\"), credentials);\n },\n passwordUpdate(credentials) {\n return $http.post($ziggy(\"auth.password.update\"), credentials);\n },\n registerShort(credentials) {\n return $http.post($ziggy(\"auth.register.short\"), credentials);\n },\n registerFull(credentials) {\n return $http.post($ziggy(\"auth.register.full\"), credentials);\n },\n registerForm() {\n return $http.post($ziggy(\"auth.register.form\"));\n },\n update(credentials) {\n return $http.post($ziggy(\"auth.register.update\"), credentials);\n },\n}","import auth from './modules/auth';\nimport cart from './modules/cart';\nimport compare from './modules/compare';\nimport shop from './modules/shop';\nimport wishlist from './modules/wishlist';\n\nexport default {\n auth,\n cart,\n compare,\n shop,\n wishlist\n};","export default {\n items() {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"get\",\n });\n },\n\n add(item) {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"add\",\n id: item.id,\n quantity: item.quantity,\n options: item.options ? item.options : false\n });\n },\n\n options(item) {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"options\",\n id: item.id,\n options: item.options\n });\n },\n\n addBundle(item) {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"addBundle\",\n id: item.id,\n second: item.second,\n third: item.third\n });\n },\n\n remove(id) {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"remove\",\n id: id\n });\n },\n\n clear() {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"clear\"\n });\n },\n\n quantity(item) {\n return $http.post($ziggy(\"api.cart\"), {\n action: \"quantity\",\n id: item.id,\n exact: item.exact\n });\n },\n}","export default {\n items() {\n return $http.post($ziggy(\"api.compare\"), {\n action: \"get\",\n });\n },\n\n category(slug) {\n return $http.post($ziggy(\"api.compare\"), {\n action: \"category\",\n slug: slug\n });\n },\n\n toggle(id) {\n return $http.post($ziggy(\"api.compare\"), {\n action: \"toggle\",\n id: id\n });\n },\n\n delete(id) {\n return $http.post($ziggy(\"api.compare\"), {\n action: \"delete\",\n id: id\n });\n },\n}","export default {\n search(term) {\n return $http.post($ziggy(\"api.search\"), {\n term: term,\n });\n },\n}","export default {\n items() {\n return $http.post($ziggy(\"api.wishlist\"), {\n action: \"get\",\n });\n },\n\n toggle(id) {\n return $http.post($ziggy(\"api.wishlist\"), {\n action: \"toggle\",\n id: id\n });\n },\n}"],"names":["auth","me","$http","post","$ziggy","login","credentials","logout","reset","passwordUpdate","registerShort","registerFull","registerForm","update","cart","items","action","add","item","id","quantity","options","addBundle","second","third","remove","clear","exact","compare","category","slug","toggle","shop","search","term","wishlist"],"mappings":"aAAA,MCMe,CACXA,KDPW,CACXC,qBACWC,MAAMC,KAAKC,OAAO,aAE7BC,eAAMC,UACKJ,MAAMC,KAAKC,OAAO,cAAeE,IAE5CC,yBACWL,MAAMC,KAAKC,OAAO,iBAE7BI,eAAMF,UACKJ,MAAMC,KAAKC,OAAO,uBAAwBE,IAErDG,wBAAeH,UACJJ,MAAMC,KAAKC,OAAO,wBAAyBE,IAEtDI,uBAAcJ,UACHJ,MAAMC,KAAKC,OAAO,uBAAwBE,IAErDK,sBAAaL,UACFJ,MAAMC,KAAKC,OAAO,sBAAuBE,IAEpDM,+BACWV,MAAMC,KAAKC,OAAO,wBAE7BS,gBAAOP,UACIJ,MAAMC,KAAKC,OAAO,wBAAyBE,KClBtDQ,KCRW,CACXC,wBACWb,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,SAIhBC,aAAIC,UACOhB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,MACRG,GAAID,EAAKC,GACTC,SAAUF,EAAKE,SACfC,UAASH,EAAKG,SAAUH,EAAKG,WAIrCA,iBAAQH,UACGhB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,UACRG,GAAID,EAAKC,GACTE,QAASH,EAAKG,WAItBC,mBAAUJ,UACChB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,YACRG,GAAID,EAAKC,GACTI,OAAQL,EAAKK,OACbC,MAAON,EAAKM,SAIpBC,gBAAON,UACIjB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,SACRG,GAAIA,KAIZO,wBACWxB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,WAIhBI,kBAASF,UACEhB,MAAMC,KAAKC,OAAO,YAAa,CAClCY,OAAQ,WACRG,GAAID,EAAKC,GACTQ,MAAOT,EAAKS,UDzCpBC,QETW,CACXb,wBACWb,MAAMC,KAAKC,OAAO,eAAgB,CACrCY,OAAQ,SAIhBa,kBAASC,UACE5B,MAAMC,KAAKC,OAAO,eAAgB,CACrCY,OAAQ,WACRc,KAAMA,KAIdC,gBAAOZ,UACIjB,MAAMC,KAAKC,OAAO,eAAgB,CACrCY,OAAQ,SACRG,GAAIA,qBAILA,UACIjB,MAAMC,KAAKC,OAAO,eAAgB,CACrCY,OAAQ,SACRG,GAAIA,MFdZa,KGVW,CACXC,gBAAOC,UACIhC,MAAMC,KAAKC,OAAO,cAAe,CACpC8B,KAAMA,MHQdC,SIXW,CACXpB,wBACWb,MAAMC,KAAKC,OAAO,gBAAiB,CACtCY,OAAQ,SAIhBe,gBAAOZ,UACIjB,MAAMC,KAAKC,OAAO,gBAAiB,CACtCY,OAAQ,SACRG,GAAIA"}
package/dist/app.js ADDED
@@ -0,0 +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;
2
+ //# sourceMappingURL=app.js.map
@@ -0,0 +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 +1 @@
1
- {"version":3,"file":"Login.js","sources":["../../../src/components/auth/Login.vue","../../../src/components/auth/Login.vue?vue&type=template&id=7e1f4c0e&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-login\">\n <div v-show=\"modal == 'login'\">\n <div class=\"title\">{{ __('auth.login.title') }}</div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"href-forget-password\">\n <a @click=\"reset\">{{ __('auth.login.forget_password') }}</a>\n </div>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.login.form.submit') }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"\n ><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-register\">\n <a @click=\"register\">{{ __('auth.login.signup') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n\n <forget v-if=\"modal == 'forget'\" :email=\"model.email\"></forget>\n </div>\n</template>\n<script>\nimport { ref, markRaw, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n props: {\n loginCallback: Function,\n default: () => {}\n },\n name: 'login',\n components: {\n SchemaForm\n },\n setup(props) {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const errors = ref({});\n const modal = computed(() => store.getters['auth/modal']);\n\n const schema = ref({\n email: {\n component: FormText,\n label: __('auth.login.form.email'),\n store: 'login',\n model: 'email'\n },\n password: {\n component: FormPassword,\n label: __('auth.login.form.password')\n }\n });\n\n const validation = yup.object().shape({\n email: yup.string().email(__('auth.validation.email')).required(__('auth.validation.required')),\n password: yup.string().required(__('auth.validation.required'))\n });\n\n const model = ref({\n email: '',\n password: ''\n });\n\n useSchemaForm(model);\n\n const reset = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/login', {\n credentials: model.value,\n callback: ()=>{\n if (props.loginCallback) {\n props.loginCallback();\n }\n },\n finally: () => {\n loading.value = false;\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n model.value.password = '';\n\n key.value++;\n }\n }\n });\n };\n\n return {\n loading,\n modal,\n schema,\n validation,\n reset,\n facebook,\n google,\n schema,\n onSubmit,\n errors,\n key,\n model,\n register\n };\n }\n};\n</script>","<template>\n <div class=\"auth-login\">\n <div v-show=\"modal == 'login'\">\n <div class=\"title\">{{ __('auth.login.title') }}</div>\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :initial-errors=\"errors\" :key=\"key\" @submit=\"onSubmit\">\n <template #afterForm>\n <div class=\"href-forget-password\">\n <a @click=\"reset\">{{ __('auth.login.forget_password') }}</a>\n </div>\n <div class=\"field\">\n <button class=\"button is-link\" type=\"submit\" v-bind:class=\"{ 'is-loading': loading }\">\n {{ __('auth.login.form.submit') }}\n </button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">\n {{ __('auth.login.socials') }}\n </div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\"\n ><svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-register\">\n <a @click=\"register\">{{ __('auth.login.signup') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n\n <forget v-if=\"modal == 'forget'\" :email=\"model.email\"></forget>\n </div>\n</template>\n<script>\nimport { ref, markRaw, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n props: {\n loginCallback: Function,\n default: () => {}\n },\n name: 'login',\n components: {\n SchemaForm\n },\n setup(props) {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const errors = ref({});\n const modal = computed(() => store.getters['auth/modal']);\n\n const schema = ref({\n email: {\n component: FormText,\n label: __('auth.login.form.email'),\n store: 'login',\n model: 'email'\n },\n password: {\n component: FormPassword,\n label: __('auth.login.form.password')\n }\n });\n\n const validation = yup.object().shape({\n email: yup.string().email(__('auth.validation.email')).required(__('auth.validation.required')),\n password: yup.string().required(__('auth.validation.required'))\n });\n\n const model = ref({\n email: '',\n password: ''\n });\n\n useSchemaForm(model);\n\n const reset = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/login', {\n credentials: model.value,\n callback: ()=>{\n if (props.loginCallback) {\n props.loginCallback();\n }\n },\n finally: () => {\n loading.value = false;\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n model.value.password = '';\n\n key.value++;\n }\n }\n });\n };\n\n return {\n loading,\n modal,\n schema,\n validation,\n reset,\n facebook,\n google,\n schema,\n onSubmit,\n errors,\n key,\n model,\n register\n };\n }\n};\n</script>"],"names":["markRaw","FormText","SchemaForm","SchemaFormFactory","VeeValidatePlugin","props","loginCallback","Function","name","components","setup","loading","ref","store","useStore","key","errors","modal","computed","getters","schema","email","component","label","__","model","password","FormPassword","validation","yup","object","shape","string","required","useSchemaForm","reset","commit","facebook","window","location","href","$ziggy","provider","google","value","dispatch","credentials","callback","error","response","data","Object","entries","field","messages","_createElementVNode","_createElementBlock","_hoisted_1","_hoisted_2","_ctx","_createBlock","schemaRowClasses","$setup","onSubmit","afterForm","_hoisted_3","onClick","_hoisted_4","type","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_14"],"mappings":"isDAoDAA,UAAQC,WAER,IAAMC,EAAaC,oBAAkB,CAACC,UAAkB,QAEzC,CACXC,MAAO,CACHC,cAAeC,iBACN,cAEbC,KAAM,QACNC,WAAY,CACRP,WAAAA,GAEJQ,eAAML,SACIM,EAAUC,OAAI,GACdC,EAAQC,aACRC,EAAMH,MAAI,GACVI,EAASJ,MAAI,IACbK,EAAQC,YAAS,kBAAML,EAAMM,QAAQ,iBAErCC,EAASR,MAAI,CACfS,MAAO,CACHC,UAAWrB,UACXsB,MAAOC,GAAG,yBACVX,MAAO,QACPY,MAAO,SAEXC,SAAU,CACNJ,UAAWK,UACXJ,MAAOC,GAAG,+BAIZI,EAAaC,EAAIC,SAASC,MAAM,CAClCV,MAAOQ,EAAIG,SAASX,MAAMG,GAAG,0BAA0BS,SAAST,GAAG,6BACnEE,SAAUG,EAAIG,SAASC,SAAST,GAAG,+BAGjCC,EAAQb,MAAI,CACdS,MAAO,GACPK,SAAU,KAGdQ,gBAAcT,eAoDVd,QAAAA,EACAM,MAAAA,EACAG,OAAAA,EACAQ,WAAAA,EACAO,MAtDU,WACVtB,EAAMuB,OAAO,aAAc,WAsD3BC,SA/Ca,WACbC,OAAOC,SAASC,KAAOC,OAAO,oBAAqB,CAC/CC,SAAU,cA8CdC,OA1CW,WACXL,OAAOC,SAASC,KAAOC,OAAO,oBAAqB,CAC/CC,SAAU,sBAyCdtB,mBArCa,WACbT,EAAQiC,OAAQ,EAEhB/B,EAAMgC,SAAS,aAAc,CACzBC,YAAarB,EAAMmB,MACnBG,SAAU,WACF1C,EAAMC,eACND,EAAMC,yBAGL,WACLK,EAAQiC,OAAQ,SAEb,SAACI,MACAA,EAAMC,SAASC,MAAQF,EAAMC,SAASC,KAAKlC,OAAQ,eACnBmC,OAAOC,QAAQJ,EAAMC,SAASC,KAAKlC,uBAAS,iBAAhEqC,OAAOC,OACXA,EAAS,KACTtC,EAAO4B,MAAMS,GAASC,EAAS,IAIvC7B,EAAMmB,MAAMlB,SAAW,GAEvBX,EAAI6B,4BAgBhB5B,aACAD,eACAU,mBAzDa,WACbZ,EAAMuB,OAAO,aAAc,gCCrGxB,uBAEQ,kBAGQ,iCAGA,kBAKA,oBACI,0CAGA,cAEHmB,kCAAW,gBACPA,yCAAgB,6BAEpBA,iCAAM,mBAGLA,kCAAW,oBACRA,yCAAgB,2BAEpBA,iCAAM,uBAIP,2IAhC3BC,2BAAAC,oBACIF,iCACIA,2BAAAG,oBAAsBC,4CACtBC,iBAAYC,iBAAiB,QAASzC,OAAQ0C,6BAA4BA,8BAA6BA,SAAS/C,IAAK+C,MAAMC,SAAQD,aACpHE,qBACP,kBAAAT,2BAAAU,GACIV,0BAAIW,sCAAOJ,yDAAUH,yCAEzBJ,2BAAAY,GACIZ,uDAAc,+BAA6DO,aAA5CM,KAAK,4BAC7BT,qCAGXJ,2BAAAc,GACId,2BAAAe,oBACOX,+BAEPJ,2BAAAgB,GACIhB,gCAAS,SAAUW,sCAAOJ,gDAM1BP,gCAAS,SAAUW,sCAAOJ,gDAQlCP,2BAAAiB,GACIjB,0BAAIW,sCAAOJ,+DAAaH,iIAhC3BG,qBAsCCA,uBAAdF,uBAAkCvC,MAAOyC,QAAMzC"}
1
+ {"version":3,"file":"Login.js","sources":["../../../src/components/auth/Login.vue","../../../src/components/auth/Login.vue?vue&type=template&id=67850c25&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-login\">\n <div v-show=\"modal == 'login'\">\n <div class=\"title\">{{ __('auth.login.title') }}</div>\n <SchemaForm\n schemaRowClasses=\"field\"\n :schema=\"schema\"\n :validation-schema=\"validation\"\n :initial-errors=\"errors\"\n :key=\"key\"\n @submit=\"onSubmit\"\n >\n <template #afterForm>\n <div class=\"href-forget-password\">\n <a @click=\"reset\">{{ __('auth.login.forget_password') }}</a>\n </div>\n <div class=\"field\">\n <button\n class=\"button is-link\"\n type=\"submit\"\n v-bind:class=\"{ 'is-loading': loading }\"\n >{{ __('auth.login.form.submit') }}</button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">{{ __('auth.login.socials') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-register\">\n <a @click=\"register\">{{ __('auth.login.signup') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n\n <forget v-if=\"modal == 'forget'\" :email=\"model.email\"></forget>\n </div>\n</template>\n<script>\nimport { ref, markRaw, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n props: {\n loginCallback: Function,\n default: () => { }\n },\n name: 'login',\n components: {\n SchemaForm\n },\n setup(props) {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const errors = ref({});\n const modal = computed(() => store.getters['auth/modal']);\n\n const schema = ref({\n email: {\n component: FormText,\n label: __('auth.login.form.email'),\n store: 'login',\n model: 'email'\n },\n password: {\n component: FormPassword,\n label: __('auth.login.form.password')\n }\n });\n\n const validation = yup.object().shape({\n email: yup.string().email(__('auth.validation.email')).required(__('auth.validation.required')),\n password: yup.string().required(__('auth.validation.required'))\n });\n\n const model = ref({\n email: '',\n password: ''\n });\n\n useSchemaForm(model);\n\n const reset = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/login', {\n credentials: model.value,\n callback: () => {\n if (props.loginCallback) {\n props.loginCallback();\n }\n },\n finally: () => {\n loading.value = false;\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n model.value.password = '';\n\n key.value++;\n }\n }\n });\n };\n\n return {\n loading,\n modal,\n schema,\n validation,\n reset,\n facebook,\n google,\n schema,\n onSubmit,\n errors,\n key,\n model,\n register\n };\n }\n};\n</script>","<template>\n <div class=\"auth-login\">\n <div v-show=\"modal == 'login'\">\n <div class=\"title\">{{ __('auth.login.title') }}</div>\n <SchemaForm\n schemaRowClasses=\"field\"\n :schema=\"schema\"\n :validation-schema=\"validation\"\n :initial-errors=\"errors\"\n :key=\"key\"\n @submit=\"onSubmit\"\n >\n <template #afterForm>\n <div class=\"href-forget-password\">\n <a @click=\"reset\">{{ __('auth.login.forget_password') }}</a>\n </div>\n <div class=\"field\">\n <button\n class=\"button is-link\"\n type=\"submit\"\n v-bind:class=\"{ 'is-loading': loading }\"\n >{{ __('auth.login.form.submit') }}</button>\n </div>\n <div class=\"socials\">\n <div class=\"description has-text-centered\">{{ __('auth.login.socials') }}</div>\n <div class=\"buttons\">\n <a class=\"button\" @click=\"facebook\">\n <svg class=\"icon fb-btn\">\n <use xlink:href=\"#logo-facebook-icon\" />\n </svg>\n <span>Facebook</span>\n </a>\n <a class=\"button\" @click=\"google\">\n <svg class=\"icon google-btn\">\n <use xlink:href=\"#logo-google-icon\" />\n </svg>\n <span>Google</span>\n </a>\n </div>\n </div>\n <div class=\"href-register\">\n <a @click=\"register\">{{ __('auth.login.signup') }}</a>\n </div>\n </template>\n </SchemaForm>\n </div>\n\n <forget v-if=\"modal == 'forget'\" :email=\"model.email\"></forget>\n </div>\n</template>\n<script>\nimport { ref, markRaw, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormPassword from '@perevorot/shop/dist/forms/FormPassword';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default {\n props: {\n loginCallback: Function,\n default: () => { }\n },\n name: 'login',\n components: {\n SchemaForm\n },\n setup(props) {\n const loading = ref(false);\n const store = useStore();\n const key = ref(0);\n const errors = ref({});\n const modal = computed(() => store.getters['auth/modal']);\n\n const schema = ref({\n email: {\n component: FormText,\n label: __('auth.login.form.email'),\n store: 'login',\n model: 'email'\n },\n password: {\n component: FormPassword,\n label: __('auth.login.form.password')\n }\n });\n\n const validation = yup.object().shape({\n email: yup.string().email(__('auth.validation.email')).required(__('auth.validation.required')),\n password: yup.string().required(__('auth.validation.required'))\n });\n\n const model = ref({\n email: '',\n password: ''\n });\n\n useSchemaForm(model);\n\n const reset = () => {\n store.commit('auth/modal', 'forget');\n };\n\n const register = () => {\n store.commit('auth/modal', 'registration');\n };\n\n const facebook = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'facebook'\n });\n };\n\n const google = () => {\n window.location.href = $ziggy('auth.login.social', {\n provider: 'google'\n });\n };\n\n const onSubmit = () => {\n loading.value = true;\n\n store.dispatch('auth/login', {\n credentials: model.value,\n callback: () => {\n if (props.loginCallback) {\n props.loginCallback();\n }\n },\n finally: () => {\n loading.value = false;\n },\n catch: (error) => {\n if (error.response.data && error.response.data.errors) {\n for (const [field, messages] of Object.entries(error.response.data.errors)) {\n if (messages[0]) {\n errors.value[field] = messages[0];\n }\n }\n\n model.value.password = '';\n\n key.value++;\n }\n }\n });\n };\n\n return {\n loading,\n modal,\n schema,\n validation,\n reset,\n facebook,\n google,\n schema,\n onSubmit,\n errors,\n key,\n model,\n register\n };\n }\n};\n</script>"],"names":["markRaw","FormText","SchemaForm","SchemaFormFactory","VeeValidatePlugin","props","loginCallback","Function","name","components","setup","loading","ref","store","useStore","key","errors","modal","computed","getters","schema","email","component","label","__","model","password","FormPassword","validation","yup","object","shape","string","required","useSchemaForm","reset","commit","facebook","window","location","href","$ziggy","provider","google","value","dispatch","credentials","callback","error","response","data","Object","entries","field","messages","_createElementVNode","_createElementBlock","_hoisted_1","_hoisted_2","_ctx","_createBlock","schemaRowClasses","$setup","onSubmit","afterForm","_hoisted_3","onClick","_hoisted_4","type","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_14"],"mappings":"isDA2DAA,UAAQC,WAER,IAAMC,EAAaC,oBAAkB,CAACC,UAAkB,QAEzC,CACXC,MAAO,CACHC,cAAeC,iBACN,cAEbC,KAAM,QACNC,WAAY,CACRP,WAAAA,GAEJQ,eAAML,SACIM,EAAUC,OAAI,GACdC,EAAQC,aACRC,EAAMH,MAAI,GACVI,EAASJ,MAAI,IACbK,EAAQC,YAAS,kBAAML,EAAMM,QAAQ,iBAErCC,EAASR,MAAI,CACfS,MAAO,CACHC,UAAWrB,UACXsB,MAAOC,GAAG,yBACVX,MAAO,QACPY,MAAO,SAEXC,SAAU,CACNJ,UAAWK,UACXJ,MAAOC,GAAG,+BAIZI,EAAaC,EAAIC,SAASC,MAAM,CAClCV,MAAOQ,EAAIG,SAASX,MAAMG,GAAG,0BAA0BS,SAAST,GAAG,6BACnEE,SAAUG,EAAIG,SAASC,SAAST,GAAG,+BAGjCC,EAAQb,MAAI,CACdS,MAAO,GACPK,SAAU,KAGdQ,gBAAcT,eAoDVd,QAAAA,EACAM,MAAAA,EACAG,OAAAA,EACAQ,WAAAA,EACAO,MAtDU,WACVtB,EAAMuB,OAAO,aAAc,WAsD3BC,SA/Ca,WACbC,OAAOC,SAASC,KAAOC,OAAO,oBAAqB,CAC/CC,SAAU,cA8CdC,OA1CW,WACXL,OAAOC,SAASC,KAAOC,OAAO,oBAAqB,CAC/CC,SAAU,sBAyCdtB,mBArCa,WACbT,EAAQiC,OAAQ,EAEhB/B,EAAMgC,SAAS,aAAc,CACzBC,YAAarB,EAAMmB,MACnBG,SAAU,WACF1C,EAAMC,eACND,EAAMC,yBAGL,WACLK,EAAQiC,OAAQ,SAEb,SAACI,MACAA,EAAMC,SAASC,MAAQF,EAAMC,SAASC,KAAKlC,OAAQ,eACnBmC,OAAOC,QAAQJ,EAAMC,SAASC,KAAKlC,uBAAS,iBAAhEqC,OAAOC,OACXA,EAAS,KACTtC,EAAO4B,MAAMS,GAASC,EAAS,IAIvC7B,EAAMmB,MAAMlB,SAAW,GAEvBX,EAAI6B,4BAgBhB5B,aACAD,eACAU,mBAzDa,WACbZ,EAAMuB,OAAO,aAAc,gCC5GxB,uBAEQ,kBAUQ,iCAGA,kBAOA,oBACI,0CACA,cAEHmB,kCAAW,gBACPA,yCAAgB,6BAEpBA,iCAAM,mBAGNA,kCAAW,oBACPA,yCAAgB,2BAEpBA,iCAAM,uBAIP,2IAvC3BC,2BAAAC,oBACIF,iCACIA,2BAAAG,oBAAsBC,4CACtBC,iBACIC,iBAAiB,QAChBzC,OAAQ0C,6BACWA,8BACHA,SAChB/C,IAAK+C,MACLC,SAAQD,aAEEE,qBACP,kBAAAT,2BAAAU,GACIV,0BAAIW,sCAAOJ,yDAAUH,yCAEzBJ,2BAAAY,GACIZ,uDACU,+BAEwBO,aAD9BM,KAAK,4BAELT,qCAERJ,2BAAAc,GACId,2BAAAe,oBAA8CX,+BAC9CJ,2BAAAgB,GACIhB,gCAAS,SAAUW,sCAAOJ,gDAM1BP,gCAAS,SAAUW,sCAAOJ,gDAQlCP,2BAAAiB,GACIjB,0BAAIW,sCAAOJ,+DAAaH,iIAvC3BG,qBA6CCA,uBAAdF,uBAAkCvC,MAAOyC,QAAMzC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=e.defineComponent({name:"catalog",setup:function(){var t=e.ref(null),n=[],o=function(){document.querySelectorAll("#subcategory > div").forEach((function(e){e.remove()}))},a=function(){window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),document.documentElement.classList.remove("is-catalog-loading"),c()},r=function(r,c){var i=function(e){var t=e.hash?e.hash.substring(1):"",n=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return e.origin+n+(e.search?e.search+"&filter":"?filter")}(r),u=function(e){return e.replace(/[^a-z0-9]/g,"")}(i);-1===n.indexOf(u)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(i).then((function(i){var l=document.createElement("html");l.innerHTML=i.data.page,window.app.component(u,{template:l.querySelector("#subcategory").innerHTML}),o(),n.push(u),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a))},c=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),r(e)}))}))},i=function(){var e=document.createElement("a");e.href=window.location.href,r(e,!0)};return window.addEventListener("DOMContentLoaded",(function(){c(),window.addEventListener("popstate",(function(){i()})),window.location.hash&&i()})),{page:t}}});t.render=function(t,n,o,a,r,c){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
1
+ "use strict";var e=require("vue"),t=e.defineComponent({name:"catalog",setup:function(){var t=e.ref(null),n=[],o=function(){document.querySelectorAll("#subcategory > div").forEach((function(e){e.remove()}))},a=function(){window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),document.documentElement.classList.remove("is-catalog-loading"),i()},r=function(r,i){var c=function(e){var t=e.hash?e.hash.substring(1):"",n=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return $env.shop.isTrailingSlash&&(n=n.replace(/\/$/,"")+"/"),e.origin+n+(e.search?e.search+"&filter":"?filter")}(r),l=function(e){return e.replace(/[^a-z0-9]/g,"")}(c);-1===n.indexOf(l)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(c).then((function(c){var u=document.createElement("html");u.innerHTML=c.data.page,window.app.component(l,{template:u.querySelector("#subcategory").innerHTML}),o(),n.push(l),t.value=l,i||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=l,i||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a))},i=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),r(e)}))}))},c=function(){var e=document.createElement("a");e.href=window.location.href,r(e,!0)};return window.addEventListener("DOMContentLoaded",(function(){i(),window.addEventListener("popstate",(function(){c()})),window.location.hash&&c()})),{page:t}}});t.render=function(t,n,o,a,r,i){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
2
2
  //# sourceMappingURL=Catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Catalog.js","sources":["../../../src/components/shop/Catalog.vue","../../../src/components/shop/Catalog.vue?vue&type=template&id=dc5ff766&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","origin","search","parseFilterHref","componentName","replace","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","error","console","addEventListener","e","preventDefault","refresh","location","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,qBACUC,EAAOC,MAAI,MACXC,EAAQ,GAMRC,EAAiB,WACnBC,SAASC,iBAAiB,sBAAsBC,SAAQ,SAACC,GACrDA,EAAQC,aAIVC,EAAQ,WACVC,OAAOC,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAGVJ,OAAOK,YACPL,OAAOK,WAAWC,SAGtBZ,SAASa,gBAAgBC,UAAUV,OAAO,sBAE1CW,KAUEC,EAAM,SAACC,EAAGC,OACNC,EARc,SAACF,OACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GACtCC,EAAWF,GAAqC,IAA7BH,EAAEK,SAASC,QAAQ,KAAcN,EAAEK,SAAW,IAAMF,EAAOH,EAAEK,SAAW,IAAMF,EAAQH,EAAEK,gBAE1GL,EAAEO,OAASF,GAAYL,EAAEQ,OAASR,EAAEQ,OAAS,UAAY,WAInDC,CAAgBT,GAEvBU,EApCU,SAACR,UACVA,EAAKS,QAAQ,aAAc,IAmCZC,CAAYV,IAEI,IAAlCrB,EAAMyB,QAAQI,IACd3B,SAASa,gBAAgBC,UAAUgB,IAAI,sBAEvCC,MACKf,IAAIG,GACJa,MAAK,SAACC,OACCC,EAAOlC,SAASmC,cAAc,QAElCD,EAAKE,UAAYH,EAASI,KAAKzC,KAE/BU,OAAOgC,IAAIC,UAAUZ,EAAe,CAChCa,SAAUN,EAAKO,cAAc,gBAAgBL,YAGjDrC,IAEAD,EAAM4C,KAAKf,GAEX/B,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,aAEN,SAAC4C,GACJC,QAAQD,MAAMA,eAET,WACLjD,SAASa,gBAAgBC,UAAUV,OAAO,2BAGlDL,IAEAH,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,KAIXU,EAAO,WACTf,SAASC,iBAAiB,mBAAmBC,SAAQ,SAACe,GAClDA,EAAEkC,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFrC,EAAIC,UAKVqC,EAAU,eACNrC,EAAIjB,SAASmC,cAAc,KACjClB,EAAEE,KAAOb,OAAOiD,SAASpC,KAEzBH,EAAIC,GAAG,WAGXX,OAAO6C,iBAAiB,oBAAoB,WACxCpC,IAEAT,OAAO6C,iBAAiB,YAAY,WAChCG,OAGAhD,OAAOiD,SAASnC,MAChBkC,OAID,CACH1D,KAAAA,0DC5HR4D,wCAAgBC"}
1
+ {"version":3,"file":"Catalog.js","sources":["../../../src/components/shop/Catalog.vue","../../../src/components/shop/Catalog.vue?vue&type=template&id=6334ff0d&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n let pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname.replace(/\\/$/, '') + '/';\n }\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n let pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname.replace(/\\/$/, '') + '/';\n }\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","$env","shop","isTrailingSlash","replace","origin","search","parseFilterHref","componentName","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","error","console","addEventListener","e","preventDefault","refresh","location","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,qBACUC,EAAOC,MAAI,MACXC,EAAQ,GAMRC,EAAiB,WACnBC,SAASC,iBAAiB,sBAAsBC,SAAQ,SAACC,GACrDA,EAAQC,aAIVC,EAAQ,WACVC,OAAOC,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAGVJ,OAAOK,YACPL,OAAOK,WAAWC,SAGtBZ,SAASa,gBAAgBC,UAAUV,OAAO,sBAE1CW,KAcEC,EAAM,SAACC,EAAGC,OACNC,EAZc,SAACF,OACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GACxCC,EAAWF,GAAqC,IAA7BH,EAAEK,SAASC,QAAQ,KAAcN,EAAEK,SAAW,IAAMF,EAAOH,EAAEK,SAAW,IAAMF,EAAQH,EAAEK,gBAE3GE,KAAKC,KAAKC,kBACVJ,EAAWA,EAASK,QAAQ,MAAO,IAAM,KAGtCV,EAAEW,OAASN,GAAYL,EAAEY,OAASZ,EAAEY,OAAS,UAAY,WAInDC,CAAgBb,GAEvBc,EAxCU,SAACZ,UACVA,EAAKQ,QAAQ,aAAc,IAuCZK,CAAYb,IAEI,IAAlCrB,EAAMyB,QAAQQ,IACd/B,SAASa,gBAAgBC,UAAUmB,IAAI,sBAEvCC,MACKlB,IAAIG,GACJgB,MAAK,SAACC,OACCC,EAAOrC,SAASsC,cAAc,QAElCD,EAAKE,UAAYH,EAASI,KAAK5C,KAE/BU,OAAOmC,IAAIC,UAAUX,EAAe,CAChCY,SAAUN,EAAKO,cAAc,gBAAgBL,YAGjDxC,IAEAD,EAAM+C,KAAKd,GAEXnC,EAAKkD,MAAQf,EAERb,GACD6B,QAAQC,UAAU,CAAEC,QAAShC,EAAEE,MAAQnB,SAASkD,MAAOjC,EAAEE,MAG7DgC,WAAS9C,aAEN,SAAC+C,GACJC,QAAQD,MAAMA,eAET,WACLpD,SAASa,gBAAgBC,UAAUV,OAAO,2BAGlDL,IAEAH,EAAKkD,MAAQf,EAERb,GACD6B,QAAQC,UAAU,CAAEC,QAAShC,EAAEE,MAAQnB,SAASkD,MAAOjC,EAAEE,MAG7DgC,WAAS9C,KAIXU,EAAO,WACTf,SAASC,iBAAiB,mBAAmBC,SAAQ,SAACe,GAClDA,EAAEqC,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFxC,EAAIC,UAKVwC,EAAU,eACNxC,EAAIjB,SAASsC,cAAc,KACjCrB,EAAEE,KAAOb,OAAOoD,SAASvC,KAEzBH,EAAIC,GAAG,WAGXX,OAAOgD,iBAAiB,oBAAoB,WACxCvC,IAEAT,OAAOgD,iBAAiB,YAAY,WAChCG,OAGAnD,OAAOoD,SAAStC,MAChBqC,OAID,CACH7D,KAAAA,0DChIR+D,wCAAgBC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),i=require("swiper/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(i);t.default.use([i.Navigation,i.Mousewheel]);var o=e.defineComponent({name:"cross",setup:function(){window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("cross-sale"),i=e.querySelectorAll(".swiper-container"),n=e.querySelectorAll("li"),o=[];n.forEach((function(e,r){e.addEventListener("click",(function(){if(n.forEach((function(e){e.classList.remove("is-active")})),i.forEach((function(e){e.classList.add("is-hidden")})),i[r].classList.remove("is-hidden"),e.classList.add("is-active"),!o[r]){var s=window.crossSaleSwiperOptions?window.crossSaleSwiperOptions:{slidesPerView:5,spaceBetween:24,freeMode:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}};o[r]=new t.default(i[r],s)}o[r].slideTo(0)}))})),n[0].click()}))}});o.render=function(e,i,n,t,o,r){return null},module.exports=o;
1
+ "use strict";var e=require("vue"),i=require("swiper");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(i),o=e.defineComponent({name:"cross",setup:function(){window.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("cross-sale"),n=e.querySelectorAll(".swiper"),o=e.querySelectorAll("li"),s=[];o.forEach((function(e,r){e.addEventListener("click",(function(){if(o.forEach((function(e){e.classList.remove("is-active")})),n.forEach((function(e){e.classList.add("is-hidden")})),n[r].classList.remove("is-hidden"),e.classList.add("is-active"),!s[r]){var c=window.crossSaleSwiperOptions?window.crossSaleSwiperOptions:{slidesPerView:5,spaceBetween:24,freeMode:{enabled:!0},mousewheel:{forceToAxis:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}};c.modules=[i.Navigation,i.Mousewheel,i.FreeMode],s[r]=new t.default(n[r],c)}s[r].slideTo(0)}))})),o[0].click()}))}});o.render=function(e,i,n,t,o,s){return null},module.exports=o;
2
2
  //# sourceMappingURL=Cross.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cross.js","sources":["../../../src/components/shop/Cross.vue"],"sourcesContent":["<template></template>\n<script>\nimport { defineComponent } from \"vue\";\nimport SwiperCore, { Navigation, Mousewheel } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Mousewheel]);\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"cross\",\n setup() {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"cross-sale\");\n const sliders = container.querySelectorAll(\".swiper-container\");\n const tabs = container.querySelectorAll(\"li\");\n let inited = [];\n\n tabs.forEach((li, index) => {\n li.addEventListener(\"click\", () => {\n tabs.forEach((li) => {\n li.classList.remove(\"is-active\");\n });\n\n sliders.forEach((slider) => {\n slider.classList.add(\"is-hidden\");\n });\n\n sliders[index].classList.remove(\"is-hidden\");\n li.classList.add(\"is-active\");\n\n if (!inited[index]) {\n const options = window.crossSaleSwiperOptions\n ? window.crossSaleSwiperOptions\n : {\n slidesPerView: 5,\n spaceBetween: 24,\n freeMode: true,\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n };\n\n inited[index] = new SwiperCore(sliders[index], options);\n }\n\n inited[index].slideTo(0);\n });\n });\n\n tabs[0].click();\n });\n },\n});\n</script>"],"names":["SwiperCore","use","Navigation","Mousewheel","defineComponent","name","setup","window","addEventListener","container","document","getElementById","sliders","querySelectorAll","tabs","inited","forEach","li","index","classList","remove","slider","add","options","crossSaleSwiperOptions","slidesPerView","spaceBetween","freeMode","mousewheel","forceToAxis","navigation","nextEl","prevEl","slideTo","click"],"mappings":"8IAKAA,UAAWC,IAAI,CAACC,aAAYC,eAE5B,MAA6BC,kBAAgB,CACzCC,KAAM,QACNC,iBACIC,OAAOC,iBAAiB,oBAAoB,eAClCC,EAAYC,SAASC,eAAe,cACpCC,EAAUH,EAAUI,iBAAiB,qBACrCC,EAAOL,EAAUI,iBAAiB,MACpCE,EAAS,GAEbD,EAAKE,SAAQ,SAACC,EAAIC,GACdD,EAAGT,iBAAiB,SAAS,cACzBM,EAAKE,SAAQ,SAACC,GACVA,EAAGE,UAAUC,OAAO,gBAGxBR,EAAQI,SAAQ,SAACK,GACbA,EAAOF,UAAUG,IAAI,gBAGzBV,EAAQM,GAAOC,UAAUC,OAAO,aAChCH,EAAGE,UAAUG,IAAI,cAEZP,EAAOG,GAAQ,KACVK,EAAUhB,OAAOiB,uBACjBjB,OAAOiB,uBACP,CACIC,cAAe,EACfC,aAAc,GACdC,UAAU,EACVC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQ,sBACRC,OAAQ,wBAItBjB,EAAOG,GAAS,IAAIlB,UAAWY,EAAQM,GAAQK,GAGnDR,EAAOG,GAAOe,QAAQ,SAI9BnB,EAAK,GAAGoB"}
1
+ {"version":3,"file":"Cross.js","sources":["../../../src/components/shop/Cross.vue"],"sourcesContent":["<template></template>\n<script>\nimport { defineComponent } from \"vue\";\nimport Swiper, { Navigation, Mousewheel, FreeMode } from \"swiper\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"cross\",\n setup() {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"cross-sale\");\n const sliders = container.querySelectorAll(\".swiper\");\n const tabs = container.querySelectorAll(\"li\");\n let inited = [];\n\n tabs.forEach((li, index) => {\n li.addEventListener(\"click\", () => {\n tabs.forEach((li) => {\n li.classList.remove(\"is-active\");\n });\n\n sliders.forEach((slider) => {\n slider.classList.add(\"is-hidden\");\n });\n\n sliders[index].classList.remove(\"is-hidden\");\n li.classList.add(\"is-active\");\n\n if (!inited[index]) {\n const options = window.crossSaleSwiperOptions\n ? window.crossSaleSwiperOptions\n : {\n slidesPerView: 5,\n spaceBetween: 24,\n freeMode: {\n enabled: true\n },\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: \".swiper-button-next\",\n prevEl: \".swiper-button-prev\",\n },\n };\n\n options.modules = [Navigation, Mousewheel, FreeMode];\n\n inited[index] = new Swiper(sliders[index], options);\n }\n\n inited[index].slideTo(0);\n });\n });\n\n tabs[0].click();\n });\n },\n});\n</script>"],"names":["defineComponent","name","setup","window","addEventListener","container","document","getElementById","sliders","querySelectorAll","tabs","inited","forEach","li","index","classList","remove","slider","add","options","crossSaleSwiperOptions","slidesPerView","spaceBetween","freeMode","enabled","mousewheel","forceToAxis","navigation","nextEl","prevEl","modules","Navigation","Mousewheel","FreeMode","Swiper","slideTo","click"],"mappings":"2IAK6BA,kBAAgB,CACzCC,KAAM,QACNC,iBACIC,OAAOC,iBAAiB,oBAAoB,eAClCC,EAAYC,SAASC,eAAe,cACpCC,EAAUH,EAAUI,iBAAiB,WACrCC,EAAOL,EAAUI,iBAAiB,MACpCE,EAAS,GAEbD,EAAKE,SAAQ,SAACC,EAAIC,GACdD,EAAGT,iBAAiB,SAAS,cACzBM,EAAKE,SAAQ,SAACC,GACVA,EAAGE,UAAUC,OAAO,gBAGxBR,EAAQI,SAAQ,SAACK,GACbA,EAAOF,UAAUG,IAAI,gBAGzBV,EAAQM,GAAOC,UAAUC,OAAO,aAChCH,EAAGE,UAAUG,IAAI,cAEZP,EAAOG,GAAQ,KACVK,EAAUhB,OAAOiB,uBACjBjB,OAAOiB,uBACP,CACEC,cAAe,EACfC,aAAc,GACdC,SAAU,CACNC,SAAS,GAEbC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQ,sBACRC,OAAQ,wBAIpBV,EAAQW,QAAU,CAACC,aAAYC,aAAYC,YAE3CtB,EAAOG,GAAS,IAAIoB,UAAO1B,EAAQM,GAAQK,GAG/CR,EAAOG,GAAOqB,QAAQ,SAI9BzB,EAAK,GAAG0B"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("swiper/core");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);i.default.use([t.Navigation,t.Mousewheel,t.Thumbs]);var o=e.defineComponent({name:"gallery",props:{thumbsDirection:{type:String,default:"horizontal"},fullscreenThumbsDirection:{type:String,default:"horizontal"},prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"},fullscreen:{type:Boolean,default:!1},isResizeThumbs:{type:Boolean,default:!1},thumbsSpaceBetween:{type:Number,default:10}},setup:function(t){var n,o,r,u,l,s=e.ref(!1),a=function(){document.body.classList.remove("product-gallery-modal-open"),s.value=!1,d("close"),t.isResizeThumbs&&p()},c=function(){document.body.classList.add("product-gallery-modal-open"),s.value=!0,d("open")},d=function(e){o&&(t.thumbsDirection!=t.fullscreenThumbsDirection?u.changeDirection("open"==e?t.fullscreenThumbsDirection:t.thumbsDirection):u.update()),l.update()};window.addEventListener("keyup",(function(e){s.value&&"Escape"===e.key&&a()}));var p=function(){o.style.height=parseInt(r.offsetHeight)+"px",u.update()},m=function(){clearTimeout(n),n=setTimeout((function(){p()}),500)};return document.addEventListener("DOMContentLoaded",(function(){if(o=document.getElementById("product-gallery-thumbs"),r=document.getElementById("product-gallery"),o&&(u=new i.default(o,{spaceBetween:t.thumbsSpaceBetween,slidesPerView:"auto",mousewheel:{forceToAxis:!0},freeMode:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0,direction:t.thumbsDirection,navigation:{nextEl:t.thumbNext,prevEl:t.thumbPrev}}),t.isResizeThumbs&&(window.addEventListener("resize",m),p()),o.classList.remove("not-inited")),t.fullscreen&&r.addEventListener("click",c),r){var e={spaceBetween:10,mousewheel:{forceToAxis:!0},centeredSlides:!0,navigation:{nextEl:t.next,prevEl:t.prev}};u&&(e.thumbs={swiper:u}),l=new i.default(r,e)}d("close")}),!1),{modal:s,close:a}}});o.render=function(t,n,i,o,r,u){return t.fullscreen?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["delete is-large",{"is-hidden":!t.modal}]),onClick:n[0]||(n[0]=function(){return t.close&&t.close.apply(t,arguments)})},null,2)):e.createCommentVNode("v-if",!0)},module.exports=o;
1
+ "use strict";var e=require("vue"),t=require("swiper");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t),i=e.defineComponent({name:"gallery",props:{thumbsDirection:{type:String,default:"horizontal"},fullscreenThumbsDirection:{type:String,default:"horizontal"},prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"},fullscreen:{type:Boolean,default:!1},isResizeThumbs:{type:Boolean,default:!1},thumbsSpaceBetween:{type:Number,default:10}},setup:function(n){var i,u,r,l,s,a=e.ref(!1),d=function(){document.body.classList.remove("product-gallery-modal-open"),a.value=!1,p("close"),n.isResizeThumbs&&m()},c=function(){document.body.classList.add("product-gallery-modal-open"),a.value=!0,p("open")},p=function(e){u&&(n.thumbsDirection!=n.fullscreenThumbsDirection?l.changeDirection("open"==e?n.fullscreenThumbsDirection:n.thumbsDirection):l.update()),s.update()};window.addEventListener("keyup",(function(e){a.value&&"Escape"===e.key&&d()}));var m=function(){u.style.height=parseInt(r.offsetHeight)+"px",l.update()},f=function(){clearTimeout(i),i=setTimeout((function(){m()}),500)};return document.addEventListener("DOMContentLoaded",(function(){if(u=document.getElementById("product-gallery-thumbs"),r=document.getElementById("product-gallery"),u&&(l=new o.default(u,{spaceBetween:n.thumbsSpaceBetween,slidesPerView:"auto",mousewheel:{forceToAxis:!0},freeMode:{enabled:!0},watchSlidesVisibility:!0,watchSlidesProgress:!0,direction:n.thumbsDirection,navigation:{nextEl:n.thumbNext,prevEl:n.thumbPrev},modules:[t.Navigation,t.Mousewheel,t.FreeMode,t.Thumbs]}),n.isResizeThumbs&&(window.addEventListener("resize",f),m()),u.classList.remove("not-inited")),n.fullscreen&&r.addEventListener("click",c),r){var e={spaceBetween:10,mousewheel:{forceToAxis:!0},centeredSlides:!0,navigation:{nextEl:n.next,prevEl:n.prev}};l&&(e.thumbs={swiper:l}),e.modules=[t.Navigation,t.Mousewheel,t.FreeMode,t.Thumbs],s=new o.default(r,e)}p("close")}),!1),{modal:a,close:d}}});i.render=function(t,n,o,i,u,r){return t.fullscreen?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["delete is-large",{"is-hidden":!t.modal}]),onClick:n[0]||(n[0]=function(){return t.close&&t.close.apply(t,arguments)})},null,2)):e.createCommentVNode("v-if",!0)},module.exports=i;
2
2
  //# sourceMappingURL=Gallery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Gallery.js","sources":["../../../src/components/shop/Gallery.vue","../../../src/components/shop/Gallery.vue?vue&type=template&id=09dbf38c&lang.js"],"sourcesContent":["<template>\n <button\n class=\"delete is-large\"\n @click=\"close\"\n v-if=\"fullscreen\"\n v-bind:class=\"{ 'is-hidden': !modal }\"\n ></button>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport SwiperCore, { Navigation, Mousewheel, Thumbs } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Mousewheel, Thumbs]);\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"gallery\",\n props: {\n thumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n fullscreenThumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n isResizeThumbs: {\n type: Boolean,\n default: false,\n },\n thumbsSpaceBetween: {\n type: Number,\n default: 10,\n },\n },\n setup(props) {\n const modal = ref(false);\n let resizeTimeout;\n let thumbs;\n let slider;\n let thumbsSwiper;\n let sliderSwiper;\n\n const close = () => {\n document.body.classList.remove(\"product-gallery-modal-open\");\n modal.value = false;\n\n update(\"close\");\n\n if (props.isResizeThumbs) {\n resizeThumbsSwiper();\n }\n };\n\n const open = () => {\n document.body.classList.add(\"product-gallery-modal-open\");\n modal.value = true;\n\n update(\"open\");\n };\n\n const update = (action) => {\n if (thumbs) {\n if (props.thumbsDirection != props.fullscreenThumbsDirection) {\n thumbsSwiper.changeDirection(\n action == \"open\"\n ? props.fullscreenThumbsDirection\n : props.thumbsDirection\n );\n } else {\n thumbsSwiper.update();\n }\n }\n\n sliderSwiper.update();\n };\n\n window.addEventListener(\"keyup\", (e) => {\n if (modal.value && e.key === \"Escape\") {\n close();\n }\n });\n\n const resizeThumbsSwiper = () => {\n thumbs.style.height = parseInt(slider.offsetHeight) + \"px\";\n thumbsSwiper.update();\n };\n\n const resizeBounced = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = setTimeout(() => {\n resizeThumbsSwiper();\n }, 500);\n };\n\n const init = () => {\n thumbs = document.getElementById(\"product-gallery-thumbs\");\n slider = document.getElementById(\"product-gallery\");\n\n if (thumbs) {\n thumbsSwiper = new SwiperCore(thumbs, {\n spaceBetween: props.thumbsSpaceBetween,\n slidesPerView: \"auto\",\n mousewheel: {\n forceToAxis: true,\n },\n freeMode: true,\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n direction: props.thumbsDirection,\n navigation: {\n nextEl: props.thumbNext,\n prevEl: props.thumbPrev,\n },\n });\n\n if (props.isResizeThumbs) {\n window.addEventListener(\"resize\", resizeBounced);\n resizeThumbsSwiper();\n }\n\n thumbs.classList.remove(\"not-inited\");\n }\n\n if (props.fullscreen) {\n slider.addEventListener(\"click\", open);\n }\n\n if (slider) {\n let options = {\n spaceBetween: 10,\n mousewheel: {\n forceToAxis: true,\n },\n centeredSlides: true,\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n };\n\n if (thumbsSwiper) {\n options.thumbs = {\n swiper: thumbsSwiper,\n };\n }\n\n sliderSwiper = new SwiperCore(slider, options);\n }\n\n update(\"close\");\n };\n\n document.addEventListener(\"DOMContentLoaded\", init, false);\n\n return {\n modal,\n close,\n };\n },\n});\n</script>","<template>\n <button\n class=\"delete is-large\"\n @click=\"close\"\n v-if=\"fullscreen\"\n v-bind:class=\"{ 'is-hidden': !modal }\"\n ></button>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport SwiperCore, { Navigation, Mousewheel, Thumbs } from \"swiper/core\";\n\nSwiperCore.use([Navigation, Mousewheel, Thumbs]);\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"gallery\",\n props: {\n thumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n fullscreenThumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n isResizeThumbs: {\n type: Boolean,\n default: false,\n },\n thumbsSpaceBetween: {\n type: Number,\n default: 10,\n },\n },\n setup(props) {\n const modal = ref(false);\n let resizeTimeout;\n let thumbs;\n let slider;\n let thumbsSwiper;\n let sliderSwiper;\n\n const close = () => {\n document.body.classList.remove(\"product-gallery-modal-open\");\n modal.value = false;\n\n update(\"close\");\n\n if (props.isResizeThumbs) {\n resizeThumbsSwiper();\n }\n };\n\n const open = () => {\n document.body.classList.add(\"product-gallery-modal-open\");\n modal.value = true;\n\n update(\"open\");\n };\n\n const update = (action) => {\n if (thumbs) {\n if (props.thumbsDirection != props.fullscreenThumbsDirection) {\n thumbsSwiper.changeDirection(\n action == \"open\"\n ? props.fullscreenThumbsDirection\n : props.thumbsDirection\n );\n } else {\n thumbsSwiper.update();\n }\n }\n\n sliderSwiper.update();\n };\n\n window.addEventListener(\"keyup\", (e) => {\n if (modal.value && e.key === \"Escape\") {\n close();\n }\n });\n\n const resizeThumbsSwiper = () => {\n thumbs.style.height = parseInt(slider.offsetHeight) + \"px\";\n thumbsSwiper.update();\n };\n\n const resizeBounced = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = setTimeout(() => {\n resizeThumbsSwiper();\n }, 500);\n };\n\n const init = () => {\n thumbs = document.getElementById(\"product-gallery-thumbs\");\n slider = document.getElementById(\"product-gallery\");\n\n if (thumbs) {\n thumbsSwiper = new SwiperCore(thumbs, {\n spaceBetween: props.thumbsSpaceBetween,\n slidesPerView: \"auto\",\n mousewheel: {\n forceToAxis: true,\n },\n freeMode: true,\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n direction: props.thumbsDirection,\n navigation: {\n nextEl: props.thumbNext,\n prevEl: props.thumbPrev,\n },\n });\n\n if (props.isResizeThumbs) {\n window.addEventListener(\"resize\", resizeBounced);\n resizeThumbsSwiper();\n }\n\n thumbs.classList.remove(\"not-inited\");\n }\n\n if (props.fullscreen) {\n slider.addEventListener(\"click\", open);\n }\n\n if (slider) {\n let options = {\n spaceBetween: 10,\n mousewheel: {\n forceToAxis: true,\n },\n centeredSlides: true,\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n };\n\n if (thumbsSwiper) {\n options.thumbs = {\n swiper: thumbsSwiper,\n };\n }\n\n sliderSwiper = new SwiperCore(slider, options);\n }\n\n update(\"close\");\n };\n\n document.addEventListener(\"DOMContentLoaded\", init, false);\n\n return {\n modal,\n close,\n };\n },\n});\n</script>"],"names":["SwiperCore","use","Navigation","Mousewheel","Thumbs","defineComponent","name","props","thumbsDirection","type","String","fullscreenThumbsDirection","prev","next","thumbPrev","thumbNext","fullscreen","Boolean","isResizeThumbs","thumbsSpaceBetween","Number","setup","resizeTimeout","thumbs","slider","thumbsSwiper","sliderSwiper","modal","ref","close","document","body","classList","remove","value","update","resizeThumbsSwiper","open","add","action","changeDirection","window","addEventListener","e","key","style","height","parseInt","offsetHeight","resizeBounced","clearTimeout","setTimeout","getElementById","spaceBetween","slidesPerView","mousewheel","forceToAxis","freeMode","watchSlidesVisibility","watchSlidesProgress","direction","navigation","nextEl","prevEl","options","centeredSlides","swiper","_ctx","_createElementBlock","onClick"],"mappings":"8IAYAA,UAAWC,IAAI,CAACC,aAAYC,aAAYC,WAExC,MAA6BC,kBAAgB,CACzCC,KAAM,UACNC,MAAO,CACHC,gBAAiB,CACbC,KAAMC,eACG,cAEbC,0BAA2B,CACvBF,KAAMC,eACG,cAEbE,KAAM,CACFH,KAAMC,eACG,uBAEbG,KAAM,CACFJ,KAAMC,eACG,uBAEbI,UAAW,CACPL,KAAMC,eACG,uBAEbK,UAAW,CACPN,KAAMC,eACG,uBAEbM,WAAY,CACRP,KAAMQ,iBACG,GAEbC,eAAgB,CACZT,KAAMQ,iBACG,GAEbE,mBAAoB,CAChBV,KAAMW,eACG,KAGjBC,eAAMd,OAEEe,EACAC,EACAC,EACAC,EACAC,EALEC,EAAQC,OAAI,GAOZC,EAAQ,WACVC,SAASC,KAAKC,UAAUC,OAAO,8BAC/BN,EAAMO,OAAQ,EAEdC,EAAO,SAEH5B,EAAMW,gBACNkB,KAIFC,EAAO,WACTP,SAASC,KAAKC,UAAUM,IAAI,8BAC5BX,EAAMO,OAAQ,EAEdC,EAAO,SAGLA,EAAS,SAACI,GACRhB,IACIhB,EAAMC,iBAAmBD,EAAMI,0BAC/Bc,EAAae,gBACC,QAAVD,EACMhC,EAAMI,0BACNJ,EAAMC,iBAGhBiB,EAAaU,UAIrBT,EAAaS,UAGjBM,OAAOC,iBAAiB,SAAS,SAACC,GAC1BhB,EAAMO,OAAmB,WAAVS,EAAEC,KACjBf,WAIFO,EAAqB,WACvBb,EAAOsB,MAAMC,OAASC,SAASvB,EAAOwB,cAAgB,KACtDvB,EAAaU,UAGXc,EAAgB,WAClBC,aAAa5B,GAEbA,EAAgB6B,YAAW,WACvBf,MACD,aA6DPN,SAASY,iBAAiB,oBA1Db,cACTnB,EAASO,SAASsB,eAAe,0BACjC5B,EAASM,SAASsB,eAAe,mBAE7B7B,IACAE,EAAe,IAAIzB,UAAWuB,EAAQ,CAClC8B,aAAc9C,EAAMY,mBACpBmC,cAAe,OACfC,WAAY,CACRC,aAAa,GAEjBC,UAAU,EACVC,uBAAuB,EACvBC,qBAAqB,EACrBC,UAAWrD,EAAMC,gBACjBqD,WAAY,CACRC,OAAQvD,EAAMQ,UACdgD,OAAQxD,EAAMO,aAIlBP,EAAMW,iBACNuB,OAAOC,iBAAiB,SAAUO,GAClCb,KAGJb,EAAOS,UAAUC,OAAO,eAGxB1B,EAAMS,YACNQ,EAAOkB,iBAAiB,QAASL,GAGjCb,EAAQ,KACJwC,EAAU,CACVX,aAAc,GACdE,WAAY,CACRC,aAAa,GAEjBS,gBAAgB,EAChBJ,WAAY,CACRC,OAAQvD,EAAMM,KACdkD,OAAQxD,EAAMK,OAIlBa,IACAuC,EAAQzC,OAAS,CACb2C,OAAQzC,IAIhBC,EAAe,IAAI1B,UAAWwB,EAAQwC,GAG1C7B,EAAO,YAGyC,GAE7C,CACHR,MAAAA,EACAE,MAAAA,4CC7KEsC,4BAHVC,6DACU,gCAGwBD,WAF7BE,sCAAOF"}
1
+ {"version":3,"file":"Gallery.js","sources":["../../../src/components/shop/Gallery.vue","../../../src/components/shop/Gallery.vue?vue&type=template&id=6658f808&lang.js"],"sourcesContent":["<template>\n <button\n class=\"delete is-large\"\n @click=\"close\"\n v-if=\"fullscreen\"\n v-bind:class=\"{ 'is-hidden': !modal }\"\n ></button>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport Swiper, { Navigation, Mousewheel, Thumbs, FreeMode } from \"swiper\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"gallery\",\n props: {\n thumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n fullscreenThumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n isResizeThumbs: {\n type: Boolean,\n default: false,\n },\n thumbsSpaceBetween: {\n type: Number,\n default: 10,\n },\n },\n setup(props) {\n const modal = ref(false);\n let resizeTimeout;\n let thumbs;\n let slider;\n let thumbsSwiper;\n let sliderSwiper;\n\n const close = () => {\n document.body.classList.remove(\"product-gallery-modal-open\");\n modal.value = false;\n\n update(\"close\");\n\n if (props.isResizeThumbs) {\n resizeThumbsSwiper();\n }\n };\n\n const open = () => {\n document.body.classList.add(\"product-gallery-modal-open\");\n modal.value = true;\n\n update(\"open\");\n };\n\n const update = (action) => {\n if (thumbs) {\n if (props.thumbsDirection != props.fullscreenThumbsDirection) {\n thumbsSwiper.changeDirection(\n action == \"open\"\n ? props.fullscreenThumbsDirection\n : props.thumbsDirection\n );\n } else {\n thumbsSwiper.update();\n }\n }\n\n sliderSwiper.update();\n };\n\n window.addEventListener(\"keyup\", (e) => {\n if (modal.value && e.key === \"Escape\") {\n close();\n }\n });\n\n const resizeThumbsSwiper = () => {\n thumbs.style.height = parseInt(slider.offsetHeight) + \"px\";\n thumbsSwiper.update();\n };\n\n const resizeBounced = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = setTimeout(() => {\n resizeThumbsSwiper();\n }, 500);\n };\n\n const init = () => {\n thumbs = document.getElementById(\"product-gallery-thumbs\");\n slider = document.getElementById(\"product-gallery\");\n\n if (thumbs) {\n thumbsSwiper = new Swiper(thumbs, {\n spaceBetween: props.thumbsSpaceBetween,\n slidesPerView: \"auto\",\n mousewheel: {\n forceToAxis: true,\n },\n freeMode: {\n enabled: true\n },\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n direction: props.thumbsDirection,\n navigation: {\n nextEl: props.thumbNext,\n prevEl: props.thumbPrev,\n },\n modules: [Navigation, Mousewheel, FreeMode, Thumbs]\n });\n\n if (props.isResizeThumbs) {\n window.addEventListener(\"resize\", resizeBounced);\n resizeThumbsSwiper();\n }\n\n thumbs.classList.remove(\"not-inited\");\n }\n\n if (props.fullscreen) {\n slider.addEventListener(\"click\", open);\n }\n\n if (slider) {\n let options = {\n spaceBetween: 10,\n mousewheel: {\n forceToAxis: true,\n },\n centeredSlides: true,\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n };\n\n if (thumbsSwiper) {\n options.thumbs = {\n swiper: thumbsSwiper,\n };\n }\n\n options.modules = [Navigation, Mousewheel, FreeMode, Thumbs];\n\n sliderSwiper = new Swiper(slider, options);\n }\n\n update(\"close\");\n };\n\n document.addEventListener(\"DOMContentLoaded\", init, false);\n\n return {\n modal,\n close,\n };\n },\n});\n</script>","<template>\n <button\n class=\"delete is-large\"\n @click=\"close\"\n v-if=\"fullscreen\"\n v-bind:class=\"{ 'is-hidden': !modal }\"\n ></button>\n</template>\n<script>\nimport { ref, defineComponent } from \"vue\";\nimport Swiper, { Navigation, Mousewheel, Thumbs, FreeMode } from \"swiper\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"gallery\",\n props: {\n thumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n fullscreenThumbsDirection: {\n type: String,\n default: \"horizontal\",\n },\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n isResizeThumbs: {\n type: Boolean,\n default: false,\n },\n thumbsSpaceBetween: {\n type: Number,\n default: 10,\n },\n },\n setup(props) {\n const modal = ref(false);\n let resizeTimeout;\n let thumbs;\n let slider;\n let thumbsSwiper;\n let sliderSwiper;\n\n const close = () => {\n document.body.classList.remove(\"product-gallery-modal-open\");\n modal.value = false;\n\n update(\"close\");\n\n if (props.isResizeThumbs) {\n resizeThumbsSwiper();\n }\n };\n\n const open = () => {\n document.body.classList.add(\"product-gallery-modal-open\");\n modal.value = true;\n\n update(\"open\");\n };\n\n const update = (action) => {\n if (thumbs) {\n if (props.thumbsDirection != props.fullscreenThumbsDirection) {\n thumbsSwiper.changeDirection(\n action == \"open\"\n ? props.fullscreenThumbsDirection\n : props.thumbsDirection\n );\n } else {\n thumbsSwiper.update();\n }\n }\n\n sliderSwiper.update();\n };\n\n window.addEventListener(\"keyup\", (e) => {\n if (modal.value && e.key === \"Escape\") {\n close();\n }\n });\n\n const resizeThumbsSwiper = () => {\n thumbs.style.height = parseInt(slider.offsetHeight) + \"px\";\n thumbsSwiper.update();\n };\n\n const resizeBounced = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = setTimeout(() => {\n resizeThumbsSwiper();\n }, 500);\n };\n\n const init = () => {\n thumbs = document.getElementById(\"product-gallery-thumbs\");\n slider = document.getElementById(\"product-gallery\");\n\n if (thumbs) {\n thumbsSwiper = new Swiper(thumbs, {\n spaceBetween: props.thumbsSpaceBetween,\n slidesPerView: \"auto\",\n mousewheel: {\n forceToAxis: true,\n },\n freeMode: {\n enabled: true\n },\n watchSlidesVisibility: true,\n watchSlidesProgress: true,\n direction: props.thumbsDirection,\n navigation: {\n nextEl: props.thumbNext,\n prevEl: props.thumbPrev,\n },\n modules: [Navigation, Mousewheel, FreeMode, Thumbs]\n });\n\n if (props.isResizeThumbs) {\n window.addEventListener(\"resize\", resizeBounced);\n resizeThumbsSwiper();\n }\n\n thumbs.classList.remove(\"not-inited\");\n }\n\n if (props.fullscreen) {\n slider.addEventListener(\"click\", open);\n }\n\n if (slider) {\n let options = {\n spaceBetween: 10,\n mousewheel: {\n forceToAxis: true,\n },\n centeredSlides: true,\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n };\n\n if (thumbsSwiper) {\n options.thumbs = {\n swiper: thumbsSwiper,\n };\n }\n\n options.modules = [Navigation, Mousewheel, FreeMode, Thumbs];\n\n sliderSwiper = new Swiper(slider, options);\n }\n\n update(\"close\");\n };\n\n document.addEventListener(\"DOMContentLoaded\", init, false);\n\n return {\n modal,\n close,\n };\n },\n});\n</script>"],"names":["defineComponent","name","props","thumbsDirection","type","String","fullscreenThumbsDirection","prev","next","thumbPrev","thumbNext","fullscreen","Boolean","isResizeThumbs","thumbsSpaceBetween","Number","setup","resizeTimeout","thumbs","slider","thumbsSwiper","sliderSwiper","modal","ref","close","document","body","classList","remove","value","update","resizeThumbsSwiper","open","add","action","changeDirection","window","addEventListener","e","key","style","height","parseInt","offsetHeight","resizeBounced","clearTimeout","setTimeout","getElementById","Swiper","spaceBetween","slidesPerView","mousewheel","forceToAxis","freeMode","enabled","watchSlidesVisibility","watchSlidesProgress","direction","navigation","nextEl","prevEl","modules","Navigation","Mousewheel","FreeMode","Thumbs","options","centeredSlides","swiper","_ctx","_createElementBlock","onClick"],"mappings":"2IAY6BA,kBAAgB,CACzCC,KAAM,UACNC,MAAO,CACHC,gBAAiB,CACbC,KAAMC,eACG,cAEbC,0BAA2B,CACvBF,KAAMC,eACG,cAEbE,KAAM,CACFH,KAAMC,eACG,uBAEbG,KAAM,CACFJ,KAAMC,eACG,uBAEbI,UAAW,CACPL,KAAMC,eACG,uBAEbK,UAAW,CACPN,KAAMC,eACG,uBAEbM,WAAY,CACRP,KAAMQ,iBACG,GAEbC,eAAgB,CACZT,KAAMQ,iBACG,GAEbE,mBAAoB,CAChBV,KAAMW,eACG,KAGjBC,eAAMd,OAEEe,EACAC,EACAC,EACAC,EACAC,EALEC,EAAQC,OAAI,GAOZC,EAAQ,WACVC,SAASC,KAAKC,UAAUC,OAAO,8BAC/BN,EAAMO,OAAQ,EAEdC,EAAO,SAEH5B,EAAMW,gBACNkB,KAIFC,EAAO,WACTP,SAASC,KAAKC,UAAUM,IAAI,8BAC5BX,EAAMO,OAAQ,EAEdC,EAAO,SAGLA,EAAS,SAACI,GACRhB,IACIhB,EAAMC,iBAAmBD,EAAMI,0BAC/Bc,EAAae,gBACC,QAAVD,EACMhC,EAAMI,0BACNJ,EAAMC,iBAGhBiB,EAAaU,UAIrBT,EAAaS,UAGjBM,OAAOC,iBAAiB,SAAS,SAACC,GAC1BhB,EAAMO,OAAmB,WAAVS,EAAEC,KACjBf,WAIFO,EAAqB,WACvBb,EAAOsB,MAAMC,OAASC,SAASvB,EAAOwB,cAAgB,KACtDvB,EAAaU,UAGXc,EAAgB,WAClBC,aAAa5B,GAEbA,EAAgB6B,YAAW,WACvBf,MACD,aAkEPN,SAASY,iBAAiB,oBA/Db,cACTnB,EAASO,SAASsB,eAAe,0BACjC5B,EAASM,SAASsB,eAAe,mBAE7B7B,IACAE,EAAe,IAAI4B,UAAO9B,EAAQ,CAC9B+B,aAAc/C,EAAMY,mBACpBoC,cAAe,OACfC,WAAY,CACRC,aAAa,GAEjBC,SAAU,CACNC,SAAS,GAEbC,uBAAuB,EACvBC,qBAAqB,EACrBC,UAAWvD,EAAMC,gBACjBuD,WAAY,CACRC,OAAQzD,EAAMQ,UACdkD,OAAQ1D,EAAMO,WAElBoD,QAAS,CAACC,aAAYC,aAAYC,WAAUC,YAG5C/D,EAAMW,iBACNuB,OAAOC,iBAAiB,SAAUO,GAClCb,KAGJb,EAAOS,UAAUC,OAAO,eAGxB1B,EAAMS,YACNQ,EAAOkB,iBAAiB,QAASL,GAGjCb,EAAQ,KACJ+C,EAAU,CACVjB,aAAc,GACdE,WAAY,CACRC,aAAa,GAEjBe,gBAAgB,EAChBT,WAAY,CACRC,OAAQzD,EAAMM,KACdoD,OAAQ1D,EAAMK,OAIlBa,IACA8C,EAAQhD,OAAS,CACbkD,OAAQhD,IAIhB8C,EAAQL,QAAU,CAACC,aAAYC,aAAYC,WAAUC,UAErD5C,EAAe,IAAI2B,UAAO7B,EAAQ+C,GAGtCpC,EAAO,YAGyC,GAE7C,CACHR,MAAAA,EACAE,MAAAA,4CChLE6C,4BAHVC,6DACU,gCAGwBD,WAF7BE,sCAAOF"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),i=require("swiper/core");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(i);s.default.use([i.Navigation,i.Mousewheel]);var n=e.defineComponent({props:{id:Number},setup:function(i){var t=!1,n=e.ref(!1),r=e.ref(null),a=e.ref(null),o=function(e){e.forEach((function(e){e.isIntersecting&&(t||(t=!0,d()))}))},d=function(){$http.post($ziggy("api.piece",{slug:"promo-products"}),{id:i.id}).then((function(t){var o="piece-promo-products-"+i.id;window.app.component(o,{template:t.data?t.data:"<i></i>"}),a.value=o,n.value=!0,e.nextTick((function(){var e=r.value.querySelectorAll(".is-faded-tabs");e.length&&e.forEach((function(e){new s.default(e.querySelector(".swiper-container"),{slidesPerView:"auto",freeMode:!0})}));var i=r.value.querySelectorAll(".is-faded-tabs .swiper-slide"),t=r.value.querySelectorAll("[products-slider]");i.forEach((function(e,s){e.addEventListener("click",(function(){i.forEach((function(e){e.classList.remove("is-active")})),t.forEach((function(e){e.classList.add("is-hidden")})),t[s].classList.remove("is-hidden"),e.classList.add("is-active")}))})),t.length&&t.forEach((function(e){new s.default(e,window.viewedSwiperOptions)})),window.lazyImages&&window.lazyImages.update()}))}))};return window.addEventListener("DOMContentLoaded",(function(){new IntersectionObserver(o,{threshold:.1}).observe(r.value)})),{container:r,component:a,loaded:n}}}),r={ref:"container"},a={key:0,class:"product-promo-block container is-fluid is-skeleton"},o=e.createStaticVNode('<div class="gradient"></div><div class="title slider-title"> </div><div class="is-faded-tabs"><div class="is-flex"><div class="swiper-slide"> </div><div class="swiper-slide"> </div></div></div>',3),d={class:"swiper-container"},c={class:"swiper-wrapper products is-slider"},l=[e.createStaticVNode('<div class="border"><div class="wrapper"><picture class="is-lazy-loaded"><img class="lazy entered loaded" src="/images/blank.png"></picture><div class="availability"> </div><div class="title"> </div><div class="prices"><div class="price"></div></div></div></div>',1)];n.render=function(i,t,s,n,u,v){return e.openBlock(),e.createElementBlock("div",r,[i.loaded?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),{key:1})):(e.openBlock(),e.createElementBlock("section",a,[o,e.createElementVNode("div",d,[e.createElementVNode("div",c,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(function(i){return e.createElementVNode("div",{class:"product",key:i},l)})),64))])])]))],512)},module.exports=n;
1
+ "use strict";var e=require("vue"),i=require("swiper");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(i),d=e.defineComponent({props:{id:Number},setup:function(t){var d=!1,n=e.ref(!1),r=e.ref(null),a=e.ref(null),o=function(e){e.forEach((function(e){e.isIntersecting&&(d||(d=!0,c()))}))},c=function(){$http.post($ziggy("api.piece",{slug:"promo-products"}),{id:t.id}).then((function(d){var o="piece-promo-products-"+t.id;window.app.component(o,{template:d.data?d.data:"<i></i>"}),a.value=o,n.value=!0,e.nextTick((function(){var e=r.value.querySelectorAll(".is-faded-tabs");e.length&&e.forEach((function(e){new s.default(e.querySelector(".swiper"),{slidesPerView:"auto",freeMode:{enabled:!0},modules:[i.Navigation,i.Mousewheel,i.FreeMode]})}));var t=r.value.querySelectorAll(".is-faded-tabs .swiper-slide"),d=r.value.querySelectorAll("[products-slider]");t.forEach((function(e,i){e.addEventListener("click",(function(){t.forEach((function(e){e.classList.remove("is-active")})),d.forEach((function(e){e.classList.add("is-hidden")})),d[i].classList.remove("is-hidden"),e.classList.add("is-active")}))})),d.length&&d.forEach((function(e){new s.default(e,window.viewedSwiperOptions)})),window.lazyImages&&window.lazyImages.update()}))}))};return window.addEventListener("DOMContentLoaded",(function(){new IntersectionObserver(o,{threshold:.1}).observe(r.value)})),{container:r,component:a,loaded:n}}}),n={ref:"container"},r={key:0,class:"product-promo-block container is-fluid is-skeleton"},a=e.createStaticVNode('<div class="gradient"></div><div class="title slider-title"> </div><div class="is-faded-tabs"><div class="is-flex"><div class="swiper-slide"> </div><div class="swiper-slide"> </div></div></div>',3),o={class:"swiper"},c={class:"swiper-wrapper products is-slider"},l=[e.createStaticVNode('<div class="border"><div class="wrapper"><picture class="is-lazy-loaded"><img class="lazy entered loaded" src="/images/blank.png"></picture><div class="availability"> </div><div class="title"> </div><div class="prices"><div class="price"></div></div></div></div>',1)];d.render=function(i,t,s,d,u,v){return e.openBlock(),e.createElementBlock("div",n,[i.loaded?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),{key:1})):(e.openBlock(),e.createElementBlock("section",r,[a,e.createElementVNode("div",o,[e.createElementVNode("div",c,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,(function(i){return e.createElementVNode("div",{class:"product",key:i},l)})),64))])])]))],512)},module.exports=d;
2
2
  //# sourceMappingURL=PromoProducts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PromoProducts.js","sources":["../../../src/components/shop/PromoProducts.vue","../../../src/components/shop/PromoProducts.vue?vue&type=template&id=6be3a2bf&lang.js"],"sourcesContent":["<template>\n <div ref=\"container\">\n <section class=\"product-promo-block container is-fluid is-skeleton\" v-if=\"!loaded\">\n <div class=\"gradient\"></div>\n <div class=\"title slider-title\">&nbsp;</div>\n <div class=\"is-faded-tabs\">\n <div class=\"is-flex\">\n <div class=\"swiper-slide\">&nbsp;</div>\n <div class=\"swiper-slide\">&nbsp;</div>\n </div>\n </div>\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper products is-slider\">\n <div class=\"product\" v-for=\"index in 5\" :key=\"index\">\n <div class=\"border\">\n <div class=\"wrapper\">\n <picture class=\"is-lazy-loaded\">\n <img class=\"lazy entered loaded\" src=\"/images/blank.png\" />\n </picture>\n <div class=\"availability\">&nbsp;</div>\n <div class=\"title\">&nbsp;</div>\n <div class=\"prices\">\n <div class=\"price\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n <component :is=\"component\" v-else></component>\n </div>\n</template>\n<script>\nimport { ref, nextTick, defineComponent } from 'vue';\nimport SwiperCore, { Navigation, Mousewheel } from 'swiper/core';\n\nSwiperCore.use([Navigation, Mousewheel]);\n\nexport default defineComponent({\n props: {\n id: Number\n },\n setup(props) {\n let inited = false;\n\n const loaded = ref(false);\n const container = ref(null);\n const component = ref(null);\n\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n if (!inited) {\n inited = true;\n\n load();\n }\n }\n });\n };\n\n const load = () => {\n $http\n .post($ziggy('api.piece', { slug: 'promo-products' }), {\n id: props.id\n })\n .then((response) => {\n const componentName = 'piece-promo-products-' + props.id;\n\n window.app.component(componentName, {\n template: response.data ? response.data : '<i></i>'\n });\n\n component.value = componentName;\n loaded.value = true;\n\n nextTick(() => {\n const fadedTabs = container.value.querySelectorAll('.is-faded-tabs');\n\n if (fadedTabs.length) {\n fadedTabs.forEach((tab) => {\n new SwiperCore(tab.querySelector('.swiper-container'), {\n slidesPerView: 'auto',\n freeMode: true\n });\n });\n }\n\n const tabs = container.value.querySelectorAll('.is-faded-tabs .swiper-slide');\n const sliders = container.value.querySelectorAll('[products-slider]');\n\n tabs.forEach((tab, index) => {\n tab.addEventListener('click', () => {\n tabs.forEach((tab) => {\n tab.classList.remove('is-active');\n });\n\n sliders.forEach((slider) => {\n slider.classList.add('is-hidden');\n });\n\n sliders[index].classList.remove('is-hidden');\n tab.classList.add('is-active');\n });\n });\n\n if (sliders.length) {\n sliders.forEach((slider) => {\n new SwiperCore(slider, window.viewedSwiperOptions);\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n });\n });\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n new IntersectionObserver(callback, {\n threshold: 0.1\n }).observe(container.value);\n });\n\n return {\n container,\n component,\n loaded\n };\n }\n});\n</script>\n","<template>\n <div ref=\"container\">\n <section class=\"product-promo-block container is-fluid is-skeleton\" v-if=\"!loaded\">\n <div class=\"gradient\"></div>\n <div class=\"title slider-title\">&nbsp;</div>\n <div class=\"is-faded-tabs\">\n <div class=\"is-flex\">\n <div class=\"swiper-slide\">&nbsp;</div>\n <div class=\"swiper-slide\">&nbsp;</div>\n </div>\n </div>\n <div class=\"swiper-container\">\n <div class=\"swiper-wrapper products is-slider\">\n <div class=\"product\" v-for=\"index in 5\" :key=\"index\">\n <div class=\"border\">\n <div class=\"wrapper\">\n <picture class=\"is-lazy-loaded\">\n <img class=\"lazy entered loaded\" src=\"/images/blank.png\" />\n </picture>\n <div class=\"availability\">&nbsp;</div>\n <div class=\"title\">&nbsp;</div>\n <div class=\"prices\">\n <div class=\"price\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n <component :is=\"component\" v-else></component>\n </div>\n</template>\n<script>\nimport { ref, nextTick, defineComponent } from 'vue';\nimport SwiperCore, { Navigation, Mousewheel } from 'swiper/core';\n\nSwiperCore.use([Navigation, Mousewheel]);\n\nexport default defineComponent({\n props: {\n id: Number\n },\n setup(props) {\n let inited = false;\n\n const loaded = ref(false);\n const container = ref(null);\n const component = ref(null);\n\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n if (!inited) {\n inited = true;\n\n load();\n }\n }\n });\n };\n\n const load = () => {\n $http\n .post($ziggy('api.piece', { slug: 'promo-products' }), {\n id: props.id\n })\n .then((response) => {\n const componentName = 'piece-promo-products-' + props.id;\n\n window.app.component(componentName, {\n template: response.data ? response.data : '<i></i>'\n });\n\n component.value = componentName;\n loaded.value = true;\n\n nextTick(() => {\n const fadedTabs = container.value.querySelectorAll('.is-faded-tabs');\n\n if (fadedTabs.length) {\n fadedTabs.forEach((tab) => {\n new SwiperCore(tab.querySelector('.swiper-container'), {\n slidesPerView: 'auto',\n freeMode: true\n });\n });\n }\n\n const tabs = container.value.querySelectorAll('.is-faded-tabs .swiper-slide');\n const sliders = container.value.querySelectorAll('[products-slider]');\n\n tabs.forEach((tab, index) => {\n tab.addEventListener('click', () => {\n tabs.forEach((tab) => {\n tab.classList.remove('is-active');\n });\n\n sliders.forEach((slider) => {\n slider.classList.add('is-hidden');\n });\n\n sliders[index].classList.remove('is-hidden');\n tab.classList.add('is-active');\n });\n });\n\n if (sliders.length) {\n sliders.forEach((slider) => {\n new SwiperCore(slider, window.viewedSwiperOptions);\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n });\n });\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n new IntersectionObserver(callback, {\n threshold: 0.1\n }).observe(container.value);\n });\n\n return {\n container,\n component,\n loaded\n };\n }\n});\n</script>\n"],"names":["SwiperCore","use","Navigation","Mousewheel","defineComponent","props","id","Number","setup","inited","loaded","ref","container","component","callback","entries","forEach","entry","isIntersecting","load","$http","post","$ziggy","slug","then","response","componentName","window","app","template","data","value","nextTick","fadedTabs","querySelectorAll","length","tab","querySelector","slidesPerView","freeMode","tabs","sliders","index","addEventListener","classList","remove","slider","add","viewedSwiperOptions","lazyImages","update","IntersectionObserver","threshold","observe","_createElementBlock","_hoisted_1","_ctx","_createBlock","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_6","_hoisted_7","key"],"mappings":"8IAqCAA,UAAWC,IAAI,CAACC,aAAYC,eAE5B,MAAeC,kBAAgB,CAC3BC,MAAO,CACHC,GAAIC,QAERC,eAAMH,OACEI,GAAS,EAEPC,EAASC,OAAI,GACbC,EAAYD,MAAI,MAChBE,EAAYF,MAAI,MAEhBG,EAAW,SAACC,GACdA,EAAQC,SAAQ,SAACC,GACTA,EAAMC,iBACDT,IACDA,GAAS,EAETU,UAMVA,EAAO,WACTC,MACKC,KAAKC,OAAO,YAAa,CAAEC,KAAM,mBAAqB,CACnDjB,GAAID,EAAMC,KAEbkB,MAAK,SAACC,OACGC,EAAgB,wBAA0BrB,EAAMC,GAEtDqB,OAAOC,IAAIf,UAAUa,EAAe,CAChCG,SAAUJ,EAASK,KAAOL,EAASK,KAAO,YAG9CjB,EAAUkB,MAAQL,EAClBhB,EAAOqB,OAAQ,EAEfC,YAAS,eACCC,EAAYrB,EAAUmB,MAAMG,iBAAiB,kBAE/CD,EAAUE,QACVF,EAAUjB,SAAQ,SAACoB,OACXpC,UAAWoC,EAAIC,cAAc,qBAAsB,CACnDC,cAAe,OACfC,UAAU,WAKhBC,EAAO5B,EAAUmB,MAAMG,iBAAiB,gCACxCO,EAAU7B,EAAUmB,MAAMG,iBAAiB,qBAEjDM,EAAKxB,SAAQ,SAACoB,EAAKM,GACfN,EAAIO,iBAAiB,SAAS,WAC1BH,EAAKxB,SAAQ,SAACoB,GACVA,EAAIQ,UAAUC,OAAO,gBAGzBJ,EAAQzB,SAAQ,SAAC8B,GACbA,EAAOF,UAAUG,IAAI,gBAGzBN,EAAQC,GAAOE,UAAUC,OAAO,aAChCT,EAAIQ,UAAUG,IAAI,mBAItBN,EAAQN,QACRM,EAAQzB,SAAQ,SAAC8B,OACT9C,UAAW8C,EAAQnB,OAAOqB,wBAIlCrB,OAAOsB,YACPtB,OAAOsB,WAAWC,uBAMtCvB,OAAOgB,iBAAiB,oBAAoB,eACpCQ,qBAAqBrC,EAAU,CAC/BsC,UAAW,KACZC,QAAQzC,EAAUmB,UAGlB,CACHnB,UAAAA,EACAC,UAAAA,EACAH,OAAAA,SChIHC,IAAI,4BACU,4RASA,6BACI,6XAXvB2C,2BAAAC,GAC+EC,wBA4B3EC,wCAAgBD,sCA5BhBF,+BAAAI,GACIC,EAQAC,2BAAAC,GACID,2BAAAE,kBACIR,kDAAqC,YAATZ,UAA5BkB,kCAAW,UAA8BG,IAAKrB"}
1
+ {"version":3,"file":"PromoProducts.js","sources":["../../../src/components/shop/PromoProducts.vue","../../../src/components/shop/PromoProducts.vue?vue&type=template&id=3398114c&lang.js"],"sourcesContent":["<template>\n <div ref=\"container\">\n <section class=\"product-promo-block container is-fluid is-skeleton\" v-if=\"!loaded\">\n <div class=\"gradient\"></div>\n <div class=\"title slider-title\">&nbsp;</div>\n <div class=\"is-faded-tabs\">\n <div class=\"is-flex\">\n <div class=\"swiper-slide\">&nbsp;</div>\n <div class=\"swiper-slide\">&nbsp;</div>\n </div>\n </div>\n <div class=\"swiper\">\n <div class=\"swiper-wrapper products is-slider\">\n <div class=\"product\" v-for=\"index in 5\" :key=\"index\">\n <div class=\"border\">\n <div class=\"wrapper\">\n <picture class=\"is-lazy-loaded\">\n <img class=\"lazy entered loaded\" src=\"/images/blank.png\" />\n </picture>\n <div class=\"availability\">&nbsp;</div>\n <div class=\"title\">&nbsp;</div>\n <div class=\"prices\">\n <div class=\"price\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n <component :is=\"component\" v-else></component>\n </div>\n</template>\n<script>\nimport { ref, nextTick, defineComponent } from 'vue';\nimport Swiper, { Navigation, Mousewheel, FreeMode } from 'swiper';\n\nexport default defineComponent({\n props: {\n id: Number\n },\n setup(props) {\n let inited = false;\n\n const loaded = ref(false);\n const container = ref(null);\n const component = ref(null);\n\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n if (!inited) {\n inited = true;\n\n load();\n }\n }\n });\n };\n\n const load = () => {\n $http\n .post($ziggy('api.piece', { slug: 'promo-products' }), {\n id: props.id\n })\n .then((response) => {\n const componentName = 'piece-promo-products-' + props.id;\n\n window.app.component(componentName, {\n template: response.data ? response.data : '<i></i>'\n });\n\n component.value = componentName;\n loaded.value = true;\n\n nextTick(() => {\n const fadedTabs = container.value.querySelectorAll('.is-faded-tabs');\n\n if (fadedTabs.length) {\n fadedTabs.forEach((tab) => {\n new Swiper(tab.querySelector('.swiper'), {\n slidesPerView: 'auto',\n freeMode: {\n enabled: true\n },\n modules: [Navigation, Mousewheel, FreeMode]\n });\n });\n }\n\n const tabs = container.value.querySelectorAll('.is-faded-tabs .swiper-slide');\n const sliders = container.value.querySelectorAll('[products-slider]');\n\n tabs.forEach((tab, index) => {\n tab.addEventListener('click', () => {\n tabs.forEach((tab) => {\n tab.classList.remove('is-active');\n });\n\n sliders.forEach((slider) => {\n slider.classList.add('is-hidden');\n });\n\n sliders[index].classList.remove('is-hidden');\n tab.classList.add('is-active');\n });\n });\n\n if (sliders.length) {\n sliders.forEach((slider) => {\n new Swiper(slider, window.viewedSwiperOptions);\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n });\n });\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n new IntersectionObserver(callback, {\n threshold: 0.1\n }).observe(container.value);\n });\n\n return {\n container,\n component,\n loaded\n };\n }\n});\n</script>\n","<template>\n <div ref=\"container\">\n <section class=\"product-promo-block container is-fluid is-skeleton\" v-if=\"!loaded\">\n <div class=\"gradient\"></div>\n <div class=\"title slider-title\">&nbsp;</div>\n <div class=\"is-faded-tabs\">\n <div class=\"is-flex\">\n <div class=\"swiper-slide\">&nbsp;</div>\n <div class=\"swiper-slide\">&nbsp;</div>\n </div>\n </div>\n <div class=\"swiper\">\n <div class=\"swiper-wrapper products is-slider\">\n <div class=\"product\" v-for=\"index in 5\" :key=\"index\">\n <div class=\"border\">\n <div class=\"wrapper\">\n <picture class=\"is-lazy-loaded\">\n <img class=\"lazy entered loaded\" src=\"/images/blank.png\" />\n </picture>\n <div class=\"availability\">&nbsp;</div>\n <div class=\"title\">&nbsp;</div>\n <div class=\"prices\">\n <div class=\"price\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n <component :is=\"component\" v-else></component>\n </div>\n</template>\n<script>\nimport { ref, nextTick, defineComponent } from 'vue';\nimport Swiper, { Navigation, Mousewheel, FreeMode } from 'swiper';\n\nexport default defineComponent({\n props: {\n id: Number\n },\n setup(props) {\n let inited = false;\n\n const loaded = ref(false);\n const container = ref(null);\n const component = ref(null);\n\n const callback = (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n if (!inited) {\n inited = true;\n\n load();\n }\n }\n });\n };\n\n const load = () => {\n $http\n .post($ziggy('api.piece', { slug: 'promo-products' }), {\n id: props.id\n })\n .then((response) => {\n const componentName = 'piece-promo-products-' + props.id;\n\n window.app.component(componentName, {\n template: response.data ? response.data : '<i></i>'\n });\n\n component.value = componentName;\n loaded.value = true;\n\n nextTick(() => {\n const fadedTabs = container.value.querySelectorAll('.is-faded-tabs');\n\n if (fadedTabs.length) {\n fadedTabs.forEach((tab) => {\n new Swiper(tab.querySelector('.swiper'), {\n slidesPerView: 'auto',\n freeMode: {\n enabled: true\n },\n modules: [Navigation, Mousewheel, FreeMode]\n });\n });\n }\n\n const tabs = container.value.querySelectorAll('.is-faded-tabs .swiper-slide');\n const sliders = container.value.querySelectorAll('[products-slider]');\n\n tabs.forEach((tab, index) => {\n tab.addEventListener('click', () => {\n tabs.forEach((tab) => {\n tab.classList.remove('is-active');\n });\n\n sliders.forEach((slider) => {\n slider.classList.add('is-hidden');\n });\n\n sliders[index].classList.remove('is-hidden');\n tab.classList.add('is-active');\n });\n });\n\n if (sliders.length) {\n sliders.forEach((slider) => {\n new Swiper(slider, window.viewedSwiperOptions);\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n });\n });\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n new IntersectionObserver(callback, {\n threshold: 0.1\n }).observe(container.value);\n });\n\n return {\n container,\n component,\n loaded\n };\n }\n});\n</script>\n"],"names":["defineComponent","props","id","Number","setup","inited","loaded","ref","container","component","callback","entries","forEach","entry","isIntersecting","load","$http","post","$ziggy","slug","then","response","componentName","window","app","template","data","value","nextTick","fadedTabs","querySelectorAll","length","tab","Swiper","querySelector","slidesPerView","freeMode","enabled","modules","Navigation","Mousewheel","FreeMode","tabs","sliders","index","addEventListener","classList","remove","slider","add","viewedSwiperOptions","lazyImages","update","IntersectionObserver","threshold","observe","_createElementBlock","_hoisted_1","_ctx","_createBlock","_hoisted_2","_hoisted_3","_createElementVNode","_hoisted_6","_hoisted_7","key"],"mappings":"2IAqCeA,kBAAgB,CAC3BC,MAAO,CACHC,GAAIC,QAERC,eAAMH,OACEI,GAAS,EAEPC,EAASC,OAAI,GACbC,EAAYD,MAAI,MAChBE,EAAYF,MAAI,MAEhBG,EAAW,SAACC,GACdA,EAAQC,SAAQ,SAACC,GACTA,EAAMC,iBACDT,IACDA,GAAS,EAETU,UAMVA,EAAO,WACTC,MACKC,KAAKC,OAAO,YAAa,CAAEC,KAAM,mBAAqB,CACnDjB,GAAID,EAAMC,KAEbkB,MAAK,SAACC,OACGC,EAAgB,wBAA0BrB,EAAMC,GAEtDqB,OAAOC,IAAIf,UAAUa,EAAe,CAChCG,SAAUJ,EAASK,KAAOL,EAASK,KAAO,YAG9CjB,EAAUkB,MAAQL,EAClBhB,EAAOqB,OAAQ,EAEfC,YAAS,eACCC,EAAYrB,EAAUmB,MAAMG,iBAAiB,kBAE/CD,EAAUE,QACVF,EAAUjB,SAAQ,SAACoB,OACXC,UAAOD,EAAIE,cAAc,WAAY,CACrCC,cAAe,OACfC,SAAU,CACNC,SAAS,GAEbC,QAAS,CAACC,aAAYC,aAAYC,qBAKxCC,EAAOlC,EAAUmB,MAAMG,iBAAiB,gCACxCa,EAAUnC,EAAUmB,MAAMG,iBAAiB,qBAEjDY,EAAK9B,SAAQ,SAACoB,EAAKY,GACfZ,EAAIa,iBAAiB,SAAS,WAC1BH,EAAK9B,SAAQ,SAACoB,GACVA,EAAIc,UAAUC,OAAO,gBAGzBJ,EAAQ/B,SAAQ,SAACoC,GACbA,EAAOF,UAAUG,IAAI,gBAGzBN,EAAQC,GAAOE,UAAUC,OAAO,aAChCf,EAAIc,UAAUG,IAAI,mBAItBN,EAAQZ,QACRY,EAAQ/B,SAAQ,SAACoC,OACTf,UAAOe,EAAQzB,OAAO2B,wBAI9B3B,OAAO4B,YACP5B,OAAO4B,WAAWC,uBAMtC7B,OAAOsB,iBAAiB,oBAAoB,eACpCQ,qBAAqB3C,EAAU,CAC/B4C,UAAW,KACZC,QAAQ/C,EAAUmB,UAGlB,CACHnB,UAAAA,EACAC,UAAAA,EACAH,OAAAA,SCjIHC,IAAI,4BACU,4RASA,mBACI,6XAXvBiD,2BAAAC,GAC+EC,wBA4B3EC,wCAAgBD,sCA5BhBF,+BAAAI,GACIC,EAQAC,2BAAAC,GACID,2BAAAE,kBACIR,kDAAqC,YAATZ,UAA5BkB,kCAAW,UAA8BG,IAAKrB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("swiper/core"),t=require("countdown.to");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),r=n(t);i.default.use([e.Navigation,e.Pagination]);var o={name:"bundle",props:{prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"}},setup:function(e){var t=function(e,t){return e+" "+t[e%100>4&&e%100<20?2:[2,0,1,1,1,2][Math.min(e%10,5)]]};window.addEventListener("DOMContentLoaded",(function(){var n=document.getElementById("bundles-root");new i.default(n,{slidesPerView:1,spaceBetween:24,allowTouchMove:!1,mousewheel:{forceToAxis:!0},navigation:{nextEl:e.next,prevEl:e.prev}}),n.querySelectorAll("#bundles-root > .swiper-wrapper > .swiper-slide").forEach((function(n,o){var a=[],u=[],l=n.querySelectorAll(".bundle-info"),s=n.querySelectorAll(".bundles-subproduct");if(n.dataset.finish){var d=n.querySelector(".countdown");new r.default(n.dataset.finish,{onCalculateRemainingTime:function(){var e=this.timeRemaining[1],n=this.timeRemaining[2];if(e>0)d.innerHTML=t(e,__("shop.pluralize.monthes"));else if(n>0)d.innerHTML=t(n,__("shop.pluralize.days"));else{var i=this.timeRemaining[3],r=this.timeRemaining[4],o=this.timeRemaining[5];d.innerHTML=i+":"+r+":"+o}}})}s.forEach((function(t,n){var r=t.querySelector(e.thumbNext),s=t.querySelector(e.thumbPrev),d=t.querySelector(".swiper-pagination");a[n]=0,d&&(u[n]=new i.default(t.querySelector(".swiper-container"),{slidesPerView:1,spaceBetween:24,navigation:{nextEl:r,prevEl:s},pagination:{el:d,clickable:!0},on:{slideChange:function(e){a[n]=e.activeIndex,l.forEach((function(e){e.classList.add("is-hidden")}));var t="bundle"+o+"-info-"+a.join("-");document.getElementById(t).classList.remove("is-hidden")}}}))}))}))}))}};o.render=function(e,t,n,i,r,o){return null},module.exports=o;
1
+ "use strict";var e=require("swiper"),n=require("countdown.to");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),r=t(n),o={name:"bundle",props:{prev:{type:String,default:".swiper-button-prev"},next:{type:String,default:".swiper-button-next"},thumbPrev:{type:String,default:".swiper-button-prev"},thumbNext:{type:String,default:".swiper-button-next"}},setup:function(n){var t=function(e,n){return e+" "+n[e%100>4&&e%100<20?2:[2,0,1,1,1,2][Math.min(e%10,5)]]};window.addEventListener("DOMContentLoaded",(function(){var o=document.getElementById("bundles-root");new i.default(o,{slidesPerView:1,spaceBetween:24,allowTouchMove:!1,mousewheel:{forceToAxis:!0},navigation:{nextEl:n.next,prevEl:n.prev},modules:[e.Navigation,e.Pagination]}),o.querySelectorAll("#bundles-root > .swiper-wrapper > .swiper-slide").forEach((function(o,a){var u=[],l=[],s=o.querySelectorAll(".bundle-info"),d=o.querySelectorAll(".bundles-subproduct");if(o.dataset.finish){var c=o.querySelector(".countdown");new r.default(o.dataset.finish,{onCalculateRemainingTime:function(){var e=this.timeRemaining[1],n=this.timeRemaining[2];if(e>0)c.innerHTML=t(e,__("shop.pluralize.monthes"));else if(n>0)c.innerHTML=t(n,__("shop.pluralize.days"));else{var i=this.timeRemaining[3],r=this.timeRemaining[4],o=this.timeRemaining[5];c.innerHTML=i+":"+r+":"+o}}})}d.forEach((function(t,r){var o=t.querySelector(n.thumbNext),d=t.querySelector(n.thumbPrev),c=t.querySelector(".swiper-pagination");u[r]=0,c&&(l[r]=new i.default(t.querySelector(".swiper"),{modules:[e.Navigation,e.Pagination],slidesPerView:1,spaceBetween:24,navigation:{nextEl:o,prevEl:d},pagination:{el:c,clickable:!0},on:{slideChange:function(e){u[r]=e.activeIndex,s.forEach((function(e){e.classList.add("is-hidden")}));var n="bundle"+a+"-info-"+u.join("-");document.getElementById(n).classList.remove("is-hidden")}}}))}))}))}))}};o.render=function(e,n,t,i,r,o){return null},module.exports=o;
2
2
  //# sourceMappingURL=Bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bundle.js","sources":["../../../../src/components/shop/bundle/Bundle.vue"],"sourcesContent":["<template></template>\n<script>\nimport SwiperCore, { Navigation, Pagination } from \"swiper/core\";\nimport countdown from \"countdown.to\";\n\nSwiperCore.use([Navigation, Pagination]);\n\nexport default {\n name: \"bundle\",\n props: {\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n },\n setup(props) {\n const pluralize = (count, words) => {\n let cases = [2, 0, 1, 1, 1, 2];\n\n return (\n count +\n \" \" +\n words[\n count % 100 > 4 && count % 100 < 20\n ? 2\n : cases[Math.min(count % 10, 5)]\n ]\n );\n };\n\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"bundles-root\");\n\n new SwiperCore(container, {\n slidesPerView: 1,\n spaceBetween: 24,\n allowTouchMove: false,\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n });\n\n const bundles = container.querySelectorAll(\n \"#bundles-root > .swiper-wrapper > .swiper-slide\"\n );\n\n bundles.forEach((bundle, bundleIndex) => {\n let active = [];\n let swipers = [];\n\n const infos = bundle.querySelectorAll(\".bundle-info\");\n const sliders = bundle.querySelectorAll(\".bundles-subproduct\");\n\n if (bundle.dataset.finish) {\n const timer = bundle.querySelector(\".countdown\");\n\n new countdown(bundle.dataset.finish, {\n onCalculateRemainingTime: function () {\n const months = this.timeRemaining[1];\n const days = this.timeRemaining[2];\n\n if (months > 0) {\n timer.innerHTML = pluralize(\n months,\n __(\"shop.pluralize.monthes\")\n );\n } else if (days > 0) {\n timer.innerHTML = pluralize(\n days,\n __(\"shop.pluralize.days\")\n );\n } else {\n const hours = this.timeRemaining[3];\n const minutes = this.timeRemaining[4];\n const seconds = this.timeRemaining[5];\n\n timer.innerHTML =\n hours + \":\" + minutes + \":\" + seconds;\n }\n },\n });\n }\n\n sliders.forEach((slider, index) => {\n const next = slider.querySelector(props.thumbNext);\n const prev = slider.querySelector(props.thumbPrev);\n const pagination =\n slider.querySelector(\".swiper-pagination\");\n\n active[index] = 0;\n\n if (pagination) {\n swipers[index] = new SwiperCore(\n slider.querySelector(\".swiper-container\"),\n {\n slidesPerView: 1,\n spaceBetween: 24,\n navigation: {\n nextEl: next,\n prevEl: prev,\n },\n pagination: {\n el: pagination,\n clickable: true,\n },\n on: {\n slideChange: function (el) {\n active[index] = el.activeIndex;\n\n infos.forEach((info) => {\n info.classList.add(\"is-hidden\");\n });\n\n const id =\n \"bundle\" +\n bundleIndex +\n \"-info-\" +\n active.join(\"-\");\n\n document\n .getElementById(id)\n .classList.remove(\"is-hidden\");\n },\n },\n }\n );\n }\n });\n });\n });\n },\n};\n</script>"],"names":["SwiperCore","use","Navigation","Pagination","name","props","prev","type","String","next","thumbPrev","thumbNext","setup","pluralize","count","words","Math","min","window","addEventListener","container","document","getElementById","slidesPerView","spaceBetween","allowTouchMove","mousewheel","forceToAxis","navigation","nextEl","prevEl","querySelectorAll","forEach","bundle","bundleIndex","active","swipers","infos","sliders","dataset","finish","timer","querySelector","countdown","onCalculateRemainingTime","months","this","timeRemaining","days","innerHTML","__","hours","minutes","seconds","slider","index","pagination","el","clickable","on","slideChange","activeIndex","info","classList","add","id","join","remove"],"mappings":"8JAKAA,UAAWC,IAAI,CAACC,aAAYC,eAE5B,MAAe,CACXC,KAAM,SACNC,MAAO,CACHC,KAAM,CACFC,KAAMC,eACG,uBAEbC,KAAM,CACFF,KAAMC,eACG,uBAEbE,UAAW,CACPH,KAAMC,eACG,uBAEbG,UAAW,CACPJ,KAAMC,eACG,wBAGjBI,eAAMP,OACIQ,EAAY,SAACC,EAAOC,UAIlBD,EACA,IACAC,EACID,EAAQ,IAAM,GAAKA,EAAQ,IAAM,GAC3B,EAPF,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAQRE,KAAKC,IAAIH,EAAQ,GAAI,MAK7CI,OAAOC,iBAAiB,oBAAoB,eAClCC,EAAYC,SAASC,eAAe,oBAEtCtB,UAAWoB,EAAW,CACtBG,cAAe,EACfC,aAAc,GACdC,gBAAgB,EAChBC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQxB,EAAMI,KACdqB,OAAQzB,EAAMC,QAINc,EAAUW,iBACtB,mDAGIC,SAAQ,SAACC,EAAQC,OACjBC,EAAS,GACTC,EAAU,GAERC,EAAQJ,EAAOF,iBAAiB,gBAChCO,EAAUL,EAAOF,iBAAiB,0BAEpCE,EAAOM,QAAQC,OAAQ,KACjBC,EAAQR,EAAOS,cAAc,kBAE/BC,UAAUV,EAAOM,QAAQC,OAAQ,CACjCI,yBAA0B,eAChBC,EAASC,KAAKC,cAAc,GAC5BC,EAAOF,KAAKC,cAAc,MAE5BF,EAAS,EACTJ,EAAMQ,UAAYpC,EACdgC,EACAK,GAAG,gCAEJ,GAAIF,EAAO,EACdP,EAAMQ,UAAYpC,EACdmC,EACAE,GAAG,4BAEJ,KACGC,EAAQL,KAAKC,cAAc,GAC3BK,EAAUN,KAAKC,cAAc,GAC7BM,EAAUP,KAAKC,cAAc,GAEnCN,EAAMQ,UACFE,EAAQ,IAAMC,EAAU,IAAMC,MAMlDf,EAAQN,SAAQ,SAACsB,EAAQC,OACf9C,EAAO6C,EAAOZ,cAAcrC,EAAMM,WAClCL,EAAOgD,EAAOZ,cAAcrC,EAAMK,WAClC8C,EACFF,EAAOZ,cAAc,sBAEzBP,EAAOoB,GAAS,EAEZC,IACApB,EAAQmB,GAAS,IAAIvD,UACjBsD,EAAOZ,cAAc,qBACrB,CACInB,cAAe,EACfC,aAAc,GACdI,WAAY,CACRC,OAAQpB,EACRqB,OAAQxB,GAEZkD,WAAY,CACRC,GAAID,EACJE,WAAW,GAEfC,GAAI,CACAC,YAAa,SAAUH,GACnBtB,EAAOoB,GAASE,EAAGI,YAEnBxB,EAAML,SAAQ,SAAC8B,GACXA,EAAKC,UAAUC,IAAI,oBAGjBC,EACF,SACA/B,EACA,SACAC,EAAO+B,KAAK,KAEhB7C,SACKC,eAAe2C,GACfF,UAAUI,OAAO"}
1
+ {"version":3,"file":"Bundle.js","sources":["../../../../src/components/shop/bundle/Bundle.vue"],"sourcesContent":["<template></template>\n<script>\nimport Swiper, { Navigation, Pagination } from \"swiper\";\nimport countdown from \"countdown.to\";\n\nexport default {\n name: \"bundle\",\n props: {\n prev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n next: {\n type: String,\n default: \".swiper-button-next\",\n },\n thumbPrev: {\n type: String,\n default: \".swiper-button-prev\",\n },\n thumbNext: {\n type: String,\n default: \".swiper-button-next\",\n },\n },\n setup(props) {\n const pluralize = (count, words) => {\n let cases = [2, 0, 1, 1, 1, 2];\n\n return (\n count +\n \" \" +\n words[\n count % 100 > 4 && count % 100 < 20\n ? 2\n : cases[Math.min(count % 10, 5)]\n ]\n );\n };\n\n window.addEventListener(\"DOMContentLoaded\", () => {\n const container = document.getElementById(\"bundles-root\");\n\n new Swiper(container, {\n slidesPerView: 1,\n spaceBetween: 24,\n allowTouchMove: false,\n mousewheel: {\n forceToAxis: true,\n },\n navigation: {\n nextEl: props.next,\n prevEl: props.prev,\n },\n modules: [Navigation, Pagination]\n });\n\n const bundles = container.querySelectorAll(\n \"#bundles-root > .swiper-wrapper > .swiper-slide\"\n );\n\n bundles.forEach((bundle, bundleIndex) => {\n let active = [];\n let swipers = [];\n\n const infos = bundle.querySelectorAll(\".bundle-info\");\n const sliders = bundle.querySelectorAll(\".bundles-subproduct\");\n\n if (bundle.dataset.finish) {\n const timer = bundle.querySelector(\".countdown\");\n\n new countdown(bundle.dataset.finish, {\n onCalculateRemainingTime: function () {\n const months = this.timeRemaining[1];\n const days = this.timeRemaining[2];\n\n if (months > 0) {\n timer.innerHTML = pluralize(\n months,\n __(\"shop.pluralize.monthes\")\n );\n } else if (days > 0) {\n timer.innerHTML = pluralize(\n days,\n __(\"shop.pluralize.days\")\n );\n } else {\n const hours = this.timeRemaining[3];\n const minutes = this.timeRemaining[4];\n const seconds = this.timeRemaining[5];\n\n timer.innerHTML =\n hours + \":\" + minutes + \":\" + seconds;\n }\n },\n });\n }\n\n sliders.forEach((slider, index) => {\n const next = slider.querySelector(props.thumbNext);\n const prev = slider.querySelector(props.thumbPrev);\n const pagination = slider.querySelector(\".swiper-pagination\");\n\n active[index] = 0;\n\n if (pagination) {\n swipers[index] = new Swiper(\n slider.querySelector(\".swiper\"),\n {\n modules: [Navigation, Pagination],\n slidesPerView: 1,\n spaceBetween: 24,\n navigation: {\n nextEl: next,\n prevEl: prev,\n },\n pagination: {\n el: pagination,\n clickable: true,\n },\n on: {\n slideChange: function (el) {\n active[index] = el.activeIndex;\n\n infos.forEach((info) => {\n info.classList.add(\"is-hidden\");\n });\n\n const id = \"bundle\" + bundleIndex + \"-info-\" + active.join(\"-\");\n\n document.getElementById(id).classList.remove(\"is-hidden\");\n },\n },\n }\n );\n }\n });\n });\n });\n },\n};\n</script>"],"names":["name","props","prev","type","String","next","thumbPrev","thumbNext","setup","pluralize","count","words","Math","min","window","addEventListener","container","document","getElementById","Swiper","slidesPerView","spaceBetween","allowTouchMove","mousewheel","forceToAxis","navigation","nextEl","prevEl","modules","Navigation","Pagination","querySelectorAll","forEach","bundle","bundleIndex","active","swipers","infos","sliders","dataset","finish","timer","querySelector","countdown","onCalculateRemainingTime","months","this","timeRemaining","days","innerHTML","__","hours","minutes","seconds","slider","index","pagination","el","clickable","on","slideChange","activeIndex","info","classList","add","id","join","remove"],"mappings":"2JAKe,CACXA,KAAM,SACNC,MAAO,CACHC,KAAM,CACFC,KAAMC,eACG,uBAEbC,KAAM,CACFF,KAAMC,eACG,uBAEbE,UAAW,CACPH,KAAMC,eACG,uBAEbG,UAAW,CACPJ,KAAMC,eACG,wBAGjBI,eAAMP,OACIQ,EAAY,SAACC,EAAOC,UAIlBD,EACA,IACAC,EACAD,EAAQ,IAAM,GAAKA,EAAQ,IAAM,GAC3B,EAPE,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,GAQZE,KAAKC,IAAIH,EAAQ,GAAI,MAKzCI,OAAOC,iBAAiB,oBAAoB,eAClCC,EAAYC,SAASC,eAAe,oBAEtCC,UAAOH,EAAW,CAClBI,cAAe,EACfC,aAAc,GACdC,gBAAgB,EAChBC,WAAY,CACRC,aAAa,GAEjBC,WAAY,CACRC,OAAQzB,EAAMI,KACdsB,OAAQ1B,EAAMC,MAElB0B,QAAS,CAACC,aAAYC,gBAGVd,EAAUe,iBACtB,mDAGIC,SAAQ,SAACC,EAAQC,OACjBC,EAAS,GACTC,EAAU,GAERC,EAAQJ,EAAOF,iBAAiB,gBAChCO,EAAUL,EAAOF,iBAAiB,0BAEpCE,EAAOM,QAAQC,OAAQ,KACjBC,EAAQR,EAAOS,cAAc,kBAE/BC,UAAUV,EAAOM,QAAQC,OAAQ,CACjCI,yBAA0B,eAChBC,EAASC,KAAKC,cAAc,GAC5BC,EAAOF,KAAKC,cAAc,MAE5BF,EAAS,EACTJ,EAAMQ,UAAYxC,EACdoC,EACAK,GAAG,gCAEJ,GAAIF,EAAO,EACdP,EAAMQ,UAAYxC,EACduC,EACAE,GAAG,4BAEJ,KACGC,EAAQL,KAAKC,cAAc,GAC3BK,EAAUN,KAAKC,cAAc,GAC7BM,EAAUP,KAAKC,cAAc,GAEnCN,EAAMQ,UACFE,EAAQ,IAAMC,EAAU,IAAMC,MAMlDf,EAAQN,SAAQ,SAACsB,EAAQC,OACflD,EAAOiD,EAAOZ,cAAczC,EAAMM,WAClCL,EAAOoD,EAAOZ,cAAczC,EAAMK,WAClCkD,EAAaF,EAAOZ,cAAc,sBAExCP,EAAOoB,GAAS,EAEZC,IACApB,EAAQmB,GAAS,IAAIpC,UACjBmC,EAAOZ,cAAc,WACrB,CACId,QAAS,CAACC,aAAYC,cACtBV,cAAe,EACfC,aAAc,GACdI,WAAY,CACRC,OAAQrB,EACRsB,OAAQzB,GAEZsD,WAAY,CACRC,GAAID,EACJE,WAAW,GAEfC,GAAI,CACAC,YAAa,SAAUH,GACnBtB,EAAOoB,GAASE,EAAGI,YAEnBxB,EAAML,SAAQ,SAAC8B,GACXA,EAAKC,UAAUC,IAAI,oBAGjBC,EAAK,SAAW/B,EAAc,SAAWC,EAAO+B,KAAK,KAE3DjD,SAASC,eAAe+C,GAAIF,UAAUI,OAAO"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("vue"),t=require("vuex"),l=require("@perevorot/shop/dist/helpers"),n=require("swiper/core");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(n);r.default.use([n.Navigation]);var c=e.defineComponent({name:"cart",props:{isModal:{type:Boolean,default:!0}},setup:function(){var n=t.useStore(),o=e.ref(!1),c=e.computed((function(){return n.getters["cart/items"]})),a=e.computed((function(){return n.getters["cart/modal"]})),s=e.computed((function(){return n.getters["cart/total"]})),i=e.computed((function(){return n.getters["cart/quantity"]})),d=function(){n.commit("cart/modal",!1)};n.dispatch("cart/get",{finally:function(){}}),window.addEventListener("keyup",(function(e){a.value&&"Escape"===e.key&&d()}));var m,u,p=e.ref(null),v=e.ref(null),E=e.ref(null),N=e.computed((function(){var e=n.getters["cart/cross"];return p.value&&(m&&m.destroy(),e.length&&(m=new r.default(p.value,{slidesPerView:2,slidesPerGroup:2,spaceBetween:0,allowTouchMove:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:v.value,prevEl:E.value}}))),e})),V=e.ref(null),k=e.ref(null),f=e.ref(null),g=e.computed((function(){var e=n.getters["cart/bundles"];return V.value&&(u&&u.destroy(),e.length&&(u=new r.default(V.value,{slidesPerView:1,spaceBetween:0,allowTouchMove:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:k.value,prevEl:f.value}}))),e}));return window.addEventListener("beforeunload",(function(){n.commit("cart/modal",null)})),{loading:o,items:c,modal:a,total:s,quantity:i,open:function(){n.commit("cart/modal",!0)},close:d,clear:function(){o.value=!0,n.dispatch("cart/clear",{finally:function(){o.value=!1}})},pluralize:l.pluralize,goto:function(e){window.addEventListener("beforeunload",(function(){n.commit("cart/modal",!1)})),window.location.href=e},cross:N,crossSlider:p,crossSliderPrev:E,crossSliderNext:v,bundles:g,bundlesSlider:V,bundlesSliderPrev:f,bundlesSliderNext:k}}}),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),m=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),u={class:"dropdown-menu",role:"menu"},p={key:0,class:"dropdown-content"},v={class:"dropdown-item"},E={class:"columns"},N={class:"column"},V=["innerHTML"],k=e.createElementVNode("div",{class:"dropdown-divider"},null,-1),f={class:"dropdown-item has-text-centered"},g=["href"],h={class:"dropdown-item has-text-centered"},B={key:1,class:"dropdown-content"},w=e.createElementVNode("div",{class:"dropdown-item"},"Ваша корзина пуста",-1),y={class:"modal-content"},C=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],b={class:"box"},x={class:"cart-title"},T=e.createTextVNode("Корзина "),L=["textContent"],M={key:0,class:"items-wrapper"},S={class:"items"},H={class:"columns is-gapless is-vcentered main-actions"},$={class:"column"},q={class:"column has-text-right"},z={class:"totals"},D={class:"title"},P=e.createTextVNode("Итого: "),_=["innerHTML"],F={class:"column is-narrow"},O=["href"],A={key:0,class:"cross"},j=e.createElementVNode("div",{class:"title"},"С товарами из вашей корзины часто покупают",-1),G={class:"swiper-container",ref:"crossSlider"},I={class:"swiper-wrapper"},J={class:"columns is-gapless"},K={class:"column is-narrow"},Q=["onClick"],R=["src"],U={key:1},W=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],X={class:"column"},Y={class:"product"},Z={class:"name"},ee=["onClick"],te={class:"columns is-gapless is-vcentered"},le={class:"column is-narrow"},ne={class:"prices"},oe=["innerHTML"],re=["innerHTML"],ce={class:"column"},ae=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-alternate"})],-1),se={class:"swiper-nav prev",ref:"crossSliderPrev"},ie=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],de={class:"swiper-nav next",ref:"crossSliderNext"},me=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],ue={key:1,class:"bundles"},pe=e.createElementVNode("div",{class:"title"},"Вместе дешевле",-1),ve={class:"swiper-container",ref:"bundlesSlider"},Ee={class:"swiper-wrapper"},Ne={class:"column is-narrow"},Ve=["onClick"],ke=["src"],fe={key:1},ge=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],he={class:"column"},Be={class:"product"},we={class:"name"},ye=["onClick"],Ce={class:"columns is-gapless is-vcentered"},be={class:"prices"},xe=["innerHTML"],Te=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})])],-1),Le={class:"column is-narrow"},Me=["onClick"],Se=["src"],He={key:1},$e=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],qe={class:"column"},ze={class:"product"},De={class:"name"},Pe=["onClick"],_e={class:"columns is-gapless is-vcentered"},Fe={class:"prices"},Oe=["innerHTML"],Ae={key:0,class:"column is-narrow"},je=[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1)],Ge={key:1,class:"column is-narrow"},Ie=["onClick"],Je=["src"],Ke={key:1},Qe=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Re={key:2,class:"column"},Ue={class:"product"},We={class:"name"},Xe=["onClick"],Ye={class:"columns is-gapless is-vcentered"},Ze={class:"prices"},et=["innerHTML"],tt={class:"columns is-vcentered"},lt={class:"column"},nt=["innerHTML"],ot=["innerHTML"],rt={class:"column"},ct={class:"is-flex is-align-items-center"},at=["innerHTML"],st={class:"swiper-nav prev",ref:"bundlesSliderPrev"},it=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],dt={class:"swiper-nav next",ref:"bundlesSliderNext"},mt=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],ut={key:1,class:"empty"},pt=e.createElementVNode("div",{class:"title"},"В корзине пока что нет товаров",-1),vt={class:"message"},Et=e.createTextVNode("Посмотрите предложения на "),Nt=e.createTextVNode(","),Vt=e.createElementVNode("br",null,null,-1),kt=e.createTextVNode("воспользуйтесь каталогом или поиском"),ft={class:"viewed-wrapper"};c.render=function(t,l,n,o,r,c){var gt=e.resolveComponent("cart-item"),ht=e.resolveComponent("cart-add"),Bt=e.resolveComponent("bundle-add"),wt=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:l[0]||(l[0]=function(){return t.open&&t.open.apply(t,arguments)})},[e.createElementVNode("span",null,[d,e.createTextVNode(" "+e.toDisplayString(t.quantity),1)]),m])]}))]),e.createElementVNode("div",u,[t.items.length?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",v,[e.createElementVNode("div",E,[e.createElementVNode("div",N,e.toDisplayString(t.__("shop.cart.total")),1),e.createElementVNode("div",{class:"column has-text-right",innerHTML:t.$filters.price(t.total)},null,8,V)])]),k,e.createElementVNode("div",f,[e.createElementVNode("a",{href:t.$ziggy("shop.checkout"),class:"button is-link"},e.toDisplayString(t.__("shop.cart.checkout")),9,g)]),e.createElementVNode("div",h,[e.renderSlot(t.$slots,"open",{open:t.open},(function(){return[e.createElementVNode("a",{onClick:l[1]||(l[1]=function(){return t.open&&t.open.apply(t,arguments)})},"Открыть корзину")]}))])])):(e.openBlock(),e.createElementBlock("div",B,[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:l[2]||(l[2]=function(){return t.close&&t.close.apply(t,arguments)})}),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"modal-close is-large",onClick:l[3]||(l[3]=function(){return t.close&&t.close.apply(t,arguments)})},C),e.createElementVNode("div",b,[e.createElementVNode("div",x,[T,t.quantity?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,L)):e.createCommentVNode("v-if",!0)]),t.items.length?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(gt,{key:t.id,item:t},null,8,["item"])})),128))]),e.createElementVNode("div",H,[e.createElementVNode("div",$,[e.createElementVNode("button",{class:"button continue",onClick:l[4]||(l[4]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки")]),e.createElementVNode("div",q,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[P,e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,_)])])]),e.createElementVNode("div",F,[e.createElementVNode("a",{href:t.$ziggy("shop.checkout"),class:"button is-link checkout"},"Оформить заказ",8,O)])]),t.cross.length?(e.openBlock(),e.createElementBlock("div",A,[j,e.createElementVNode("div",G,[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cross,(function(l){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:l.id},[e.createElementVNode("div",J,[e.createElementVNode("div",K,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.image}])},[l.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.image},null,8,R)):(e.openBlock(),e.createElementBlock("svg",U,W))],2)],8,Q)]),e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},e.toDisplayString(l.name),9,ee)]),e.createElementVNode("div",te,[e.createElementVNode("div",le,[e.createElementVNode("div",ne,[l.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(l.priceOld)},null,8,oe)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.price)},null,8,re)])]),e.createElementVNode("div",ce,[e.createVNode(ht,{id:l.id,"is-simple":!0},{default:e.withCtx((function(){return[ae]})),_:2},1032,["id"])])])])])])])})),128))]),(e.openBlock(),e.createElementBlock("svg",se,ie,512)),(e.openBlock(),e.createElementBlock("svg",de,me,512))],512)])):e.createCommentVNode("v-if",!0),t.bundles.length?(e.openBlock(),e.createElementBlock("div",ue,[pe,e.createElementVNode("div",ve,[e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bundles,(function(l){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:l.id},[e.createElementVNode("div",{class:e.normalizeClass(["columns is-gapless is-vcentered",{"is-third":l.third}])},[e.createElementVNode("div",Ne,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.image}])},[l.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.image},null,8,ke)):(e.openBlock(),e.createElementBlock("svg",fe,ge))],2)],8,Ve)]),e.createElementVNode("div",he,[e.createElementVNode("div",Be,[e.createElementVNode("div",we,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},e.toDisplayString(l.name),9,ye)]),e.createElementVNode("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.price)},null,8,xe)])])])]),Te,e.createElementVNode("div",Le,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.second.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.second.image}])},[l.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.second.image},null,8,Se)):(e.openBlock(),e.createElementBlock("svg",He,$e))],2)],8,Me)]),e.createElementVNode("div",qe,[e.createElementVNode("div",ze,[e.createElementVNode("div",De,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.second.href)}},e.toDisplayString(l.second.name),9,Pe)]),e.createElementVNode("div",_e,[e.createElementVNode("div",Fe,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.second.price)},null,8,Oe)])])])]),l.third?(e.openBlock(),e.createElementBlock("div",Ae,je)):e.createCommentVNode("v-if",!0),l.third?(e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.third.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.third.image}])},[l.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.third.image},null,8,Je)):(e.openBlock(),e.createElementBlock("svg",Ke,Qe))],2)],8,Ie)])):e.createCommentVNode("v-if",!0),l.third?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ue,[e.createElementVNode("div",We,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.third.href)}},e.toDisplayString(l.third.name),9,Xe)]),e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.third.price)},null,8,et)])])])])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",tt,[e.createElementVNode("div",lt,[e.createElementVNode("span",{class:"total-old",innerHTML:t.$filters.price(l.bundle.priceOld)},null,8,nt),e.createElementVNode("span",{class:"bundle-amount",innerHTML:"Выгода "+l.bundle.amount},null,8,ot)]),e.createElementVNode("div",rt,[e.createElementVNode("div",ct,[e.createElementVNode("span",{class:"total",innerHTML:t.$filters.price(l.bundle.price)},null,8,at),e.createVNode(Bt,{id:l.id,second:l.second.id,third:l.third?l.third.id:null},null,8,["id","second","third"])])])])])})),128))])],512),(e.openBlock(),e.createElementBlock("svg",st,it,512)),(e.openBlock(),e.createElementBlock("svg",dt,mt,512))])):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock("div",ut,[pt,e.createElementVNode("div",vt,[Et,e.createElementVNode("a",{onClick:l[5]||(l[5]=function(e){return t.goto(t.$env.locale.url+"/")})},"главной странице"),Nt,Vt,kt]),e.createElementVNode("button",{class:"button continue",onClick:l[6]||(l[6]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки"),e.createElementVNode("div",ft,[e.createVNode(wt,{slider:!0})])]))])])],2)):e.createCommentVNode("v-if",!0)])},module.exports=c;
1
+ "use strict";var e=require("vue"),t=require("vuex"),l=require("@perevorot/shop/dist/helpers"),n=require("swiper");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(n),c=e.defineComponent({name:"cart",props:{isModal:{type:Boolean,default:!0}},setup:function(){var o=t.useStore(),c=e.ref(!1),s=e.computed((function(){return o.getters["cart/items"]})),a=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"]})),m=function(){o.commit("cart/modal",!1)};o.dispatch("cart/get",{finally:function(){}}),window.addEventListener("keyup",(function(e){a.value&&"Escape"===e.key&&m()}));var u,p,v=e.ref(null),E=e.ref(null),N=e.ref(null),V=e.computed((function(){var e=o.getters["cart/cross"];return v.value&&(u&&u.destroy(),e.length&&(u=new r.default(v.value,{slidesPerView:2,slidesPerGroup:2,spaceBetween:0,allowTouchMove:!0,modules:[n.Navigation],mousewheel:{forceToAxis:!0},navigation:{nextEl:E.value,prevEl:N.value}}))),e})),k=e.ref(null),f=e.ref(null),g=e.ref(null),h=e.computed((function(){var e=o.getters["cart/bundles"];return k.value&&(p&&p.destroy(),e.length&&(p=new r.default(k.value,{slidesPerView:1,spaceBetween:0,allowTouchMove:!0,mousewheel:{forceToAxis:!0},navigation:{nextEl:f.value,prevEl:g.value}}))),e}));return window.addEventListener("beforeunload",(function(){o.commit("cart/modal",null)})),{loading:c,items:s,modal:a,total:i,quantity:d,open:function(){o.commit("cart/modal",!0)},close:m,clear:function(){c.value=!0,o.dispatch("cart/clear",{finally:function(){c.value=!1}})},pluralize:l.pluralize,goto:function(e){window.addEventListener("beforeunload",(function(){o.commit("cart/modal",!1)})),window.location.href=e},cross:V,crossSlider:v,crossSliderPrev:N,crossSliderNext:E,bundles:h,bundlesSlider:k,bundlesSliderPrev:g,bundlesSliderNext:f}}}),s={class:"cart"},a={class:"dropdown is-right is-hoverable"},i={class:"dropdown-trigger"},d=e.createElementVNode("i",{class:"fas fa-shopping-cart"},null,-1),m=e.createElementVNode("span",{class:"icon is-small"},[e.createElementVNode("i",{class:"fas fa-angle-down","aria-hidden":"true"})],-1),u={class:"dropdown-menu",role:"menu"},p={key:0,class:"dropdown-content"},v={class:"dropdown-item"},E={class:"columns"},N={class:"column"},V=["innerHTML"],k=e.createElementVNode("div",{class:"dropdown-divider"},null,-1),f={class:"dropdown-item has-text-centered"},g=["href"],h={class:"dropdown-item has-text-centered"},B={key:1,class:"dropdown-content"},w=e.createElementVNode("div",{class:"dropdown-item"},"Ваша корзина пуста",-1),y={class:"modal-content"},C=[e.createElementVNode("svg",{class:"icon close"},[e.createElementVNode("use",{"xlink:href":"#close"})],-1)],b={class:"box"},x={class:"cart-title"},T=e.createTextVNode(" Корзина "),L=["textContent"],M={key:0,class:"items-wrapper"},S={class:"items"},H={class:"columns is-gapless is-vcentered main-actions"},$={class:"column"},q={class:"column has-text-right"},z={class:"totals"},D={class:"title"},P=e.createTextVNode(" Итого: "),_=["innerHTML"],F={class:"column is-narrow"},O=["href"],A={key:0,class:"cross"},j=e.createElementVNode("div",{class:"title"},"С товарами из вашей корзины часто покупают",-1),G={class:"swiper",ref:"crossSlider"},I={class:"swiper-wrapper"},J={class:"columns is-gapless"},K={class:"column is-narrow"},Q=["onClick"],R=["src"],U={key:1},W=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],X={class:"column"},Y={class:"product"},Z={class:"name"},ee=["onClick"],te={class:"columns is-gapless is-vcentered"},le={class:"column is-narrow"},ne={class:"prices"},oe=["innerHTML"],re=["innerHTML"],ce={class:"column"},se=e.createElementVNode("svg",null,[e.createElementVNode("use",{"xlink:href":"#cart-alternate"})],-1),ae={class:"swiper-nav prev",ref:"crossSliderPrev"},ie=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],de={class:"swiper-nav next",ref:"crossSliderNext"},me=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],ue={key:1,class:"bundles"},pe=e.createElementVNode("div",{class:"title"},"Вместе дешевле",-1),ve={class:"swiper",ref:"bundlesSlider"},Ee={class:"swiper-wrapper"},Ne={class:"column is-narrow"},Ve=["onClick"],ke=["src"],fe={key:1},ge=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],he={class:"column"},Be={class:"product"},we={class:"name"},ye=["onClick"],Ce={class:"columns is-gapless is-vcentered"},be={class:"prices"},xe=["innerHTML"],Te=e.createElementVNode("div",{class:"column is-narrow"},[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})])],-1),Le={class:"column is-narrow"},Me=["onClick"],Se=["src"],He={key:1},$e=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],qe={class:"column"},ze={class:"product"},De={class:"name"},Pe=["onClick"],_e={class:"columns is-gapless is-vcentered"},Fe={class:"prices"},Oe=["innerHTML"],Ae={key:0,class:"column is-narrow"},je=[e.createElementVNode("svg",{class:"bundle-icon plus"},[e.createElementVNode("use",{"xlink:href":"#bundle-plus"})],-1)],Ge={key:1,class:"column is-narrow"},Ie=["onClick"],Je=["src"],Ke={key:1},Qe=[e.createElementVNode("use",{"xlink:href":"#logo"},null,-1)],Re={key:2,class:"column"},Ue={class:"product"},We={class:"name"},Xe=["onClick"],Ye={class:"columns is-gapless is-vcentered"},Ze={class:"prices"},et=["innerHTML"],tt={class:"columns is-vcentered"},lt={class:"column"},nt=["innerHTML"],ot=["innerHTML"],rt={class:"column"},ct={class:"is-flex is-align-items-center"},st=["innerHTML"],at={class:"swiper-nav prev",ref:"bundlesSliderPrev"},it=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],dt={class:"swiper-nav next",ref:"bundlesSliderNext"},mt=[e.createElementVNode("use",{"xlink:href":"#arrow-submenu"},null,-1)],ut={key:1,class:"empty"},pt=e.createElementVNode("div",{class:"title"},"В корзине пока что нет товаров",-1),vt={class:"message"},Et=e.createTextVNode(" Посмотрите предложения на "),Nt=e.createTextVNode(", "),Vt=e.createElementVNode("br",null,null,-1),kt=e.createTextVNode("воспользуйтесь каталогом или поиском "),ft={class:"viewed-wrapper"};c.render=function(t,l,n,o,r,c){var gt=e.resolveComponent("cart-item"),ht=e.resolveComponent("cart-add"),Bt=e.resolveComponent("bundle-add"),wt=e.resolveComponent("viewed");return e.openBlock(),e.createElementBlock("div",s,[e.createElementVNode("div",a,[e.createElementVNode("div",i,[e.renderSlot(t.$slots,"default",{total:t.quantity,open:t.open},(function(){return[e.createElementVNode("button",{class:"button",onClick:l[0]||(l[0]=function(){return t.open&&t.open.apply(t,arguments)})},[e.createElementVNode("span",null,[d,e.createTextVNode(" "+e.toDisplayString(t.quantity),1)]),m])]}))]),e.createElementVNode("div",u,[t.items.length?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("div",v,[e.createElementVNode("div",E,[e.createElementVNode("div",N,e.toDisplayString(t.__("shop.cart.total")),1),e.createElementVNode("div",{class:"column has-text-right",innerHTML:t.$filters.price(t.total)},null,8,V)])]),k,e.createElementVNode("div",f,[e.createElementVNode("a",{href:t.$ziggy("shop.checkout"),class:"button is-link"},e.toDisplayString(t.__("shop.cart.checkout")),9,g)]),e.createElementVNode("div",h,[e.renderSlot(t.$slots,"open",{open:t.open},(function(){return[e.createElementVNode("a",{onClick:l[1]||(l[1]=function(){return t.open&&t.open.apply(t,arguments)})},"Открыть корзину")]}))])])):(e.openBlock(),e.createElementBlock("div",B,[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:l[2]||(l[2]=function(){return t.close&&t.close.apply(t,arguments)})}),e.createElementVNode("div",y,[e.createElementVNode("button",{class:"modal-close is-large",onClick:l[3]||(l[3]=function(){return t.close&&t.close.apply(t,arguments)})},C),e.createElementVNode("div",b,[e.createElementVNode("div",x,[T,t.quantity?(e.openBlock(),e.createElementBlock("span",{key:0,textContent:e.toDisplayString(t.pluralize(t.quantity,t.__("shop.pluralize.products")))},null,8,L)):e.createCommentVNode("v-if",!0)]),t.items.length?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(function(t){return e.openBlock(),e.createBlock(gt,{key:t.id,item:t},null,8,["item"])})),128))]),e.createElementVNode("div",H,[e.createElementVNode("div",$,[e.createElementVNode("button",{class:"button continue",onClick:l[4]||(l[4]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки")]),e.createElementVNode("div",q,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[P,e.createElementVNode("span",{innerHTML:t.$filters.price(t.total)},null,8,_)])])]),e.createElementVNode("div",F,[e.createElementVNode("a",{href:t.$ziggy("shop.checkout"),class:"button is-link checkout"},"Оформить заказ",8,O)])]),t.cross.length?(e.openBlock(),e.createElementBlock("div",A,[j,e.createElementVNode("div",G,[e.createElementVNode("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cross,(function(l){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:l.id},[e.createElementVNode("div",J,[e.createElementVNode("div",K,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.image}])},[l.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.image},null,8,R)):(e.openBlock(),e.createElementBlock("svg",U,W))],2)],8,Q)]),e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},e.toDisplayString(l.name),9,ee)]),e.createElementVNode("div",te,[e.createElementVNode("div",le,[e.createElementVNode("div",ne,[l.priceOld?(e.openBlock(),e.createElementBlock("div",{key:0,class:"price-old",innerHTML:t.$filters.price(l.priceOld)},null,8,oe)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.price)},null,8,re)])]),e.createElementVNode("div",ce,[e.createVNode(ht,{id:l.id,"is-simple":!0},{default:e.withCtx((function(){return[se]})),_:2},1032,["id"])])])])])])])})),128))]),(e.openBlock(),e.createElementBlock("svg",ae,ie,512)),(e.openBlock(),e.createElementBlock("svg",de,me,512))],512)])):e.createCommentVNode("v-if",!0),t.bundles.length?(e.openBlock(),e.createElementBlock("div",ue,[pe,e.createElementVNode("div",ve,[e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bundles,(function(l){return e.openBlock(),e.createElementBlock("div",{class:"swiper-slide",key:l.id},[e.createElementVNode("div",{class:e.normalizeClass(["columns is-gapless is-vcentered",{"is-third":l.third}])},[e.createElementVNode("div",Ne,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.image}])},[l.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.image},null,8,ke)):(e.openBlock(),e.createElementBlock("svg",fe,ge))],2)],8,Ve)]),e.createElementVNode("div",he,[e.createElementVNode("div",Be,[e.createElementVNode("div",we,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.href)}},e.toDisplayString(l.name),9,ye)]),e.createElementVNode("div",Ce,[e.createElementVNode("div",be,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.price)},null,8,xe)])])])]),Te,e.createElementVNode("div",Le,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.second.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.second.image}])},[l.second.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.second.image},null,8,Se)):(e.openBlock(),e.createElementBlock("svg",He,$e))],2)],8,Me)]),e.createElementVNode("div",qe,[e.createElementVNode("div",ze,[e.createElementVNode("div",De,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.second.href)}},e.toDisplayString(l.second.name),9,Pe)]),e.createElementVNode("div",_e,[e.createElementVNode("div",Fe,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.second.price)},null,8,Oe)])])])]),l.third?(e.openBlock(),e.createElementBlock("div",Ae,je)):e.createCommentVNode("v-if",!0),l.third?(e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.third.href)}},[e.createElementVNode("figure",{class:e.normalizeClass(["image is-square",{"no-thumb":!l.third.image}])},[l.third.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:l.third.image},null,8,Je)):(e.openBlock(),e.createElementBlock("svg",Ke,Qe))],2)],8,Ie)])):e.createCommentVNode("v-if",!0),l.third?(e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ue,[e.createElementVNode("div",We,[e.createElementVNode("a",{onClick:function(e){return t.goto(l.third.href)}},e.toDisplayString(l.third.name),9,Xe)]),e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("div",{class:"price",innerHTML:t.$filters.price(l.third.price)},null,8,et)])])])])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",tt,[e.createElementVNode("div",lt,[e.createElementVNode("span",{class:"total-old",innerHTML:t.$filters.price(l.bundle.priceOld)},null,8,nt),e.createElementVNode("span",{class:"bundle-amount",innerHTML:"Выгода "+l.bundle.amount},null,8,ot)]),e.createElementVNode("div",rt,[e.createElementVNode("div",ct,[e.createElementVNode("span",{class:"total",innerHTML:t.$filters.price(l.bundle.price)},null,8,st),e.createVNode(Bt,{id:l.id,second:l.second.id,third:l.third?l.third.id:null},null,8,["id","second","third"])])])])])})),128))])],512),(e.openBlock(),e.createElementBlock("svg",at,it,512)),(e.openBlock(),e.createElementBlock("svg",dt,mt,512))])):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock("div",ut,[pt,e.createElementVNode("div",vt,[Et,e.createElementVNode("a",{onClick:l[5]||(l[5]=function(e){return t.goto(t.$env.locale.url+"/")})},"главной странице"),Nt,Vt,kt]),e.createElementVNode("button",{class:"button continue",onClick:l[6]||(l[6]=function(){return t.close&&t.close.apply(t,arguments)})},"Продолжить покупки"),e.createElementVNode("div",ft,[e.createVNode(wt,{slider:!0})])]))])])],2)):e.createCommentVNode("v-if",!0)])},module.exports=c;
2
2
  //# sourceMappingURL=Cart.js.map