PageSourceSearch

https://www.alfombra.es/theme/949ee58e39760cd248753e012058d86b/js/e-r-chat/e-r-chat.js?1790840303

js alfombra.es collected 2026-10-07 11:56:58 UTC 10,315 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 s(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function n(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,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(r);return h!==Array.isArray(t)?i(r,l):h?l.arrayMerge(t,r,l):(u={},(c=l).isMergeableObject(t)&&n(t).forEach(function(e){u[e]=i(t[e],c)}),n(r).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(r[e])?u[e]=(function(t,e){if(!e.customMerge)return a;var r=e.customMerge(t);return"function"==typeof r?r:a})(e,c)(t[e],r[e],c):u[e]=i(r[e],c))}),u)}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 s=e[i];if(void 0!==s)return s.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,r),n.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 s{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!s.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===s.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],n=e.replace(/^data(|-)/,""),o=i.toLowerCamelCase(n,"-");if(!s.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&&!s.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&&!s.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 n{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,s=t.split("."),n=r.scope?e.bind(r.scope):e;if(r.once&&!0===r.once){let e=n;n=function(r){i.unsubscribe(t),e(r)}}return this.el.addEventListener(s[0],n),this.listeners.push({splitEventName:s,opts:r,cb:n}),!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),n=s.getDataAttribute(this.el,"data-".concat(r,"-config"),!1),o=s.getAttribute(this.el,"data-".concat(r,"-options"),!1),a=[this.constructor.options,this.options,t];n&&a.push(window.PluginConfigManager.get(this._pluginName,n));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(!s.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new n(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}window.PluginManager.register("ErChatWidgetPlugin",class extends o{init(){this.trigger=this.el.querySelector("#supportTrigger"),this.popup=this.el.querySelector("#supportPopup"),this.closeBtn=this.el.querySelector("#supportClose"),this.card=this.el.querySelector(".support-card"),this.lastFocusedElement=null,this.isClosing=!1,this.tabId=this._getOrCreateTabId(),this.storageKey="erchat:open:".concat(this.tabId,":").concat(window.location.pathname),this.trigger&&this.popup&&this.closeBtn&&this.card&&(this._hideUntilLoaded(),this._registerEvents(),this._restoreState())}_hideUntilLoaded(){let t=()=>{this.el.setAttribute("data-erchat-ready","true")};if("complete"===document.readyState){t();return}window.addEventListener("load",t,{once:!0})}_getOrCreateTabId(){let t="erchat-tab:";if(window.name&&window.name.startsWith(t))return window.name.replace(t,"");let e="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,11));return window.name="".concat(t).concat(e),e}_registerEvents(){this.trigger.addEventListener("click",()=>this.togglePopup()),this.closeBtn.addEventListener("click",()=>this.closePopup()),document.addEventListener("keydown",t=>this._onKeydown(t)),this.card.addEventListener("transitionend",t=>{t.target===this.card&&"transform"===t.propertyName&&this.isClosing&&(this.el.classList.remove("is-visible"),this.isClosing=!1)})}_restoreState(){try{let t=window.sessionStorage.getItem(this.storageKey);"1"===t&&this.openPopup(!1)}catch(t){}}togglePopup(){if(this.el.classList.contains("is-open")){this.closePopup();return}this.openPopup()}openPopup(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.lastFocusedElement=document.activeElement,this.isClosing=!1,this.el.classList.add("is-visible"),this.popup.setAttribute("aria-hidden","false"),this.trigger.setAttribute("aria-expanded","true"),this.trigger.setAttribute("aria-label","Support schließen"),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this.el.classList.add("is-open")})});try{window.sessionStorage.setItem(this.storageKey,"1")}catch(t){}t&&window.requestAnimationFrame(()=>{window.matchMedia("(max-width: 767.98px)").matches?this.closeBtn.focus():this.trigger.focus()})}
1closePopup(){if(this.el.classList.contains("is-open")){this.isClosing=!0,this.el.classList.remove("is-open"),this.popup.setAttribute("aria-hidden","true"),this.trigger.setAttribute("aria-expanded","false"),this.trigger.setAttribute("aria-label","Support öffnen");try{window.sessionStorage.removeItem(this.storageKey)}catch(t){}if(this.lastFocusedElement&&this.lastFocusedElement!==this.trigger){this.lastFocusedElement.focus();return}this.trigger.focus()}}_onKeydown(t){if(!this.el.classList.contains("is-open"))return;if("Escape"===t.key){this.closePopup();return}if("Tab"!==t.key)return;let e=this.card.querySelectorAll('button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!e.length)return;let r=e[0],i=e[e.length-1];t.shiftKey&&document.activeElement===r?(t.preventDefault(),i.focus()):t.shiftKey||document.activeElement!==i||(t.preventDefault(),r.focus())}},"[data-erchat-widget]")})()})();

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.