PageSourceSearch

https://www.store-charge.com/theme/d3ced1a4f9608283541cbb16aa17cf8…/dvsn-set-configurator.plugin.4de7bb.js

js store-charge.com collected 2026-10-07 02:00:07 UTC 68,092 bytes, 127 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["dvsn-set-configurator.plugin"],{998:t=>{var e="%[a-f0-9]{2}",i=RegExp("("+e+")|([^%]+?)","gi"),r=RegExp("("+e+")+","gi");t.exports=function(t){if("string"!=typeof t)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},s=r.exec(t);s;){try{e[s[0]]=decodeURIComponent(s[0])}catch(t){var a=function(t){try{return decodeURIComponent(t)}catch(s){for(var e=t.match(i)||[],r=1;r<e.length;r++)e=(t=(function t(e,i){try{return[decodeURIComponent(e.join(""))]}catch(t){}if(1===e.length)return e;i=i||1;var r=e.slice(0,i),s=e.slice(i);return Array.prototype.concat.call([],t(r),t(s))})(e,r).join("")).match(i)||[];return t}}(s[0]);a!==s[0]&&(e[s[0]]=a)}s=r.exec(t)}e["%C2"]="�";for(var n=Object.keys(e),o=0;o<n.length;o++){var l=n[o];t=t.replace(RegExp(l,"g"),e[l])}return t}(t)}}},728:t=>{t.exports=function(t,e){for(var i={},r=Object.keys(t),s=Array.isArray(e),a=0;a<r.length;a++){var n=r[a],o=t[n];(s?-1!==e.indexOf(n):e(n,o,t))&&(i[n]=o)}return i}},742:t=>{t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},352:(t,e,i)=>{i.r(e),i.d(e,{default:()=>X});class r{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var i of t.entries())e(i[1],i[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(i=>{e(t[i],i)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}let s="loader",a={BEFORE:"before",INNER:"inner"};class n{create(){if(!this.exists()){if(this.position===a.INNER){this.parent.innerHTML=n.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),n.getTemplate())}}remove(){let t=this.parent.querySelectorAll(".".concat(s));r.iterate(t,t=>t.remove())}exists(){return this.parent.querySelectorAll(".".concat(s)).length>0}_getPosition(){return this.position===a.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(s,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return s}constructor(t,e=a.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}}class o{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return o.isIPhoneDevice()||o.isIPadDevice()}static isNativeWindowsBrowser(){return o.isIEBrowser()||o.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":o.isTouchDevice(),"is-ios":o.isIOSDevice(),"is-native-windows":o.isNativeWindowsBrowser(),"is-iphone":o.isIPhoneDevice(),"is-ipad":o.isIPadDevice(),"is-ie":o.isIEBrowser(),"is-edge":o.isEdgeBrowser()}}}let l="modal-backdrop",c="modal-backdrop-open",u="no-scroll",d={ON_CLICK:"backdrop/onclick"};class p{create(t){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let e=document.body.lastChild;document.documentElement.classList.add(u),setTimeout(function(){e.classList.add(c),"function"==typeof t&&t()},75),this._dispatchEvents()}remove(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350,e=this._getBackdrops();r.iterate(e,t=>t.classList.remove(c)),setTimeout(this._removeExistingBackdrops.bind(this),t),document.documentElement.classList.remove(u)}_dispatchEvents(){let t=o.isTouchDevice()?"touchstart":"click";document.addEventListener(t,function(t){t.target.classList.contains(l)&&document.dispatchEvent(new CustomEvent(d.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(l))}_removeExistingBackdrops(){if(!1===this._exists())return;let t=this._getBackdrops();r.iterate(t,t=>t.remove())}_exists(){return document.querySelectorAll(".".concat(l)).length>0}_getTemplate(){return'<div class="'.concat(l,'"></div>')}constructor(){return p.instance||(p.instance=this),p.instance}}let h=Object.freeze(new p);class g{static create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;h.create(t)}static remove(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;h.remove(t)}static SELECTOR_CLASS(){return l}}let m=Object.freeze(new class extends n{create(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&t&&(g.create(),document.querySelector(".".concat(g.SELECTOR_CLASS())).insertAdjacentHTML("beforeend",n.getTemplate()))}remove(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),t&&g.remove()}constructor(){super(document.body)}});class v{static create(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];m.create(t)}static remove(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];m.remove(t)}}/**
2 * digitvision
3 *
4 * @category  digitvision
5 * @package   Shopware\Plugins\DvsnSetConfigurator
6 * @copyright (c) 2020 digitvision
7 */class y{toggle(t){let e=t.closest("div.stream");if(!1===e.classList.contains("is--collapsed")){e.classList.add("is--collapsed");return}this._plugin.addClass(this._plugin.el.querySelectorAll("div.stream.is--collapsible:not(.is--collapsed)"),"is--collapsed"),e.classList.remove("is--collapsed"),this._plugin.scrollTo("div.stream.is--collapsible:not(.is--collapsed)")}next(t){if("true"===t.getAttribute("data-set-status")||"true"===t.getAttribute("data-multiple")||"true"===t.getAttribute("data-input-status")||null===t.nextElementSibling)return;let e=t.nextElementSibling;!1!==e.classList.contains("stream")&&!1!==e.classList.contains("is--collapsible")&&e.querySelector("div.header").click()}constructor(t,e){this._plugin=t,this._options=e}}class f{get(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=this._createPreparedRequest("GET",t,i);
7return this._sendRequest(r,null,e)}post(t,e,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(e,r);let s=this._createPreparedRequest("POST",t,r);return this._sendRequest(s,e,i)}delete(t,e,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(e,r);let s=this._createPreparedRequest("DELETE",t,r);return this._sendRequest(s,e,i)}patch(t,e,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(e,r);let s=this._createPreparedRequest("PATCH",t,r);return this._sendRequest(s,e,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn("the request to ".concat(t.responseURL," was aborted"))}),t.addEventListener("error",()=>{console.warn("the request to ".concat(t.responseURL," failed with status ").concat(t.status))}),t.addEventListener("timeout",()=>{console.warn("the request to ".concat(t.responseURL," timed out"))})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,i){return this._registerOnLoaded(t,i),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,i){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}/**
8 * digitvision
9 *
10 * @category  digitvision
11 * @package   Shopware\Plugins\DvsnSetConfigurator
12 * @copyright (c) 2020 digitvision
13 */class S{redirect(){let t=document.querySelectorAll("body .product-detail-buy .dvsn-set-configuration--product-inquiry")[0];this._httpClient.abort(),this._httpClient.post(this._options.inquiry.saveSelectionUrl,JSON.stringify({"dvsn-set-configurator--selection":t.querySelector('input[name="dvsn-set-configurator--selection"]').value,"dvsn-set-configurator--product-id":t.querySelector('input[name="dvsn-set-configurator--product-id"]').value,"dvsn-set-configurator--configurator-id":t.querySelector('input[name="dvsn-set-configurator--configurator-id"]').value}),t=>{if(!1===(t=JSON.parse(t)).success){window.location.reload();return}window.location.href=this._options.inquiry.landingPageUrl.replace("___key___",t.key).replace("___qty___",this._plugin.getParentQuantity().toString())})}constructor(t,e){this._plugin=t,this._options=e,this._httpClient=new f(window.accessKey,window.contextToken)}}/**
14 * digitvision
15 *
16 * @category  digitvision
17 * @package   Shopware\Plugins\DvsnSetConfigurator
18 * @copyright (c) 2020 digitvision
19 */class b{formatPrice(t){return this._options.price.pre+this._formatNumber(t,2)+this._options.price.post+this._options.price.star}roundPrice(t){return Math.round(100*t)/100}_formatNumber(t,e){t=this.roundPrice(t).toString();let i=(t+=0>t.indexOf(".")?".0":"").split("."),r=i[0],s=i[1];return void 0===s&&(s=""),r=r.toString(),s=(s=s.toString()).padEnd(e,"0"),(r=r.length>3?r.slice(0,r.length-3)+this._options.number.thousandsSeparator+r.slice(-3):r)+this._options.number.decimalSeparator+s}constructor(t,e){this._plugin=t,this._options=e}}/**
20 * digitvision
21 *
22 * @category  digitvision
23 * @package   Shopware\Plugins\DvsnSetConfigurator
24 * @copyright (c) 2020 digitvision
25 */class _{update(){if(1!==document.querySelectorAll("body .dvsn-set-configurator-availability-information").length)return;let t=this._plugin.el,e=document.querySelector("body .dvsn-set-configurator-availability-information");this._plugin.addClass(e.querySelectorAll(".delivery-information-status-container"),"is--hidden");let i=!0;this._options.configurator.stock<1&&(i=!1),t.querySelectorAll("div.product.is--selected").forEach(t=>{!1!==i&&this._plugin.getProductQuantity(t)>this._plugin.getProductStock(t)&&(i=!1)}),!0===i?e.querySelector(".is--available").classList.remove("is--hidden"):e.querySelector(".is--not-available").classList.remove("is--hidden")}constructor(t,e){this._plugin=t,this._options=e}}/**
26 * digitvision
27 *
28 * @category  digitvision
29 * @package   Shopware\Plugins\DvsnSetConfigurator
30 * @copyright (c) 2020 digitvision
31 */class A{update(){}constructor(t,e){this._plugin=t,this._options=e}}class q{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=q.toUpperCamelCase(t,e);return q.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>q.ucFirst(t.toLowerCase())).join(""):q.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class P{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!P.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===P.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.replace(/^data(|-)/,""),s=q.toLowerCamelCase(r,"-");if(!P.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[s];if(void 0===a){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return q.parsePrimitive(a)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!P.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelector(e)||!1;if(i&&!1===r)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return r}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!P.isNode(t))throw Error("The parent node is not a valid HTML Node!");let r=t.querySelectorAll(e);if(0===r.length&&(r=!1),i&&!1===r)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return r}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not
31([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}let w="js-pseudo-modal";class L{open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:350;this._hideExistingModal(),this._create(),setTimeout(this._open.bind(this,t),e)}close(){let t=this.getModal();this._modalInstance=bootstrap.Modal.getInstance(t),this._modalInstance.hide()}getModal(){return this._modal||this._create(),this._modal}updatePosition(){this._modalInstance.handleUpdate()}updateContent(t,e){this._content=t,this._setModalContent(t),this.updatePosition(),"function"==typeof e&&e.bind(this)()}_hideExistingModal(){try{let t=P.querySelector(document,".".concat(w," .modal"),!1);if(!t)return;let e=bootstrap.Modal.getInstance(t);if(!e)return;e.hide()}catch(t){console.warn("[PseudoModalUtil] Unable to hide existing pseudo modal before opening pseudo modal: ".concat(t.message))}}_open(t){this.getModal(),this._modal.addEventListener("hidden.bs.modal",this._modalWrapper.remove),this._modal.addEventListener("shown.bs.modal",t),this._modalInstance.show()}_create(){this._modalMarkupEl=P.querySelector(document,this._templateSelector),this._createModalWrapper(),this._modalWrapper.innerHTML=this._content,this._modal=this._createModalMarkup(),this._modalInstance=new bootstrap.Modal(this._modal,{backdrop:this._useBackdrop}),document.body.insertAdjacentElement("beforeend",this._modalWrapper)}_createModalWrapper(){this._modalWrapper=P.querySelector(document,".".concat(w),!1),this._modalWrapper||(this._modalWrapper=document.createElement("div"),this._modalWrapper.classList.add(w))}_createModalMarkup(){let t=P.querySelector(this._modalWrapper,".modal",!1);if(t)return t;let e=this._modalWrapper.innerHTML;return this._modalWrapper.innerHTML=this._modalMarkupEl.innerHTML,this._setModalContent(e),P.querySelector(this._modalWrapper,".modal")}_setModalTitle(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{P.querySelector(this._modalWrapper,this._templateTitleSelector).innerHTML=t}catch(t){}}_setModalContent(t){let e=P.querySelector(this._modalWrapper,this._templateContentSelector);e.innerHTML=t;try{let t=P.querySelector(e,this._templateTitleSelector);t&&(this._setModalTitle(t.innerHTML),t.parentNode.removeChild(t))}catch(t){}}constructor(t,e=!0,i=".".concat("js-pseudo-modal-template"),r=".".concat("js-pseudo-modal-template-content-element"),s=".".concat("js-pseudo-modal-template-title-element")){this._content=t,this._useBackdrop=e,this._templateSelector=i,this._templateContentSelector=r,this._templateTitleSelector=s}}/**
32 * digitvision
33 *
34 * @category  digitvision
35 * @package   Shopware\Plugins\DvsnSetConfigurator
36 * @copyright (c) 2020 digitvision
37 */class E{click(t){let e=t.closest(".stream");if(!t.classList.contains("is--fully-selectable")){if(e.classList.contains("is--template-list")){if("info"===e.getAttribute("data-display-list-click-behaviour")){if(t.classList.contains("is--empty-choice"))return;this.open(t.getAttribute("data-id"));return}t.querySelector(".selector input.is--selector-input").click();return}t.classList.contains("is--empty-choice")||this.open(t.getAttribute("data-id"))}}open(t){let e=this;v.create(),this._httpClient.abort(),this._httpClient.get(this._options.info.url.replace("__productId__",t),function(i){e._openProductInfoModal(i,t)})}_openProductInfoModal(t,e){let i=new L(t);v.remove(),i.open(function(){}),i.getModal().classList.add(this._options.info.class)}constructor(t,e){this._plugin=t,this._options=e,this._httpClient=new f(window.accessKey,window.contextToken)}}/**
38 * digitvision
39 *
40 * @category  digitvision
41 * @package   Shopware\Plugins\DvsnSetConfigurator
42 * @copyright (c) 2020 digitvision
43 */class C{has(t){return t.classList.contains("has--input")}get(t){return t.querySelectorAll("input.is--input").length<1?"":t.querySelector("input.is--in
43put").value.toString().split(":").join("--colon--").split(",").join("--comma--")}update(){this._plugin.el.querySelectorAll("div.stream div.product div.input-container .is--input").forEach(t=>{t.disabled=!0}),this._plugin.el.querySelectorAll("div.stream div.product.is--selected div.input-container .is--input").forEach(t=>{t.disabled=!1})}change(t){let e=t.closest(".stream");t.classList.remove("has--input-warning"),0===e.querySelectorAll("div.product.has--input-warning").length&&e.classList.remove("has--input-warning")}constructor(t,e){this._plugin=t,this._options=e}}/**
44 * digitvision
45 *
46 * @category  digitvision
47 * @package   Shopware\Plugins\DvsnSetConfigurator
48 * @copyright (c) 2020 digitvision
49 */class T{update(){this._updatePrices(),this._updatePercentalSurchages(),this._updateRelativePrices()}getFlatSum(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i={price:0,pseudoPrice:0};return!0===t&&(i.price+=this._options.product.price*((100-this._plugin.getParentRebate())/100),i.pseudoPrice+=this._options.product.listPrice>0?this._options.product.listPrice:this._options.product.price),this._plugin.el.querySelectorAll("div.stream").forEach(t=>{let r=this.getFlatStreamSum(t,e);i.price+=r.price,i.pseudoPrice+=r.pseudoPrice}),i}getFlatStreamSum(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!1===this._plugin.isStreamVisible(t))return{price:0,pseudoPrice:0};let i=0,r=0;return t.querySelectorAll("div.product.is--selected").forEach(t=>{if("true"===t.getAttribute("data-is-percental-surcharge"))return;let s=t.closest("div.stream"),a=!0===e?this._plugin.getStreamRebate(s):0,n=this.getPrices(t),o=this._plugin.getProductQuantity(t);i+=this.getPrice(t,o,a);let l=this.getPrice(t,o,0);if("no"!==this._options.config.showListPrice){let t=this._plugin.getProductListPrice(n,o);t>0&&(l=t)}r+=l}),{price:i,pseudoPrice:r}}getFlatProductSum(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return this.getFlatSum(!0,t)}getSurchargeStreamSum(t,e){if(!1===this._plugin.isStreamVisible(t))return{price:0,pseudoPrice:0};let i=0,r=0;return t.querySelectorAll('div.product.is--selected[data-is-percental-surcharge="true"]').forEach(t=>{let s=this._plugin.getProductQuantity(t);i+=this._plugin.roundPrice(e.price*(parseInt(t.getAttribute("data-percental-surcharge-value"),10)/100))*s,r+=this._plugin.roundPrice(e.pseudoPrice*(parseInt(t.getAttribute("data-percental-surcharge-value"),10)/100))*s}),{price:i,pseudoPrice:r}}getSurchargeSum(t){let e={price:0,pseudoPrice:0};return this._plugin.el.querySelectorAll("div.stream").forEach(i=>{let r=this.getSurchargeStreamSum(i,t);e.price+=r.price,e.pseudoPrice+=r.pseudoPrice}),e}getSurchargeProductSum(t){return this.getSurchargeSum(t)}getPrice(t,e,i){return this._getPriceForQuantity(this.getPrices(t),e,i)}getDisplayPrice(t,e,i){return this._getPriceForQuantity(this.getDisplayPrices(t),e,i)}getPrices(t){return this._getPricesArray(t,"prices")}getDisplayPrices(t){return this._getPricesArray(t,"prices-display")}getListPrice(t,e){for(let i in t)if(0===t[i].to||e>=t[i].from&&e<=t[i].to)return this._plugin.roundPrice(e*this._plugin.roundPrice(parseFloat(t[i].listPrice)));return this._plugin.roundPrice(e*this._plugin.roundPrice(parseFloat(t[0].listPrice)))}_getPriceForQuantity(t,e,i){for(let r in t)if(0===t[r].to||e>=t[r].from&&e<=t[r].to)return this._plugin.roundPrice(e*this._plugin.roundPrice(parseFloat(t[r].price)*((100-i)/100)));return this._plugin.roundPrice(e*this._plugin.roundPrice(parseFloat(t[0].price)*((100-i)/100)))}_getPricesArray(t,e){return"string"==typeof t.getAttribute("data-"+e)?JSON.parse(t.getAttribute("data-"+e)):t.getAttribute("data-"+e)}_updatePrices(){this._plugin.el.querySelectorAll("div.stream div.product").forEach(t=>{if(!0===this._plugin.isPercentalSurcharge(t))return;let e=t.closest("div.stream"),i=this._plugin.getStreamRebate(e),r=!0===this._options.config.showUnitPrices?1:this._plugin.getProductQuantity(t),s=this.getDisplayPrices(t),a=this.getDisplayPrice(t,r,i),n=this._plugin.formatPrice(a);if("true"===t.getAttribute("data-is-variant")&&"true"===t.getAttribute("data-is-parent")&&!1===t.classList.contains("is--selected")&&(n=this._options.snippets.fromPrice+" "+n),t.querySelector(".price").innerHTML=n,"no"===this._options.config.showListPrice)return;let o=this._plugin.getProductListPrice(s,r);if(0===o&&"yesAlways"===this._options.config.showListPrice&&i>0&&(o=this._plugin.getProductPrice(s,r,0)),0===o){t.querySelector(".price").classList.remove("has--list-price");return}if("true"===t.getAttribute("data-is-variant")&&"true"===t.getAttribute("data-is-parent")&&!1===t.classList.contains("is--selected")){t.querySelector(".price").classList.remove("has--list-price"),t.querySelector(".list-price").innerHTML="";return}n=this._plugin.formatPrice(o),t.querySelector(".list-price").innerHTML=n,t.querySelector(".price").classList.add("has--list-price")})}_updatePercentalSurchages(){let t=this._plugin.el,e=this._plugin.getFlatProductSum();t.querySelectorAll('div.stream div.product[data-is-percental-surcharge="true"]').forEach(t=>{if("percental"===t.getAttribute("data-percental-surcharge-display")){let e="+ "+t.getAttribute("data-percental-surcharge-value").toString();"true"===t.getAttribute("data-is-variant")&&"true"===t.getAttribute("data-is-parent")&&!1===t.classList.contains("is--selected")&&(e=this._options.snippets.fromPrice+" "+e),t.querySelector(".price").innerHTML=e+"%";return}let i=!0===this._options.config.showUnitPrices?1:this._plugin.getProductQuantity(t),r=e.price*(parseInt(t.getAttribute("data-percental-surcharge-value"),10)/100)*i,s=this._plugin.formatPrice(r);"true"===t.getAttribute("data-is-variant")&&"true"===t.getAttribute("data-is-parent")&&!1===t.classList.contains("is--selected")&&(s=this._options.snippets.fromPrice+" "+s),t.querySelector(".price").innerHTML=s})}
49_updateRelativePrices(){this._plugin.el.querySelectorAll("div.stream").forEach(t=>{"false"!==t.getAttribute("data-relative-prices")&&this._recalculateStreamProductPricesForRelativePrices(t)})}_recalculateStreamProductPricesForRelativePrices(t){let e=this._plugin.getStreamRebate(t),i=!1;if(t.querySelectorAll("div.product").forEach(t=>{!0===this._plugin.isPercentalSurcharge(t)&&(i=!0)}),!0===i)return;let r=0;if("false"===t.getAttribute("data-multiple")&&t.querySelectorAll("div.product.is--selected").length>0){let i=t.querySelector("div.product.is--selected"),s=!0===this._options.config.showUnitPrices?1:this._plugin.getProductQuantity(i);r=this.getDisplayPrice(i,s,e)}t.querySelectorAll("div.product").forEach(i=>{if(!0===this._plugin.isPercentalSurcharge(i))return;if(i.classList.contains("is--selected")){this._plugin.addClass(i.querySelectorAll(".price"),"is--hidden"),(t.classList.contains("is--template-slider")||t.classList.contains("is--template-gallery"))&&this._plugin.addClass(i.querySelectorAll(".stock-indicator"),"is--hidden");return}this._plugin.removeClass(i.querySelectorAll(".price"),"is--hidden"),this._plugin.removeClass(i.querySelectorAll(".stock-indicator"),"is--hidden");let s=!0===this._options.config.showUnitPrices?1:this._plugin.getProductQuantity(i),a=this.getDisplayPrice(i,s,e)-r;i.querySelector(".price").innerHTML=a>0?"+ "+this._plugin.formatPrice(a):0===a?this._plugin.formatPrice(0):"- "+this._plugin.formatPrice(-1*a)})}constructor(t,e){this._plugin=t,this._options=e}}/**
50 * digitvision
51 *
52 * @category  digitvision
53 * @package   Shopware\Plugins\DvsnSetConfigurator
54 * @copyright (c) 2020 digitvision
55 */class k{toggle(t,e){let i=t.closest("div.product"),r=i.closest("div.stream");"false"===r.getAttribute("data-multiple")&&this._plugin.removeClass(r.querySelectorAll("div.product.is--selected"),"is--selected"),!0===e&&i.classList.add("is--selected"),!1===e&&i.classList.remove("is--selected"),this._options.config.autoChangeCollapsableStream&&r.classList.contains("is--collapsible")&&this._plugin.onNextCollapsibleStream(r)}fullySelectableProductClick(t,e){let i=t.target,r=e.closest(".stream"),s=e.querySelector(".selector input.is--selector-input");if(i.classList.contains("is--quantity-select")||i.classList.contains("is--input"))return;if(!0===this._options.config.nameOpensModal&&i.classList.contains("product-info")){if(e.classList.contains("is--empty-choice"))return;this._plugin.openProductInfo(e.getAttribute("data-id"));return}if(r.classList.contains("is--not-selectable"))return;if(r.classList.contains("has--mandatory-warning")&&r.classList.remove("has--mandatory-warning"),e.classList.contains("is--empty-choice")){this._plugin.removeClass(r.querySelectorAll("div.product.is--selected"),"is--selected"),r.querySelectorAll("div.product input.is--selector-input").forEach(function(t){t.checked=!1}),t.preventDefault(),this._plugin.updateEverything();return}if("true"===e.getAttribute("data-is-variant")&&"false"===r.getAttribute("data-multiple")&&!0===s.checked);else if("true"===e.getAttribute("data-is-variant")&&("false"===r.getAttribute("data-multiple")||!1===s.checked)){t.preventDefault(),this._plugin.openVariantSelection(r.getAttribute("data-id"),e.getAttribute("data-parent-id"));return}let a=s.checked;s.checked=!a,this._plugin.setInputSelected(s,s.checked),this._plugin.updateEverything()}inputClick(t,e){let i=e.closest(".product"),r=i.closest(".stream");if(r.classList.contains("has--mandatory-warning")&&r.classList.remove("has--mandatory-warning"),i.classList.contains("is--empty-choice")){this._plugin.removeClass(r.querySelectorAll("div.product.is--selected"),"is--selected"),r.querySelectorAll("div.product input.is--selector-input").forEach(function(t){t.checked=!1}),t.preventDefault(),this._plugin.updateEverything();return}if("true"===i.getAttribute("data-is-variant")&&("false"===r.getAttribute("data-multiple")||!0===e.checked)){t.preventDefault(),this._plugin.openVariantSelection(r.getAttribute("data-id"),i.getAttribute("data-parent-id"));return}this._plugin.setInputSelected(e,e.checked),this._plugin.updateEverything()}constructor(t,e){this._plugin=t,this._options=e}}/**
56 * digitvision
57 *
58 * @category  digitvision
59 * @package   Shopware\Plugins\DvsnSetConfigurator
60 * @copyright (c) 2020 digitvision
61 */class I{update(t){if(0===t.querySelectorAll(".stock-indicator").length)return;let e=t.querySelector(".stock-indicator"),i=this._plugin.getProductQuantity(t),r=this._plugin.getProductStock(t);e.classList.remove("bg-info"),e.classList.remove("bg-danger"),e.classList.remove("bg-success"),e.classList.add(r>=i?"bg-success":"bg-danger")}constructor(t,e){this._plugin=t,this._options=e}}/**
62 * digitvision
63 *
64 * @category  digitvision
65 * @package   Shopware\Plugins\DvsnSetConfigurator
66 * @copyright (c) 2020 digitvision
67 */class M{update(){if(!1!==this._options.configurator.rebateThresholdInfo&&!(this._options.configurator.rebateThresholdValue<=0)){if("configurator"===this._options.configurator.rebateThresholdType){this._updateConfigurator();return}this._updateStreams()}}_updateConfigurator(){document.querySelectorAll(this._options.rebateInfo.configurator.selector).length<1||this._updateContainer(document.querySelector(this._options.rebateInfo.configurator.selector),this._plugin.rebateService.isParentRebateTresholdComplete(),"quantity"===this._options.configurator.rebateThresholdValueType?this._plugin.rebateService._countSelectedProducts():this._plugin.productPriceService.getFlatSum(!1,!1).price,"configurator")}_updateStreams(){this._plugin.el.querySelectorAll("div.stream").forEach(t=>{t.querySelectorAll(this._options.rebateInfo.stream.selector).length<1||this._updateContainer(t.querySelector(this._options.rebateInfo.stream.selector),this._plugin.rebateService.isStreamRebateTresholdComplete(t),"quantity"===this._options.configurator.rebateThresholdValueType?this._plugin.rebateService._countStreamSelectedProducts(t):this._plugin.productPriceService.getFlatStreamSum(t,!1).price,"stream")})}_updateContainer(t,e,i,r){let s=t.getAttribute("data-rebate").toString(),a=this._options.configurator.rebateThresholdValue-i;if(t.querySelectorAll(this._options.rebateInfo.alertSelector).length>0){let i=t.querySelector(this._options.rebateInfo.alertSelector).querySelector(".alert");!0===e?(i.classList.remove("alert-info"),i.classList.add("alert-success")):(i.classList.remove("alert-success"),i.classList.add("alert-info"));let n=!0===e?this._options.snippets.rebateInfoAlert[this._options.configurator.rebateThresholdValueType][r].complete:this._options.snippets.rebateInfoAlert[this._options.configurator.rebateThresholdValueType][r].incomplete,o="true"===t.getAttribute("data-rebate-range")?this._options.snippets.rebateInfoAlert.upTo:"";n=n.replace("#rebate#",o+s),n="quantity"===this._options.configurator.rebateThresholdValueType?n.replace("#missing-value#",a.toString()):n.replace("#missing-value#",this._plugin.formatPrice(this._plugin.roundPrice(a.toString()))),i.querySelector(".alert-content").innerHTML=n}if(t.querySelectorAll(this._options.rebateInfo.barSelector).length>0){let i=t.querySelector(this._options.rebateInfo.barSelector).querySelector(".bar-progress"),r=100-Math.round(a/this._options.configurator.rebateThresholdValue*100);r<1&&(r=0),r>99&&(r=100),i.style.width=r+"%",!0===e?(i.classList.remove("is--incomplete"),i.classList.add("is--complete")):(i.classList.remove("is--complete"),i.classList.add("is--incomplete"))}}constructor(t,e){this._plugin=t,this._options=e}}/**
68 * digitvision
69 *
70 * @category  digitvision
71 * @package   Shopware\Plugins\DvsnSetConfigurator
72 * @copyright (c) 2020 digitvision
73 */class V{getParentRebate(){return!0===this._options.configurator.rebateExcludeParent?0:this._options.configurator.rebateThresholdValue<1||"stream"===this._options.configurator.rebateThresholdType?parseInt(this._options.configurator.rebate,10):!1===this.isParentRebateTresholdComplete()?0:parseInt(this._options.configurator.rebate,10)}isParentRebateTresholdComplete(){return!(("quantity"===this._options.configurator.rebateThresholdValueType?this._countSelectedProducts():this._plugin.productPriceService.getFlatSum(!1,!1).price)<this._options.configurator.rebateThresholdValue)}getStreamRebate(t){return this._options.configurator.rebateThresholdValue<1?parseInt(t.getAttribute("data-rebate"),10):!1===this.isStreamRebateTresholdComplete(t)?0:parseInt(t.getAttribute("data-rebate"),10)}isStreamRebateTresholdComplete(t){return"configurator"===this._options.configurator.rebateThresholdType?this.isParentRebateTresholdComplete():!(("quantity"===this._options.configurator.rebateThresholdValueType?this._countStreamSelectedProducts(t):this._plugin.productPriceService.getFlatStreamSum(t,!1).price)<this._options.configurator.rebateThresholdValue)}_countSelectedProducts(){let t=0;return this._plugin.el.querySelectorAll("div.stream").forEach(e=>{t+=this._countStreamSelectedProducts(e)}),t}_countStreamSelectedProducts(t){let e=0;return t.querySelectorAll("div.product.is--selected").forEach(t=>{this._plugin.isPercentalSurcharge(t)||(e+=this._plugin.getProductQuantity(t))}),e}constructor(t,e){this._plugin=t,this._options=e}}/**
74 * digitvision
75 *
76 * @category  digitvision
77 * @package   Shopware\Plugins\DvsnSetConfigurator
78 * @copyright (c) 2020 digitvision
79 */class x{get(){let t=this._plugin,e=this._plugin.el,i=[];return e.querySelectorAll("div.product input.is--selector-input:checked").forEach(function(e){let r=e.closest(".product"),s=r.closest(".stream");!1!==t.isStreamVisible(s)&&i.push(s.getAttribute("data-id").toString()+":"+r.getAttribute("data-parent-id").toString()+":"+r.getAttribute("data-id").toString()+":"+t.getProductQuantity(r).toString()+":"+(t.hasInput(s)?t.getProductInput(r):""))}),i.join(",")}set(t){let e=this._plugin;document.querySelectorAll("input.dvsn-set-configurator--selection").forEach(function(e){e.value=t}),document.querySelectorAll("input.dvsn-set-configurator--quantity").forEach(function(t){t.value=e.getParentQuantity()})}constructor(t,e){this._plugin=t,this._options=e}}class F{static debounce(t,e){let i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var s=arguments.length,a=Array(s),n=0;n<s;n++)a[n]=arguments[n];r&&!i&&setTimeout(t.bind(t,...a),0),clearTimeout(i),i=setTimeout(t.bind(t,...a),e)}}}class R{_registerEvents(){window.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this)),window.addEventListener("resize",F.debounce(this._onResize.bind(this),200),{capture:!0,passive:!0})}_onDOMContentLoaded(){this._dispatchEvents()}_onResize(){this._viewportHasChanged(R.getCurrentViewport())&&(this._dispatchEvents(),this._dispatchViewportEvent("Viewport/hasChanged"))}_dispatchEvents(){R.isXS()?this._dispatchViewportEvent("Viewport/isXS"):R.isSM()?this._dispatchViewportEvent("Viewport/isSM"):R.isMD()?this._dispatchViewportEvent("Viewport/isMD"):R.isLG()?this._dispatchViewportEvent("Viewport/isLG"):R.isXL()?this._dispatchViewportEvent("Viewport/isXL"):R.isXXL()&&this._dispatchViewportEvent("Viewport/isXXL")}_viewportHasChanged(t){let e=t!==this.currentViewport;return e&&(this.previousViewport=this.currentViewport,this.currentViewport=t),e}_dispatchViewportEvent(t){document.$emitter.publish(t,{previousViewport:this.previousViewport})}static isXS(){return"XS"===R.getCurrentViewport()}static isSM(){return"SM"===R.getCurrentViewport()}static isMD(){return"MD"===R.getCurrentViewport()}static isLG(){return"LG"===R.getCurrentViewport()}static isXL(){return"XL"===R.getCurrentViewport()}static isXXL(){return"XXL"===R.getCurrentViewport()}static getCurrentViewport(){return window.getComputedStyle(document.documentElement).getPropertyValue("--sw-current-breakpoint").replace(/['"]+/g,"").toUpperCase()}constructor(){this.previousViewport=null,this.currentViewport=R.getCurrentViewport(),this._registerEvents()}}/**
80 * digitvision
81 *
82 * @category  digitvision
83 * @package   Shopware\Plugins\DvsnSetConfigurator
84 * @copyright (c) 2020 digitvision
85 */class O{update(){let t=this._plugin.el;t.querySelectorAll('div.stream[data-condition-status="true"]').forEach(e
85=>{let i=e.getAttribute("data-condition-visibility"),r="string"==typeof e.getAttribute("data-condition-conditions")?JSON.parse(e.getAttribute("data-condition-conditions")):e.getAttribute("data-condition-conditions"),s=!1;if(r.forEach(function(i){!0!==s&&t.querySelectorAll("div.stream").forEach(t=>{if(t.classList.contains("is--visibility-disabled")||t.classList.contains("is--visibility-hidden")||t.getAttribute("data-id")===e.getAttribute("data-id")||null!==i.streamId&&i.streamId!==t.getAttribute("data-id"))return;let r=[];switch(i.type){case"any":t.querySelectorAll(".product.is--selected").length>0&&(s=!0);break;case"anyof":t.querySelectorAll(".product.is--selected").forEach(function(t){["id","variant-id","parent-id"].forEach(function(e){let i=t.getAttribute("data-"+e);r.includes(i)||r.push(i)})}),r.filter(t=>i.identifiers.includes(t)).length>0&&(s=!0);break;case"noneof":if(t.querySelectorAll(".product.is--selected").forEach(function(t){["id","variant-id","parent-id"].forEach(function(e){let i=t.getAttribute("data-"+e);r.includes(i)||r.push(i)})}),0===r.length)break;0===r.filter(t=>i.identifiers.includes(t)).length&&(s=!0);break;case"none":0===t.querySelectorAll(".product.is--selected").length&&(s=!0)}})}),!0===s){let r=e.classList.contains("is--visibility-"+i);e.classList.remove("is--visibility-"+i),t.querySelectorAll('div.summary .summary--stream[data-id="'+e.getAttribute("data-id")+'"]').forEach(function(t){t.classList.remove("is--hidden")}),!0===r&&e.classList.contains("is--template-slider")&&(window.PluginManager.getPluginInstanceFromElement(e.querySelector("div.base-slider"),"ProductSlider").rebuild(R.getCurrentViewport(),!0),this._plugin.bindProductEvents(e))}else e.classList.add("is--visibility-"+i),t.querySelectorAll('div.summary .summary--stream[data-id="'+e.getAttribute("data-id")+'"]').forEach(function(t){t.classList.add("is--hidden")})})}constructor(t,e){this._plugin=t,this._options=e}}/**
86 * digitvision
87 *
88 * @category  digitvision
89 * @package   Shopware\Plugins\DvsnSetConfigurator
90 * @copyright (c) 2020 digitvision
91 */class j{update(){let t=this._plugin.el;this._plugin.removeClass(t.querySelectorAll("div.stream.has--set-warning"),"has--set-warning"),this._plugin.removeClass(t.querySelectorAll('div.stream[data-set-status="true"] .set-icons > span'),"is--visible"),t.querySelectorAll('div.stream[data-set-status="true"]').forEach(t=>{let e=0;t.querySelectorAll("div.product.is--selected").forEach(t=>{e+=this._plugin.getProductQuantity(t)});let i="range"===t.getAttribute("data-set-behaviour")?this._options.snippets.setInfoRange:this._options.snippets.setInfo;t.querySelector(".set-info").innerHTML=i.replace("[x]",e.toString()).replace("[y]",t.getAttribute("data-set-quantity")).replace("[z]",t.getAttribute("data-set-quantity-y")),this._plugin.isSetValid(t)?this._plugin.addClass(t.querySelectorAll(".set-icons .checkmark"),"is--visible"):this._plugin.addClass(t.querySelectorAll(".set-icons .cross"),"is--visible")})}isValid(t){let e=0;switch(t.querySelectorAll("div.product.is--selected").forEach(t=>{e+=this._plugin.getProductQuantity(t)}),t.getAttribute("data-set-behaviour")){default:case"free":if(e>parseInt(t.getAttribute("data-set-quantity"),10))return!1;break;case"minimum":if(e<1||e>parseInt(t.getAttribute("data-set-quantity"),10))return!1;break;case"fixed":if(e!==parseInt(t.getAttribute("data-set-quantity"),10))return!1;break;case"range":if(e<parseInt(t.getAttribute("data-set-quantity"),10)||e>parseInt(t.getAttribute("data-set-quantity-y"),10))return!1}return!0}constructor(t,e){this._plugin=t,this._options=e}}/**
92 * digitvision
93 *
94 * @category  digitvision
95 * @package   Shopware\Plugins\DvsnSetConfigurator
96 * @copyright (c) 2020 digitvision
97 */class D{update(){let t=this._plugin.el;if(0===t.querySelectorAll("div.summary").length||t.querySelector("div.summary").classList.contains("is--hidden"))return;let e=t.querySelector("div.summary").classList.contains("is--extended");t.querySelectorAll("div.stream").forEach(i=>{let r=[];i.querySelectorAll("div.product.is--selected").forEach(t=>{let e=this._plugin.getProductQuantity(t),s="string"==typeof t.getAttribute("data-prices")?JSON.parse(t.getAttribute("data-prices")):t.getAttribute("data-prices"),a=t.querySelectorAll(".image img").length>0?t.querySelector(".image img").getAttribute("src"):t.getAttribute("data-cover"),n=this._plugin.getProductPrice(s,e,this._plugin.getStreamRebate(i)),o=0;"no"!==this._options.config.showListPrice&&0===(o=this._plugin.getProductListPrice(s,e))&&"yesAlways"===this._options.config.showListPrice&&this._plugin.getStreamRebate(i)>0&&(o=this._plugin.getProductPrice(s,e,0)),r.push({name:t.getAttribute("data-name"),quantity:e,price:n,listPrice:o,image:a})});let s=t.querySelector('div.summary div.summary--stream[data-id="'+i.getAttribute("data-id")+'"]');if(0===r.length){s.querySelector("div.products--column").innerHTML='<div class="product--empty-line">'+this._options.snippets.summaryEmpty+"</div>";return}let a="";r.forEach(t=>{let i="";i=!0===e?'<div class="product--line block-group"><div class="image-container block"><div class="product-image-wrapper">
97<span class="product-image-link is-minimal image">'+(t.image?'<img src="'+t.image+'" class="product-image is-minimal"/>':"")+'</span></div></div><div class="info-container block"><div class="name">'+(t.quantity>1?'<span class="quantity">'+t.quantity+"x</span> ":"")+t.name+'</div><div class="price-container"><span class="price'+(t.listPrice>0?" has--list-price":"")+'">'+this._plugin.formatPrice(t.price)+"</span>"+(t.listPrice>0?' <span class="list-price">'+this._plugin.formatPrice(t.listPrice)+"</span>":"")+"</div></div></div>":'<div class="product--line">'+(t.quantity>1?'<span class="quantity">'+t.quantity+"x</span> ":"")+t.name+"</div>",a+=i}),s.querySelector("div.products--column").innerHTML=a})}constructor(t,e){this._plugin=t,this._options=e}}/**
98 * digitvision
99 *
100 * @category  digitvision
101 * @package   Shopware\Plugins\DvsnSetConfigurator
102 * @copyright (c) 2020 digitvision
103 */class H{update(){this.updateStreamConditions(),this.parseProductPrices(),this.parseConfiguratorPrice(),this.updateSelectionLabels(),this.updateSummary(),this.updateMandatoryAndSets(),this.updateAvailabilityInformation(),this.updateDeliveryTime(),this.updateRebateInfo(),!0===this._options.config.disableQuantitySelection&&this.updateQuantitySelection(),!0===this._options.config.disableInputFields&&this._plugin.updateInputFields()}updateQuantitySelection(){this._plugin.el.querySelectorAll("div.stream div.product.has--quantity-selection div.quantity-selection select.is--quantity-select").forEach(t=>{t.disabled=!0}),this._plugin.el.querySelectorAll("div.stream div.product.has--quantity-selection.is--selected div.quantity-selection select.is--quantity-select").forEach(t=>{t.disabled=!1})}updateMandatoryAndSets(){let t=this._plugin.el;this._plugin.removeClass(t.querySelectorAll("div.stream.has--mandatory-warning"),"has--mandatory-warning"),this._plugin.removeClass(t.querySelectorAll("div.stream.has--input-warning"),"has--input-warning"),this._plugin.removeClass(t.querySelectorAll("div.product.has--input-warning"),"has--input-warning"),this._plugin.streamSetService.update(),this._plugin.removeClass(t.querySelectorAll("div.stream.is--mandatory .mandatory-icons > span"),"is--visible"),t.querySelectorAll("div.stream.is--mandatory").forEach(t=>{t.querySelectorAll("div.product.is--selected").length>0?this._plugin.addClass(t.querySelectorAll(".mandatory-icons .checkmark"),"is--visible"):this._plugin.addClass(t.querySelectorAll(".mandatory-icons .cross"),"is--visible")})}updateSelectionLabels(){this._plugin.el.querySelectorAll("div.stream.is--template-slider div.product div.selector label").forEach(t=>{t.innerHTML=this._options.snippets.selectable}),this._plugin.el.querySelectorAll("div.stream.is--template-slider div.product.is--selected div.selector label").forEach(t=>{t.innerHTML=this._options.snippets.selected}),this._plugin.el.querySelectorAll("div.stream.is--template-gallery div.product div.selector label").forEach(t=>{t.innerHTML=this._options.snippets.selectable}),this._plugin.el.querySelectorAll("div.stream.is--template-gallery div.product.is--selected div.selector label").forEach(t=>{t.innerHTML=this._options.snippets.selected})}updateSummary(){this._plugin.summaryService.update()}updateStreamConditions(){this._plugin.streamConditionsService.update()}updateDeliveryTime(){this._plugin.productDeliveryTimeService.update()}updateAvailabilityInformation(){this._plugin.productAvailabilityService.update()}parseProductPrices(){this._plugin.productPriceService.update()}parseConfiguratorPrice(){let t=0,e=0;if(!0===this._options.config.treatConfiguratorWithoutConfigurationAsDefaultProduct&&0===this._plugin.el.querySelectorAll("div.stream div.product.is--selected").length)t=this._options.product.price,e=0===this._options.product.listPrice?this._options.product.price:this._options.product.listPrice;else{let i=this._plugin.getFlatProductSum(),r=this._plugin.getSurchargeProductSum(i);t=i.price+r.price,e=i.pseudoPrice+r.pseudoPrice}let i="percental"===this._options.config.showGlobalRebate?Math.round(Math.abs(100-t/e*100))+"%":this._plugin.formatPrice(Math.abs(e-t)),r=e>t?this._options.templates.price.pseudo:this._options.templates.price.default;r=(r=(r=(r=r.replace("{price}",this._plugin.formatPrice(t))).replace("{priceNumeric}",this._plugin.roundPrice(t))).replace("{pseudoPrice}",this._plugin.formatPrice(e))).replace("{rebate}",i),document.querySelectorAll("body .product-detail-price-container").forEach(function(t){t.innerHTML=r})}
103updateRebateInfo(){this._plugin.rebateInfoService.update()}constructor(t,e){this._plugin=t,this._options=e}}/**
104 * digitvision
105 *
106 * @category  digitvision
107 * @package   Shopware\Plugins\DvsnSetConfigurator
108 * @copyright (c) 2020 digitvision
109 */class N{isValid(){let t=this._plugin,e=this._plugin.el;return(this._prepareMandatoryStreams(),this._prepareSetStreams(),this._prepareInputStreams(),e.querySelectorAll("div.stream.has--mandatory-warning").length>0)?(t.scrollTo("div.stream.has--mandatory-warning"),!1):e.querySelectorAll("div.stream.has--input-warning").length>0?(t.scrollTo("div.stream.has--input-warning"),!1):!(e.querySelectorAll("div.stream.has--set-warning").length>0)||(t.scrollTo("div.stream.has--set-warning"),!1)}_prepareMandatoryStreams(){let t=this._plugin,e=this._plugin.el;t.removeClass(e.querySelectorAll("div.stream.has--mandatory-warning"),"has--mandatory-warning"),e.querySelectorAll('div.stream[data-mandatory="true"]').forEach(function(e){!1!==t.isStreamVisible(e)&&0===e.querySelectorAll("div.product.is--selected").length&&e.classList.add("has--mandatory-warning")})}_prepareSetStreams(){let t=this._plugin,e=this._plugin.el;t.removeClass(e.querySelectorAll("div.stream.has--set-warning"),"has--set-warning"),e.querySelectorAll('div.stream[data-set-status="true"]').forEach(function(e){!1!==t.isStreamVisible(e)&&!1===t.isSetValid(e)&&e.classList.add("has--set-warning")})}_prepareInputStreams(){let t=this._plugin;this._plugin.el.querySelectorAll('div.stream[data-input-mandatory="true"] div.product.is--selected').forEach(function(e){""===t.getProductInput(e)&&(e.closest("div.stream").classList.add("has--input-warning"),e.classList.add("has--input-warning"))})}constructor(t,e){this._plugin=t,this._options=e}}let U="element-loader-backdrop";class Q extends n{static create(t){t.classList.add("has-element-loader"),Q.exists(t)||(Q.appendLoader(t),setTimeout(()=>{let e=t.querySelector(".".concat(U));e&&e.classList.add("element-loader-backdrop-open")},1))}static remove(t){t.classList.remove("has-element-loader");let e=t.querySelector(".".concat(U));e&&e.remove()}static exists(t){return t.querySelectorAll(".".concat(U)).length>0}static getTemplate(){return'\n        <div class="'.concat(U,'">\n            <div class="loader" role="status">\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(t){t.insertAdjacentHTML("beforeend",Q.getTemplate())}}var B=i(940);/**
110 * digitvision
111 *
112 * @category  digitvision
113 * @package   Shopware\Plugins\DvsnSetConfigurator
114 * @copyright (c) 2020 digitvision
115 */class W{open(t,e){let i=this;this._httpClient.abort(),v.create();let r="single"===this._options.config.variantSelection?this._options.variant.urlSimple:this._options.variant.urlConfigurator;this._httpClient.get(r.replace("__productId__",e).replace("__streamId__",t),function(r){i._openVariantSelectionModal(r,t,e)})}_openVariantSelectionModal(t,e,i){let r=new L(t);v.remove(),"single"===this._options.config.variantSelection?r.open(this._onOpenVariantSelectionModalSimple.bind(this,r,e,i)):r.open(this._onOpenVariantSelectionModalConfigurator.bind(this,r,e,i)),r.getModal().classList.add(this._options.variant.class)}_onOpenVariantSelectionModalConfigurator(t,e,i){let s=this,a=document.querySelector("div.modal."+this._options.variant.class);a.querySelector("button.btn.btn-primary").addEventListener("click",t=>{let r=a.querySelector(".product-data-container");this._applyVariantData(e,i,r),a.querySelector(".btn-close.close").click()}),a.querySelectorAll("select").forEach(function(n){n.addEventListener("change",function(n){let o={};Q.create(a.querySelector(".modal-body div."+s._options.variant.class)),r.iterate(a.querySelectorAll("select"),t=>{let e=[...t.options].find(t=>t.selected);o[t.name]=e.value});let l={switched:this.name,options:JSON.stringify(o)},c=s._options.variant.urlConfiguratorSwitchVariant.replace("__productId__",i).replace("__streamId__",e)+"?"+B.stringify({...l});s._httpClient.abort(),s._httpClient.get(c,function(r){Q.remove(a.querySelector(".modal-body div."+s._options.variant.class)),t.updateContent(r,function(){s._onOpenVariantSelectionModalConfigurator(t,e,i)})})})})}_onOpenVariantSelectionModalSimple(t,e,i){let r=document.querySelector("div.modal."+this._options.variant.class);r.querySelectorAll(".cover img").length>0&&r.querySelector(".cover img").setAttribute("src",r.querySelectorAll("select option")[0].getAttribute("data-cover")),r.querySelector("button.btn.btn-primary").addEventListener("click",t=>{let s=r.querySelectorAll("select option")[r.querySelector("select").selectedIndex];this._applyVariantData(e,i,s),r.querySelector(".btn-close.close").click()}),r.querySelector("select").addEventListener("change",function(){let t=r.querySelectorAll("select option")[r.querySelector("select").selectedIndex];r.querySelectorAll(".cover img").length>0&&r.querySelector(".cover img").setAttribute("src",t.getAttribute("data-cover"))})}
115_applyVariantData(t,e,i){let r=this._getProduct(t,e),s=r.closest(".stream"),a=i.getAttribute("data-name");"false"===r.getAttribute("data-has-quantity-select")&&parseInt(r.getAttribute("data-quantity"),10)>1&&(a='<span class="quantity">'+r.getAttribute("data-quantity").toString()+"x</span> "+a),"list"===s.getAttribute("data-template")&&!0===this._options.config.hasStockIndicator&&(a='<span class="stock-indicator bg-info"></span> '+a),r.querySelector(".name").innerHTML=a,r.querySelector(".price").innerHTML="";let n="true"===s.getAttribute("data-free")?'[{"from":1,"to":0,"price":0}]':i.getAttribute("data-prices"),o="true"===s.getAttribute("data-free")&&"false"===s.getAttribute("data-free-and-show-prices")?'[{"from":1,"to":0,"price":0}]':i.getAttribute("data-prices");r.setAttribute("data-id",i.getAttribute("data-id")),r.setAttribute("data-number",i.getAttribute("data-number")),r.setAttribute("data-is-variant","true"),r.setAttribute("data-is-parent","false"),r.setAttribute("data-variant-id",i.getAttribute("data-id")),r.setAttribute("data-name",i.getAttribute("data-name")),r.setAttribute("data-weight",i.getAttribute("data-weight")),r.setAttribute("data-stock",i.getAttribute("data-stock")),r.setAttribute("data-prices",n),r.setAttribute("data-prices-display",o),r.setAttribute("data-is-percental-surcharge",i.getAttribute("data-is-percental-surcharge")),r.setAttribute("data-percental-surcharge-value",i.getAttribute("data-percental-surcharge-value")),r.setAttribute("data-percental-surcharge-display",i.getAttribute("data-percental-surcharge-display")),r.querySelectorAll(".product-image-placeholder").length>0&&r.querySelectorAll(".selector--overlay").length>0&&(r.querySelector(".selector--overlay").insertAdjacentHTML("afterend",'<img src="" srcset="" sizes="" class="product-image is-minimal" alt="" title="">'),r.querySelector(".product-image-placeholder").parentNode.removeChild(r.querySelector(".product-image-placeholder"))),r.querySelectorAll(".image img").length>0&&(r.querySelector(".image img").setAttribute("src",i.getAttribute("data-cover")),r.querySelector(".image img").setAttribute("srcset",i.getAttribute("data-cover")));let l=parseInt(i.getAttribute("data-stock").toString(),10),c=parseInt(r.getAttribute("data-quantity").toString(),10)>l?l:parseInt(r.getAttribute("data-quantity").toString(),10);if("true"===r.getAttribute("data-has-quantity-select")){let t=r.querySelector("select");for(;t.firstChild;)t.removeChild(t.firstChild);for(let e=1;e<=l;e++){let i=document.createElement("option");i.value=e.toString(),i.innerHTML=e.toString(),t.appendChild(i)}t.value=c.toString()}r.querySelector("input.is--selector-input").checked=!0,this._plugin.setInputSelected(r.querySelector("input.is--selector-input"),!0),this._plugin.updateEverything(),this._plugin.updateStockIndicator(r)}_getProduct(t,e){return this._plugin.el.querySelector('div.stream[data-id="'+t+'"] div.product[data-parent-id="'+e+'"]')}constructor(t,e){this._plugin=t,this._options=e,this._httpClient=new f(window.accessKey,window.contextToken)}}/**
116 * digitvision
117 *
118 * @category  digitvision
119 * @package   Shopware\Plugins\DvsnSetConfigurator
120 * @copyright (c) 2020 digitvision
121 */class X extends window.PluginBaseClass{init(){this.options.templates.price.pseudo=this.options.templates.price.pseudo.replace("{snippet.list-price-saved-pre}",this.options.snippets.listPriceSavedPre),this.options.templates.price.pseudo=this.options.templates.price.pseudo.replace("{snippet.list-price-saved-post}",this.options.snippets.listPriceSavedPost),this.initPriceTemplate(this.options.price.template),this.initSelection(this.el),this.initCollapsed(this.el),this.initServices(),this.bindEvents(this.el),this.bindProductEvents(this.el),this.bindCustomEvents(),this.updateEverything()}initServices(){this.collapsibleStreamsService=new y(this,this.options),this.inquiryService=new S(this,this.options),this.priceService=new b(this,this.options),this.productAvailabilityService=new _(this,this.options),this.productDeliveryTimeService=new A(this,this.options),this.productInfoService=new E(this,this.options),this.productInputService=new C(this,this.options),this.productPriceService=new T(this,this.options),this.productSelectionService=new k(this,this.options),this.productStockIndicatorService=new I(this,this.options),this.rebateInfoService=new M(this,this.options),this.rebateService=new V(this,this.options),this.selectionService=new x(this,this.options),this.streamConditionsService=new O(this,this.options),this.streamSetService=new j(this,this.options),this.summaryService=new D(this,this.options),this.updaterService=new H(this,this.options),this.validationService=new N(this,this.options),this.variantSelectionService=new W(this,this.options)}initCollapsed(t){this.addClass(t.querySelectorAll("div.stream.is--collapsible.add--is--collapsed"),"is--collapsed"),this.removeClass(t.querySelectorAll("div.stream.is--collapsible.add--is--collapsed"),"add--is--collapsed")}initPriceTemplate(t){this.options.price.pre=t.toString().split("55")[0].split("222")[0].split("11")[0],this.options.price.post=t.toString().split("55")[1],this.options.number.decimalSeparator=t.toString().split("55")[0].split("222")[1],this.options.number.thousandsSeparator=t.toString().split("55")[0].split("222")[0].split("11")[1]}initSelection(t){t.querySelectorAll("div.product input.is--selector-input:checked").forEach(function(t){t.closest(".product").classList.add("is--selected")})}bindCustomEvents(){}bindEvents(t){let e=this;t.querySelectorAll("div.stream.is--collapsible div.header").forEach(function(t){t.addEventListener("click",function(t){e.onCollapsibleHeaderClick(t,this)})}),document.querySelectorAll("body .product-detail-buy .dvsn-set-configurator--save-selection").forEach(function(t){t.addEventListener("click",function(t){if(!1===e.validateSelection()){t.preventDefault();return}v.create(),e.setSelection(e.parseSelection())})}),document.querySelectorAll("body .product-detail-buy form.buy-widget button.btn.btn-buy").forEach(function(t){t.addEventListener("click",function(t){!1===e.validateSelection()&&t.preventDefault(),e.setSelection(e.parseSelection())})}),document.querySelectorAll("body .product-detail-buy .dvsn-set-configuration--product-inquiry .product-inquiry-action").forEach(function(t){t.addEventListener("click",function(t){if(!1===e.validateSelection()){t.preventDefault();return}v.create(),e.setSelection(e.parseSelection()),e.prepareInquiry()})})}bindProductEvents(t){let e=this;
121t.querySelectorAll("div.product input:not([type='text'])").forEach(function(t){t.addEventListener("click",function(t){e.onInputClick(t,this)})}),t.querySelectorAll("div.product.is--fully-selectable").forEach(function(t){t.addEventListener("click",function(t){e.onFullySelectableProductClick(t,this)})}),t.querySelectorAll("div.product div.quantity-selection select").forEach(function(t){t.addEventListener("change",function(t){e.onQuantityChange(t,this)})}),t.querySelectorAll("div.product.is--fully-selectable label").forEach(function(t){t.addEventListener("click",function(t){t.preventDefault()})}),t.querySelectorAll("div.product .name, div.product .price, div.product .image").forEach(function(t){t.addEventListener("click",function(t){e.onProductDataClick(t,this)})}),t.querySelectorAll("div.product input.is--input").forEach(function(t){t.addEventListener("keyup",function(t){e.onInputChange(t,this)})})}onQuantityChange(t,e){this.updateStockIndicator(e.closest(".product")),this.updateEverything()}scrollTo(t){let e=this.el.querySelector(t).getBoundingClientRect().top+window.pageYOffset+-100;window.scrollTo({top:e,behavior:"smooth"})}addClass(t,e){t.forEach(function(t){t.classList.add(e)})}removeClass(t,e){t.forEach(function(t){t.classList.remove(e)})}getParentQuantity(){return document.querySelectorAll("form.buy-widget .product-detail-quantity-input").length>0?document.querySelector("form.buy-widget .product-detail-quantity-input").value:document.querySelectorAll("form.buy-widget .quantity-selector-group-input").length>0?document.querySelector("form.buy-widget .quantity-selector-group-input").value:1}getProductQuantity(t){return"true"===t.getAttribute("data-has-quantity-select")?parseInt(t.querySelector("select").value,10):parseInt(t.getAttribute("data-quantity"),10)}getProductStock(t){return parseInt(t.getAttribute("data-stock"),10)}isPercentalSurcharge(t){return"true"===t.getAttribute("data-is-percental-surcharge")}getParentRebate(){return this.rebateService.getParentRebate()}getStreamRebate(t){return this.rebateService.getStreamRebate(t)}isStreamVisible(t){return!t.classList.contains("is--visibility-hidden")&&!t.classList.contains("is--visibility-disabled")}updateEverything(){this.updaterService.update()}getProductInput(t){return this.productInputService.get(t)}hasInput(t){return this.productInputService.has(t)}getProductPrice(t,e,i){return this.productPriceService._getPriceForQuantity(t,e,i)}getProductListPrice(t,e){return this.productPriceService.getListPrice(t,e)}updateInputFields(){this.productInputService.update()}onInputChange(t,e){this.productInputService.change(e.closest(".product"))}onFullySelectableProductClick(t,e){this.productSelectionService.fullySelectableProductClick(t,e)}onInputClick(t,e){this.productSelectionService.inputClick(t,e)}setInputSelected(t,e){this.productSelectionService.toggle(t,e)}getSurchargeProductSum(t){return this.productPriceService.getSurchargeProductSum(t)}getFlatProductSum(){return this.productPriceService.getFlatProductSum()}validateSelection(){return this.validationService.isValid()}parseSelection(){return this.selectionService.get()}setSelection(t){this.selectionService.set(t)}formatPrice(t){return this.priceService.formatPrice(t)}roundPrice(t){return this.priceService.roundPrice(t)}updateStockIndicator(t){this.productStockIndicatorService.update(t)}isSetValid(t){return this.streamSetService.isValid(t)}prepareInquiry(){this.inquiryService.redirect()}onCollapsibleHeaderClick(t,e){this.collapsibleStreamsService.toggle(e)}onNextCollapsibleStream(t){this.collapsibleStreamsService.next(t)}openVariantSelection(t,e){this.variantSelectionService.open(t,e)}onProductDataClick(t,e){this.productInfoService.click(e.closest(".product"))}openProductInfo(t){this.productInfoService.open(t)}}X.options=new /**
122 * digitvision
123 *
124 * @category  digitvision
125 * @package   Shopware\Plugins\DvsnSetConfigurator
126 * @copyright (c) 2020 digitvision
127 */class{constructor(){this.product={id:"",number:"",price:0,listPrice:0,weight:0,stock:0,hasDeliveryTime:!1,deliveryTime:null,restockTime:-1},this.configurator={rebate:0,rebateExcludeParent:void 0,rebateThresholdInfo:void 0,rebateThresholdType:"",rebateThresholdValueType:void 0,rebateThresholdValue:0,position:"",summary:void 0,free:void 0,collapsible:void 0},this.price={template:"",star:"",pre:"",post:""},this.number={decimalSeparator:"",thousandsSeparator:""},this.info={title:"",url:"",class:"dvsn-set-configurator--product-info"},this.variant={title:"",urlSimple:"",urlConfigurator:"",urlConfiguratorSwitchVariant:"",class:"dvsn-set-configurator--variant-selection"},this.inquiry={landingPageUrl:"",saveSelectionUrl:""},this.rebateInfo={alertSelector:".rebate-alert-container",barSelector:".rebate-bar-container",configurator:{selector:".dvsn-set-configurator-rebate-info-container.rebate-info-configurator"},stream:{selector:".dvsn-set-configurator-rebate-info-container.rebate-info-stream"}},this.snippets={selectable:"",selected:"",summaryEmpty:"",setInfo:"",setInfoRange:"",fromPrice:"",listPriceSavedPre:"",listPriceSavedPost:"",rebateInfoAlert:{price:{stream
127:{incomplete:"",complete:""},configurator:{incomplete:"",complete:""}},quantity:{stream:{incomplete:"",complete:""},configurator:{incomplete:"",complete:""}},upTo:""}},this.config={hasStockIndicator:!1,showUnitPrices:!1,disableQuantitySelection:!1,disableInputFields:!1,nameOpensModal:!1,treatConfiguratorWithoutConfigurationAsDefaultProduct:!1,showListPrice:"no",showGlobalRebate:"percental",variantSelection:"single",autoChangeCollapsableStream:!1},this.templates={price:{default:'<p class="product-detail-price">{price}</p>',pseudo:'<p class="product-detail-price with-list-price">{price}</p><span class="list-price-badge">%</span><span class="product-detail-list-price-wrapper"><span class="list-price-price">{pseudoPrice}</span> <span class="list-price-percentage">({snippet.list-price-saved-pre}{rebate}{snippet.list-price-saved-post})</span></span>'}}}}},940:(t,e,i)=>{let r=i(742),s=i(998),a=i(231),n=i(728),o=t=>null==t,l=Symbol("encodeFragmentIdentifier");function c(t){if("string"!=typeof t||1!==t.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?r(t):encodeURIComponent(t):t}function d(t,e){return e.decode?s(t):t}function p(t){let e=t.indexOf("#");return -1!==e&&(t=t.slice(0,e)),t}function h(t){let e=(t=p(t)).indexOf("?");return -1===e?"":t.slice(e+1)}function g(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):e.parseBooleans&&null!==t&&("true"===t.toLowerCase()||"false"===t.toLowerCase())&&(t="true"===t.toLowerCase()),t}function m(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);let i=function(t){let e;switch(t.arrayFormat){case"index":return(t,i,r)=>{if(e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),!e){r[t]=i;return}void 0===r[t]&&(r[t]={}),r[t][e[1]]=i};case"bracket":return(t,i,r)=>{if(e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),!e){r[t]=i;return}if(void 0===r[t]){r[t]=[i];return}r[t]=[].concat(r[t],i)};case"colon-list-separator":return(t,i,r)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){r[t]=i;return}if(void 0===r[t]){r[t]=[i];return}r[t]=[].concat(r[t],i)};case"comma":case"separator":return(e,i,r)=>{let s="string"==typeof i&&i.includes(t.arrayFormatSeparator),a="string"==typeof i&&!s&&d(i,t).includes(t.arrayFormatSeparator);i=a?d(i,t):i;let n=s||a?i.split(t.arrayFormatSeparator).map(e=>d(e,t)):null===i?i:d(i,t);r[e]=n};case"bracket-separator":return(e,i,r)=>{let s=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!s){r[e]=i?d(i,t):i;return}let a=null===i?[]:i.split(t.arrayFormatSeparator).map(e=>d(e,t));if(void 0===r[e]){r[e]=a;return}r[e]=[].concat(r[e],a)};default:return(t,e,i)=>{if(void 0===i[t]){i[t]=e;return}i[t]=[].concat(i[t],e)}}}(e),r=Object.create(null);if("string"!=typeof t||!(t=t.trim().replace(/^[?#&]/,"")))return r;for(let s of t.split("&")){if(""===s)continue;let[t,n]=a(e.decode?s.replace(/\+/g," "):s,"=");n=void 0===n?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?n:d(n,e),i(d(t,e),n,r)}for(let t of Object.keys(r)){let i=r[t];if("object"==typeof i&&null!==i)for(let t of Object.keys(i))i[t]=g(i[t],e);else r[t]=g(i,e)}return!1===e.sort?r:(!0===e.sort?Object.keys(r).sort():Object.keys(r).sort(e.sort)).reduce((t,e)=>{let i=r[e];return i&&"object"==typeof i&&!Array.isArray(i)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(i):t[e]=i,t},Object.create(null))}e.extract=h,e.parse=m,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);let i=i=>e.skipNull&&o(t[i])||e.skipEmptyString&&""===t[i],r=function(t){switch(t.arrayFormat){case"index":return e=>(i,r)=>{let s=i.length;return void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?i:null===r?[...i,[u(e,t),"[",s,"]"].join("")]:[...i,[u(e,t),"[",u(s,t),"]=",u(r,t)].join("")]};case"bracket":return e=>(i,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?i:null===r?[...i,[u(e,t),"[]"].join("")]:[...i,[u(e,t),"[]=",u(r,t)].join("")];case"colon-list-separator":return e=>(i,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?i:null===r?[...i,[u(e,t),":list="].join("")]:[...i,[u(e,t),":list=",u(r,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e="bracket-separator"===t.arrayFormat?"[]=":"=";return i=>(r,s)=>void 0===s||t.skipNull&&null===s||t.skipEmptyString&&""===s?r:(s=null===s?"":s,0===r.length)?[[u(i,t),e,u(s,t)].join("")]:[[r,u(s,t)].join(t.arrayFormatSeparator)]}default:return e=>(i,r)=>void 0===r||t.skipNull&&null===r||t.skipEmptyString&&""===r?i:null===r?[...i,u(e,t)]:[...i,[u(e,t),"=",u(r,t)].join("")]}}(e),s={};for(let e of Object.keys(t))i(e)||(s[e]=t[e]);let a=Object.keys(s);return!1!==e.sort&&a.sort(e.sort),a.map(i=>{let s=t[i];return void 0===s?"":null===s?u(i,e):Array.isArray(s)?0===s.length&&"bracket-separator"===e.arrayFormat?u(i,e)+"[]":s.reduce(r(i),[]).join("&"):u(i,e)+"="+u(s,e)}).filter(t=>t.length>0).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[i,r]=a(t,"#");return Object.assign({url:i.split("?")[0]||"",query:m(h(t),e)},e&&e.parseFragmentIdentifier&&r?{fragmentIdentifier:d(r,e)}:{})},e.stringifyUrl=(t,i)=>{i=Object.assign({encode:!0,strict:!0,[l]:!0},i);let r=p(t.url).split("?")[0]||"",s=e.extract(t.url),a=Object.assign(e.parse(s,{sort:!1}),t.query),n=e.stringify(a,i);n&&(n="?".concat(n));let o=function(t){let e="",i=t.indexOf("#");return -1!==i&&(e=t.slice(i)),e}(t.url);return t.fragmentIdentifier&&(o="#".concat(i[l]?u(t.fragmentIdentifier,i):t.fragmentIdentifier)),"".concat(r).concat(n).concat(o)},e.pick=(t,i,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[l]:!1},r);let{url:s,query:a,fragmentIdentifier:o}=e.parseUrl(t,r);return e.stringifyUrl({url:s,query:n(a,i),fragmentIdentifier:o},r)},e.exclude=(t,i,r)=>{let s=Array.isArray(i)?t=>!i.includes(t):(t,e)=>!i(t,e);return e.pick(t,s,r)}},231:t=>{t.exports=(t,e)=>{if(!("string"==typeof t&&"string"==typeof e))throw TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];let i=t.indexOf(e);return -1===i?[t]:[t.slice(0,i),t.slice(i+e.length)]}}}]);

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.