PageSourceSearch

https://www.galindberg.se/dist/script/advantages-table.a765c3fdc6cd07ca4857.js

js galindberg.se collected 2026-09-24 13:08:10 UTC 11,253 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkknowit_seed_project=self.webpackChunkknowit_seed_project||[]).push([[7329,6709],{21049:(t,e,a)=>{a.d(e,{I:()=>r});var r=function(t){return window.__litium.translation[t]||t}},75545:(t,e,a)=>{a.r(e),a.d(e,{default:()=>i});var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.visible?a("div",[a("div",{staticClass:"modal fade show",staticStyle:{display:"block"},attrs:{id:"abandonedCartModal",tabindex:"-1",role:"dialog","aria-modal":"true"}},[a("div",{staticClass:"modal-dialog modal-lg",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("h1",{staticClass:"modal-title h5"},[t._v(t._s(t.translate("abandonedcart.cartsaved")))]),t._v(" "),a("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:t.closeModal}},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])]),t._v(" "),a("div",{staticClass:"modal-body"},[t._v("\n          "+t._s(t.translate("abandonedcart.introtext"))+"\n          "),a("div",{staticClass:"c-buy c-buy__abandoned mt-3"},[a("h2",{staticClass:"d-flex align-items-center h5"},[a("svg",{staticClass:"bi bi-cart mr-2",attrs:{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",fill:"currentColor",viewBox:"0 0 16 16"}},[a("path",{attrs:{d:"M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .491.592l-1.5 8A.5.5 0 0 1 13 12H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5zM3.102 4l1.313 7h8.17l1.313-7H3.102zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"}})]),t._v("\n              "+t._s(t.totalQuantity)+" "+t._s(t.translate("abandonedcart.products"))+"\n            ")]),t._v(" "),a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table mt-2"},[a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[t._v(t._s(t.translate("abandonedcart.variant")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.translate("abandonedcart.quantity")))]),t._v(" "),a("th",{attrs:{scope:"col"}},[t._v(t._s(t.translate("abandonedcart.price")))])])]),t._v(" "),a("tbody",t._l(t.products,(function(e){return a("tr",{key:e.ArticleNumber},[a("td",{attrs:{"data-header":"Variant"}},[a("a",{staticClass:"c-buy__abandoned__product",attrs:{href:e.Url}},[a("picture",[a("img",{attrs:{src:e.Image}})]),t._v("\n                        "+t._s(e.ArticleNumber)+"\n                      ")])]),t._v(" "),a("td",{attrs:{"data-header":"Antal"}},[t._v(t._s(e.Quantity))]),t._v(" "),a("td",{attrs:{"data-header":"Pris"}},[t._v(t._s(e.Price))])])})),0),t._v(" "),a("tfoot",[a("tr",[a("th",{attrs:{scope:"row",colspan:"2"}},[t._v(t._s(t.translate("abandonedcart.totalexklvat")))]),t._v(" "),a("th",[t._v(t._s(t.totalPrice))])])])])])])]),t._v(" "),a("div",{staticClass:"modal-footer"},[a("button",{staticClass:"btn btn-outline-dark",attrs:{type:"button"},on:{click:t.closeModal}},[t._v("\n            "+t._s(t.translate("abandonedcart.closemodal"))+"\n          ")]),t._v(" "),a("a",{staticClass:"btn btn-primary",attrs:{href:t.checkoutLink}},[t._v("\n            "+t._s(t.translate("abandonedcart.gotocart"))+"\n          ")])])])])]),t._v(" "),a("div",{staticClass:"modal-backdrop fade show"})]):t._e()};r._withStripped=!0;var n=a(21049);const o={name:"AbandonedCartModal",props:{showModal:{type:Boolean,required:!0},products:{type:Array,default:function(){return[]}},checkoutLink:String,totalPrice:String,totalQuantity:String},data:function(){return{visible:!1}},watch:{showModal:function(t){this.visible=t}},methods:{closeModal:function(){this.visible=!1,this.$emit("close")},translate:function(t){return(0,n.I)(t)}},mounted:function(){var t=this;this.showModal&&setTimeout((function(){t.visible=!0}),1e3)}};var s=(0,a(51900).Z)(o,r,[],!1,null,null,null);s.options.__file="app/vue-js/components/abandoned-cart/abandoned-cart-modal.vue";const i=s.exports},16182:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"p-product__meta__group__advantages"},[a("div",{domProps:{innerHTML:t._s(t.displayedAdvantages)}}),t._v(" "),t.rowCount>t.nrOfRowsToShow?a("button",{staticClass:"btn-link btn btn-text-reveal",on:{click:t.toggleShow}},[t._v(t._s(t.button.text)+" "),a("span",{staticClass:"c-arrow ml-1",class:t.arrowClass})]):t._e()])};r._withStripped=!0;var n=a(70538),o=a(21049);const s=n.default.extend({name:"advantages-table",props:{advantages:{type:String,required:!0}},data:()=>({reveal:!1,button:{text:(0,o.I)("show.more")},nrOfRowsToShow:4,arrowClass:"down"}),methods:{translate:function(t){return(0,o.I)(t)},toggleShow:function(){this.reveal=!this.reveal,this.button.text=this.reveal?(0,o.I)("show.less"):(0,o.I)("show.more"),this.arrowClass=this.reveal?"up":"down"}}
1,computed:{rowCount(){const t=document.createElement("div");return t.innerHTML=this.advantages,t.querySelectorAll("li").length},displayedAdvantages(){if(this.reveal||this.rowCount<=this.nrOfRowsToShow)return this.advantages;{const t=document.createElement("div");t.innerHTML=this.advantages;const e=t.querySelector("ul");if(e){const t=e.querySelectorAll("li");for(let e=this.nrOfRowsToShow;e<t.length;e++)t[e].style.display="none"}return t.innerHTML}}}});var i=(0,a(51900).Z)(s,r,[],!1,null,null,null);i.options.__file="app/vue-js/components/advantages-table/advantages-table.vue";const l=i.exports},29204:(t,e,a)=>{a.r(e),a.d(e,{default:()=>p});var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.shouldBeGrouped?t._e():a("div",{staticClass:"c-variantmenu"},[a("span",{staticClass:"c-variantmenu__label"},[t._v(t._s(t.translate("variants.heading")))]),t._v(" "),a("b-dropdown",{attrs:{"no-flip":"",variant:"outline-dark",text:t.productItem.name}},t._l(t.variants,(function(e){return a("b-dropdown-item",{key:e.id,class:{active:t.isActive(e)},attrs:{href:e.url},on:{click:function(a){return t.onSelect(e)}}},[t._v("\n        "+t._s(e.name)+"\n      ")])})),1)],1),t._v(" "),t.shouldBeGrouped?a("grouped-selector",{attrs:{variants:t.variants,productItem:t.productItem}}):t._e()],1)};r._withStripped=!0;var n=a(70538),o=a(21049),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"c-variantmenu"},[a("span",{staticClass:"c-variantmenu__label d-block"},[t._v(t._s(t.translate("productselector.groupheading")))]),t._v(" "),a("b-dropdown",{attrs:{"no-flip":"",variant:"outline-dark",text:t.activeGroupLabel}},t._l(t.uniqueGroups,(function(e){return a("b-dropdown-item",{key:e,class:{active:t.isGroupActive(e)},on:{click:function(a){return t.groupedSelected(e)}}},[t._v("\n        "+t._s(e)+"\n      ")])})),1)],1),t._v(" "),a("div",{staticClass:"mt-4 c-variantmenu"},[a("span",{staticClass:"c-variantmenu__label"},[t._v(t._s(t.translate("productselector.groupedVariants")))]),t._v(" "),a("b-dropdown",{attrs:{"no-flip":"",variant:"outline-dark",text:t.activeVariant}},t._l(t.groupedVariants,(function(e){return a("b-dropdown-item",{key:e.id,class:{active:t.isVariantActive(e)},on:{click:function(a){return t.variantSelected(e)}}},[t._v("\n        "+t._s(e.GroupedVolume)+"\n      ")])})),1)],1)])};s._withStripped=!0;const i=n.default.extend({name:"product-variant-selector",props:{variants:{type:Array,required:!0},productItem:{type:Object,required:!0,default:null}},data:()=>({activeGroup:"",activeVariant:""}),computed:{uniqueGroups(){const t=new Set,e=[];(this.variants||[]).forEach((a=>{var r;const n=null!==(r=null==a?void 0:a.GroupedName)&&void 0!==r?r:"";n&&(t.has(n)||(t.add(n),e.push(n)))}));const a=t=>{const e=t.lastIndexOf("("),a=t.lastIndexOf(")");if(-1===e||-1===a||a<=e)return{hasNumber:!1,num:0};const r=t.substring(e+1,a).match(/0*(\d+)\s*$/);return r?{hasNumber:!0,num:parseInt(r[1],10)}:{hasNumber:!1,num:0}};return e.sort(((t,e)=>{const r=a(t),n=a(e);return r.hasNumber&&n.hasNumber?r.num!==n.num?r.num-n.num:t.localeCompare(e,void 0,{sensitivity:"base"}):r.hasNumber&&!n.hasNumber?-1:!r.hasNumber&&n.hasNumber?1:t.localeCompare(e,void 0,{sensitivity:"base"})})),e},groupedVariants(){const t=(this.variants||[]).filter((t=>String(t.GroupedName).toLowerCase()===String(this.activeGroup||"").toLowerCase())),e=[];return t.forEach((t=>{const a=String(t.GroupedVolume||"").replace(/[\d.,\s]+/g,"").trim().toLowerCase();a&&-1===e.indexOf(a)&&e.push(a)})),t.sort(((t,e)=>{const a=t=>{const e=t.match(/^\d+/);return e?parseInt(e[0],10):0},r=String(t.GroupedVolume||""),n=String(e.GroupedVolume||""),o=a(r),s=a(n);return o!==s?o-s:r.localeCompare(n,void 0,{sensitivity:"base"})}))},activeGroupLabel(){return this.activeGroup}},methods:{translate:t=>(0,o.I)(t),isGroupActive(t){var e,a,r=null!==(a=null===(e=this.productItem)||void 0===e?void 0:e.GroupedName)&&void 0!==a?a:"";return String(r).toLowerCase()===String(t||"").toLowerCase()},groupedSelected(t){var e;this.activeGroup=t;const a=String(this.activeVariant||"");let r=(this.variants||[]).find((e=>String(null==e?void 0:e.GroupedName)===String(t)&&String(null==e?void 0:e.GroupedVolume)===a));if(!r){const t=this.groupedVariants;t&&t.length>0&&(r=t[0])}r?(this.activeVariant=null!==(e=r.GroupedVolume)&&void 0!==e?e:this.translate("productselector.choosevolume"),r.url&&(window.location.href=r.url)):this.activeVariant=this.translate("productselector.choosevolume")},isVariantActive(t){var e;return String(t.name).toLowerCase()===String((null===(e=this.productItem)||void 0===e?void 0:e.name)||"").toLowerCase()},variantSelected(t){window.location.href=t.url}}
1,mounted(){var t,e;this.activeGroup=null===(t=this.productItem)||void 0===t?void 0:t.GroupedName,this.activeVariant=null===(e=this.productItem)||void 0===e?void 0:e.GroupedVolume,console.log(this.variants)}});var l=a(51900),d=(0,l.Z)(i,s,[],!1,null,null,null);d.options.__file="app/vue-js/components/product-variant-selector/product-variant-selector-grouped.vue";const c=d.exports,u=n.default.extend({name:"product-variant-selector",components:{"grouped-selector":c},props:{variants:{type:Array,required:!0},productItem:{type:Object,required:!0,default:null},shouldBeGrouped:{type:Boolean,required:!1,default:!1}},methods:{translate:t=>(0,o.I)(t),isActive(t){return String(this.productItem.name).toLowerCase()===String((null==t?void 0:t.name)||"").toLowerCase()},onSelect(t){window.location.href=t.url}}});var v=(0,l.Z)(u,r,[],!1,null,null,null);v.options.__file="app/vue-js/components/product-variant-selector/product-variant-selector.vue";const p=v.exports},51900:(t,e,a)=>{function r(t,e,a,r,n,o,s,i){var l,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=a,d._compiled=!0),r&&(d.functional=!0),o&&(d._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},d._ssrRegister=l):n&&(l=i?function(){n.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(d.functional){d._injectStyles=l;var c=d.render;d.render=function(t,e){return l.call(e),c(t,e)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:d}}a.d(e,{Z:()=>r})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.