PageSourceSearch

https://www.faber-castell.es/dist/FC.Ecom/modules/CanvasOverlay.96a1e008.js

js faber-castell.es collected 2026-10-02 13:25:17 UTC 4,924 bytes, 1 lines download raw bytes

1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[6314],{77640:(t,e,n)=>{n.r(e),n.d(e,{default:()=>l});var o=n(49964),i=n(47012),s=function(){function t(t,e){this.element=t,this.commonTexts=e,this.showSpinner=!0,this.isOpen=!1,this.html=document.querySelector("html"),this.body=document.body,this.isColorSelectorButton=this.element.classList.contains("color-selector-button"),this.isOpen=!1,this.owner=t;var n=this.isColorSelectorButton?this.element.closest(".color"):this.element;this.ajaxUrl=null==n?void 0:n.getAttribute("data-ajax-url"),this.init()}return t.setup=function(e){void 0===e&&(e='[data-module="CanvasOverlay"]'),Array.from(document.querySelectorAll(e)).filter((function(t){return!t.dataset.moduleInitialized})).forEach((function(e){var n,o={};if(e.classList.contains("color-selector-button")){var s=document.getElementById("rc-mini-cart");o.closeLabel=null===(n=(0,i.getCommonTexts)(s))||void 0===n?void 0:n.closeColorVariantSelectorLabel}t.setupSpecific(e,o,!1)}))},t.setupSpecific=function(e,n,o){var i=new t(e,n);e.dataset.moduleInitialized="true",o&&i.open()},t.setupSpecificWithCustomContent=function(e,n,o,i){var s=new t(e,n);return s.customContent=o,e.dataset.moduleInitialized="true",s.showSpinner=!1,i&&s.open(),s},t.prototype.init=function(){this.onClick(),this.onClose()},t.prototype.onClick=function(){this.element.addEventListener("click",this.open.bind(this))},t.prototype.onClose=function(){var t,e=this;null===(t=document.querySelector(".overlay__close"))||void 0===t||t.addEventListener("click",this.close.bind(this)),document.addEventListener("click",(function(t){!e.element.contains(t.target)&&e.isOpen&&e.close()}))},t.prototype.close=function(){this.isOpen=!1},t.prototype.open=function(){var t=this;this.isOpen=!0,this.createEmptyOverlay();var e=document.querySelector(".off-canvas__slide");this.showSpinner&&e.classList.add("spinner-loading"),setTimeout((function(){e&&e.classList.add("animated"),t.html.classList.add("lock-screen"),t.body.classList.add("lock-screen","off-canvas__opened")}),100),window.FaberCastell.initModules()},t.prototype.createEmptyOverlay=function(){var t,e=document.querySelector(".canvas-overlay"),n=this.owner.getAttribute("data-controls"),i=this.owner.getAttribute("data-dialog-label"),s=(0,o.AQ)("\n                <section".concat(i?' aria-label="'.concat(i,'"'):"",' class="empty off-canvas__slide ').concat(this.isColorSelectorButton&&"color-selector",'" data-module="CanvasOverlayEvents"').concat(n?' id="'.concat(n,'"'):"",' role="dialog">\n                    <button class="overlay__close" aria-label="').concat(null===(t=this.commonTexts)||void 0===t?void 0:t.closeLabel,'" type="button">\n                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">\n                            <path fill-rule="evenodd" clip-rule="evenodd" d="M18.364 7.05024L16.9497 5.63603L12 10.5858L7.05025 5.63603L5.63604 7.05024L10.5858 12L5.63604 16.9497L7.05025 18.3639L12 13.4142L16.9497 18.3639L18.364 16.9497L13.4142 12L18.364 7.05024Z" fill="#222222"/>\n                            <mask id="mask0_322_39177" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="5" y="5" width="14" height="14">\n                              <path fill-rule="evenodd" clip-rule="evenodd" d="M18.364 7.05024L16.9497 5.63603L12 10.5858L7.05025 5.63603L5.63604 7.05024L10.5858 12L5.63604 16.9497L7.05025 18.3639L12 13.4142L16.9497 18.3639L18.364 16.9497L13.4142 12L18.364 7.05024Z" fill="white"/>\n                            </mask>\n                            <g mask="url(#mask0_322_39177)">\n                              <rect width="24" height="24" fill="#222222"/>\n                            </g>\n                        </svg> \n                    </button>\n\n                    <div class="canvas-overlay__content" aria-live="polite">\n                        <div class="spinner lazy-spinner">\n                        </div>\n                    </div>\n                </section>\n            '));e&&(this.body.prepend(s),n&&this.owner.setAttribute("aria-controls",n),this.owner.setAttribute("aria-expanded","true")),this.customContent?(this.customContent(document.querySelector(".canvas-overlay__content")),this.initModules()):this.fetchDataOnClick()},t.prototype.fetchDataOnClick=function(){var t=this,e="".concat(window.location.origin+"/"+this.ajaxUrl);fetch(e,{credentials:"include"}).then((function(t){return t.text()})).then((function(e){document.querySelector(".canvas-overlay__content").innerHTML=e,t.initModules()})).catch((function(t){return console.error(t)}))},t.prototype.initModules=function(){var t=document.querySelector(".off-canvas__slide");this.showSpinner&&t.classList.remove("spinner-loading");var e=t.querySelector("#color-table-headline");e&&t.setAttribute("aria-labelledby",e.id),window.FaberCastell.initModules()},t}();const l=s;new s.setup}}]);

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.