@perevorot/shop 2.0.150 → 2.0.151

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.
@@ -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.disableScrollTopAfterCatalogLoad||window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),window.catalogFilterCallback&&window.catalogFilterCallback(),document.documentElement.classList.remove("is-catalog-loading"),r()},c=function(c,r){var i=function(e){var t=e.hash?e.hash.substring(1):"",n=e.pathname.replace(/\/$/,"");return n=t?-1!==e.pathname.indexOf(":")?n+";"+t:n+"/"+t:n,$env.shop.isTrailingSlash&&(n+="/"),e.origin+n+(e.search?e.search+"&filter":"?filter")}(c),l=function(e){return e.replace(/[^a-z0-9]/g,"")}(i);-1===n.indexOf(l)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(i).then((function(i){var u=document.createElement("html");u.innerHTML=i.data.page,window.app.component(l,{template:u.querySelector("#subcategory").innerHTML}),o(),n.push(l),t.value=l;var d={event:"applied_filter"};window.custom_page_type&&(d.custom_page_type=window.custom_page_type),$env.debug.ecommerce&&console.log(d),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(d)),r||history.pushState({urlPath:c.href,source:"catalog"},document.title,c.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=l,r||history.pushState({urlPath:c.href,source:"catalog"},document.title,c.href),e.nextTick(a))},r=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),c(e)}))}))},i=function(){var e=document.createElement("a");e.href=window.location.href,c(e,!0)};return window.onpageshow=function(e){e.persisted&&window.location.reload()},window.addEventListener("DOMContentLoaded",(function(){r(),window.addEventListener("popstate",(function(e){e.state&&"catalog"==e.state.source&&i()})),window.location.hash&&i()})),{page:t}}});t.render=function(t,n,o,a,c,r){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.disableScrollTopAfterCatalogLoad||window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),window.catalogFilterCallback&&window.catalogFilterCallback(),document.documentElement.classList.remove("is-catalog-loading"),r()},c=function(c,r){var i=function(e){var t=e.hash?e.hash.substring(1):"",n=e.pathname.replace(/\/$/,"");return n=t?-1!==e.pathname.indexOf(":")?n+";"+t:n+"/"+t:n,$env.shop.isTrailingSlash&&(n+="/"),e.origin+n+(e.search?e.search+"&filter":"?filter")}(c),l=function(e){return e.replace(/[^a-z0-9]/g,"")}(i);-1===n.indexOf(l)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(i).then((function(i){var u=document.createElement("html");if(u.innerHTML=i.data.page,window.app.component(l,{template:u.querySelector("#subcategory").innerHTML}),o(),n.push(l),t.value=l,!window.prevent_applied_filter_track){var d={event:"applied_filter"};window.custom_page_type&&(d.custom_page_type=window.custom_page_type),$env.debug.ecommerce&&console.log(d),!$env.debug.ecommerce&&window.dataLayer&&(window.dataLayer.push({ecommerce:null}),window.dataLayer.push(d))}r||history.pushState({urlPath:c.href,source:"catalog"},document.title,c.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=l,r||history.pushState({urlPath:c.href,source:"catalog"},document.title,c.href),e.nextTick(a))},r=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),c(e)}))}))},i=function(){var e=document.createElement("a");e.href=window.location.href,c(e,!0)};return window.onpageshow=function(e){e.persisted&&window.location.reload()},window.addEventListener("DOMContentLoaded",(function(){r(),window.addEventListener("popstate",(function(e){e.state&&"catalog"==e.state.source&&i()})),window.location.hash&&i()})),{page:t}}});t.render=function(t,n,o,a,c,r){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=e2a58212&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 if (!window.disableScrollTopAfterCatalogLoad) {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\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\n let pathname = a.pathname.replace(/\\/$/, '');\n\n pathname = hash ? (a.pathname.indexOf(':') !== -1 ? pathname + ';' + hash : pathname + '/' + hash) : pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname + '/';\n }\n\n const href = a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n\n return href;\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 let object = {\n 'event': 'applied_filter',\n };\n\n if (window.custom_page_type) {\n object.custom_page_type = window.custom_page_type;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href, source: 'catalog' }, 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, source: 'catalog' }, 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.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', (e) => {\n if (e.state && e.state.source == 'catalog') {\n refresh();\n }\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 if (!window.disableScrollTopAfterCatalogLoad) {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\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\n let pathname = a.pathname.replace(/\\/$/, '');\n\n pathname = hash ? (a.pathname.indexOf(':') !== -1 ? pathname + ';' + hash : pathname + '/' + hash) : pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname + '/';\n }\n\n const href = a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n\n return href;\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 let object = {\n 'event': 'applied_filter',\n };\n\n if (window.custom_page_type) {\n object.custom_page_type = window.custom_page_type;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href, source: 'catalog' }, 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, source: 'catalog' }, 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.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', (e) => {\n if (e.state && e.state.source == 'catalog') {\n refresh();\n }\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","disableScrollTopAfterCatalogLoad","scrollTo","top","left","behavior","lazyImages","update","catalogFilterCallback","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","replace","indexOf","$env","shop","isTrailingSlash","origin","search","parseFilterHref","componentName","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","object","custom_page_type","debug","ecommerce","console","log","dataLayer","history","pushState","urlPath","source","title","nextTick","error","addEventListener","e","preventDefault","refresh","location","onpageshow","event","persisted","reload","state","_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,WACLC,OAAOC,kCACRD,OAAOE,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAIdL,OAAOM,YACPN,OAAOM,WAAWC,SAGlBP,OAAOQ,uBACPR,OAAOQ,wBAGXd,SAASe,gBAAgBC,UAAUZ,OAAO,sBAE1Ca,KAmBEC,EAAM,SAACC,EAAGC,OACNC,EAjBc,SAACF,OACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GAExCC,EAAWL,EAAEK,SAASC,QAAQ,MAAO,WAEzCD,EAAWF,GAAqC,IAA7BH,EAAEK,SAASE,QAAQ,KAAc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+C,EAAU,eACN/C,EAAInB,SAASwC,cAAc,KACjCrB,EAAEE,KAAOf,OAAO6D,SAAS9C,KAEzBH,EAAIC,GAAG,WAGXb,OAAO8D,WAAa,SAAUC,GACtBA,EAAMC,WACNhE,OAAO6D,SAASI,UAIxBjE,OAAOyD,iBAAiB,oBAAoB,WACxC9C,IAEAX,OAAOyD,iBAAiB,YAAY,SAACC,GAC7BA,EAAEQ,OAA2B,WAAlBR,EAAEQ,MAAMb,QACnBO,OAIJ5D,OAAO6D,SAAS7C,MAChB4C,OAID,CACHtE,KAAAA,0DCvKR6E,wCAAgBC"}
1
+ {"version":3,"file":"Catalog.js","sources":["../../../src/components/shop/Catalog.vue","../../../src/components/shop/Catalog.vue?vue&type=template&id=7b55c54e&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 if (!window.disableScrollTopAfterCatalogLoad) {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\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\n let pathname = a.pathname.replace(/\\/$/, '');\n\n pathname = hash ? (a.pathname.indexOf(':') !== -1 ? pathname + ';' + hash : pathname + '/' + hash) : pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname + '/';\n }\n\n const href = a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n\n return href;\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 (!window.prevent_applied_filter_track) {\n let object = {\n 'event': 'applied_filter',\n };\n\n if (window.custom_page_type) {\n object.custom_page_type = window.custom_page_type;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href, source: 'catalog' }, 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, source: 'catalog' }, 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.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', (e) => {\n if (e.state && e.state.source == 'catalog') {\n refresh();\n }\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 if (!window.disableScrollTopAfterCatalogLoad) {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n }\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\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\n let pathname = a.pathname.replace(/\\/$/, '');\n\n pathname = hash ? (a.pathname.indexOf(':') !== -1 ? pathname + ';' + hash : pathname + '/' + hash) : pathname;\n\n if ($env.shop.isTrailingSlash) {\n pathname = pathname + '/';\n }\n\n const href = a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n\n return href;\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 (!window.prevent_applied_filter_track) {\n let object = {\n 'event': 'applied_filter',\n };\n\n if (window.custom_page_type) {\n object.custom_page_type = window.custom_page_type;\n }\n\n if ($env.debug.ecommerce) {\n console.log(object);\n }\n\n if (!$env.debug.ecommerce && window.dataLayer) {\n window.dataLayer.push({\n ecommerce: null\n });\n\n window.dataLayer.push(object);\n }\n }\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href, source: 'catalog' }, 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, source: 'catalog' }, 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.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', (e) => {\n if (e.state && e.state.source == 'catalog') {\n refresh();\n }\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","disableScrollTopAfterCatalogLoad","scrollTo","top","left","behavior","lazyImages","update","catalogFilterCallback","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","replace","indexOf","$env","shop","isTrailingSlash","origin","search","parseFilterHref","componentName","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","prevent_applied_filter_track","object","custom_page_type","debug","ecommerce","console","log","dataLayer","history","pushState","urlPath","source","title","nextTick","error","addEventListener","e","preventDefault","refresh","location","onpageshow","event","persisted","reload","state","_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,WACLC,OAAOC,kCACRD,OAAOE,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAIdL,OAAOM,YACPN,OAAOM,WAAWC,SAGlBP,OAAOQ,uBACPR,OAAOQ,wBAGXd,SAASe,gBAAgBC,UAAUZ,OAAO,sBAE1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,UAAU,CAAEC,QAASxC,EAAEE,KAAMuC,OAAQ,WAAa5D,SAAS6D,MAAO1C,EAAEE,MAGhFyC,WAASzD,KAIXY,EAAO,WACTjB,SAASC,iBAAiB,mBAAmBC,SAAQ,SAACiB,GAClDA,EAAE6C,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFhD,EAAIC,UAKVgD,EAAU,eACNhD,EAAInB,SAASwC,cAAc,KACjCrB,EAAEE,KAAOf,OAAO8D,SAAS/C,KAEzBH,EAAIC,GAAG,WAGXb,OAAO+D,WAAa,SAAUC,GACtBA,EAAMC,WACNjE,OAAO8D,SAASI,UAIxBlE,OAAO0D,iBAAiB,oBAAoB,WACxC/C,IAEAX,OAAO0D,iBAAiB,YAAY,SAACC,GAC7BA,EAAEQ,OAA2B,WAAlBR,EAAEQ,MAAMb,QACnBO,OAIJ7D,OAAO8D,SAAS9C,MAChB6C,OAID,CACHvE,KAAAA,0DCzKR8E,wCAAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perevorot/shop",
3
- "version": "2.0.150",
3
+ "version": "2.0.151",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist/*"