PageSourceSearch

https://www.new-walls.com/theme/b3ba08847f76eb802d66a86cd0799834/j…/wdu-upselling-slider.js?1789563919

js new-walls.com collected 2026-09-26 19:34:18 UTC 10,810 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function s(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,r,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||e,c.cloneUnlessOtherwiseSpecified=i;var u,l,d=Array.isArray(r);return d!==Array.isArray(t)?i(r,c):d?c.arrayMerge(t,r,c):(l={},(u=c).isMergeableObject(t)&&s(t).forEach(function(e){l[e]=i(t[e],u)}),s(r).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&u.isMergeableObject(r[e])?l[e]=(function(t,e){if(!e.customMerge)return a;var r=e.customMerge(t);return"function"==typeof r?r:a})(e,u)(t[e],r[e],u):l[e]=i(r[e],u))}),l)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,r){return a(t,r,e)},{})},t.exports=a}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,r),s.exports}(()=>{r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e}})(),(()=>{r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})}})(),(()=>{r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})(),(()=>{var t=r(857),e=r.n(t);class i{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 r=i.toUpperCamelCase(t,e);return i.lcFirst(r)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>i.ucFirst(t.toLowerCase())).join(""):i.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.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 r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=e.replace(/^data(|-)/,""),o=i.toLowerCamelCase(s,"-");if(!n.isNode(t)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[o];if(void 0===a){if(r)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return a}return i.parsePrimitive(a)}static querySelector(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(r&&!1===i)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return i}static querySelectorAll(t,e){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return i}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
1([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]}}class s{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=t.split("."),s=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=s;s=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,r)=>([...r.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):t.push(r),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class o{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let r=i.toDashCase(this._pluginName),s=n.getDataAttribute(this.el,"data-".concat(r,"-config"),!1),o=n.getAttribute(this.el,"data-".concat(r,"-options"),!1),a=[this.constructor.options,this.options,t];s&&a.push(window.PluginConfigManager.get(this._pluginName,s));try{o&&a.push(JSON.parse(o))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(r,'-options" could not be parsed to json: ').concat(t.message))}return e().all(a.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},r=!1){if(!n.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new s(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}class a{static debounce(t,e){let r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var n=arguments.length,s=Array(n),o=0;o<n;o++)s[o]=arguments[o];i&&!r&&setTimeout(t.bind(t,...s),0),clearTimeout(r),r=setTimeout(t.bind(t,...s),e)}}}class c{_registerEvents(){window.addEventListener("DOMContentLoaded",this._onDOMContentLoaded.bind(this)),window.addEventListener("resize",a.debounce(this._onResize.bind(this),200),{capture:!0,passive:!0})}_onDOMContentLoaded(){this._dispatchEvents()}_onResize(){this._viewportHasChanged(c.getCurrentViewport())&&(this._dispatchEvents(),this._dispatchViewportEvent("Viewport/hasChanged"))}_dispatchEvents(){c.isXS()?this._dispatchViewportEvent("Viewport/isXS"):c.isSM()?this._dispatchViewportEvent("Viewport/isSM"):c.isMD()?this._dispatchViewportEvent("Viewport/isMD"):c.isLG()?this._dispatchViewportEvent("Viewport/isLG"):c.isXL()?this._dispatchViewportEvent("Viewport/isXL"):c.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"===c.getCurrentViewport()}static isSM(){return"SM"===c.getCurrentViewport()}static isMD(){return"MD"===c.getCurrentViewport()}static isLG(){return"LG"===c.getCurrentViewport()}static isXL(){return"XL"===c.getCurrentViewport()}static isXXL(){return"XXL"===c.getCurrentViewport()}static getCurrentViewport(){return window.getComputedStyle(document.documentElement).getPropertyValue("--sw-current-breakpoint").replace(/['"]+/g,"").toUpperCase()}constructor(){this.previousViewport=null,this.currentViewport=c.getCurrentViewport(),this._registerEvents()}}class u{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var r of t.entries())e(r[1],r[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(r=>{e(t[r],r)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}window.PluginManager.register("WduUpsellingOffcanvas",class extends o{init(){this._registerTabs();let t=document.querySelector("[data-off-canvas-cart]");t&&window.PluginManager.getPluginInstanceFromElement(t,"OffCanvasCart").$emitter.subscribe("offCanvasOpened",this._wduOpenOffcanvas.bind(this))}_wduOpenOffcanvas(){this._registerTabs(),setTimeout(function(){if(document.querySelector(".cart-offcanvas [data-product-slider]")){let t=PluginManager.getPluginInstances("ProductSlider");t.length>0?u.iterate(t,t=>{t.rebuild(c.getCurrentViewport(),!0)}):PluginManager.initializePlugin("ProductSlider","[data-product-slider]")}},200)}_registerTabs(){console.log("wduRegister");let t=document.querySelectorAll('button[data-bs-toggle="pill"]',!1);this._hideTabs();let e=this;t.forEach(function(t){t.addEventListener("click",function(r){setTimeout(function(){if(t.classList.contains("active")){if(console.log("wduRegister-active"),document.querySelector(".wdu-cart-slider [data-product-slider]")){let t=PluginManager.getPluginInstances("ProductSlider");t.length>0?u.iterate(t,t=>{t.rebuild(c.getCurrentViewport(),!0)}):PluginManager.initializePlugin("ProductSlider","[data-product-slider]")}let r=t.getAttribute("data-target"),i=document.querySelector(r);i&&(i.style.opacity="1"),e._hideTabs()}},300)})})}_hideTabs(){document.querySelectorAll(".tab-pane.fade:not(.show)").forEach(function(t){t.style.opacity="0"})}})})()})();

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.