PageSourceSearch

https://www.schaefer-shop.ch/store/assets/v3/components/js/main.CP1vJH61.js

js schaefer-shop.ch collected 2026-10-08 17:10:17 UTC 223,603 bytes, 314 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/chunks/add-item-dialog.YqnBDvCS.js","js/chunks/dialog.DXiS-0jx.js","js/chunks/assert.CnnRwD05.js","js/chunks/dropdown.DnT9er7I.js","js/chunks/format-string.D9gpd2DC.js","js/chunks/try-catch.D16SHkYg.js","js/chunks/typed-event-target.BHwKIA-j.js","js/chunks/wishlist.Cm-bG10d.js","js/chunks/errors.CZ_vGr36.js","js/chunks/dashboard.CVgemfDs.js","js/chunks/live-chat-trigger.BULkWNzy.js","js/chunks/userlike.BKSY7P1c.js","js/chunks/usercentrics-consent.DKXo8Gpd.js","js/chunks/secondary-layout.BJ01yHiG.js","js/chunks/cart.C2teZnRS.js"])))=>i.map(i=>d[i]);
2import{r as Gt,_ as Bi,p as as}from"./chunks/wishlist-utils.CAPZfd15.js";import{Q as mi}from"./chunks/quantity-input.BlGXaDne.js";import{t as Ge}from"./chunks/try-catch.D16SHkYg.js";import{a as ls}from"./chunks/errors.CZ_vGr36.js";import{L as cs,r as ds,f as us}from"./chunks/wishlist.Cm-bG10d.js";import{w as hs,s as fs}from"./chunks/userlike.BKSY7P1c.js";import{T as ms}from"./chunks/typed-event-target.BHwKIA-j.js";import{D as er}from"./chunks/dialog.DXiS-0jx.js";import{e as Oe,a as gi}from"./chunks/assert.CnnRwD05.js";import"./chunks/usercentrics-consent.DKXo8Gpd.js";function gs(t){return t.includes("/order/cart")?t:"/user/login?gotoUrl=/order/cart"}function pt(t,e,i){const n=t.getBoundingClientRect();return n.top<=i&&i<=n.top+n.height&&n.left<=e&&e<=n.left+n.width}function Es(t){if(!t)return!1;const e=getComputedStyle(t);if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!1;const i=t.getBoundingClientRect();if(i.width===0||i.height===0||i.bottom<0||i.top>window.innerHeight||i.right<0||i.left>window.innerWidth)return!1;const n=i.left+i.width/2,r=i.top+i.height/2,s=document.elementFromPoint(n,r);return t===s||t.contains(s)}function ps(t,e){const i=t.querySelector(".rotate-left"),n=t.querySelector(".rotate-right"),r=t.querySelector("ul");if(!i||!n||!r)throw new Error("Carousel element could not be initialized");const s=Array.from(r.children),o=1,a=Math.ceil(s.length/e);let l=o;const c=()=>{const h=l*e-(e-1);s.forEach((p,S)=>{const b=S+1;b>=h&&b<h+e?p.classList.replace("hidden","list-item"):p.classList.replace("list-item","hidden")}),setTimeout(()=>
2{l===o&&i.classList.replace("inline","hidden"),l>o&&i.classList.replace("hidden","inline"),l<a&&n.classList.replace("hidden","inline"),l===a&&n.classList.replace("inline","hidden")},10)};c();function d(){l>o&&(l--,c())}function g(){l<a&&(l++,c())}i.addEventListener("click",d),n.addEventListener("click",g);let f=0;function E(h){f=h.changedTouches[0]?.screenX??0}const m=h=>{const[p]=h.changedTouches;p&&pt(r,p.clientX,p.clientY)&&Math.abs(f-p.screenX)>20&&(f>p.screenX?g():d())};return document.addEventListener("touchstart",E),document.addEventListener("touchend",m),()=>{i.removeEventListener("click",d),n.removeEventListener("click",g),document.removeEventListener("touchstart",E),document.removeEventListener("touchend",m)}}function vs(t){return`<i class="uil uil-${t}"></i>`}function Ss(t){return`
3    <img
4      src="${t.mobileImageLink}"
5      sizes="(min-width: 1280px) 159px, (min-width: 768px) 154px, 139px"
6      srcset="${t.desktopImageLink} 159px, ${t.tabletImageLink} 154px, ${t.mobileImageLink} 139px"
7      alt="${t.imageAlt}"
8      class="max-w-[139px] m:max-w-[154px] l:max-w-[159px] object-contain"
9    /> 
10  `}function ys(t){const{rating:e}=t;return e===void 0?"":e.map(i=>`
11        <span class="${["full","half"].includes(i)?"text-ui-border-standardyellow":""}">
12          ${vs(i==="full"?"star-active":i==="half"?"star-half-alt-active":"star")}
13        </span>
14      `).join("")}function bs(t){return`
15    <li class="list-item border border-ui-border-standard rounded-lg">
16      <a
17        href="${t.link}"
18        class="inline-block h-full w-full p-3"
19      >
20        <div class="flex justify-center">
21          ${Ss(t)}
22        </div>
23        <div class="min-h-[63px] mt-4 text-body-small font-bold line-clamp-3">
24          ${t.title}
25        </div>
26        <span class="min-h-[21px] flex gap-1 mt-2 text-body-small text-ti-disabled">
27          ${ys(t)}
28        </span>
29        <span class="block mt-5 text-heading-6 font-bold">
30          ${t.price}
31        </span>
32        <span class="block min-h-[37px] text-body-small text-ti-additional2">
33          ${t.unit}
34        </span>
35      </a>
36    </li>
37  `}function Ls(t){return`
38    <img
39      src="${t.mobileImageLink}"
40      sizes="(min-width: 768px) 120px, 100px"
41      srcset="${t.tabletImageLink} 120px, ${t.mobileImageLink} 100px"
42      alt="${t.imageAlt}"
43      class="max-w-[100px] m:max-w-[120px] object-contain"
44    />
45  `}function Is(){return window.innerWidth>=1280?3:window.innerWidth>=768?4:2}function As(){const t=document.querySelector("#add-to-cart-layer");if(!t)return;const e=t.querySelector("#add-to-cart-layer-details"),i=t.querySelector("#add-to-cart-layer-article-number"),n=t.querySelector("#add-to-cart-layer-title"),r=t.querySelector("#add-to-cart-layer-image"),s=t.querySelector("#add-to-cart-layer-quantity"),o=t.querySelector("#add-to-cart-layer-sum"),a=t.querySelector("#add-to-cart-layer-accessory-wrapper")||t.querySelector("#add-to-cart-layer-correlation-matrix-wrapper")||t.querySelector("#add-to-cart-layer-article-crossseller-wrapper")||t.querySelector("#add-to-cart-layer-product-crossseller-wrapper")||t.querySelector("#add-to-cart-layer-old-crossseller-wrapper"),l=t.querySelector("#add-to-cart-layer-accessory-headline"),c=t.querySelector("#add-to-cart-layer-reco-headline"),d=t.querySelector("#add-to-cart-layer-accessory"),g=t.querySelectorAll(".close");if(!e||!i||!n||!r||!s||!o)throw new Error("Add to cart layer core elements not fully provided via HTML");return(!a||!l||!c||!d)&&console.error("Add to cart layer recommendation elements not fully provided via HTML, recommendations will not be shown"),{addToCartLayer:t,articleDetailsElement:e,articleNumberElement:i,articleTitleElement:n,articleImageElement:r,quantityElement:s,sumElement:o,wrapperElement:a,accessoryHeadlineElement:l,recoHeadlineElement:c,accessoryElement:d,closeButtons:g}}document.addEventListener("DOMContentLoaded",()=>{const t=As();if(!t)return;let e=null;document.addEventListener("pda.cart.add-to-cart",l=>{e?.abort(),e=new AbortController;const{signal:c}=e;t.articleNumberElement.innerText=l.detail.article.articleNumber,t.articleTitleElement.innerText=l.detail.article.title,t.articleImageElement.innerHTML=Ls(l.detail.article),t.quantityElement.innerText=`${l.detail.quantity}`,t.sumElement.innerText=l.detail.sum;let d=()=>{},g=[];const f=(l.detail.accessories?.length??0)>0,E=!f&&(l.detail.article.articleCrossseller?.length??0)>0,m=!f&&(l.detail.productCrossseller?.length??0)>0,h=!f&&(l.detail.reco?.length??0)>0;l.detail.accessories&&f?g=l.detail.accessories:l.detail.article.articleCrossseller&&E?g=l.detail.article.articleCrossseller:l.detail.productCrossseller&&m?g=l.detail.productCrossseller:l.detail.reco&&h&&(g=l.detail.reco);const{wrapperElement:p,accessoryHeadlineElement:S,recoHeadlineElement:b,accessoryElement:y}=t;if((f||E||m||h)&&p&&S&&b&&y){f?S.classList.replace("hidden","inline"):b.classList.replace("hidden","inline");let L=()=>{};const D=()=>{y.innerHTML="",g.forEach(V=>{y.innerHTML+=bs(V)}),L=ps(p,Is())};D(),t.articleDetailsElement.classList.add("pb-6"),p.hidden=!1,window.addEventListener("resize",D),d=()=>{window.removeEventListener("resize",D),L()}}t.addToCartLayer.showModal();const k=document.body.style.overflow;document.body.style.overflow="hidden";const O=L=>{pt(t.addToCartLayer,L.clientX,L.clientY)||q()},q=()=>{t.addToCartLayer.close(),document.body.style.overflow=k,d(),e?.abort(),e=null};t.addToCartLayer.addEventListener("click",O,{signal:c}),t.closeButtons.forEach(L=>{L.addEventListener("click",q,{signal:c})})});const i=t.addToCartLayer.querySelector("#add-to-cart-layer-batch"),n=t.addToCartLayer.querySelector("#add-to-cart-layer-batch-items"),r=t.addToCartLayer.querySelector("#add-to-cart-layer-headline-single"),s=t.addToCartLayer.querySelector("#add-to-cart-layer-headline-batch"),o=t.addToCartLayer.querySelector("#add-to-cart-layer-batch-item-template");let a=null;i&&n&&o&&document.addEventListener("pda.wishlist.add-to-cart",l=>{a?.abort(),a=new AbortController;const{signal:c}=a;t.articleDetailsElement.hidden=!0,i.hidden=!1,r&&(r.hidden=!0),s&&(s.hidden=!1),n.innerHTML="",l.detail.items.forEac
45h(E=>{const m=o.content.cloneNode(!0),h=m.querySelector("[data-slot='image']"),p=m.querySelector("[data-slot='title']"),S=m.querySelector("[data-slot='price']");h&&(h.src=E.imageUrl,h.alt=E.title),p&&(p.textContent=E.title),S&&(S.textContent=E.price),n.append(m)}),t.addToCartLayer.showModal();const d=document.body.style.overflow;document.body.style.overflow="hidden";const g=E=>{pt(t.addToCartLayer,E.clientX,E.clientY)||f()},f=()=>{t.addToCartLayer.close(),document.body.style.overflow=d,t.articleDetailsElement.hidden=!1,i.hidden=!0,r&&(r.hidden=!1),s&&(s.hidden=!0),a?.abort(),a=null};t.addToCartLayer.addEventListener("click",g,{signal:c}),t.closeButtons.forEach(E=>E.addEventListener("click",f,{signal:c}))})});const ws=document.querySelectorAll('form[id^="alert-action-"]');ws.forEach(t=>{const e=t.getAttribute("action");e&&t.addEventListener("submit",async i=>{i.preventDefault();const n=t.querySelector("[data-role=base]"),r=t.querySelector("[data-role=loading]"),s=t.querySelector("[data-role=success]"),o=t.querySelector("[data-role=error]");try{n?.classList.add("hidden"),r?.classList.remove("hidden"),await fetch(e),setTimeout(()=>{r?.classList.add("hidden"),s?.classList.remove("hidden")},1e3)}catch{setTimeout(()=>{r?.classList.add("hidden"),o?.classList.remove("hidden")},1e3)}setTimeout(()=>{o?.classList.add("hidden"),s?.classList.add("hidden"),n?.classList.remove("hidden")},4e3)})});const _i="header-resized",En=new WeakSet;function _s(){window.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector("header");if(!t)return console.warn("No header found.");if(En.has(t)){console.warn("A ResizeObserver is already attached to the header.");return}let e=t.offsetHeight;new ResizeObserver(n=>{for(const r of n){const s=r.contentRect.height;if(s!==e){e=s;const o=new CustomEvent(_i,{detail:{height:s},bubbles:!0});t.dispatchEvent(o)}}}).observe(t),En.add(t)})}function Ts(t){const e=t.querySelector(".announcement-bar");if(e){const i=document.querySelector(".announcement-bar__close button");if(!i)throw new Error("Announcement bar has no close button");i.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),e.style.display="none";const r=new Date(Date.now()+1e3*24e3);document.cookie=`ad_seen=true;expires=${r.toUTCString()};path=/;secure;`})}}document.addEventListener("DOMContentLoaded",()=>{const t=document.querySelector("header");if(!t)return;try{Ts(t)}catch(n){console.error(n)}const e=document.querySelector("body > .page-body.body-bg-darkgrey")??document.querySelector("body > .container"),i=e?.querySelector("main");if(!(!e||!i)&&!document.querySelector("header.head-dynamic")){_s(),t.addEventListener(_i,r=>Rs(r));const n=new CustomEvent(_i,{detail:{height:t.offsetHeight},bubbles:!0});t.dispatchEvent(n)}});function Rs(t){const e=t.detail,i=32,n=document.querySelector(".pda-accordion-sticky-nav-container"),r=document.querySelector("#stickyobserver"),s=document.querySelector("body.pda-trial-c .pda-left .pda-gallery");if(!n){console.warn("calculateOffsetStickyNavTop: Error");return}if(n.style.setProperty("--pda-accordion-offset-top",`${e.height}px`),!r){console.warn("missing observer element");return}r.style.setProperty("--pda-accordion-offset-top",`-${e.height}px`),s&&s.style.setProperty("--pda-gallery-offset-top",`${e.height+i}px`)}document.addEventListener("DOMContentLoaded",()=>{const t=document.getElementById("coupon-code-copy-button");if(t){const e=t.dataset.code,i=t.querySelector("#coupon-code-copy-message"),n=t.querySelector("#coupon-code-copied-message");if(!e||!i||!n)throw new Error("Code or message elements not defined");t.addEventListener("click",()=>{t.classList.replace("bg-ti-standard","bg-ti-functional-success"),t.classList.replace("border-ti-standard","border-ti-functional-success"),i.classList.replace("inl
45ine-block","hidden"),n.classList.replace("hidden","inline-block"),navigator.clipboard.writeText(e),setTimeout(()=>{t.classList.replace("bg-ti-functional-success","bg-ti-standard"),t.classList.replace("border-ti-functional-success","border-ti-standard"),n.classList.replace("inline-block","hidden"),i.classList.replace("hidden","inline-block")},2500)})}});var Ke=(t=>(t.INPUT_BASE="INPUT_BASE",t.ERROR_ELEMENTS="ERROR_ELEMENTS",t))(Ke||{}),G=(t=>(t.PASSWORD_RESET_CONTAINER="PASSWORD_RESET_CONTAINER",t.PASSWORD_VALIDATION_BOX="PASSWORD_VALIDATION_BOX",t.PASSWORD_STRENGTH_INDICATOR="PASSWORD_STRENGTH_INDICATOR",t.HINT_ELEMENT="HINT_ELEMENT",t.HINT_TEXT="HINT_TEXT",t.HINT_STRENGTH="HINT_STRENGTH",t.STEP_ELEMENT="STEP_ELEMENT",t.NEW_PASSWORD="NEW_PASSWORD",t.CONFIRM_PASSWORD="CONFIRM_PASSWORD",t.ERROR_LIST_ELEMENTS="ERROR_LIST_ELEMENTS",t.PASSWORD_SHOW_HIDE_ELEMENTS="PASSWORD_SHOW_HIDE_ELEMENTS",t))(G||{});class tr{}class Ei extends Error{errors;constructor(e){super(e?`${e.length} errors occurred during unsubscription:
46${e.map((i,n)=>`${n+1}) ${i.toString()}`).join(`
47  `)}`:""),this.errors=e,this.name="UnsubscriptionError"}}class tt{initialTeardown;static EMPTY=(()=>{const e=new tt;return e.closed=!0,e})();closed=!1;_finalizers=null;constructor(e){this.initialTeardown=e}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{initialTeardown:i}=this;if(X(i))try{i()}catch(r){e=r instanceof Ei?r.errors:[r]}const{_finalizers:n}=this;if(n){this._finalizers=null;for(const r of n)try{pn(r)}catch(s){e=e??[],s instanceof Ei?e.push(...s.errors):e.push(s)}}if(e)throw new Ei(e)}}add(e){e&&e!==this&&(this.closed?pn(e):(e&&"add"in e&&e.add(()=>{this.remove(e)}),this._finalizers??=new Set,this._finalizers.add(e)))}remove(e){this._finalizers?.delete(e)}}typeof Symbol.dispose=="symbol"&&(tt.prototype[Symbol.dispose]=tt.prototype.unsubscribe);function pn(t){X(t)?t():t.unsubscribe()}class Je extends tt{isStopped=!1;destination;_nextOverride=null;_errorOverride=null;_completeOverride=null;_onFinalize=null;constructor(e,i){super(),this.destination=e instanceof Je?e:Ps(e),this._nextOverride=i?.next??null,this._errorOverride=i?.error??null,this._completeOverride=i?.complete??null,this._onFinalize=i?.finalize??null,this._next=this._nextOverride?Ns:this._next,this._error=this._errorOverride?Cs:this._error,this._complete=this._completeOverride?Os:this._complete,ks(e)&&e.add(this)}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this._onFinalize?.())}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}function Ns(t){try{this._nextOverride(t)}catch(e){this.destination.error(e)}}function Cs(t){try{this._errorOverride(t)}catch(e){this.destination.error(e)}finally{this.unsubscribe()}}function Os(){try{this._completeOverride()}catch(t){this.destination.error(t)}finally{this.unsubscribe()}}class Ds{partialObserver;constructor(e){this.partialObserver=e}next(e){const{partialObserver:i}=this;if(i.next)try{i.next(e)}catch(n){ft(n)}}error(e){const{partialObserver:i}=this;if(i.error)try{i.error(e)}catch(n){ft(n)}else ft(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(i){ft(i)}}}function Ps(t){return new Ds(!t||X(t)?{next:t??void 0}:t)}function ks(t){return t&&X(t.unsubscribe)&&X(t.add)}function ue({destination:t,...e}){return new Je(t,e)}class ${constructor(e){e&&(this._subscribe=e)}subscribe(e){const i=e instanceof Je?e:new Je(e);return i.add(this._trySubscribe(i)),i}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e){return new Promise((i,n)=>{const r=new Je({next:s=>{try{e(s)}catch(o){n(o),r.unsubscribe()}},error:n,complete:i});this.subscribe(r)})}_subscribe(e){}[Symbol.observable??"@@observable"](){return this}pipe(...e){return e.reduce(xs,this)}[Symbol.asyncIterator](){let e,i=!1,n,r=!1;const s=[],o=[],a=c=>{for(i=!0,n=c;o.length;){const[d,g]=o.shift();g(c)}},l=()=>{for(r=!0;o.length;){const[c]=o.shift();c({value:void 0,done:!0})}};return{next:()=>(e||(e=this.subscribe({next:c=>{if(o.length){const[d]=o.shift();d({value:c,done:!1})}else s.push(c)},error:a,complete:l})),s.length?Promise.resolve({value:s.shift(),done:!1}):r?Promise.resolve({value:void 0,done:!0}):i?Promise.reject(n):new Promise((c,d)=>{o.push([c,d])})),throw:c=>(e?.unsubscribe(),a(c),Promise.reject(c)),return:()=>(e?.unsubscribe(),l(),Promise.resolve({value:void 0,done:!0})),[Symbol.asyncIterator](){return this}}}}function xs(t,e){return e(t)}function ft(t){setTimeout(()=>{throw t})}function He(t){switch(nr(t)){case z.Own:return t;case z.InteropObservable:return Fs(t);case z.ArrayLike:return Ms(t);case z.Promise:return qs(t);case z.AsyncIterable:return ir(t);case z.Iterable:return Bs(t);case z.ReadableStreamLike:return Vs(t)}}function Fs(t){return new $(e=>{const i=t[Symbol.observable??"@@observable"]();if(X(i.subscribe))return i.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ms(t){return new $(e=>{Gs(t,e)})}function qs(t){return new $(e=>{t.then(i=>{e.closed||(e.next(i),e.complete())},i=>e.error(i)).then(null,ft)})}function Bs(t){return new $(e=>{for(const i of t)if(e.next(i),e.closed)return;e.complete()})}function ir(t){return new $(e=>{Ys(t,e).catch(i=>e.error(i))})}function Vs(t){return ir(rr(t))}async function Ys(t,e){for await(const i of t)if(e.next(i),e.closed)return;e.complete()}function Gs(t,e){const i=t.length;for(let n=0;n<i;n++){if(e.closed)return;e.next(t[n])}e.complete()}var z;(function(t){t[t.Own=0]="Own",t[t.InteropObservable=1]="InteropObservable",t[t.ArrayLike=2]="ArrayLike",t[t.Promise=3]="Promise",t[t.AsyncIterable=4]="AsyncIterable",t[t.Iterable=5]="Iterable",t[t.ReadableStreamLike=6]="ReadableStreamLike"})(z||(z={}));function nr(t){if(t instanceof $)return z.Own;if($s(t))return z.InteropObservable;if(sr(t))return z.ArrayLike;if(Us(t))return z.Promise;if(Hs(t))return z.AsyncIterable;if(Ks(t))return z.Iterable;if(Ws(t))return z.ReadableStreamLike;throw new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invali
47d object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function X(t){return typeof t=="function"}function Hs(t){return Symbol.asyncIterator&&X(t?.[Symbol.asyncIterator])}async function*rr(t){const e=t.getReader();try{for(;;){const{value:i,done:n}=await e.read();if(n)return;yield i}}finally{e.releaseLock()}}function Ws(t){return X(t?.getReader)}function Us(t){return X(t?.then)}function $s(t){return X(t[Symbol.observable??"@@observable"])}function Ks(t){return X(t?.[Symbol.iterator])}function sr(t){return t&&typeof t.length=="number"&&!X(t)}const zs={now(){return Date.now()}};class js extends tt{constructor(e,i){super()}schedule(e,i=0){return this}}const vn={setInterval(t,e,...i){return setInterval(t,e,...i)},clearInterval(t){return clearInterval(t)},delegate:void 0};function Xs(t,e){if(t){const i=t.indexOf(e);0<=i&&t.splice(i,1)}}class Zs extends js{scheduler;work;id;state;delay;pending=!1;constructor(e,i){super(e,i),this.scheduler=e,this.work=i}schedule(e,i=0){if(this.closed)return this;this.state=e;const n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,i)),this.pending=!0,this.delay=i,this.id=this.id??this.requestAsyncId(r,this.id,i),this}requestAsyncId(e,i,n=0){return vn.setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,i,n=0){if(n!=null&&this.delay===n&&this.pending===!1)return i;i!=null&&vn.clearInterval(i)}execute(e,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(e,i);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,i){let n=!1,r;try{this.work(e)}catch(s){n=!0,r=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:e,scheduler:i}=this,{actions:n}=i;this.work=this.state=this.scheduler=null,this.pending=!1,Xs(n,this),e!=null&&(this.id=this.recycleAsyncId(i,e,null)),this.delay=null,super.unsubscribe()}}}class jt{schedulerActionCtor;static now=zs.now;constructor(e,i=jt.now){this.schedulerActionCtor=e,this.now=i}now;schedule(e,i=0,n){return new this.schedulerActionCtor(this,e).schedule(n,i)}}class Js extends jt{actions=[];_active=!1;_scheduled;constructor(e,i=jt.now){super(e,i)}flush(e){const{actions:i}=this;if(this._active){i.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=i.shift());if(this._active=!1,n){for(;e=i.shift();)e.unsubscribe();throw n}}}const Qs=new Js(Zs);function Vi(t){return t}function Se(t,e,i,n=0,r=!1){if(!t.closed){const s=e.schedule(function(){i(),r?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!r)return s}}function eo(t){return t&&X(t.schedule)}function ni(t){return e=>new $(i=>{let n=0;e.subscribe(ue({destination:i,next:r=>{i.next(t(r,n++))}}))})}const{isArray:to}=Array;function io(t,e){return to(e)?t(...e):t(e)}function no(t){return ni(e=>io(t,e))}function or(t,e=0){return i=>new $(n=>{i.subscribe(ue({destination:n,next:r=>Se(n,t,()=>n.next(r),e),error:r=>Se(n,t,()=>n.error(r),e),complete:()=>Se(n,t,()=>n.complete(),e)}))})}function ar(t,e=0){return i=>new $(n=>{n.add(t.schedule(()=>i.subscribe(n),e))})}function ro(t,e){return He(t).pipe(ar(e),or(e))}function so(t,e){return He(t).pipe(ar(e),or(e))}function oo(t,e){return new $(i=>{let n=0;const r=()=>{n===t.length?i.complete():(i.next(t[n++]),Se(i,e,r))};return Se(i,e,r)})}function ao(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}const lo=ao();function co(t,e){return new $(i=>{let n;return Se(i,e,()=>{n=t[lo](),Se(i,e,()=>{let r,s;try{({value:r,done:s}=n.next())}catch(o){i.error(o);return}s?i.complete():i.next(r)},0,!0)}),()=>X(n?.return)&&n.return()})}function lr(t,e){if(!t)throw new Error("Iterable cannot be null");return new $(i=>{Se(i,e,()=>{const n=t[Symbol.asyncIterator]();Se(i,e,()=>{n.next().then(r=>{r.done?i.complete():i.next(r.value)})},0,!0)})})}function uo(t,e){return lr(rr(t),e)}function ho(t,e){switch(nr(t)){case z.Own:case z.InteropObservable:return ro(t,e);case z.Promise:return so(t,e);case z.ArrayLike:return oo(t,e);case z.Iterable:return co(t,e);case z.AsyncIterable:return lr(t,e);case z.ReadableStreamLike:return uo(t,e)}}const cr=new $(t=>t.complete());function fo(t,e,i,n,r,s,o,a){const l=[];let c=0,d=0,g=!1;const f=()=>{g&&!l.length&&!c&&e.complete()},E=h=>c<n?m(h):l.push(h),m=h=>{c++;let p=!1;He(i(h,d++)).subscribe(ue({destination:e,next:S=>{e.next(S)},complete:()=>{p=!0},finalize:()=>{if(p)try{for(c--;l.length&&c<n;){const S=l.shift();o||m(S)}f()}catch(S){e.error(S)}}}))};return t.subscribe(ue({destination:e,next:E,complete:()=>{g=!0,f()}}
47)),()=>{}}function mo(t,e=1/0){return i=>new $(n=>fo(i,n,t,e))}function go(t=1/0){return mo(Vi,t)}function dr(t){return t[t.length-1]}function Eo(t){return eo(dr(t))?t.pop():void 0}function po(t,e){return typeof dr(t)=="number"?t.pop():e}const vo=["addListener","removeListener"],So=["addEventListener","removeEventListener"],yo=["on","off"];function Q(t,e,i,n){if(X(i)&&(n=i,i=void 0),n)return no(n)(Q(t,e,i));const r=ur(t)||hr(t)||fr(t);if(!r&&!sr(t))throw new TypeError("Invalid event target");return new $(s=>{const o=(...a)=>s.next(1<a.length?a:a[0]);if(r)Sn(o,s,t,e,i);else for(let a=0;a<t.length&&!s.closed;a++){const l=t[a];Sn(o,s,l,e,i)}})}function Sn(t,e,i,n,r){const[s,o]=bo(i);if(!s||!o)throw new TypeError("Invalid event target");i[s](n,t,r),e.add(()=>i[o](n,t,r))}function bo(t){return fr(t)?So:ur(t)?vo:hr(t)?yo:[]}function ur(t){return X(t.addListener)&&X(t.removeListener)}function hr(t){return X(t.on)&&X(t.off)}function fr(t){return X(t.addEventListener)&&X(t.removeEventListener)}function Lo(...t){const e=Eo(t),i=po(t,1/0),n=t;return n.length?n.length===1?He(n[0]):go(i)(e?ho(n,e):He(n)):cr}function Ht(t,e){return i=>new $(n=>{let r=0;i.subscribe(ue({destination:n,next:s=>t.call(e,s,r++)&&n.next(s)}))})}function Yi(t){return e=>new $(i=>{let n=null,r=!1,s;n=e.subscribe(ue({destination:i,error:o=>{s=He(t(o,Yi(t)(e))),n?(n.unsubscribe(),n=null,s.subscribe(i)):r=!0}})),r&&(n.unsubscribe(),n=null,s.subscribe(i))})}function mr(t,e=Qs){return i=>new $(n=>{let r,s;i.subscribe(ue({destination:n,next:o=>{r=o,s?.unsubscribe(),s=Se(n,e,()=>{s=void 0;const a=r;r=null,n.next(a)},t)},complete:()=>{s&&n.next(r),n.complete()},finalize:()=>{r=s=null}}))})}function Ti(t){return t<=0?()=>cr:e=>new $(i=>{let n=0;const r=ue({destination:i,next:s=>{++n<t?i.next(s):(r.unsubscribe(),i.next(s),i.complete())}});e.subscribe(r)})}function gr(t,e=Vi){return t=t??Io,i=>new $(n=>{let r,s=!0;i.subscribe(ue({destination:n,next:o=>{const a=e(o);(s||!t(r,a))&&(s=!1,r=a,n.next(o))}}))})}function Io(t,e){return t===e}function Er(t){return e=>new $(i=>{let n=null,r=0,s=!1;const o=()=>s&&!n&&i.complete();e.subscribe(ue({destination:i,next:a=>{n?.unsubscribe();const l=r++;He(t(a,l)).subscribe(n=ue({destination:i,complete:()=>{n=null,o()}}))},complete:()=>{s=!0,o()}}))})}function Gi(t){const e=X(t)?{next:t}:t;return e?i=>new $(n=>{e.subscribe?.();let r=!0;i.subscribe(ue({destination:n,next:s=>{e.next?.(s),n.next(s)},error:s=>{r=!1,e.error?.(s),n.error(s)},complete:()=>{r=!1,e.complete?.(),n.complete()},finalize:()=>{r&&e.unsubscribe?.(),e.finalize?.()}}))}):Vi}class Ao{min;max;color;hint;shortHint}class wo{validations;strength;strengthInPercent}class _o extends tr{formElement;elements=new Map;stepConfig;passwordStrength;ruleset;tempStrength=0;isPasswordRequirementsHintEnabled=!1;isPasswordStrengthIndicatorEnabled=!1;isShowHidePasswordFunctionEnabled=!1;constructor(e,i){super(),this.formElement=e,this.ruleset=i,this.buildElementList(),this.buildPasswordStrength(),this.buildStepConfig(),this.enableShowHidePasswordFunction(),this.enablePasswordStrengthIndicator(),this.enablePasswordRequirementsHint()}getValidationFunctions(){return[this.validationNoEmptyStrings.bind(this),this.validationPasswordEquality.bind(this),this.validationValidationsFulfilled.bind(this)]}validationNoEmptyStrings(e){const i=this.elements.get(G.NEW_PASSWORD),n=this.elements.get(G.CONFIRM_PASSWORD);(i.value===""||n.value==="")&&(i.value===""&&e([1],[i]),n.value===""&&e([1],[n]))}validationPasswordEquality(e){const i=this.elements.get(G.NEW_PASSWORD),n=this.elements.get(G.CONFIRM_PASSWORD);i.value!==n.value&&e([2],[n])}validationValidationsFulfilled(e){const i=this.elements.get(G.NEW_PASSWORD);this.passwordStrength.strength<this.passwordStrength.validations&&e([3],[i])}buildElementList(){const e=new Map;e.set(G.PASSWORD_RESET_CONTAINER,this.formElement.querySelector(".password-reset-container")),e.set(G.PASSWORD_VALIDATION_BOX,e.get(G.PASSWORD_RESET_CONTAINER).querySelector(".password-validation-box")),e.set(G.PASSWORD_STRENGTH_INDICATOR,e.get(G.PASSWORD_RESET_CONTAINER).querySelector(".password-strength-indicator")),e.set(G.HINT_ELEMENT,e.get(G.PASSWORD_STRENGTH_INDICATOR).querySelector(".hint")),e.set(G.HINT_TEXT,e.get(G.HINT_ELEMENT).querySelector(".hint-text")),e.set(G.HINT_STRENGTH,e.get(G.HINT_ELEMENT).querySelector(".hint-strength")),e.set(G.STEP_ELEMENT,e.get(G.PASSWORD_STRENGTH_INDICATOR).querySelector(".bar .step")),e.set(G.NEW_PASSWORD,e.get(G.PASSWORD_RESET_CONTAINER).querySelector("#newPassword")),e.set(G.CONFIRM_PASSWORD,e.get(G.PASSWORD_RESET_CONTAINER).querySelector("#confirmNewPassword")),e.set(G.ERROR_LIST_ELEMENTS,e.get(G.PASSWORD_RESET_CONTAINER).querySelectorAll(".hint-list")),e.set(G.PASSWORD_SHOW_HIDE_ELEMENTS,e.get(G.PASSWORD_RESET_CONTAINER).querySelectorAll(".show-
47hide-password")),this.elements=e}buildStepConfig(){typeof miscellaneous>"u"&&console.warn("password-reset-validator.ts: No miscellaneous Map available.");const e=this.generateStepRule(0,33,"red",typeof miscellaneous>"u"?"Ihr Passwort ist nicht sicher!":miscellaneous.get("weak-hint")||"",typeof miscellaneous>"u"?"Schwach":miscellaneous.get("weak")||""),i=this.generateStepRule(34,66,"yellow",typeof miscellaneous>"u"?"Ihr Passwort erfüllt noch nicht alle Kriterien":miscellaneous.get("mediocre-hint")||"",typeof miscellaneous>"u"?"Mittelmäßig":miscellaneous.get("mediocre")||""),n=this.generateStepRule(67,100,"green",typeof miscellaneous>"u"?"Ihr Passwort ist sehr sicher!":miscellaneous.get("strong-hint")||"",typeof miscellaneous>"u"?"Stark":miscellaneous.get("strong")||"");this.stepConfig=[e,i,n]}generateStepRule(e,i,n,r,s){const o=new Ao;return o.min=e,o.max=i,o.color=n,o.hint=r,o.shortHint=s,o}buildPasswordStrength(){const e=new wo;e.strength=0,e.strengthInPercent=0,e.validations=0;const i=this.ruleset.find(n=>n.fieldName==="newPassword");i&&(e.validations+=i.rules.length),this.passwordStrength=e}updatePasswordRequirementsHint(){if(!this.isPasswordRequirementsHintEnabled)return;const e=this.ruleset.find(i=>i.fieldName==="newPassword");if(e)for(const i of e.rules)this.updateRule(i)}updateRule(e){const i=this.elements.get(G.PASSWORD_VALIDATION_BOX).querySelector("."+e.ruleShortName),n=i?.querySelector(".password-check"),r=i?.querySelector(".icon i");!n||!r||(e.passed?(n.classList.add("valid"),n.classList.remove("not-valid"),r.className="",r.classList.add("fal"),r.classList.add("fa-check")):(n.classList.add("not-valid"),n.classList.remove("valid"),r.className="",r.classList.add("fal"),r.classList.add("fa-times")))}updatePasswordStrengthHint(){const e=this.elements.get(G.HINT_TEXT),i=this.elements.get(G.HINT_STRENGTH),n=this.elements.get(G.STEP_ELEMENT),r=this.passwordStrength.strength/this.passwordStrength.validations*100;this.passwordStrength.strengthInPercent=r,n.style.width=""+Math.round(r)+"%";for(const s of this.stepConfig)r>=s.min&&r<=s.max&&(n.className="",n.classList.add("step"),n.classList.add(s.color),e.textContent=s.hint,i.className="",i.classList.add("hint-strength",s.color),i.textContent=s.shortHint)}enablePasswordRequirementsHint(){this.isPasswordRequirementsHintEnabled=!0;const e=this.elements.get(G.PASSWORD_VALIDATION_BOX);e.classList.remove("hidden");const i=e.querySelector(".check");if(i){const n=this.ruleset.filter(r=>r.fieldName==="newPassword");for(const r of n)for(const s of r.rules)this.addVisibleRule(s,i);i.remove()}}addVisibleRule(e,i){const n=i.cloneNode(!0),r=n?.querySelector(".description");n.classList.add(e.ruleShortName),typeof passwordRequirements>"u"&&console.warn("password-reset-validator.ts: No passwordRequirements Map available."),r.textContent=typeof passwordRequirements>"u"?e.ruleName:passwordRequirements.get(e.ruleShortName)||"",this.elements.get(G.PASSWORD_VALIDATION_BOX).append(n)}validatePasswordStrength(e){const i=e.value;i.length>0&&this.elements.get(G.PASSWORD_STRENGTH_INDICATOR).classList.remove("invisible"),this.tempStrength=0;const n=this.ruleset.find(r=>r.fieldName==="newPassword");if(n)for(const r of n.rules)this.checkRule(r,i);this.passwordStrength.strength=this.tempStrength,this.updatePasswordStrengthHint(),this.updatePasswordRequirementsHint()}enablePasswordStrengthIndicator(){this.isPasswordStrengthIndicatorEnabled=!0,this.elements.get(G.PASSWORD_STRENGTH_INDICATOR).classList.remove("hidden"),Q(this.elements.get(G.NEW_PASSWORD),"input").subscribe(()=>this.validatePasswordStrength(this.elements.get(G.NEW_PASSWORD)))}checkRule(e,i){i.match(e.regex)?(this.tempStrength++,e.passed=!0):e.passed=!1}enableShowHidePasswordFunction(){this.isShowHidePasswordFunctionEnabled=!0,typeof miscellaneous>"u"&&console.warn("password-reset-validator.ts: No miscellaneous Map available.");for(const e of this.elements.get(G.PASSWORD_SHOW_HIDE_ELEMENTS))e.classList.remove("hidden"),Q(e,"mousedown").subscribe(i=>{i.preventDefault();const n=e.parentElement?.querySelector("input");n&&(n&&n.type==="password"?(n.type="text",e.textContent=typeof miscellaneous>"u"?"ausblenden":miscellaneous.get("hide")||"ausblenden"):(n.type="password",e.textContent=typeof miscellaneous>"u"?"anzeigen":miscellaneous.get("show")||"anzeigen"),n.focus())})}}var Ne=(t=>(t.USERNAME_CONTAINER="USERNAME_CONTAINER",t.USERNAME_INPUT="USERNAME_INPUT",t.ERROR_LIST_ELEMENTS="ERROR_LIST_ELEMENTS",t))(Ne||{});class To extends tr{formElement;elements=new Map;ruleset;constructor(e,i){super(),this.formElement=e,this.ruleset=i,this.buildElementList()}getValidationFunctions(){return[this.validationNoEmptyStrings.bind(this),this.validationMaxLength.bind(this)]}validationNoEmptyStrings(e){const i=this.elements.get(Ne.USERNAME_INPUT);i.value===""&&e([1],[i])}validationMaxLength(e){const i=this.elements.get(Ne.USERNAME_INPUT),n=this.ruleset.find(r=>r.fieldName==="username")?.rules.find(r=>
47r.ruleShortName==="max-length");n&&i.value.match(n.regex)&&e([4],[i])}buildElementList(){const e=new Map;e.set(Ne.USERNAME_CONTAINER,this.formElement.querySelector(".username-container")),e.set(Ne.USERNAME_INPUT,e.get(Ne.USERNAME_CONTAINER).querySelector("#username")),e.set(Ne.ERROR_LIST_ELEMENTS,e.get(Ne.USERNAME_CONTAINER).querySelectorAll(".hint-list")),this.elements=e}}class yn{fieldName;rules}class pr{}var u=(t=>(t.MAIN_ADDRESS_FIELD="MAIN_ADDRESS_FIELD",t.MAIN_STREET="MAIN_STREET",t.MAIN_POSTAL_CODE="MAIN_POSTAL_CODE",t.MAIN_CITY="MAIN_CITY",t.MAIN_SUGGESTIONS="MAIN_SUGGESTIONS",t.MAIN_HINT="MAIN_HINT",t.MAIN_SUGGESTION_LIST="MAIN_SUGGESTION_LIST",t.MAIN_COUNTRY="MAIN_COUNTRY",t.MAIN_CLOSE_BUTTON="MAIN_CLOSE_BUTTON",t.DELIVERY_ADDRESS_FIELD="DELIVERY_ADDRESS_FIELD",t.DELIVERY_STREET="DELIVERY_STREET",t.DELIVERY_POSTAL_CODE="DELIVERY_POSTAL_CODE",t.DELIVERY_CITY="DELIVERY_CITY",t.DELIVERY_SUGGESTIONS="DELIVERY_SUGGESTIONS",t.DELIVERY_HINT="DELIVERY_HINT",t.DELIVERY_SUGGESTION_LIST="DELIVERY_SUGGESTION_LIST",t.DELIVERY_COUNTRY="DELIVERY_COUNTRY",t.DELIVERY_CLOSE_BUTTON="DELIVERY_CLOSE_BUTTON",t.BILLING_ADDRESS_FIELD="BILLING_ADDRESS_FIELD",t.BILLING_STREET="BILLING_STREET",t.BILLING_POSTAL_CODE="BILLING_POSTAL_CODE",t.BILLING_CITY="BILLING_CITY",t.BILLING_SUGGESTIONS="BILLING_SUGGESTIONS",t.BILLING_HINT="BILLING_HINT",t.BILLING_SUGGESTION_LIST="BILLING_SUGGESTION_LIST",t.BILLING_COUNTRY="BILLING_COUNTRY",t.BILLING_CLOSE_BUTTON="BILLING_CLOSE_BUTTON",t.PAYER_ADDRESS_FIELD="PAYER_ADDRESS_FIELD",t.PAYER_STREET="PAYER_STREET",t.PAYER_POSTAL_CODE="PAYER_POSTAL_CODE",t.PAYER_CITY="PAYER_CITY",t.PAYER_SUGGESTIONS="PAYER_SUGGESTIONS",t.PAYER_HINT="PAYER_HINT",t.PAYER_SUGGESTION_LIST="PAYER_SUGGESTION_LIST",t.PAYER_COUNTRY="PAYER_COUNTRY",t.PAYER_CLOSE_BUTTON="PAYER_CLOSE_BUTTON",t))(u||{});class it{static get(e,i){const n={};return n.method="GET",i?.headers&&(n.headers=i.headers),new $(r=>{fetch(e,n).then(s=>{if(!s.ok){const o=new Error("HTTP status code: "+s.status);return r.error(o)}return s.redirected||s.type==="opaqueredirect"?s.url:i?.response?.responseType==="text"?s.text():s.json()}).then(s=>r.next(s)).catch(s=>r.error(s))})}static post(e,i,n){const r={};return r.method="POST",r.body=i,n&&(r.headers=n),new $(s=>{fetch(e,r).then(o=>o.redirected||o.type==="opaqueredirect"?o.url:o.json()).then(o=>s.next(o)).catch(o=>s.error(o))})}static delete(e){const i={};return i.method="DELETE",new $(n=>{fetch(e,i).then(r=>r.redirected||r.type==="opaqueredirect"?r.url:r.json()).then(r=>n.next(r)).catch(r=>n.error(r))})}}class bn{apiKey;text;type;lang;format;filter}class Ro{static getEndpointUrl(){return"https://api.geoapify.com/v1/geocode/autocomplete"}static getApiKey(){return"d59ade6d8b40463fae046e6294d1c43d"}static getStreetSuggestionsByPostalCodeAndCity(e,i,n,r){const s=new bn;s.apiKey=this.getApiKey(),s.format="geojson",s.text=`${e} ${n} ${r}`,s.type="street";const o=new URL(this.getEndpointUrl()),a=new URLSearchParams;return a.set("apiKey",s.apiKey),a.set("format",s.format),a.set("text",s.text),a.set("type",s.type),a.set("filter",`countrycode:${i||"de"}`),o.search=a.toString(),it.get(o.toString())}static getCityByPostalCode(e,i){const n=new bn;n.apiKey=this.getApiKey(),n.format="geojson",n.text=e;const r=new URL(this.getEndpointUrl()),s=new URLSearchParams;return s.set("apiKey",n.apiKey),s.set("format",n.format),s.set("text",n.text),s.set("filter",`countrycode:${(i||"de").toLowerCase()}`),s.set("lang",i.toLowerCase()),r.search=s.toString(),it.get(r.toString())}}class Wt{static removeScriptsFromString(e){const i=document.createElement("div");i.innerHTML=e;const n=i.getElementsByTagName("script");if(n)for(const r of Array.from(n))r.remove();return i.innerHTML}}class xt{name;streetField;countryField;postalCodeField;cityField;suggestionElement;suggestionListElement;hintElement}class No extends pr{formElement;elements=new Map;documentClickEvent$;placeId="";constructor(e){super(),this.formElement=e,this.buildElementList(),this.addEvents()}addEvents(){if(!this.elements.get(u.MAIN_STREET)||!this.elements.get(u.MAIN_POSTAL_CODE)||!this.elements.get(u.MAIN_CITY))return console.warn("address-suggestion-validator.ts: Address autocompletion disabled, because one or more necessary fields could not be found.");this.documentClickEvent$=Q(document,"click"),Q(this.elements.get(u.MAIN_CLOSE_BUTTON),"click").subscribe(()=>{this.elements.get(u.MAIN_SUGGESTIONS).classList.add("hidden"),this.setInputAutocompleteValue(this.elements.get(u.MAIN_STREET),"street-address")}),Q(this.elements.get(u.DELIVERY_CLOSE_BUTTON),"click").subscribe(()=>this.elements.get(u.DELIVERY_SUGGESTIONS).classList.add("hidden")),Q(this.elements.get(u.BILLING_CLOSE_BUTTON),"click").subscribe(()=>this.elements.get(u.BILLING_SUGGESTIONS).classList.add("hidden"));const e=new xt;e.name="mainAddress",e.streetField=this.elements.get(u.MAIN_STREET),e.countryField=this.elements.get(u.MAIN_COUNTRY),e.suggestionElement=this.elements.get(u.MAIN_SUGGESTIONS),e.suggestionListElement=this.elements.get(u.MAIN_SUGGESTION_LIST),e.postalCodeField=this.elements.get(u.MAIN_POSTAL_CODE),e.cityField=this.elements.get(u.MAIN_CITY),e.hintElement=this.elements.get(u.MAIN_HINT);const i=new xt;i.name="deliveryAddress",i.streetField=this.elements.get(u.DELIVERY_STREET),i.countryField=this.elements.get(u.DELIVERY_COUNTRY),i.suggestionElement=this.elements.get(u.DELIVERY_SUGGESTIONS),i.suggestionListElement=this.elements.get(u.DELIVERY_SUGGESTION_LIST),i.postalCodeField=this.elements.get(u.DELIVERY_POSTAL_CODE),i.cityField=this.elements.get(u.DELIVERY_CITY),i.hintElement=this.elements.get(u.DELIVERY_HINT);const n=new xt;n.name="billingAddress",n.streetField=this.elements.get(u.BILLING_STREET),n.countryField=this.elements.get(u.BILLING_COUNTRY),n.suggestionElement=this.elements.get(u.BILLING_SUGGESTIONS),n.suggestionListElement=this.elements.get(u.BILLING_SUGGESTION_LIST),n.postalCodeField=this.elements.get(u.BILLING_POSTAL_CODE),n.cityField=this.elements.get(u.BILLING_CITY),n.hintElement=this.elements.get(u.BILLING_HINT);const r=new xt;r.name="payerAddress",r.streetField=this.elements.get(u.PAYER_STREET),r.countryField=this.elements.get(u.PAYER_COUNTRY),r.suggestionElement=this.elements.get(u.PAYER_SUGGESTIONS),r.suggestionListElement=this.elements.get(u.PAYER_SUGGESTION_LIST),r.postalCodeField=this.elements.get(u.PAYER_POSTAL_CODE),r.cityField=this.elements.get(u.PAYER_CITY),r.hintElement=this.elements.get(u.PAYER_HINT);const s=[e,i,n,r];for(const o of s)this.setInputAutocompleteValue(o.streetField,this.getBrowserAutoCompletionOffValue()),Q([o.streetField],"input").pipe(gr(),Ht(()=>o.cityField.value.trim()!==""),mr(200),ni(a=>a.target.value),Er(a=>{if(o?.countryField||console.warn(`address-suggestion-validator.ts: No country code for ${o.name} found. Using "de" as fallback.`),a==="")return o.suggestionListElement.innerText="",o.suggestionElement.classList.add("hidden"),[];{const l=o?.countryField?.value.toLowerCase()||"de",c=o?.postalCodeField?.value||"",d=o?.cityField?.value||"";return Ro.getStreetSuggestionsByPostalCodeAndCity(a,l,c,d).pipe(Yi(()=>[]))}}),Gi(a=>this.makeAddressSuggestions(a,o))).subscribe()}getBrowserAutoCompletionOffValue(){const e=navigator.userAgent;return e.match(/chrome|chromium|crios/i)?"none":(e.match(/firefox|fxios/i),"off")}setInputAutocompleteValue(e,i){e&&e.setAttribute("autocomplete",i)}makeAddressSuggestions(e,i){if(!e||e?.features.length===0||e.query.parsed.housenumber)return;i.suggestionListElement.innerText="",this.documentClickEvent$.pipe(Ti(1)).subscribe(()=>i.suggestionElement.classList.add("hidden"));const n=e.query.text;for(const r of e.features){const s=r.properties,o=document.createElement("div");if(this.isSameCity(e.query?.parsed?.city?.toLowerCase().trim(),s.city?.toLowerCase().trim())&&!this.isSameStreet(i.streetField.value.toLowerCase().trim(),s.street?.toLowerCase().trim())){const a=`${s.street}`;o.innerHTML=a.replace(n,Wt.removeScriptsFromString(`<strong>${n}</strong>`)),i.suggestionListElement.append(o),Q(o,"click").pipe(Ti(1)).subscribe(()=>this.addSuggestions(r,i))}}i.suggestionListElement.childNodes.length>0&&i.suggestionElement.classList.remove("hidden")}isSameCity(e,i){return e===i}isSameStreet(e,i){return e===i}addSuggestions(e,i){i.streetField.value=e.properties.street,i.suggestionListElement.innerText="",i.suggestionElement.classList.add("hidden"),this.setInputAutocompleteValue(i.streetField,"street-address"),i.streetField.focus()}buildElementList(){const e=new Map;e.set(u.MAIN_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-mainAddress")),e.get(u.MAIN_ADDRESS_FIELD)&&(e.set(u.MAIN_STREET,e.get(u.MAIN_ADDRESS_FIELD).querySelector("input[data-street]")),e.set(u.MAIN_POSTAL_CODE,e.get(u.MAIN_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.MAIN_CITY,e.get(u.MAIN_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.MAIN_SUGGESTIONS,e.get(u.MAIN_ADDRESS_FIELD).querySelector(".street-suggestions")),e.set(u.MAIN_HINT,e.get(u.MAIN_ADDRESS_FIELD).querySelector("div[data-hint]")),e.set(u.MAIN_SUGGESTION_LIST,e.get(u.MAIN_ADDRESS_FIELD).querySelector(".street-suggestion-list")),e.set(u.MAIN_CLOSE_BUTTON,e.get(u.MAIN_ADDRESS_FIELD).querySelector(".suggestion-close-button")),e.set(u.MAIN_COUNTRY,this.formElement.querySelector("#input-field-mainAddress-countryCode")),e.set(u.DELIVERY_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-deliveryAddress")),e.get(u.DELIVERY_ADDRESS_FIELD)&&(e.set(u.DELIVERY_STREET,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("input[data-street]")),e.set(u.DELIVERY_POSTAL_CODE,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.DELIVERY_CITY,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.DELIVERY_SUGGESTIONS,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector(".street-suggestions")),e.set(u.DELIVERY_HINT,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("div[data-hint]")),e.set(u.DELIVERY_SUGGESTION_LIST,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector(".street-suggestion-list")),e.set(u.DELIVERY_CLOSE_BUTTON,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector(".suggestion-close-button")),e.set(u.DELIVERY_COUNTRY,this.formElement.querySelector("#input-field-deliveryAddress-countryCode")),e.set(u.BILLING_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-billingAddress")),e.get(u.BILLING_ADDRESS_FIELD)&&(e.set(u.BILLING_STREET,e.get(u.BILLING_ADDRESS_FIELD).querySelector("input[data-street]")),e.set(u.BILLING_POSTAL_CODE,e.get(u.BILLING_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.BILLING_CITY,e.get(u.BILLING_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.BILLING_SUGGESTIONS,e.get(u.BILLING_ADDRESS_FIELD).querySelector(".street-suggestions")),e.set(u.BILLING_HINT,e.get(u.BILLING_ADDRESS_FIELD).querySelector("div[data-hint]")),e.set(u.BILLING_SUGGESTION_LIST,e.get(u.BILLING_ADDRESS_FIELD).querySelector(".street-suggestion-list")),e.set(u.BILLING_CLOSE_BUTTON,e.get(u.BILLING_ADDRESS_FIELD).querySelector(".suggestion-close-button")),e.set(u.BILLING_COUNTRY,this.formElement.querySelector("#input-field-billingAddress-countryCode")),e.set(u.PAYER_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-payerAddress")),e.get(u.PAYER_ADDRESS_FIELD)&&(e.set(u.PAYER_STREET,e.get(u.PAYER_ADDRESS_FIELD).querySelector("input[data-street]")),e.set(u.PAYER_POSTAL_CODE,e.get(u.PAYER_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.PAYER_CITY,e.get(u.PAYER_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.PAYER_SUGGESTIONS,e.get(u.PAYER_ADDRESS_FIELD).querySelector(".street-suggestions")),e.set(u.PAYER_HINT,e.get(u.PAYER_ADDRESS_FIELD).querySelector("div[data-hint]")),e.set(u.PAYER_SUGGESTION_LIST,e.get(u.PAYER_ADDRESS_FIELD).querySelector(".street-suggestion-list")),e.set(u.PAYER_CLOSE_BUTTON,e.get(u.PAYER_ADDRESS_FIELD).querySelector(".suggestion-close-button")),e.set(u.PAYER_COUNTRY,this.formElement.querySelector("#input-field-payerAddress-countryCode")),this.elements=e))))}}class Co{countryCode;postalCode;placeName}class Oo{static getEndpointUrl(){return location.origin}static getCitiesByZipCode(e,i){const n=new Co;n.countryCode=e,n.postalCode=i;
47const r=new URL(this.getEndpointUrl());return r.pathname="/user/zipcode-info",it.get(`${r.toString()}?countryCode=${n.countryCode}&zipcode=${n.postalCode}`)}}class Ft{name;countryField;postalCodeField;cityField;suggestionElement;suggestionListElement}class Do extends pr{formElement;elements=new Map;documentClickEvent$;constructor(e){super(),this.formElement=e,this.buildElementList(),this.addEvents()}buildElementList(){const e=new Map;this.formElement.querySelector(".address-editable-mainAddress")&&(e.set(u.MAIN_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-mainAddress")),e.set(u.MAIN_POSTAL_CODE,e.get(u.MAIN_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.MAIN_CITY,e.get(u.MAIN_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.MAIN_COUNTRY,this.formElement.querySelector("#input-field-mainAddress-countryCode")),e.set(u.MAIN_SUGGESTIONS,e.get(u.MAIN_ADDRESS_FIELD).querySelector("div[data-suggestions]")),e.set(u.MAIN_SUGGESTION_LIST,e.get(u.MAIN_ADDRESS_FIELD).querySelector(".suggestion-list")),e.set(u.MAIN_CLOSE_BUTTON,e.get(u.MAIN_ADDRESS_FIELD).querySelector(".suggestion-close-button"))),this.formElement.querySelector(".address-editable-deliveryAddress")&&(e.set(u.DELIVERY_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-deliveryAddress")),e.set(u.DELIVERY_POSTAL_CODE,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.DELIVERY_CITY,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.DELIVERY_COUNTRY,this.formElement.querySelector("#input-field-deliveryAddress-countryCode")),e.set(u.DELIVERY_SUGGESTIONS,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector("div[data-suggestions]")),e.set(u.DELIVERY_SUGGESTION_LIST,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector(".suggestion-list")),e.set(u.DELIVERY_CLOSE_BUTTON,e.get(u.DELIVERY_ADDRESS_FIELD).querySelector(".suggestion-close-button"))),this.formElement.querySelector(".address-editable-billingAddress")&&(e.set(u.BILLING_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-billingAddress")),e.set(u.BILLING_POSTAL_CODE,e.get(u.BILLING_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.BILLING_CITY,e.get(u.BILLING_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.BILLING_COUNTRY,this.formElement.querySelector("#input-field-billingAddress-countryCode")),e.set(u.BILLING_SUGGESTIONS,e.get(u.BILLING_ADDRESS_FIELD).querySelector("div[data-suggestions]")),e.set(u.BILLING_SUGGESTION_LIST,e.get(u.BILLING_ADDRESS_FIELD).querySelector(".suggestion-list")),e.set(u.BILLING_CLOSE_BUTTON,e.get(u.BILLING_ADDRESS_FIELD).querySelector(".suggestion-close-button"))),this.formElement.querySelector(".address-editable-payerAddress")&&(e.set(u.PAYER_ADDRESS_FIELD,this.formElement.querySelector(".address-editable-payerAddress")),e.set(u.PAYER_POSTAL_CODE,e.get(u.PAYER_ADDRESS_FIELD).querySelector("input[data-postalcode]")),e.set(u.PAYER_CITY,e.get(u.PAYER_ADDRESS_FIELD).querySelector("input[data-city]")),e.set(u.PAYER_COUNTRY,this.formElement.querySelector("#input-field-payerAddress-countryCode")),e.set(u.PAYER_SUGGESTIONS,e.get(u.PAYER_ADDRESS_FIELD).querySelector("div[data-suggestions]")),e.set(u.PAYER_SUGGESTION_LIST,e.get(u.PAYER_ADDRESS_FIELD).querySelector(".suggestion-list")),e.set(u.PAYER_CLOSE_BUTTON,e.get(u.PAYER_ADDRESS_FIELD).querySelector(".suggestion-close-button"))),this.elements=e}addEvents(){this.documentClickEvent$=Q(document,"click"),Q(this.elements.get(u.MAIN_CLOSE_BUTTON),"click").subscribe(()=>this.elements.get(u.MAIN_SUGGESTIONS).classList.add("hidden")),Q(this.elements.get(u.DELIVERY_CLOSE_BUTTON),"click").subscribe(()=>this.elements.get(u.DELIVERY_SUGGESTIONS).classList.add("hidden")),Q(this.elements.get(u.BILLING_CLOSE_BUTTON),"click").subscribe(()=>this.elements.get(u.BILLING_SUGGESTIONS).classList.add("hidden"));const e=this.elements.get(u.PAYER_CLOSE_BUTTON);e&&Q(e,"click").subscribe(()=>this.elements.get(u.PAYER_SUGGESTIONS).classList.add("hidden"));const i=new Ft;i.name="mainAddress",i.countryField=this.elements.get(u.MAIN_COUNTRY),i.postalCodeField=this.elements.get(u.MAIN_POSTAL_CODE),i.cityField=this.elements.get(u.MAIN_CITY),i.suggestionElement=this.elements.get(u.MAIN_SUGGESTIONS),i.suggestionListElement=this.elements.get(u.MAIN_SUGGESTION_LIST);const n=new Ft;n.name="deliveryAddress",n.countryField=this.elements.get(u.DELIVERY_COUNTRY),n.postalCodeField=this.elements.get(u.DELIVERY_POSTAL_CODE),n.cityField=this.elements.get(u.DELIVERY_CITY),n.suggestionElement=this.elements.get(u.DELIVERY_SUGGESTIONS),n.suggestionListElement=this.elements.get(u.DELIVERY_SUGGESTION_LIST);const r=new Ft;r.name="billingAddress",r.countryField=this.elements.get(u.BILLING_COUNTRY),r.postalCodeField=this.elements.get(u.BILLING_POSTAL_CODE),r.cityField=this.elements.get(u.BILLING_CITY),r.suggestionElement=this.elements.get(u.BILLING_SUGGESTIONS),r.suggestionListElement=this.elements.get(u.BILLING_SUGGESTION_LIST);const s=new Ft;s.name="billingAddress",s.countryField=this.elements.get(u.PAYER_COUNTRY),s.postalCodeField=this.elements.get(u.PAYER_POSTAL_CODE),s.cityField=this.elements.get(u.PAYER_CITY),s.suggestionElement=this.elements.get(u.PAYER_SUGGESTIONS),s.suggestionListElement=this.elements.get(u.PAYER_SUGGESTION_LIST);const o=[i,n,r];e&&o.push(s);for(const a of o)this.setInputAutocompleteValue(a.postalCodeField,this.getBrowserAutoCompletionOffValue()),this.setInputAutocompleteValue(a.cityField,this.getBrowserAutoCompletionOffValue()),Q(a.postalCodeField,"keyup").pipe(gr(),mr(200),ni(l=>l.target.value),Ht(l=>l.length>=3),Er(l=>{const c=a?.countryField?.value||"DE";return Oo.getCitiesByZipCode(c,l).pipe(Yi(()=>[]))}),Ht(l=>l.length>0),Gi(l=>this.makeSuggestion(l,a))).subscribe()}makeSuggestion(e,i){if(e[0]&&e.length==1)this.addSuggestions(e[0],i);else{i.suggestionElement.classList.remove("hidden"),i.suggestionListElement.innerText="",i.suggestionListElement.setAttribute("style","max-height:255px;overflow:auto;");const n=e.filter((r,s)=>s===e.findIndex(o=>r.placeName===o.placeName));for(const r of n){const s=document.createElement("div");s.setAttribute("tabindex","0"),s.setAttribute("role","button"),s.setAttribute("aria-label",Wt.removeScriptsFromString(r.placeName)),s.innerHTML=Wt.removeScriptsFromString(r.postalCode)+" "+Wt.removeScriptsFromString(r.placeName),i.suggestionListElement.append(s);const o=Q(s,"click"),a=Q(s,"keydown").pipe(Ht(l=>l.code==="Enter"||l.code==="Space"));Lo(o,a).pipe(Ti(1)).subscribe(()=>this.addSuggestions(r,i))}}}addSuggestions(e,i){i.cityField.value=e.placeName,i.postalCodeField.value=e.postalCode,i.suggestionListElement.innerText="",i.suggestionElement.classList.add("hidden")}setInputAutocompleteValue(e,i){e&&e.setAttribute("autocomplete",i)}getBrowserAutoCompletionOffValue(){const e=navigator.userAgent;return e.match(/chrome|chromium|crios/i)?"none":(e.match(/firefox|fxios/i),"off")}}class Po{formElement;elementList=new Map;formSubmitObservable;validationRuleset=[];validationFunctions=[];
47hintCodesMap;hasHints=!1;isSubmitValidationEnabled=!1;enabledValidators=new Map;enabledPlugins=new Map;isNoSubmit=!1;lookupFor(e){this.formElement=document.querySelector(e),this.formElement&&(this.getEnabledValidators(),this.getEnabledPlugins(),this.init())}init(){this.formSubmitObservable=Q(this.formElement,"submit"),this.isNoSubmit=this.formElement.classList.contains("no-submit"),this.elementList=this.getDefaultElementList(this.formElement),this.buildValidationRules(),this.buildHintCodes(),this.addValidators(),this.addPlugins(),this.isNoSubmit||(this.disableFormSubmitByDefault(),this.enableSubmitValidation())}getEnabledValidators(){this.enabledValidators.set("passwordReset",this.formElement.classList.contains("validator-password-reset")),this.enabledValidators.set("username",this.formElement.classList.contains("validator-username"))}getEnabledPlugins(){this.enabledPlugins.set("addressAutocompletion",this.formElement.classList.contains("plugin-address-autocompletion")),this.enabledPlugins.set("zipCityAutocompletion",this.formElement.classList.contains("plugin-zip-city-autocompletion"))}addValidators(){if(this.enabledValidators.get("passwordReset")){const e=new _o(this.formElement,this.validationRuleset.filter(i=>i.fieldName==="newPassword"));this.validationFunctions.push(...e.getValidationFunctions())}if(this.enabledValidators.get("username")){const e=new To(this.formElement,this.validationRuleset.filter(i=>i.fieldName==="username"));this.validationFunctions.push(...e.getValidationFunctions())}}addPlugins(){this.enabledPlugins.get("addressAutocompletion")&&new No(this.formElement),this.enabledPlugins.get("zipCityAutocompletion")&&new Do(this.formElement)}disableFormSubmitByDefault(){this.isNoSubmit||this.formSubmitObservable?.subscribe(e=>e.preventDefault())}getDefaultElementList(e){const i=new Map;return i.set(Ke.ERROR_ELEMENTS,e.querySelectorAll(".hint-list")),i.set(Ke.INPUT_BASE,e.querySelectorAll(".input-base")),i}buildHintCodes(){typeof hintCodes>"u"&&console.warn("form-validator.ts: No hintCodes Map available."),this.hintCodesMap=typeof hintCodes>"u"?new Map:hintCodes}buildValidationRules(){const e=new yn;e.fieldName="newPassword",e.rules=[{ruleName:"Minimale Passwortlänge",ruleShortName:"min-password-length",regex:/^.{8,}/,passed:!1},{ruleName:"Kleinbuchstaben als key",ruleShortName:"lower-chars",regex:/[a-z]/,passed:!1},{ruleName:"Großbuchstaben als key",ruleShortName:"upper-chars",regex:/[A-Z]/,passed:!1},{ruleName:"Zahlen als key",ruleShortName:"numbers",regex:/\d/,passed:!1},{ruleName:"Spezialbuchstaben als key",ruleShortName:"special-chars",regex:/[^a-zA-Z\d]/,passed:!1}];const i=new yn;i.fieldName="username",i.rules=[{ruleName:"Maximale Länge",ruleShortName:"max-length",regex:/^.{60,}$/,passed:!1}],this.validationRuleset=[e,i]}enableSubmitValidation(){if(this.isSubmitValidationEnabled=!0,!this.formElement)return console.error("form element for password validation not found");this.formSubmitObservable?.subscribe(async()=>{this.clearHints(),this.hasHints=!1;for(const e of this.validationFunctions)await e(this.setFieldHint.bind(this));this.hasHints||this.formElement.submit()})}clearHints(){this.elementList.get(Ke.INPUT_BASE)?.forEach(e=>e.classList.remove("has-error")),this.elementList.set(Ke.ERROR_ELEMENTS,this.formElement.querySelectorAll(".hint-list")),this.elementList.get(Ke.ERROR_ELEMENTS)?.forEach(e=>{const i=e.querySelector(".input-field-hint.invisible");e.textContent="",e.append(i)})}setFieldHint(e,i){for(const n of i){const r=n?.parentElement?.parentElement?.querySelector(".input-field-hint");if(!r){console.error("No .input-field-hint found to put the hint message in");return}n.parentElement?.classList.add("has-error"),this.hasHints=!0;for(const s of e){const o=r.cloneNode(!0);if(o){const a=o.querySelector(".field-hint-text");a&&(a.textContent=this.hintCodesMap?.get(s)||"")}n.parentElement?.classList.contains("has-error")&&o.classList.add("has-error"),n.parentElement?.classList.contains("disabled")&&o.classList.add("is-disabled"),n?.parentElement?.parentElement?.querySelector(".hint-list")?.append(o),setTimeout(()=>
47o.classList.remove("invisible"))}}}}new Po().lookupFor("form.validate");const vr=document.querySelectorAll('dialog[id^="dialog-"]');vr.forEach(t=>{const e=t.dataset.trigger;if(!e)return;const i=document.querySelectorAll(`${e}`),n=t.querySelectorAll(".close");let r=document.body.style.overflow;function s(){r=document.body.style.overflow,document.body.style.overflow="hidden",t.showModal()}i.forEach(o=>{o.addEventListener("click",s),o.addEventListener("keydown",a=>{(a.key==="Enter"||a.key===" ")&&s()})}),t?.addEventListener("close",()=>document.body.style.overflow=r),t?.addEventListener("click",o=>{pt(t,o.clientX,o.clientY)||t.close()}),n.forEach(o=>{o.addEventListener("click",()=>{t.close()})})});vr.forEach(t=>{const e=t.dataset.trigger;if(!e)return;const i=t.querySelector("[data-on-close-event]");if(!e.startsWith("[role='button']")){const n=document.querySelectorAll(`[data-${e}]`),r=t.querySelector("div[data-dialog-content]"),s=t.dataset.onOpenEvent,o=t.querySelector("[on-close-event]");if(n.length===0||!r)return;i?.addEventListener("click",a=>{a.stopPropagation(),o!==void 0&&document.dispatchEvent(new CustomEvent("dialog.onclose"))}),n.forEach(a=>{a?.addEventListener("click",l=>{l.stopPropagation(),t.showModal(),s!==void 0&&document.dispatchEvent(new CustomEvent("dialog.onopen"))})}),r&&(t?.addEventListener("close",()=>document.body.style.overflow="auto"),t?.addEventListener("click",a=>{pt(r,a.clientX,a.clientY)||t.close()}))}});var ze=(t=>(t.Existing="article-form",t.New="new-article-form",t))(ze||{});class ae extends EventTarget{static ChangeEventType="change";static Selector(e){return`[data-type="${e}"]`}#e;#i;#t=-1;#n="";#s=0;#r;#o;constructor(e,i,n=-1){super();const r=e.querySelector('[data-type="article-id-input"]'),s=e.querySelector(mi.Selector);this.#e=e,this.type=i,this.index=n,r instanceof HTMLInputElement&&s instanceof HTMLElement&&(this.#n=r.value.trim(),this.#r=r,this.#r.addEventListener("change",this.#a),this.#r.addEventListener("input",this.#l),this.#o=new mi(s),this.#s=this.#o.value,this.#o.addEventListener(mi.ChangeEventType,this.#c))}clone(){const e=this.element.cloneNode(!0);return new ae(e,this.type)}get element(){return this.#e}get type(){return this.#i}set type(e){this.#i=e,this.#e.setAttribute("data-type",e)}get index(){return this.#t}set index(e){this.#t=e}get articleId(){return this.#n}set articleId(e){this.#n=e,this.#r.value=e}get quantity(){return this.#s}#a=e=>{e.stopPropagation()};#l=()=>{this.#r.removeAttribute("data-has-error"),this.#n=this.#r.value.trim(),this.dispatchEvent(new Event(ae.ChangeEventType))};#c=()=>{this.#s=this.#o.value}}class Ln{static Selector='[data-type="direct-order-form"]';#e;#i;#t;#n=new Map;constructor(e){this.#e=e;const i=e.querySelector('button[type="submit"]'),n=e.querySelector(ae.Selector(ze.New)),r=Array.from(e.querySelectorAll(ae.Selector(ze.Existing)));i instanceof HTMLButtonElement&&n instanceof HTMLElement&&(this.#t=i,this.#t.addEventListener("click",this.#l),this.#i=new ae(n,ze.New),this.#i.addEventListener(ae.ChangeEventType,this.#o));for(const s of r)s instanceof HTMLElement&&this.#s(new ae(s,ze.Existing))}get hasError(){return this.#e.dataset.hasError==="true"}get viewportMin(){return Number(this.#e.dataset.viewportMin)||0}get viewportMax(){return Number(this.#e.dataset.viewportMax)||Number.POSITIVE_INFINITY}scrollIntoView(){(this.#e.closest("[data-scroll-marker]")||this.#e).scrollIntoView({block:"start"})}#s(e){const i=this.#n.size;e.index=i,e.addEventListener(ae.ChangeEventType,this.#a),this.#n.set(i,e)}#r(e){e.element.remove(),this.#n.delete(e.index)}#o=e=>{const i=e.target;i instanceof ae&&i.articleId!==""&&(i.removeEventListener(ae.ChangeEventType,this.#o),i.type=ze.Existing,this.#i=i.clone(),this.#i.articleId="",this.#i.addEventListener(ae.ChangeEventType,this.#o),i.element.after(this.#i.element),this.#s(i))};#a=e=>{e.target instanceof ae&&e.target.articleId===""&&this.#r(e.target)};#l=e=>{if(this.#n.size===0){e.preventDefault();return}requestAnimationFrame(()=>{this.#t.disabled=!0})}}function In(){const t=window.innerWidth;
47document.querySelectorAll(Ln.Selector).forEach(e=>{if(e instanceof HTMLElement){const i=new Ln(e);t>=i.viewportMin&&t<i.viewportMax&&i.hasError&&i.scrollIntoView()}})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",In):In();async function Sr(t,e){const i=new URL("/pricing/cc",window.location.origin);return i.searchParams.set("code",e.trim()),await fetch(i,{method:t,headers:{"Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"}})}class ko{#e;#i;#t;#n;constructor(e){this.#e=e,this.#e.addEventListener("submit",this.#s);const i=this.#e.querySelector("input");i instanceof HTMLInputElement&&(this.#i=i);const n=this.#e.querySelector('[data-type="error-message"]');n instanceof HTMLElement&&(this.#t=n);const r=this.#e.querySelector('[data-type="error-message-text"]');r instanceof HTMLElement&&(this.#n=r)}#s=async e=>{e.preventDefault();const n=await(await Sr("PUT",this.#i.value)).text();n==="valid"?(this.#i.value="",this.#t.dataset.show="",this.#n.textContent="",window.location.reload()):(this.#t.dataset.show="true",this.#n.textContent=n)}}class xo{#e;#i;constructor(e){this.#e=e,this.#e.addEventListener("submit",this.#t);const i=this.#e.querySelector('[data-type="voucher-code"]');i instanceof HTMLElement&&(this.#i=i.textContent??"")}#t=async e=>{e.preventDefault(),(await Sr("DELETE",this.#i)).ok&&window.location.reload()}}const Fo=document.querySelectorAll('form[data-type="add-voucher-form"]');for(const t of Fo)new ko(t);const Mo=document.querySelectorAll('form[data-type="remove-voucher-form"]');for(const t of Mo)new xo(t);async function qo(t,e){const n=await(await fetch(e)).text();for(const r of t)r.element.innerHTML=n,window.dispatchEvent(new CustomEvent("recoLoaded",{detail:r.swiperEventDetail}))}function An(t){for(const e of t)e.matchViewport()?e.element.removeAttribute("hidden"):e.element.setAttribute("hidden","")}async function Bo(t,e,i){const n=document.querySelector(".area1-footer"),r=document.querySelector(".area4");if(!n||!r)return;const s=[{matchViewport:()=>window.innerWidth<1280?!0:n.getBoundingClientRect().bottom>r.getBoundingClientRect().bottom,element:document.querySelector(".footer-recommendations"),swiperEventDetail:".footer-recommendations .ajax-reco"},{matchViewport:()=>window.innerWidth<1280?!1:n.getBoundingClientRect().bottom<r.getBoundingClientRect().bottom,element:document.querySelector(".area1-recommendations"),swiperEventDetail:".area1-recommendations .ajax-reco; 5"}].filter(l=>l&&l.element!==null);if(s.length===0)return;const o=new URL(`${t}/mapping/new/cart-reco`,window.location.origin);o.searchParams.set("productsInCartIds",e.join(",")),o.searchParams.set("maxRecos",String(i));const{error:a}=await Ge(qo(s,o));a||(An(s),window.addEventListener("resize",()=>An(s)))}document.addEventListener("DOMContentLoaded",async()=>{const t=window,e=typeof t.urlPrefix=="string"?t.urlPrefix:"",i=Array.isArray(t.cartProductIds)?t.cartProductIds:[];i.length!==0&&await Bo(e,i,15)});class Vo{static getEndpointUrl(){return"/order"}static clearCart(){return it.post(`${this.getEndpointUrl()}/cart/removeAllItems`,"")}}const Yo=document.querySelectorAll("[data-clear-cart-trigger]");Yo.forEach(t=>{t.addEventListener("click",()=>Vo.clearCart().subscribe(e=>window.location.replace(e)))});function wn(t){return document.querySelector(t)?.getBoundingClientRect().height??0}function pi(t){return Array.from(document.querySelector(t)?.children??[]).reduce((e,i)=>e+i.getBoundingClientRect().height,0)}function Mt(t,e){const i=document.createElement("input");return i.type="hidden",i.name=t,typeof e=="number"?i.value=`${e===0?"-":Math.round(e)}`:i.value=e===""?"-":e,i}const ct=document.getElementById("tracking-metrics");ct&&document.addEventListener("DOMContentLoaded",()=>{const t=wn(".pda-top");let e=t+pi(".pda-left");const i=t+pi(".pda-right");let n=pi(".pda-side");const r=wn(".pda-mobile-cta-box"),s=r>0;s&&(e-=r,n=r),ct.appendChild(Mt("viewportCategory",s?"mobile":"desktop")),ct.appendChild(Mt("leftPaneHeight",e)),ct.appendChild(Mt("centerPaneHeight",i)),ct.appendChild(Mt("rightPaneHeight",n))});class yr{static getEndpointUrl(){return"/user"}static getNewWishlistName(){return it.get(`${this.getEndpointUrl()}/wishlists/cart-name`)}static saveNewWishlist(){return it.post(`${this.getEndpointUrl()}/my-shop/wishlist/cart`,"")}}const Go=document.querySelectorAll("[data-save-cart-user]"),_n=document.querySelector("dialog#dialog-save-cart-user"),qt=document.querySelector("button[data-save-cart-user-confirm]"),Ho=t=>{yr.getNewWishlistName().pipe(Gi(()=>t.textContent="resolving ...")).subscribe(e=>t.textContent=e.name)}
47;Go.forEach(t=>{const e=_n?.querySelector("[data-wishlist-name]");!e||!_n||!qt||(t.addEventListener("click",()=>Ho(e)),qt.dataset.triggerAdded!=="true"&&(qt.addEventListener("click",()=>{yr.saveNewWishlist().pipe(ni(gs)).subscribe(i=>window.location.replace(i))}),qt.dataset.triggerAdded="true"))});const Wo=document.querySelectorAll('[id^="gallery-video-"]');Wo.forEach(t=>{document.addEventListener("dialog.onopen",()=>{t.dataset.src&&(t.setAttribute("src",t.dataset?.src+"?enablejsapi=1"),t.removeAttribute("data-src"))}),document.addEventListener("dialog.onclose",()=>{t.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})});const Uo=document.querySelectorAll('[id^="cta-video-or-image-"]');Uo.forEach(t=>{document.addEventListener("dialog.onopen",()=>{t.dataset.src&&(t.setAttribute("src",t.dataset?.src+"?enablejsapi=1"),t.removeAttribute("data-src"))}),document.addEventListener("dialog.onclose",()=>{t.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})});const dt=document.querySelector("form#form-invoice");function $o(t){function e(){for(const i of t)i.removeEventListener("focus",e),i.setCustomValidity("")}for(const i of t)i.setCustomValidity("invalid"),i.addEventListener("focus",e)}dt&&dt.addEventListener("submit",async t=>{t.preventDefault();const e=new FormData(dt),i=e.get("voucherNumber"),n=e.get("invoiceNumber");if(n)try{const r=await fetch("/user/my-shop/invoice/"+n);ls(r),window.location.href="/user/my-shop/invoice/"+n}catch(r){if(r instanceof cs)return;window.location.href="/user/my-shop/invoice?notFound=true&invoiceNumber="+n}else i?window.location.href="/user/my-shop/invoice/search/"+i:($o(Array.from(dt.elements).filter(r=>r instanceof HTMLInputElement)),dt.checkValidity())});function Ko(){zo()}Ko();function zo(){const t=document.getElementById("order-confirmation-detail-view-click-handler"),e=document.getElementById("checkout-order-detail-controller");!t||!e||t.addEventListener("click",()=>{const i={open:"close",close:"open"},n=e.getAttribute("data-state");e.setAttribute("data-state",i[n])})}function jo(){const t=document.querySelectorAll("[data-feedback-form-id]");if(t.length!==0)for(const e of t)e.addEventListener("submit",i=>{i.preventDefault(),ia(e).then()})}jo();function Xo(){const t=document.querySelectorAll("[data-feedback-rating-item]");if(t.length!==0)for(const e of t)e.addEventListener("click",async i=>{const{currentTarget:n}=i;if(!n)throw new Error("No currentTarget found");const r=Number(n.getAttribute("data-rating-score")),s=n.getAttribute("data-id");if(!r||!s)throw new Error("No score or formId found");const o=`[data-feedback-form-id='${s}']`;Zo(o,r)})}Xo();function Zo(t,e){if(!e)throw new Error("Score is not a number");if(!t)throw new Error("No form selector found");const i=document.querySelector(t);if(!i)throw new Error("No form found");const n=i.getAttribute("data-form-is-submitted")==="true";if(i.getAttribute("data-score-is-selected")==="true"&&!n){Jo(i),ta(i);return}else if(n)return;Qo(i,e),i.setAttribute("data-open-feedback","open"),br(i,"feedback")}function Jo(t){t.setAttribute("data-score-is-selected","false");const e=t.querySelectorAll("[data-feedback-rating-item]");if(e.length===0)throw new Error("No rating items found");for(const i of e)i.classList.contains("hidden")&&i.classList.remove("hidden");t.setAttribute("data-current-selected-score",""),t.setAttribute("data-open-feedback","close")}function Qo(t,e){if(!t)throw new Error("No form found");if(!e)throw new Error("No Score found");t.setAttribute("data-current-selected-score",e.toString()),t.setAttribute("data-score-is-selected","true"),ea(t,e)}function ea(t,e){const i=t.querySelectorAll("[data-feedback-rating-item]");if(i.length===0)throw new Error("No rating items found");for(const n of i)Number(n.getAttribute("data-rating-score"))===e?n.classList.contains("hidden")&&n.classList.remove("hidden"):n.classList.add("hidden")}function br(t,e){const i=t.querySelectorAll("[data-text-message]");if(i.length===0)throw new Error("No text messages found");for(const n of i)n.getAttribute("data-text-message")===e?n.setAttribute("data-show","true"):n.setAttribute("data-show","false")}function ta(t){const e=t.querySelectorAll("[data-text-message]");if(e.length===0)throw new Error("No text messages found");for(const i of e)i.setAttribute("data-show","false")}async function ia(t){if(!t){console.error("submitForm: No form found");return}const{action:e}=t,i=Number(t.getAttribute("data-current-selected-score"));br(t,"feedback-promise"),t.setAttribute("data-open-feedback","close"),t.setAttribute("data-form-is-submitted","true");const n=new FormData(t);n.append("score",i.toString());
47const r=new URLSearchParams(n).toString(),s={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r};try{const{status:o,ok:a}=await fetch(e,s);a||console.error("Form submission failed",o)}catch(o){console.error(o)}}var Lr=(t=>(t.hasError="data-has-error",t.password_mismatch="data-error-password-mismatch",t.minLength="data-error-min-length",t.noDangerousChars="data-error-no-dangerous-chars",t.unchecked="data-error-unchecked",t))(Lr||{});const Tn={minLength:8,noDangerousChars:/[<>;'"/\\]/},le={form:"#cta-user-registration",password:"#cta-reg-password",passwordRepeat:"#cta-reg-repeat_password",submitButton:"button[type='submit']",checkbox:"input[type='checkbox']"};function na(){const t=document.querySelector(le.form);t&&ra(t)}na();function ra(t){if(!t){console.error("Form not found");return}const i=[le.password,le.passwordRepeat,le.checkbox].map(n=>({selector:n,element:t.querySelector(n)}));if(!i.every(n=>n.element)){console.error("Form elements not found");return}t.addEventListener("input",n=>sa(n,i))}function sa(t,e){const{target:i}=t;if(!i){console.error("Target not found");return}const{form:n}=i;if(!n){console.error("Form not found");return}let r=[];for(const{selector:s,element:o}of e){if(s===le.password&&(r=[...r,...aa(o.value)]),s===le.passwordRepeat){const a=e.find(c=>c.selector===le.password)?.element,l=e.find(c=>c.selector===le.passwordRepeat)?.element;a&&l&&(r=[...r,...la(a,l)])}s===le.checkbox&&(r=[...r,...ca(o)])}r=oa(r),console.log("ERRORS",r),r.length>0?(n.querySelector(le.submitButton)?.setAttribute("disabled",""),vi(r,n)):n.checkValidity()?(n.querySelector(le.submitButton)?.removeAttribute("disabled"),vi(r,n)):(n.querySelector(le.submitButton)?.setAttribute("disabled",""),vi(r,n))}function oa(t){return[...new Set(t)]}function aa(t){const e=[];return t.length<Tn.minLength&&e.push("data-error-min-length"),Tn.noDangerousChars.test(t)&&e.push("data-error-no-dangerous-chars"),e.length>0&&e.push("data-has-error"),e}function la(t,e){const i=[];return t.value!==e.value&&i.push("data-error-password-mismatch"),i.length>0&&i.push("data-has-error"),i}function ca(t){const e=[];return t.checked||e.push("data-error-unchecked"),e}function vi(t,e){for(const i of Object.values(Lr)){const n=e.hasAttribute(i),r=t.includes(i);r&&!n&&e.setAttribute(i,""),!r&&n&&e.removeAttribute(i)}}function Ri(t){let e,i;return{promise:new Promise((r,s)=>{e=r,i=s}),resolve:e,reject:i}}function Ni(t,e){return t.lastIndexOf(e,0)===0}var da=/^((?:\w+:)?\/\/([^\/]+))/;function Ir(t){let e=[];const i=Object.keys(t),n=encodeURIComponent;for(let r=0;r<i.length;r++)e.push(`${n(i[r])}=${n(t[i[r]])}`);return e.join("&")}function Xt(t){const e=document.location;if(Ni(t,"/")||Ni(t,"."))return e.origin?e.origin:e.protocol+"//"+e.host;const i=t.match(da);if(!i)throw new Error("Invalid URL: "+t);return i[1]}var ua=class{constructor(t){this.ready=!1,this.buffer=[],this.id=t.id,this.type=t.type,this.element=t.element,this.onReady=t.onReady,this.origin=Xt(t.element.src)}send(t){this.ready?this.element.contentWindow.postMessage(t,this.origin):this.buffer.push(t)}setReady(t){this.onReady(),this.ready=t,this.ready&&this.flush()}flush(){for(let t=0;t<this.buffer.length;t++)this.element.contentWindow.postMessage(this.buffer[t],this.origin);this.buffer=[]}};function ha(t,e){return t==="*"||e.has(t)}var fa=class{constructor(){this.origins=new Set,this.targets={},this.answered=new Set,this.onReceiveRootMessage=()=>{},window.addEventListener("message",t=>{this.onReceive(t)})}listen(t){let e=this.onReceiveRootMessage;this.onReceiveRootMessage=i=>{e(i),t(i)}}addOrigin(t){this.origins.add(t)}send(t){if(t.from_id){const n=this.targets[t.from_id];if(!n){console.error(`[bus] Unexpected message from unknown sender ${t.from_id}`,t);return}(t.type==="widget_announce"||t.type==="agent_announce")&&n.setReady(!0)}const e=t.rid;if(e){if(this.answered.has(e+t.to_id))return;this.answered.add(e+t.to_id)}if(t.to_id===""){this.onReceiveRootMessage(t);return}const i=this.targets[t.to_id];if(!i){console.error(`[bus] Unexpected message to unknown target ${t.to_i
47d}`,t);return}i.send(t)}onReceive(t){if(!ha(t.origin,this.origins))return;const e=t.data;!e||!e._frc||this.send(e)}registerTarget(t){this.targets[t.id]=t}registerTargetIFrame(t,e,i,n){const r=Ri();let s=new Promise(a=>setTimeout(()=>a("timeout"),n));const o=new ua({id:e,element:i,type:t,onReady:()=>r.resolve("registered")});return this.registerTarget(o),Promise.race([r.promise,s])}removeTarget(t){delete this.targets[t]}};function Zt(t,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let i="";for(let n=0;n<t;n++)i+=e.charAt(Math.floor(Math.random()*e.length));return i}function Hi(t){return new Promise((e,i)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>i(t.error)})}function Ar(t,e){const i=indexedDB.open(t);i.onupgradeneeded=()=>i.result.createObjectStore(e);const n=Hi(i);return(r,s)=>n.then(o=>s(o.transaction(e,r).objectStore(e)))}var Si;function wr(){return Si||(Si=Ar("keyval-store","keyval")),Si}function ma(t,e=wr()){return e("readonly",i=>Hi(i.get(t)))}function ga(t,e,i=wr()){return i("readwrite",n=>(n.put(e,t),Hi(n.transaction)))}var Rn="frc_sc",Nn="frc_sid",Cn="__",yi="0",Ea="__"+Zt(10);function Wi(t){{let e=0;try{e=parseInt(sessionStorage.getItem(Rn)||"",10)}catch{}isNaN(e)&&(e=0),t&&e++,yi=e.toString();try{sessionStorage.setItem(Rn,yi)}catch{}}return yi}function Ui(){let t;try{t=sessionStorage.getItem(Nn)}catch{return Ea}return t||(t=Zt(12),sessionStorage.setItem(Nn,t)),t}var pa=class{constructor(t){this.mem=new Map,this.storePrefix=t}setup(){return new Promise((t,e)=>{if(this._hasSA!==void 0)return t(this._hasSA);try{indexedDB.open("")}catch{return t(this._hasSA=!1)}if(!document.hasStorageAccess)return t(this._hasSA=!0);document.hasStorageAccess().then(i=>(this._hasSA=i,this._hasSA?this.idb=Ar("friendlycaptcha","frc"):console.debug("FRC has no storage access"),t(this._hasSA))).catch(e)})}get(t,e){return this.setup().then(i=>{const n=this.storePrefix+Cn+t;if(e.p)return i?ma(n,this.idb):this.mem.get(t);try{const r=sessionStorage.getItem(n);return r===null?void 0:r}catch{}return this.mem.get(t)})}set(t,e,i){return this.setup().then(n=>{const r=this.storePrefix+Cn+t;if(i.p){if(n)return ga(r,e,this.idb);e===void 0?this.mem.delete(t):this.mem.set(t,e)}else try{e===void 0?(this.mem.delete(t),sessionStorage.removeItem(r)):(this.mem.set(t,e),sessionStorage.setItem(r,e))}catch{}})}hasSA(){return this._hasSA}},va=typeof navigator<"u"&&navigator.userAgentData!==void 0;function Sa(){return document.querySelectorAll(".frc-captcha")}function ya(t){for(;t.tagName!=="FORM";)if(t=t.parentElement,!t)return null;return t}function ba(t,e){t.addEventListener("focusin",e,{once:!0,passive:!0})}function La(t,e,i){t.style[e]===""&&(t.style[e]=i)}function Ia(t){const e=La;e(t,"position","relative"),e(t,"height","70px"),e(t,"padding","0"),e(t,"width","316px"),e(t,"maxWidth","100%"),e(t,"maxHeight","100%"),e(t,"overflow","hidden"),e(t,"borderRadius","4px")}function Aa(t){t.removeAttribute("style")}function Ci(t){document.readyState!=="loading"?t():document.addEventListener("DOMContentLoaded",t)}function wa(t,e){let i;typeof window.CustomEvent=="function"?i=new CustomEvent(e.name,{bubbles:!0,detail:e}):(i=document.createEvent("CustomEvent"),i.initCustomEvent(e.name,!0,!1,e)),t.dispatchEvent(i)}function _a(t){for(;!t.lang||typeof t.lang!="string";)if(t=t.parentElement,!t)return null;return t.lang}var Jt={ar:{title:"التحقق من مكافحة الروبوتات",connecting:"التحقق من مكافحة الروبوتات قيد الاتصال…",retrying:`استغرق الاتصال بالتحقق من مكافحة الروبوتات وقتًا طويلاً.
48
49إعادة المحاولة…`,failed:"فشل الاتصال بالتحقق من مكافحة الروبوتات."},cs:{title:"Ověření proti robotům",connecting:"Připojování kontroly proti robotům…",retrying:`Připojení kontroly proti robotům trvalo příliš dlouho.
50
51Opakuji pokus…`,failed:"Kontrola proti robotům se nepodařilo připojit."},da:{title:"Anti-robot-verifikation",connecting:"Anti-robot-kontrol forbinder…",retrying:`Anti-robot-kontrol tog for lang tid at oprette forbindelse.
52
53Prøver igen…`,failed:"Anti-robot-kontrol kunne ikke oprette forbindelse."},nl:{title:"Anti-robotcheck",connecting:"Verbinden met Anti-robotcheck…",retrying:`Verbinden met Anti-robotcheck mislukt.
54
55Opnieuw aan het proberen…`,failed:"Verbinden met Anti-robotcheck mislukt."},en:{title:"Anti-Robot verification",connecting:"Anti-Robot check connecting…",retrying:`Anti-Robot check took too long to connect.
56
57Retrying…`,failed:"Anti-Robot check failed to connect."},fi:{title:"Robottien torjunnan vahvistus",connecting:"Robottien torjunnan tarkistus käynnissä…",retrying:`Robottien torjunnan tarkistus kesti liian kauan.
58
59Yritetään uudelleen…`,failed:"Robottien torjunnan tarkistus epäonnistui."},fr:{title:"Vérification anti-robot",connecting:"Connexion à la vérification anti-robot…",retrying:`La connexion à la vérification anti-robot a pris trop de temps.
60
61Nouvelle tentative…`,failed:"Échec de la connexion à la vérification anti-robot."},de:{title:"Anti-Roboter-Verifizierung",connecting:"Verbindung zur Anti-Roboter-Verifizierung wird hergestellt…",retrying:`Verbindung zur Anti-Roboter-Verifizierung hat zu lange gedauert.
62
63Erneuter Versuch…`,failed:"Verbindung zur Anti-Roboter-Verifizierung ist fehlgeschlagen."},hu:{title:"Robotellenőrzés",connecting:"Robotellenőrzés csatlakozás…",retrying:`A robotellenőrzés túl sokáig tartott a csatlakozáshoz.
64
65Újrapróbálom…`,failed:"A robotellenőrzés nem tudott csatlakozni."},id:{title:"Verifikasi Anti-Robot",connecting:"Pemeriksaan Anti-Robot sedang terhubung…",retrying:`Pemeriksaan Anti-Robot memakan waktu terlalu lama untuk terhubung.
66
67Mencoba lagi…`,failed:"Pemeriksaan Anti-Robot gagal terhubung."},it:{title:"Verifica anti-robot",connecting:"Connessione verifica anti-robot in corso…",retrying:`La connessione alla verifica anti-robot ha richiesto troppo tempo.
68
69Riprovando…`,failed:"Impossibile connettersi alla verifica anti-robot."},pl:{title:"Weryfikacja antyrobotowa",connecting:"Łączenie się z kontrolą antyrobotową…",retrying:`Łączenie się z kontrolą antyrobotową trwało zbyt długo. 
70
71Ponowna próba…`,failed:"Nie udało się połączyć z kontrolą antyrobotową."},pt:{title:"Verificação anti-robô",connecting:"Verificação anti-robô a ligar…",retrying:`A verificação anti-robô demorou demasiado tempo a ligar-se.
72
73A tentar novamente…`,failed:"A verificação anti-robô não conseguiu ligar-se."},ru:{title:"Проверка антиробота",connecting:"Подключение к проверке антиробота…",retrying:`Подключение к проверке антиробота заняло слишком много времени.
74
75Повторяем попытку…`,failed:"Не удалось подключиться к проверке антиробота."},sk:{title:"Overovanie proti robotom",connecting:"Pripojenie kontroly proti robotom…",retrying:`Pripojenie kontroly proti robotom trvalo príliš dlho.
76
77Opakujem pokus…`,failed:"Pripojenie kontroly proti robotom sa nepod
77arilo."},es:{title:"Verificación antirrobot",connecting:"Conectando verificación antirrobot…",retrying:`La verificación antirrobot tardó demasiado en conectarse.
78
79Reintentando…`,failed:"Error al conectar la verificación antirrobot."},sv:{title:"Anti-robotverifiering",connecting:"Anti-robotverifiering ansluter…",retrying:`Anti-robotverifiering tog för lång tid att ansluta.
80
81Försöker igen…`,failed:"Anti-robotverifiering kunde inte ansluta."},tr:{title:"Robot önleme doğrulaması",connecting:"Robot önleme kontrolü bağlanıyor…",retrying:`Robot önleme kontrolü bağlanmak için çok uzun sürdü.
82
83Yeniden deniyor…`,failed:"Robot önleme kontrolü bağlanamadı."},vi:{title:"Xác minh chống robot",connecting:"Kiểm tra robot đang kết nối…",retrying:`Kiểm tra chống robot mất quá nhiều thời gian để kết nối.
84
85Đang thử lại…`,failed:"Kiểm tra chống robot không thể kết nối."},zh:{title:"反机器人验证",connecting:"反机器人验证正在连接…",retrying:`反机器人验证连接耗时过长。
86
87正在重试…`,failed:"反机器人验证连接失败。"}},Ta=["ar","he","fa","ur","ps","sd","yi"];function $i(t){return t.toLowerCase().split("-")[0].split("_")[0]}function Oi(t){return t=$i(t),Ta.indexOf(t)!==-1}function _r(t){return t=$i(t),(Jt[t]||Jt.en).title+" - Widget"}function Di(t,e){return t=$i(t),(Jt[t]||Jt.en)[e]}var Tr="FrcFrameId",Rr="frc-i-agent",Ra="frc-i-widget",Na="frc-widget-placeholder";function Ca(t,e,i){const n={origin:document.location.origin,sess_id:Ui(),sess_c:Wi(!0),comm_id:e,sdk_v:"0.1.32",v:"1",agent_id:e,ts:Date.now().toString()},r=document.createElement("iframe");r.className=Rr,r.dataset[Tr]=e,r.src=i+"?"+Ir(n),r.frcSDK=t;const s=r.style;return s.width=s.height=s.border=s.visibility="0",s.display="none",r}function Oa(t,e,i,n){const r=document.createElement("iframe"),s=zi(n),o={origin:document.location.origin,sess_id:Ui(),sess_c:Wi(!0),comm_id:e,sdk_v:"0.1.32",v:"1",agent_id:t,lang:s,sitekey:n.sitekey||"",ts:Date.now().toString()};n.theme&&(o.theme=n.theme),va&&(r.allow="clipboard-write"),r.frameBorder="0",r.src=i+"?"+Ir(o),r.className=Ra,r.title=_r(s),r.dataset[Tr]=e;const a=r.style;return a.border=a.visibility="0",a.position="absolute",a.height=a.width="100%",a.display="none",n.element.appendChild(r),r}function Da(t){const e=document.createElement("div");e.classList.add(Na);const i=e.style,n=t.theme==="dark"||t.theme==="auto"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return i.color=n?"#fff":"#222",i.backgroundColor=n?"#171717":"#fafafa",i.borderRadius="4px",i.border="1px solid",i.borderColor="#ddd",i.padding="8px",i.height=i.width="100%",i.fontSize="14px",Ki(i),t.element.appendChild(e),e}function Ki(t){t.textDecoration=t.fontStyle="none",t.fontWeight="500",t.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',t.lineHeight="1",t.letterSpacing="-0.0125rem"}function Pa(t){const e=document.createElement("div");e.classList.add("frc-banner");const i=zi(t),n=e.style;n.position="absolute",n.bottom="2px",Oi(i)?n.left="6px":n.right="6px",n.lineHeight="1";const r=document.createElement("a");r.href="https://friendlycaptcha.com",r.rel="noopener";const s=r.style;Ki(s),s.fontSize="10px",t.theme==="dark"||t.theme==="auto"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?s.color="#a2a2a2":s.color="#565656",s.letterSpacing="-0.0125rem",r.target="_blank",r.textContent="Friendly Captcha",r.onmouseenter=()=>s.textDecoration="underline",r.onmouseleave=()=>s.textDecoration="none",e.appendChild(r),t.element.appendChild(e)}function zi(t){let e=t.language;return(!e||e==="html")&&(e=_a(t.element)||""),e}function ka(t,e,i){const n=(o,a)=>{const l=document.createElement("a");l.href=o,l.target="_blank",l.rel="noopener",l.textContent=a;const c=l.style;return Ki(c),c.textDecoration="underline",c.color="#565656",l.onmouseenter=()=>c.textDecoration="none",l.onmouseleave=()=>c.textDecoration="underline",l},r=Di(i,"failed"),s=[n(`${e}/connectionTest`,r)];
87t.textContent="",s.forEach(o=>t.appendChild(o))}function ji(){const t=window.performance;return t?t.now():0}function xa(t,e,i,n){const r=ji(),s=i.getBoundingClientRect(),o={v:1,tt:t,pnow:r,sm:e,el:{bcr:[s.left,s.top,s.width,s.height],con:document.body.contains(i)},stack:new Error().stack||"",we:!!window.event,weit:!!window.event&&!!window.event.isTrusted};return n&&(o.ev={ts:n.timeStamp,rt:!!n.relatedTarget,eot:!!n.explicitOriginalTarget,it:n.isTrusted}),o}function Xi(t,...e){for(let n=0;n<e.length;n++){const r=e[n];for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}var Fa="frc-captcha-response",Ma=class{constructor(t){this.state="init",this.response=".UNINITIALIZED",this.focusEventPending=!1,this.isDestroyed=!1,this.id=t.id;const e=t.createOpts;if(this.e=e.element,this.ready=t.registered,!this.e)throw new Error("No element provided to mount widget under.");if(this.e.frcWidget=this,this.formFieldName=e.formFieldName===void 0?Fa:e.formFieldName,this.sitekey=e.sitekey,this._reset=t.callbacks.onReset,this._destroy=t.callbacks.onDestroy,this._trigger=t.callbacks.onTrigger,this.startMode=t.createOpts.startMode||"focus",this.formFieldName!==null){const i=document.createElement("input");i.type="hidden",i.style.display="none",i.name=this.formFieldName,this.hiddenFormEl=i,this.e.appendChild(i)}this.setState({response:".UNCONNECTED",state:"init"}),this.ready.then(()=>{this.handleStartMode()})}handleStartMode(){if(this.startMode==="focus"&&!this.focusEventPending&&!this.isDestroyed){const t=ya(this.e);t&&(this.focusEventPending=!0,ba(t,e=>{this.trigger("focus",{ev:e}),this.focusEventPending=!1}))}else this.startMode==="auto"&&this.trigger("auto")}reset(t={trigger:"root"}){if(this.isDestroyed)throw new Error("Can not reset destroyed widget.");this.setState({response:".RESET",state:"reset",resetTrigger:t.trigger}),this._reset(t),this.handleStartMode()}destroy(){this.isDestroyed=!0,this.hiddenFormEl&&this.hiddenFormEl.remove(),this.hiddenFormEl=void 0,this.setState({response:".DESTROYED",state:"destroyed"}),this._destroy()}trigger(t,e={}){if(this.isDestroyed)throw new Error("Can not start destroyed widget.");const i=xa(t,this.startMode,this.e,e.ev);this._trigger({trigger:i})}start(){this.trigger("programmatic")}setState(t){const e=this.state!==t.state;this.response=t.response,this.state=t.state,this.hiddenFormEl&&this.e.isConnected!==!1&&(this.hiddenFormEl.value=t.response),e&&this.dispatchWidgetEvent({name:"frc:widget.statechange",error:t.error}),this.state==="expired"?this.dispatchWidgetEvent({name:"frc:widget.expire"}):this.state==="completed"?this.dispatchWidgetEvent({name:"frc:widget.complete"}):this.state==="error"?this.dispatchWidgetEvent({name:"frc:widget.error",error:t.error}):this.state==="reset"&&this.dispatchWidgetEvent({name:"frc:widget.reset",trigger:t.resetTrigger})}dispatchWidgetEvent(t){const e={response:this.response,state:this.state,id:this.id};Xi(e,t),wa(this.e,e)}addEventListener(t,e,i){this.e.addEventListener(t,e,i)}removeEventListener(t,e,i){this.e.removeEventListener(t,e,i)}getState(){return this.state}getResponse(){return this.response}getElement(){return this.e}},qa=function(t){return typeof t=="function"},Ba=function(t){const e=[],i=new Map,n=function(){return e.splice(0,e.length)},r=window,s=function(){try{const E=document.createElement("iframe");E.style.display="none",(document.body||document.head).appendChild(E);const m=E?E.contentWindow:0;return E.remove(),m||r}catch{return r}}(),o=Function.prototype.toString,a=function(...E){const m=qa(this)?i.get(this):!1,h=this===a?o:m||this;return o.apply(h,E)};Function.prototype.toString=a;const l=function(){return(s.Error||r.Error)("FriendlyCaptcha_DummyTrace").stack||""},c="prototype",d=r.EventTarget?r.EventTarget[c].dispatchEvent:{},g=[["Document."+c+".documentElement",r.Document[c],"documentElement"],["Element."+c+".shadowRoot",r.Element[c],"shadowRoot"],["Node."+c+".nodeType",r.Node[c],"nodeType"],["Object.is",r.Object,"is"],["Array."+c+".slice",r.Array[c],"slice"],["Document."+c+".querySelectorAll",r.Document[c],"querySelectorAll"],["Document."+c+".createElement",r.Document[c],"createElement"],["EventTarget."+c+".dispatchEvent",d,"dis
87patchEvent"]];return t.disableEvalPatching||g.push(["eval",r,"eval"]),g.forEach(function([f,E,m]){const h=Object.getOwnPropertyDescriptor(E,m),p=h&&(h.get||h.set);if(h){if(p){if(!h.get)return}else if(typeof h.value!="object"&&typeof h.value!="function")return}else return;let S=0,b=0;const y=function(...O){const q=Date.now();if(q-S>=1e3&&(b=0,S=q),b<50){const L={d:q,pnow:ji(),n:f,st:l()};e.length>2e4&&e.splice(0,1e3),e.push(L),b++}return(p?h.get:h.value).apply(this,O)};try{const k=p?h.get?h.get():void 0:h.value();k&&(y.length=k.length,y.name=k.name)}catch{}try{const k=Xi({},h);p?k.get=y:k.value=y,Object.defineProperty(E,m,k),i.set(y,p?h.get:h.value)}catch{}}),n};function Ce(){const t=[0,0,0,0,0,0,0];return{s:t,add(e){const i=++t[0],n=e-t[1],r=n/i,s=r*r,o=n*r*(i-1);t[1]+=r,t[4]+=o*s*(i*i-3*i+3)+6*s*t[2]-4*r*t[3],t[3]+=o*r*(i-2)-3*r*t[2],t[2]+=o,i==1?t[5]=t[6]=e:(e<t[5]&&(t[5]=e),e>t[6]&&(t[6]=e))}}}var ve="addEventListener",Ve=Math,On;function Dn(){return/Android/i.test(navigator.userAgent)}function fe(t,e,i=!1,n){const r=Ce();let s=!1,o;return Ci(()=>{n=n||document.body,n[ve](t,a=>
87{(!s||i)&&(o=a.timeStamp,s=!0)}),n[ve](e,a=>{s&&(r.add(a.timeStamp-o),s=!1)})}),r.s}function Va(t){const e=[];for(let i=0;i<t.length;i++)e.push(0),document[ve](t[i],n=>e[i]++);return e}function Ya(){const t=[0,0,0,0,0,0,0,0],e={8:1,46:1,9:2,45:3,17:4,13:5,37:6,38:6,39:6,40:6,33:7,34:7};return document[ve]("keydown",i=>{const n=i.keyCode;e[n]?t[e[n]]++:n>=112&&n<=123&&t[0]++}),t}function Pn(t,e,i,n){return Ve.sqrt(Ve.pow(t-e,2)+Ve.pow(i-n,2))}function kn(t,e,i){return Ve.sqrt(Ve.pow(t,2)+Ve.pow(e,2)+Ve.pow(i,2))}function xn(t,e){let i=e-t;return i+=i>180?-360:i<-180?360:0,i}var Ga=class{constructor(t){this.rn=0,this.i=0,this.smel={n:0,ts:0,d:0};const e="mouse",i=this.smel,n=s=>{i.n||(i.fts=s.timeStamp,i.fxy=[s.clientX,s.clientY,s.screenX,s.screenY]),i.n++,s.type===e+"leave"&&(i.d+=s.timeStamp-i.ts),i.ts=s.timeStamp,i.xy=[s.clientX,s.clientY]},r=document;Ci(()=>{const s=r.body;s[ve](e+"enter",n),s[ve](e+"leave",n)}),this.bh={onoff:{kdu:fe("keydown","keyup"),cse:fe("compositionstart","compositionend"),mdu:fe(e+"down",e+"up"),mle:fe(e+"leave",e+"enter"),med:fe(e+"enter",e+"down",!0),semd:fe("scrollend",e+"down",!0,r),se:fe("scroll","scrollend",!1,r),pdc:fe("pointerdown","pointercancel",!0),mmc:fe(e+"move","click",!0),tse:fe("touchstart","touchend"),fikd:fe("focusin","keydown",!0)},nev:Va([e+"out","pointercancel","focus","focusin","blur","visibilitychange","copy","paste","cut","contextmenu","click","auxclick","wheel","resize"]),nk:Ya(),mov:this.setupMovementMetrics(),dm:this.setupMotionMetrics(),do:this.setupOrientationMetrics()},this.dep=t.disableEvalPatching||!1,this.takeTraceRecords=Ba(t)}setupMovementMetrics(){let t,e=[];const n=Ce(),r=Ce(),s=Ce(),o={t:n.s,v:s.s,d:r.s,ns:0},a=()=>{const c=e[e.length-1];if(e.length>=1e4/50||c&&(c[0]&&this.tm.timeStamp===c[1]||!c[0]&&this.mm.timeStamp===c[1])){if(clearInterval(t),t=void 0,e.length===1){o.ns++,e=[];return}const g=e[0];n.add(c[1]-g[1]),r.add(Pn(c[2],g[2],c[3],g[3]));for(let f=1;f<e.length;f++){const E=e[f],m=e[f-1],h=Pn(E[2],m[2],E[3],m[3])*1e3,p=E[1]-m[1];s.add(h/p)}e=[];return}let d=0;if(c?d=c[0]:this.mm&&this.tm?d=this.mm.timeStamp>this.tm.timeStamp?0:1:this.mm||(d=1),d){const g=this.tm.touches[0];g&&e.push([1,this.tm.timeStamp,g.screenX,g.screenY])}else e.push([0,this.mm.timeStamp,this.mm.screenX,this.mm.screenY])};let l=-1;return Ci(()=>{const c=document.body;c[ve]("mousemove",d=>{this.mm=d,t===void 0&&(a(),t=setInterval(a,50))}),c[ve]("touchmove",d=>{this.tm=d;const g=d.touches[0];if(g){const f=g.radiusX+g.radiusY*1.234;f!==l&&(l=f,this.rn++)}t===void 0&&(a(),t=setInterval(a,50))})}),o}setupMotionMetrics(){const t=Ce(),e=Ce(),i={n:0,ts:0,ac:t.s,rr:e.s,i:0,g:!1};return Dn()&&window[ve]("devicemotion",n=>{i.ts=n.timeStamp,i.i=n.interval,i.g=!n.acceleration;const r=n.acceleration||n.accelerationIncludingGravity;r&&t.add(kn(r.x,r.y,r.z));const s=n.rotationRate;s&&e.add(kn(s.alpha,s.beta,s.gamma))}),i}setupOrientationMetrics(){const t=Ce(),e=Ce(),i={fts:0,ts:0,gd:t.s,bd:e.s};if(!Dn())return i;let n;return window[ve]("deviceorientation",r=>{r.gamma==null||r.beta==null||r.alpha==null||(i.ts=r.timeStamp,i.a=r.alpha,i.b=r.beta,i.g=r.gamma,n?(t.add(xn(r.gamma,i.g)),e.add(xn(i.b,r.beta))):(i.fts=i.ts,n=!0))}),i}gmm(){const t=this.mm;return t&&{xy:[t.clientX,t.clientY,t.screenX,t.screenY,t.offsetX,t.offsetY,t.pageX,t.pageY,t.movementX,t.movementY],ts:t.timeStamp}}gtm(){const t=this.tm,e=t&&t.touches,i=e&&e[0];return t&&i&&{id:i.identifier,xy:[i.clientX,i.clientY,i.screenX,i.screenY,i.pageX,i.pageY],r:[i.radiusX,i.radiusX,i.rotationAngle,i.force],n:e.length,ts:t.timeStamp,rn:this.rn}}get(t){const e=document.body,i=window,n=i.performance;return{v:1,i:++this.i,hl:history.length,fe:!!window.frameElement,dep:this.dep,wid:t,sc:parseInt(Wi(!1)),sid:Ui(),conv:0,t:{pnow:ji(),pto:n&&n.timeOrigin||0,ts:Date.now()},dims:{d:[i.innerWidth,i.innerHeight,i.outerWidth,i.outerHeight,i.screenX,i.screenY,i.pageXOffset,i.pageYOffset,e.clientWidth,e.clientHeight],dpr:i.devicePixelRatio},mel:this.smel,mm:this.gmm(),tm:this.gtm(),bh:this.bh,stack:new Error().stack||"",trc:this.takeTraceRecords()}}};function Ha(t){return On||(On=new Ga(t))}var bi={eu:"https://eu.frcapi.com",global:"https://global.frcapi.com"};function Fn(t){let e=t;return e?bi[e]&&(e=bi[e]):e=bi.global,Xt(e)}function Wa(){const t=document.querySelector('meta[name="frc-disable-eval-patching"]');return t?!!t.content:!1}function Mn(){const t=document.querySelector('meta[name="frc-api-endpoint"]');if(t)return t.content;const e=document.currentScript;if(e){const n=e.dataset.frcApiEndpoint;if(n)return n}
87const i=document.querySelector(".frc-captcha[data-api-endpoint]");if(i){const n=i.dataset.apiEndpoint;if(n)return n}}function Ua(){const t=window.Intl;if(!t||!t.DateTimeFormat)return;const e=new t.DateTimeFormat;if(!(!e||!e.resolvedOptions))return e.resolvedOptions().timeZone}var Bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function $a(t){return window.TextEncoder?Ka(new TextEncoder().encode(t)):""}function Ka(t){const e=t.length;let i="";for(let n=0;n<e;n+=3){const r=t[n+0],s=t[n+1],o=t[n+2];let a="";a+=Bt.charAt(r>>>2),a+=Bt.charAt((r&3)<<4|s>>>4),a+=Bt.charAt((s&15)<<2|o>>>6),a+=Bt.charAt(o&63),i+=a}return e%3===2?i=i.substring(0,i.length-1)+"=":e%3===1&&(i=i.substring(0,i.length-2)+"=="),i}var za="/api/v2/captcha/agent",ja="/api/v2/captcha/widget",qn="FrcFrameId",Xa=1e3*60*60*36,Vt,ut=0,Za=class{constructor(t={}){if(this.agents=new Map,this.agentState=new Map,this.widgets=new Map,this._attached=Ri(),this.attached=this._attached.promise,this.apiEndpoint=t.apiEndpoint,Vt=Vt||new fa,Vt.listen(e=>this.onReceiveMessage(e)),this.bus=Vt,ut++,ut>1&&console.warn("Multiple Friendly Captcha SDKs created, this is not recommended. Please use a single SDK instance."),this.signals=Ha({disableEvalPatching:t.disableEvalPatching||Wa()}),t.startAgent){const e=Fn(this.apiEndpoint||Mn());this.ensureAgentIFrame(e)}this.setupPeriodicRefresh()}onReceiveMessage(t){if(t.type==="root_set_response"){const e=this.widgets.get(t.widget_id);if(!e){ut===1&&console.warn(`Received set response message for widget ${t.widget_id} that doesn't exist`);return}e.setState(t)}else if(Ni(t.type,"root_store"))this.handleStoreMessage(t);else if(t.type==="root_signals_get")this.handleSignalsGetMessage(t);else if(t.type==="widget_language_change")this.handleWidgetLanguageChange(t);else if(t.type==="widget_reset"){const e=this.widgets.get(t.from_id);if(!e){ut===1&&console.warn(`Received reset message for widget ${t.from_id} that doesn't exist`);return}e.reset({trigger:"widget"})}}handleWidgetLanguageChange(t){const e=this.widgets.get(t.from_id);if(!e){ut===1&&console.warn(`Received language change message for widget ${t.from_id} that doesn't exist`);return}const i=e.getElement(),n=i.querySelector("iframe");n&&(n.title=_r(t.language));const r=i.querySelector(".frc-banner");if(r){const s=r.style;Oi(t.language)?(s.left="6px",s.right="auto"):(s.left="auto",s.right="6px")}}handleSignalsGetMessage(t){const e=this.signals.get(t.widget_id);this.bus.send({type:"root_signals_get_reply",from_id:"",to_id:t.from_id,_frc:1,rid:t.rid,value:e})}handleStoreMessage(t){const e=t.from_id,i=this.agentState.get(e);if(!i){console.error(`Store not found ${e}`);return}t.type==="root_store_get"?i.store.get(t.key,{p:t.p}).then(n=>{this.bus.send({type:"root_store_get_reply",from_id:"",to_id:e,_frc:1,rid:t.rid,value:n,sa:i.store.hasSA()})}):t.type==="root_store_set"&&i.store.set(t.key,t.value,{p:t.p}).then(()=>{this.bus.send({type:"root_store_set_reply",from_id:"",to_id:e,_frc:1,rid:t.rid,sa:i.store.hasSA()})})}ensureAgentIFrame(t){const e=t+za;let i=document.getElementsByClassName(Rr);for(let a=0;a<i.length;a++){const l=i[a];if(Xt(l.src)===t&&l.dataset[qn])return l.dataset[qn]}const n="a_"+Zt(12),r=Ca(this,n,e);this.agents.set(t,r),this.agentState.set(n,{store:new pa(t),origin:t}),document.body.appendChild(r);let s=1;const o=()=>{this.bus.registerTargetIFrame("agent",n,r,this.getRetryTimeout(s)).then(a=>{if(a==="timeout"){if(s>4){console.error("[Friendly Captcha] Failed to load agent iframe after 4 retries."),r.remove(),this.agents.delete(t);return}console.warn("[Friendly Captcha] Retrying agent iframe load."),r.src+="&retry="+s++,o()}})};return o(),n}setupPeriodicRefresh(){let t=1;setInterval(()=>{const e="&expire="+t++;this.agents.forEach((i,n)=>{i.src+=e}),this.widgets.forEach((i,n)=>{const r=i.getElement().querySelector("iframe");r.src+=e})},Xa)}getRetryTimeout(t){return Math.pow(t,1.8)*1e3+2e3}attach(t){t===void 0&&(t=Sa()),Array.isArray(t)||t instanceof NodeList||(t=[t]);const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(r&&!r.frcWidget){const s=r.dataset,o={element:r,sitekey:s.sitekey,formFieldName:s.formFieldName,apiEndpoint:s.apiEndpoint,language:s.lang,theme:s.theme,startMode:s.start};e.push(this.createWidget(o))}}const i=this.getAllWidgets();return this._attached.resolve(i),this.attached=Promise.resolve(i),e}createWidget(t){const e=Fn(t.apiEndpoint||this.apiEndpoint||Mn());this.bus.addOrigin(e);const i=this.ensureAgentIFrame(e),n="w_"+Zt(12),r=p=>{const S={from_id:n,to_id:i,_frc:1};this.bus.send(Xi(S,p))},s={onDestroy:()=>{r({type:"root_destroy_widget"}),this.bus.removeTarget(n),this.widgets.delete(n),t.element.innerHTML="",Aa(t.element)},onReset:()=>{r({type:"root_reset_widget"})},onTrigger:p=>{r({type:"root_trigger_widget",trigger:p.trigger})}},o=Ri(),a=new Ma({id:n,createOpts:t,callbacks:s,registered:o.promise});this.widgets.set(n,a);const l=e+ja,c=Oa(i,n,l,t),d=Da(t);Ia(t.element),Pa(t);let g=zi(t);Oi(g)&&(t.element.dir="rtl");const f=d.style;d.textContent=Di(g,"connecting");let E=1;function m(p){const S=$a(JSON.stringify({sdk_v:"0.1.32",sitekey:t.sitekey||"",retry:E+"",endpoint:e,ua:navigator.userAgent,tz:Ua()||""}));let b=".ERROR.UNREACHABLE";S&&(b+="~"+S),a.setState({state:"error",response:b,error:{code:"network_error",detail:p}})}const h=()=>{this.bus.registerTargetIFrame("widget",n,c,this.getRetryTimeout(E)).then(p=>{if(p==="timeout"){if(E>4){console.error("[Friendly Captcha] Failed to load widget iframe after 4 retries."),m("Widget load timeout, stopped retrying"),f.borderColor="#f00",f.fontSize="12px",ka(d,Xt(c.src
87),g);return}f.backgroundColor="#fee",f.color="#222",d.textContent=Di(g,"retrying")+` (${E})`,console.warn(`[Friendly Captcha] Retrying widget ${n} iframe load.`),m("Widget load timeout, will retry"),c.src+="&retry="+E++,h()}else p==="registered"&&(t.element.removeChild(d),c.style.display="")})};return h(),o.resolve(),a}getAllWidgets(){const t=[];return this.widgets.forEach(e=>{t.push(e)}),t}getWidgetById(t){return this.widgets.get(t)}clear(){this.widgets.forEach(t=>{t.destroy()}),this.agents.forEach(t=>{t.remove()}),this.agents.clear()}};/*!
88 * Copyright (c) Friendly Captcha GmbH 2023.
89 * This Source Code Form is subject to the terms of the Mozilla Public
90 * License, v. 2.0. If a copy of the MPL was not distributed with this
91 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
92 */const Ja="FCMPKP3O8NNFENKJ",Qa=new Za;document.addEventListener("DOMContentLoaded",el);function el(){document.querySelectorAll(".frc-captcha").forEach(e=>{if(e.dataset.initImmediately!==null)return Zi(e);il().observe(e)})}document.addEventListener("application.flyout.opened",t=>{const e=t.currentTarget.querySelector(".frc-captcha");e&&Zi(e)},{once:!0});function Zi(t){if(t.dataset.initialized)return;if(t.dataset.initialized="true",document.body.dataset.captchaDisabled!==void 0){const r=document.createElement("input");r.type="hidden",r.name="frc-captcha-response",r.value="local",t.appendChild(r);return}const e=Qa.createWidget({element:t,sitekey:Ja,startMode:"focus"});t.classList.remove("frc-captcha"),t.classList.add("friendly-captcha");const i=t.closest("form");if(!i)return console.error("Captcha widget is not inside a form",e);const n=i.querySelector("button[type=submit]");if(!n)return console.error("No submit button found for captcha widget",e);e.getElement().style.height="40px",e.getElement().style.width="100%",e.getElement().querySelector("iframe")?.setAttribute("title","Friendly Captcha"),n.disabled=!0,e.addEventListener("frc:widget.complete",()=>{n.disabled=!1,nl()}),e.addEventListener("frc:widget.statechange",()=>{rl()}),e.addEventListener("frc:widget.error",r=>{n.disabled=!0,tl(e,r)}),e.addEventListener("frc:widget.expire",()=>e.reset()),document.addEventListener("ssi-email-validated",()=>e.reset()),document.addEventListener("registration.reset-captcha",()=>{e.reset(),e.start()}),window.addEventListener("pageshow",function(r){r.persisted&&(n.disabled=!0,e.reset())})}function tl(t,e){t.reset();const i={location:window.location.href,error:e.detail};console.error("Captcha error",i),fetch("/user/captcha/log",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(i)})}function il(){return new IntersectionObserver((t,e)=>{t.forEach(i=>{i.isIntersecting&&Es(i.target)&&(Zi(i.target),e.unobserve(i.target))})})}function nl(){document.dispatchEvent(new CustomEvent("ssi.captcha-complete"))}function rl(){document.dispatchEvent(new CustomEvent("ssi.captcha-statechange"))}const sl={accordionSection:"[data-acc-section]",accordionButton:"[data-acc-button]",accordionTitle:"[data-acc-title]",accordionContent:"[data-acc-content]"};class ol{selectors;constructor(){this.selectors=sl,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{this.initializeAccordions()}):this.initializeAccordions()}addClickListener(e){e.addEventListener("click",i=>{const n=i.target;(n?!!n.closest(this.selectors.accordionContent):!1)||this.toggleAccordion(e)})}addFocusInListener(e){if(!e.hasAttribute("data-focus-open"))return;const i=e.querySelector(this.selectors.accordionContent);i&&e.addEventListener("focusin",n=>{n.target instanceof Node&&i.contains(n.target)&&e.setAttribute("data-open","true")})}toggleAccordion(e){const i=e.getAttribute("data-open")==="true";e.setAttribute("data-open",i?"false":"true")}accTitleFocusListener(e){const i=e.querySelector(this.selectors.accordionButton);if(!i){console.error("No headline found in accordion",e);return}i.addEventListener("focus",()=>{if(!e)return console.info("accordion not found.");e?.setAttribute("data-focused","true")}),i.addEventListener("blur",()=>
92{e?.setAttribute("data-focused","false")})}addIdToAccordion(e){const i=e.querySelector(this.selectors.accordionButton);if(!i||!e)return console.error("Accordion or Button is missing");const n=this.generateId();e.setAttribute("id",n),i.setAttribute("aria-controls",n)}jumpToProductDetailsLinkClickHandler(e,i){if(!i){console.warn("No Accordion found");return}i.setAttribute("data-open","true")}getAllAccordions(){return Array.from(document.querySelectorAll(this.selectors.accordionSection))}initializeAccordions(){const e=this.getAllAccordions(),i=document.querySelectorAll(".pda-anker-to-productdescription-section");if(e.length!==0){for(const n of e)this.addClickListener(n),this.addFocusInListener(n),this.accTitleFocusListener(n),this.addIdToAccordion(n);i&&e&&e.length>0&&i.forEach(n=>{n.addEventListener("click",r=>this.jumpToProductDetailsLinkClickHandler(r,e[0]))})}}generateId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return`accordion-${Array.from({length:7},()=>e[Math.floor(Math.random()*e.length)]).join("")}`}}new ol;const al=document.querySelectorAll('select[id^="content-"]');al.forEach(t=>{const e=t.id,i=document.querySelectorAll(`[data-select-id="${e}"]`);t.addEventListener("change",()=>{const n=t.value;i.forEach(r=>r.classList.add("hidden")),document.querySelector(`[data-content-id="${n}"]`)?.classList.remove("hidden")})});window.addEventListener("load",ll);async function ll(){const t=Array.from(document.querySelectorAll('select[name*="country"]')).filter(r=>!r.hasAttribute("data-dropdown-select"));if(t.length===0)return;const e=await n();if(e.error||!e.data.ok)return t.forEach(r=>{r.innerHTML='<option value="Fallback" disabled selected>Error loading countries, using fallback</option>',r.disabled=!0}),console.error("Error loading countries",e.error,e.data?.statusText);const i=await e.data.json();t.forEach(r=>{const s=r.getAttribute("data-default-selected");r.innerHTML=i.map(o=>`<option
93        value="${o.countryCode}"
94        ${s?.toUpperCase()===o.countryCode?"selected":""}
95        data-tenant="${o.tenant}"
96        data-locale="${o.locale}">
97        ${o.countryName}
98      </option>`).join(""),document.dispatchEvent(new CustomEvent("input.country-codes-ready"))});async function n(){return await Ge(fetch("/order/get-countries"))}}async function cl(){const t=document.querySelectorAll('select[name="b2b_industryName"]');if(t.length===0)return;const e=t[0]?.getAttribute("data-tenant"),i=t[0]?.getAttribute("data-client-locale");if(!e)return console.error("Error: Missing tenant attribute on industry field");if(!i)return console.error("Error: Missing client-locale attribute on industry field");const n=await s(e,i);if(n.error||!n.data.ok)return t.forEach(o=>{o.innerHTML='<option value="Fallback" disabled selected>Error loading industry codes, using fallback</option>',o.disabled=!0}),console.error("Error loading industry codes:",n.error,n.data?.statusText);const r=await n.data?.json();if(!r)return console.error("Error: No industry codes data available");t.forEach(o=>{const a=r.map(c=>`<option
99        value="${c.name}"
100        data-industry-ssi-code="${c.ssiCode}"
101        data-industry-nace-code="${c.naceCode}">
102        ${c.name}
103      </option>`),l=o.getAttribute("data-unselected-text");l&&a.unshift(`<option value="" disabled selected>${l}</option>`),o.innerHTML=a.join("")});async function s(o,a){return await Ge(fetch(`/tenant/industry-codes/codes/${o}/${a}`))}}cl();const dl=t=>{const e=t.querySelector("input"),i=t.querySelector('button[data-action="dec"]'),n=t.querySelector('button[data-action="inc"]'),r=e?.getAttribute("min"),s=r?parseInt(r,10):null,o=e?.getAttribute("max"),a=o?parseInt(o,10):null,l=()=>e?parseInt(e.value,10):s??0;(s!=null||a!=null)&&e?.addEventListener("blur",()=>{const c=parseInt(e.value,10);s!=null&&(!e.value||c<s)?e.value=`${s}`:a!=null&&c>a&&(e.value=`${a}`)}),i?.addEventListener("click",()=>{const c=l();if(e){if(s!=null&&c<=s)return;e.value=`${c-1}`}}),n?.addEventListener("click",()=>{const c=l();if(e){if(a!=null&&c>=a)return;e.value=`${c+1}`}})};function ul(t,e,i=document.documentElement){const n=new WeakSet,r=o=>{o.nodeType===1&&(o.matches?.(t)&&!n.has(o)&&(n.add(o),e(o)),o.querySelectorAll?.(t).forEach(a=>{n.has(a)||(n.add(a),e(a))}
103))},s=new MutationObserver(o=>{for(const a of o)for(const l of a.addedNodes)r(l)});return s.observe(i,{childList:!0,subtree:!0}),i.querySelectorAll?.(t).forEach(o=>{n.has(o)||(n.add(o),e(o))}),s}ul('[data-input-type="number-stepper"]',dl);const hl=document.querySelectorAll("div[data-password-strength]");hl.forEach(t=>{const e=t.querySelector('input[type="password"]'),i=t.querySelector("[data-password-rules]");if(!e||!i)return;const n=i.querySelector("[data-rule-length]"),r=i.querySelector("[data-rule-lower-chars]"),s=i.querySelector("[data-rule-upper-chars]"),o=i.querySelector("[data-rule-numbers]"),a=i.querySelector("[data-rule-special-chars]");if(!n||!r||!s||!o||!a)return console.error("Missing password rules elements in the template.");e.setAttribute("valid","false"),e.addEventListener("input",()=>{i.setAttribute("data-password-rules-visible","");const l=e.value,c=/^.{8,}$/.test(l),d=/[a-z]/.test(l),g=/[A-Z]/.test(l),f=/\d/.test(l),E=/[\W_]/.test(l);c?(n.classList.add("valid"),n.classList.remove("not-valid")):(n.classList.remove("valid"),n.classList.add("not-valid")),d?(r.classList.add("valid"),r.classList.remove("not-valid")):(r.classList.remove("valid"),r.classList.add("not-valid")),g?(s.classList.add("valid"),s.classList.remove("not-valid")):(s.classList.remove("valid"),s.classList.add("not-valid")),f?(o.classList.add("valid"),o.classList.remove("not-valid")):(o.classList.remove("valid"),o.classList.add("not-valid")),E?(a.classList.add("valid"),a.classList.remove("not-valid")):(a.classList.remove("valid"),a.classList.add("not-valid")),c&&d&&g&&f&&E?e.setAttribute("valid","true"):e.setAttribute("valid","false")})});const fl=document.querySelectorAll("div[data-password-input]");fl.forEach(t=>{const e=t.querySelector('input[type="password"]'),i=t.querySelector("[data-show-password]"),n=t.querySelector("[data-hide-password]");if(!e||!i||!n)return;["click","keydown"].forEach(a=>{i.addEventListener(a,l=>r(l,e,i,n)),n.addEventListener(a,l=>s(l,e,i,n))});function r(a,l,c,d){o(a)&&(a.preventDefault(),l.type="text",c.setAttribute("hidden",""),d.removeAttribute("hidden"),d.focus())}function s(a,l,c,d){o(a)&&(a.preventDefault(),l.type="password",d.setAttribute("hidden",""),c.removeAttribute("hidden"),c.focus())}function o(a){return a instanceof MouseEvent?!0:a instanceof KeyboardEvent?a.code==="Enter"||a.code==="Space":!1}});const ml="SideSlideButtonUpdate";class gl{triggerElements=[];backgroundClickHandlerMap=new WeakMap;constructor(){window.addEventListener("DOMContentLoaded",this.initialize.bind(this))}initialize(){const e=Array.from(document.querySelectorAll("[data-component='side-slide']"));if(e.length!==0){if(e.forEach(i=>this.registerSlide(i)),this.triggerElements=Array.from(document.querySelectorAll("[data-side-slide-trigger-id]")),this.triggerElements.length===0){console.warn("No Trigger Buttons found.");return}this.addTriggerEventListeners(),this.addCloseButtonEventListeners(),this.addKeyboardEventListeners(),this.addCustomEventListener()}}addKeyboardEventListeners(){document.addEventListener("keydown",e=>this.handleKeyDown(e))}handleKeyDown(e){if(e.key==="Escape"){const i=this.getOpenSlide();i&&this.closeSlide(i)}}getOpenSlide(){const e=Array.from(document.querySelectorAll("[data-component='side-slide']"));if(e.length!==0)return e.find(i=>i.getAttribute("data-open")==="true")}generateUniqueIdsObject(){const e=crypto.randomUUID(),i=crypto.randomUUID(),n=crypto.randomUUID();return{sliderId:e,titleId:i,descriptionId:n}}registerSlide(e){const i=this.generateUniqueIdsObject();e.setAttribute("data-side-slide-id",i.sliderId),this.addIdToTitle(e,i),this.addIdToDescription(e,i),e.querySelector("aside")?.setAttribute("aria-labelledby",i.titleId),e.querySelector("aside")?.setAttribute("aria-describedby",i.descriptionId)}addIdToTitle(e,i){const n=e.querySelector("[data-custom-selector='aria-labelledby']");n instanceof HTMLElement&&n.setAttribute("id",i.titleId)}addIdToDescription(e,i){const n=e.querySelector("[data-custom-selector='aria-describedby']");n instanceof HTMLElement&&n.setAttribute("id",i.descriptionId)}
103addTriggerEventListeners(){this.triggerElements.forEach(e=>{e.addEventListener("click",i=>this.handleTriggerClick(i))})}addCustomEventListener(){document.addEventListener(ml,e=>{const i=document.querySelector(e.detail.selector);i&&i.addEventListener("click",n=>this.handleTriggerClick(n))})}handleTriggerClick(e){const i=e.currentTarget;if(!(i instanceof HTMLElement))return;const n=i.getAttribute("data-side-slide-trigger-id");if(!n)return;const r=this.getSlideByTriggerId(n);r&&this.toggleSlideState(r)}toggleSlideState(e){e.getAttribute("data-open")==="true"?this.closeSlide(e):this.openSlide(e)}openSlide(e){e.setAttribute("data-open","true"),e.setAttribute("data-slide-in","true"),this.disablePageScrolling();const i=e.querySelector("[data-side-slide-close-button]");i instanceof HTMLElement&&i.focus();const n=r=>this.handleSlideBackgroundClick(r,e);e.addEventListener("click",n),this.backgroundClickHandlerMap.set(e,n)}closeSlide(e){e.setAttribute("data-open","false"),e.setAttribute("data-slide-in","false"),this.enablePageScrolling();const i=this.backgroundClickHandlerMap.get(e);i&&(e.removeEventListener("click",i),this.backgroundClickHandlerMap.delete(e))}disablePageScrolling(){document.body?.style.setProperty("overflow","hidden","important"),document.body?.style.setProperty("padding-right","10px","important"),document.body?.style.setProperty("max-height","100dvh","important")}enablePageScrolling(){document.body?.style.removeProperty("overflow"),document.body?.style.removeProperty("padding-right"),document.body?.style.removeProperty("max-height")}handleSlideBackgroundClick(e,i){const n=i.querySelector("aside"),r=e.target;n&&!n.contains(r)&&this.closeSlide(i)}addCloseButtonEventListeners(){const e=document.querySelectorAll("[data-side-slide-close-button]");if(e.length===0){console.warn("No Close Buttons found.");return}e.forEach(i=>{i.addEventListener("click",()=>this.handleCloseButtonClick(i))})}handleCloseButtonClick(e){const i=e.getAttribute("data-trigger-target");if(!i)return;const n=this.getSlideByTriggerId(i);n&&this.closeSlide(n)}getSlideByTriggerId(e){return document.querySelector(`[data-trigger-target="${e}"]`)}}new gl;const El=(t,e,i)=>()=>{const{scrollLeft:n,scrollWidth:r,clientWidth:s}=t;e.classList.toggle("invisible",n<=0),i.classList.toggle("invisible",n>=r-s-1)};function pl(t){const e=t.querySelector(".slider-container"),i=t.querySelector('[name="left"]'),n=t.querySelector('[name="right"]');if(!(e&&i&&n))return;const r=El(e,i,n);e.addEventListener("scroll",r),new ResizeObserver(r).observe(e);const s=t.dataset.scrollAmount!=null?parseInt(t.dataset.scrollAmount,10):0;i.addEventListener("click",()=>{e.scrollBy({left:s*-1,behavior:"smooth"})}),n.addEventListener("click",()=>{e.scrollBy({left:s,behavior:"smooth"})})}document.querySelectorAll('[id^="slider-"]').forEach(pl);class vl{constructor(){window.addEventListener("DOMContentLoaded",()=>this.initialize())}initialize(){const e=document.getElementById("button-back-top-top");e&&(this.addClickListener(e),this.addScrollListener(e),this.observeStickyCta())}addClickListener(e){e.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"}),e.blur()})}addScrollListener(e){let i=!1;const n=()=>{const r=e.parentElement;if(!r)return;window.scrollY>window.innerHeight*.5?r.setAttribute("data-active",""):r.removeAttribute("data-active"),i=!1};window.addEventListener("scroll",()=>{i||(i=!0,requestAnimationFrame(n))})}observeStickyCta(){const e=document.querySelector(".pda-sticky-cta-box"),i=document.getElementById("sticky-buttons");if(!e||!i)return;let n=document.body.classList.contains("pda-sticky");new MutationObserver(s=>{for(const o of s){if(o.type!=="attributes"||o.attributeName!=="class")continue;const a=o.target.classList.contains("pda-sticky");n!==a&&(n=a,a?i.setAttribute("style",`bottom: ${e.offsetHeight}px !important`):i.removeAttribute("style"))}}).observe(document.body,{attributes:!0})}}new vl;class Sl{ratingElement;pId;theme;maxRatingsPerStep;locale;widgetVersion;constructor(){this.ratingElement=document.querySelector("etrusted-widget-pda"),this.ratingElement&&(this.pId=this.ratingElement.getAttribute("data-sku"),this.theme="light",this.maxRatingsPerStep=3,this.locale=document.querySelector("etrusted-widget-pda")?.getAttribute("data-locale")??null,this.widgetVersion="1.18.18")}toObject(){return{theme:this.theme,maxRatingsPerStep:this.maxRatingsPerStep,locale:this.locale,widgetVersion:this.widgetVersion,ratingElement:this.ratingElement,pId:this.pId}}}class yl{getProductReview(){const e=document.querySelector(".reviewdata");if(!e)return null;const i=e.textContent;return i?JSON.parse(i):null}sortRatings(e){return!e||!Array.isArray(e.ratings)?null:(e.ratings.sort((i,n)=>{const r=new Date(i?.meta?.date??0).getTime();return new Date(n?.meta?.date??0).getTime()-r}),e)}}class bl{config;i18n=null;renderer=null;constructor(){const e=new Sl().toObject(),i=new Ll;this.config=i.initConfig(e)}inititialize(){const e=new ri;this.i18n=new Il(e,this.config.language),this.renderer=new Al(this.i18n,this.config);const i=new yl;let n=i.getProductReview();if(n=i.sortRatings(n),!n)return;const r=this.renderer.renderProductReviewListWidget(n),s=this.attachShadowRootWithHtml(document,`etrusted-widget-${this.config.pId}`,r,"open"),o=this.renderer.renderProductReview(n),a=this.attachShadowRootWithHtml(s,`etrusted-product-review-list-widget-${this.config.pId}`,o,"open");if(!a)return;const l=new _l(a,this.config);new wl(a,l,this.i18n,this.config).initToggles(),l.makeReviewsVisible(!1),document.querySelectorAll(".add-rating").forEach(f=>{f.addEventListener("click",()=>{g()})});function g(){const f=document.querySelector(".pda-rating-list"),E=document.querySelector("header")?.getBoundingClientRect()?.height??0,m=document.querySelector(".pda-accordion-sticky-nav-container")?.getBoundingClientRect()?.height??0,h=32;if(!f)return console.warn("rating scroll target not found");const p={OffsetY:h+m},S=f.getBoundingClientRect().top+window.scrollY-E-p.OffsetY;window.scroll({top:S,behavior:"smooth"})}}attachShadowRootWithHtml(e,i,n,r="open"){if(!e)return null;const s=e.getElementById?e.getElementById(i):e.querySelector(`#${i}`);if(!s)return null;const o=s.shadowRoot||s.attachShadow({mode:r});return o.innerHTML!==n&&(o.innerHTML=n),o}}class Ll{initConfig(e={}){const i=e.ratingElement,n=e.pId,r=e.theme??"light",s=e.widgetVersion??"1.18.17",o="dd.MM.yyyy",a={year:"numeric",month:"2-digit",day:"2-digit"},l=Number(e.minRating??0),c=Number(e.maxRating??5),d=Number(e.maxRatingsPerStep??3),g=e.tenant??"ssh_de",f=e.locale??"de-DE",E=f.split("-")[0]??"de";return{shopName:"Schäfer Shop",ratingElement:i,pId:n,theme:r,widgetVersion:s,dateFormat:o,dateFormatOptions:a,minRating:l,maxRating:c,maxRatingsPerStep:d,tenant:g,locale:f,language:E,visibleRatings:0}}}
103class Il{I18N_KEYS;translations;lang;i18nHelper;constructor(e,i="en"){this.I18N_KEYS=e.I18N_KEYS,this.translations=e.getTranslationTexts()??{},this.lang=i||"en",this.i18nHelper=new Tl(this.lang)}translate(e,i={},n){n=n||this.lang;const r=this.translations[n]?.[e]||e;return this.replacePlaceholders(r,i)}replacePlaceholders(e,i={}){for(const[n,r]of Object.entries(i))e=e.replace(new RegExp(`{{${n}}}`,"g"),r);return e}t(e,i,n){return this.translate(e,i,n)}translatePlural(e,i,n={},r){const s=r||this.lang,o=this.i18nHelper.getPluralKey(s,i),a=this.translations[s]?.[e];let l=e;return a!==void 0&&(typeof a=="string"?l=a:typeof a=="object"&&a!==null&&(l=a[typeof o=="string"?o:"other"]??e)),this.replacePlaceholders(l,n)}tp(e,i,n,r){return this.translatePlural(e,i,n,r)}changeLanguage(e){this.translations[e]&&(this.lang=e)}}class Al{i18n;config;constructor(e,i){this.i18n=e,this.config=i}renderProductReviewListWidget(e){return`
104      <etrusted-product-review-list-widget
105          data-sku="${e.productId}"
106          data-theme="${this.config.theme}"
107          data-font-style="default"
108          id="etrusted-product-review-list-widget-${e.productId}">
109      </etrusted-product-review-list-widget>
110    `}renderProductReview(e){return`
111      <style>
112        @import url("https://integrations.etrusted.com/applications/product-review-list-widget/${this.config.widgetVersion}/index.css");
113        :host(etrusted-product-review-list-widget), :host(etrusted-star-extension) {
114            --accent-color: #FCD300;
115        }
116        .review-list .footer .action {
117            color: #2C689F;
118            font-weight: 700;
119            font-size: .75rem;
120            border: none;
121            background: none;
122            padding: 0;
123            cursor: pointer;
124        }
125        .review-list .footer .action.load-more {
126            background: #28292E;
127            border-color: #28292E;
128            color: white;
129            margin-top: 14px;
130            font-size: 14px;
131            padding: 12px;
132        }
133        .review-list .review .footer {
134            justify-content: flex-start;
135            align-items: flex-start;
136        }
137        .rating-distribution .footer a {
138            text-decoration: underline;
139        }
140        etrusted-review-filter .review-filter button {
141            font-size: 1em;
142        }
143        etrusted-review-filter .filter-list li {
144            cursor: pointer;
145        }
146        etrusted-review-element .review .body .reply {
147            box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.02), 0 8px 12px 0 rgba(0, 0, 0, 0.04);
148        }
149        etrusted-review-element .review .body .reply .marker {
150            border-left: 3px solid #2C689F;
151        }
152        @media (max-width: 991px) {
153            .product-review-list-widget {
154                flex-direction: column;
155            }
156            .product-review-list-widget .col-40, .product-review-list-widget .col-60 {
157                width: 100%;
158            }
159        }
160      </style>
161      <div class="product-review-list-widget">
162        <div class="col-40">
163          ${this.renderRatingDistribution(e)}
164        </div>
165        <div class="col-60">
166          <div class="bar">
167            <div class="bar-action">
168              ${this.renderRatingFilter(e)}
169            </div>
170            <div class="bar-content"></div>
171          </div>
172          ${this.renderRatingList(e)}
173        </div>
174      </div>
175      <style>
176        etrusted-widget {display: block;}
177        .product-review-list-widget {background-color: var(--color-bg-highlight);}
178      </style>
179    `}renderRatingStars(e){e=Number(e);const i=Number(this.config.maxRating)-e;return`
180      <etrusted-rl-star-rating baseurl="${`https://integrations.etrusted.com/applications/product-review-list-widget/${this.config.widgetVersion}`}" rating="${e}" theme="${this.config.theme}">
181          <div class="star-rating">
182              ${te.repeat('<div class="filled"></div>',e,`
183`)}
184              ${i<=0?"":`
185                  <div class="star-rating__fraction">
186                    <div class="star"><div class="empty"></div></div>
187                    <div class="star" style="width: 0;"><div class="filled"></div></div>
188                  </div>
189                  ${te.repeat('<div class="empty"></div>',i-1,`
190`)}
191                  `}
192          </div>
193      </etrusted-rl-star-rating>
194    `}renderRatingElement(e){const i=Number(e?.rating!=null?e.rating:this.config.minRating),n=e?.meta??{},r=n.date?te.formatDate(n.date,this.config.dateFormatOptions,this.config.locale):"",s=n.replyDate?te.formatDate(n.replyDate,this.config.dateFormatOptions,this.config.locale):r,o=e?.origin??{},a=e?.content?.[this.config?.language]??o;let l,c,d;const g=te.sanitizeTextToHtml(o.title),f=te.sanitizeTextToHtml(o.comment),E=te.sanitizeTextToHtml(o.replyContent);let m=te.sanitizeTextToHtml(a.title),h=te.sanitizeTextToHtml(a.comment),p=te.sanitizeTextToHtml(a.replyContent);const S=o.language!==this.config.language;S?(l=g,c=f,d=E):(l=m,c=h,d=p),l=te.defaultIfEmpty(l,""),c=te.defaultIfEmpty(c,""),d=te.defaultIfEmpty(d,""),m=te.defaultIfEmpty(m,""),h=te.defaultIfEmpty(h,""),p=te.defaultIfEmpty(p,"");const b=e?.userName??"",y=!!(l||c||d);return`
195                <etrusted-review-element theme="${this.config.theme}" tabindex="-1" style="display:none;">
196                    <div class="review">
197                        <div class="header">
198                            <div class="row row--space-between">
199                                ${this.renderRatingStars(i)}
200                                ${e?.imported&&e.imported.imported?`<div class="imported-flag">
200${this.i18n.t(this.i18n.I18N_KEYS.IMPORTED.SHORT)}</div>`:`<etrusted-rc-tooltip
201                                            content="${te.excapeHtml(this.i18n.t(this.i18n.I18N_KEYS.COMMON.VERIFIED_TOOLTIP,{shopName:this.config.shopName,dataKeyNav:""}))}"
202                                            orientation="left" data-key-nav="${me.getDataKeyNav()}" tabindex="0">
203                                        <div class="verified-icon"></div>
204                                        <div class="tooltip-wrapper left" style="left: -276px; display: none;">
205                                            <div class="tooltip left">
206                                                <span tabindex="-1">${this.i18n.t(this.i18n.I18N_KEYS.COMMON.VERIFIED_TOOLTIP,{shopName:this.config.shopName,dataKeyNav:me.getDataKeyNav().toString()})}</span>
207                                            </div>
208                                        </div>
209                                        </etrusted-rc-tooltip>
210                                    `}
211                            </div>
212                            <div class="row">
213                                <etrusted-rc-tooltip content="${this.i18n.t(this.i18n.I18N_KEYS.REVIEW.TOOLTIP.DATE,{date:r})}">
214                                    <span>${b?this.i18n.t(this.i18n.I18N_KEYS.REVIEW.TOOLTIP.TITLE,{date:r,username:b}):r}</span>
215                                    <div class="tooltip-wrapper center" style="left: -65.9062px; display: none;">
216                                      <div class="tooltip">
217                                        <span>${this.i18n.t(this.i18n.I18N_KEYS.REVIEW.TOOLTIP.DATE,{date:r})}</span>
218                                      </div>
219                                    </div>
220                                </etrusted-rc-tooltip>
221                            </div>
222                        </div>
223                        ${y?`
224                            <div class="body">
225                                ${l?`<div class="title origin">${l}</div>`:""}
226                                ${m?`<div class="title translation" style="display:none;">${m}</div>`:""}
227                                ${c?`<div class="comment origin">${c}</div>`:""}
228                                ${h?`<div class="comment translation" style="display:none;">${h}</div>`:""}
229                                ${d?`
230                                    <div class="reply">
231                                        <div class="icon"></div>
232                                        <div class="title">${this.i18n.t(this.i18n.I18N_KEYS.REVIEW.REPLY_FROM,{replyFrom:this.config.shopName})}</div>
233                                        ${s?.toString().trim()?`<div class="date">${s}</div>`:""}
234                                        <div class="marker"></div>
235                                        <div class="comment origin">${d}</div>
236                                        ${p?`<div class="comment translation" style="display:none;">${p}</div>`:""}
237                                    </div>
238                                    `:""}
239                          </div>
240                          ${S?`
241                              <div class="footer">
242                                  <button class="action show-translation cta cta-tertiary" style=""><span>${this.i18n.t(this.i18n.I18N_KEYS.REVIEW.SHOW_TRANSLATION,{language:this.i18n.i18nHelper.getLanguageName(this.config?.language)??""})}</span></button>
243                                  <button class="action show-origin cta cta-tertiary" style="display: none;"><span>${this.i18n.t(this.i18n.I18N_KEYS.REVIEW.SHOW_ORIGIN,{language:this.i18n.i18nHelper.getLanguageName(o?.language??"")??""})}</span></button>
244                              </div>`:""}`:""}
245                    </div>
246                </etrusted-review-element>
247            `}renderRatingList(e){return`
248      <etrusted-review-list>
249          <div class="review-list">
250              <div class="body">
251                  ${(e?.ratings??[]).map(r=>this.renderRatingElement(r)).join(`
252`)}
253              </div>
254              <div class="footer">
255                  <span class="action load-more cta cta-tertiary" tabindex="0" data-key-nav="${me.getDataKeyNav()}" style="display: none;">${this.i18n.t(this.i18n.I18N_KEYS.REVIEW_LIST.LOAD_MORE)}</span>
256                  <span style="display: none;">${this.i18n.t(this.i18n.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS)}<button class="action show-less" tabindex="0" data-key-nav="${me.getDataKeyNav()}">${this.i18n.t(this.i18n.I18N_KEYS.REVIEW_LIST.SHOW_LESS)}</button></span>
257              </div>
258          </div>
259      </etrusted-review-list>
260    `}renderRatingFilterRow(e,i){return`
261      <li data-filter-value="${e}" role="checkbox" aria-label="${e} Sterne" aria-checked="false" data-key-nav="${me.getDataKeyNav()}" tabindex="0">
262          ${this.renderRatingStars(Number(e))}
263          <span>(${Number(Math.round(i[e]??0)).toString()})</span>
264      </li>
265    `}renderRatingFilter(e){const i=e.ratingDistribution||{},n=Object.keys(i).sort().reverse();return`
266      <etrusted-review-filter theme="${this.config.theme}" data-key-nav="${me.getDataKeyNav()}" tabindex="-1">
267          <div class="review-filter closed" data-key-nav="${me.getDataKeyNav()}" tabindex="-1">
268              <button tabindex="0" contenteditable="false">${this.i18n.t(this.i18n.I18N_KEYS.FILTER.LABEL)} <span class="icon" aria-label="${this.i18n.t(this.i18n.I18N_KEYS.FILTER.SHOW_ARIA_LABEL)}"></span></button>
269              <div class="filter">
270                  <span>${this.i18n.t(this.i18n.I18N_KEYS.FILTER.HEADER)}</span>
271                  <ol class="filter-list">
272                      ${n.map(r=>this.renderRatingFilterRow(r,i)).join(`
273`)}
274              </ol>
275              <a data-key-nav="${me.getDataKeyNav()}" tabindex="0" role="button" aria-label="${this.i18n.t(this.i18n.I18N_KEYS.FILTER.REMOVE_FILTER)}">${this.i18n.t(this.i18n.I18N_KEYS.FILTER.REMOVE_FILTER)}</a>
276            </div>
277          </div>
278      </etrusted-review-filter>
279    `}renderRatingDistributionRow(e,i){const n=i[e]??0,r=Number(Math.round(n)).toString();return`
280      <div class="distribution-row" data-filter-value="${e}">
281          <span class="rating-index" aria-label="${e}">${e} <span class="rating-star"><img class="star empty" alt=""></span></span>
282          <div class="bar" aria-label="${this.i18n.t(this.i18n.I18N_KEYS.RATING.BAR_ARIA_LABEL)}">
283              <div class="bar-filled" style="width: ${r}%"></div>
284          </div>
285          <span class="percent"> ${r}% </span>
286      </div>
287    `}renderRatingDistributionRows(e){return Object.keys(e).sort().reverse().map(n=>this.renderRatingDistributionRow(n,e)).join(`
288`)}renderRatingDistribution(e){const i=e.ratingPercentageDistribution||{},n=Number(e.totalReviews??0).toFixed(0);return`
289      <etrusted-rating-distribution data-key-nav="${me.getDataKeyNav()}" tabindex="-1">
290          <div class="rating-distribution">
291              <div class="header">
292                  <span class="rating">${Number(e.averageRating).toFixed(2)}</span>
293                  <span class="review-count">${this.i18n.tp(this.i18n.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT,parseFloat(n),{count:n})} </span>
294                  <span class="logo"></span>
295              </div>
296              <div class="body">
297                  ${this.renderRatingDistributionRows(i)}
298              </div>
299              <div class="footer">
300                  <span>${this.i18n.t(ri.I18N_KEYS.COMMON.LEGAL_TEXT,{dateKeyNav:me.getDataKeyNav().toString()})}</span>
301                  <span>${this.i18n.t(this.i18n.I18N_KEYS.COMMON.LEGAL_TEXT2,{dateKeyNav:me.getDataKeyNav().toString()})}</span>
302              </div>
303          </div>
304      </etrusted-rating-distribution>
305    `}}class te{static formatDate(e,i,n="en-US"){const r=e instanceof Date?e:new Date(e);return isFinite(r.getTime())?new Intl.DateTimeFormat(n,i).format(r):""}static repeat(e,i=0,n=""){return n=n||"",i=i||0,i=Number(i??0),Array(i).fill(e).join(n)}static sanitizeTextToHtml(e){return(e??"").replaceAll(/<br\s*\/?>/gi,`
306`).replaceAll(/\r\n?/g,`
307`).replaceAll(/\n/g,"<br>")}static defaultIfEmpty(e,i){return e?.toString().trim()?e:i}static excapeHtml(e){return(e??"").replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}}class me{static dataKeyNav=1;static getDataKeyNav(){return this.dataKeyNav++}}class wl{reviewVisibilityManager;shadowRoot;i18n;config;_outsideClickListener=null;constructor(e,i,n,r){this.shadowRoot=e,this.reviewVisibilityManager=i,this.i18n=n,this.config=r}initToggles(){this.initFilterViewToggle(),this.initActiveFilterToggles(),this.initActiveFilterRemoveToggle(),this.initTooltipToggles(),this.initLoadMoreRatingsToggle(),this.initTranslationToggle(
307)}initFilterViewToggle(){this.shadowRoot.querySelectorAll("etrusted-review-filter .review-filter").forEach(i=>{const n=i.querySelector("button");n&&(n.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let s=i.classList.contains("open");s?(i.classList.remove("open"),i.classList.add("closed")):(i.classList.remove("closed"),i.classList.add("open")),s=i.classList.contains("open");const o=n.querySelector(".icon");if(o&&o.setAttribute("aria-label",s?this.i18n.t(this.i18n.I18N_KEYS.FILTER.HIDE_ARIA_LABEL):this.i18n.t(this.i18n.I18N_KEYS.FILTER.SHOW_ARIA_LABEL)),!this._outsideClickListener){const a=l=>{const c=n.querySelector(".icon"),d=i.classList.contains("open");l.composedPath().includes(i)||(d?(i.classList.remove("open"),i.classList.add("closed")):(i.classList.remove("closed"),i.classList.add("open")),c&&c.setAttribute("aria-label",d?this.i18n.t(this.i18n.I18N_KEYS.FILTER.HIDE_ARIA_LABEL):this.i18n.t(this.i18n.I18N_KEYS.FILTER.SHOW_ARIA_LABEL)),document.removeEventListener("click",a,!0))};this._outsideClickListener=a}s?document.addEventListener("click",this._outsideClickListener,!0):document.removeEventListener("click",this._outsideClickListener,!0)},{capture:!1}),n.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&!r.repeat&&(r.preventDefault(),n.click())}))})}initActiveFilterToggles(){const e=this.shadowRoot.querySelectorAll(".filter .filter-list li");e.forEach(i=>{i.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),i.classList.toggle("active");const r=i.classList.contains("active");i.setAttribute("aria-checked",r?"true":"false"),Array.from(e).every(o=>o.classList.contains("active"))&&e.forEach(o=>{o.classList.remove("active"),o.setAttribute("aria-checked","false")}),this.reviewVisibilityManager.makeReviewsVisible(!0)},{capture:!1}),i.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&!n.repeat&&(n.preventDefault(),i.click())})})}initActiveFilterRemoveToggle(){const e=this.shadowRoot.querySelector(".filter a");e&&(e.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),this.shadowRoot.querySelectorAll(".filter .filter-list li").forEach(r=>{r.classList.remove("active"),r.setAttribute("aria-checked","false")}),this.reviewVisibilityManager.makeReviewsVisible(!0)}),e.addEventListener("keydown",i=>{(i.key==="Enter"||i.key===" ")&&!i.repeat&&(i.preventDefault(),e.click())}))}toggleTranslation(e,i,n,r){n&&(n.addEventListener("click",()=>{r.forEach(s=>s.style.display="none"),i.forEach(s=>s.style.removeProperty("display")),n&&(n.style.display="none"),e&&e.style.removeProperty("display")}),n.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&!s.repeat&&(s.preventDefault(),n.click())}))}initTranslationToggle(){const e=this.shadowRoot.querySelectorAll("etrusted-review-element");e.length!==0&&e.forEach(i=>{const n=i.querySelector(".button.action.show-translation, .action.show-translation, button.action.show-translation"),r=i.querySelector(".button.action.show-origin, .action.show-origin, button.action.show-origin");if(!n&&!r)return;const s=i.querySelectorAll(".title.origin, .comment.origin"),o=i.querySelectorAll(".title.translation, .comment.translation");this.toggleTranslation(r,o,n,s),this.toggleTranslation(n,s,r,o)})}initTooltipToggles(){this.shadowRoot.querySelectorAll("etrusted-rc-tooltip").forEach(i=>{const n=i.querySelector(".tooltip-wrapper");n&&(i.addEventListener("mouseenter",()=>{n.style.display="block"}),i.addEventListener("mouseleave",()=>{n.style.display="none"}))})}initLoadMoreRatingsToggle(){const e=this.shadowRoot.querySelector("etrusted-review-list .footer .load-more"),i=this.shadowRoot.querySelector("etrusted-review-list .footer span:nth-child(2)");this.shadowRoot.querySelectorAll("etrusted-review-element").length!==0&&(e?.addEventListener("click",()=>{this.reviewVisibilityManager.makeReviewsVisible(!1)}),e?.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&!r.repeat&&(r.preventDefault(),e.click())}),i?.addEventListener("click",()=>{this.reviewVisibilityManager.makeReviewsVisible(!0)}),i?.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&!r.repeat&&(r.preventDefault(),i.click())}))}}class _l{config;shadowRoot;constructor(e,i={}){this.shadowRoot=e,this.config={visibleRatings:0,maxRatingsPerStep:5,...i}}getFilteredReviews(e){const i=this.shadowRoot.querySelectorAll(".filter .filter-list .active"),n=Array.from(i).map(s=>s.getAttribute("data-filter-value"));if(!n||n.length===0)return Array.from(e);const r=[];return e.forEach(s=>{const o=s.querySelectorAll("etrusted-rl-star-rating"),a=Array.from(o).map(l=>l.getAttribute("rating")).pop();a&&n.includes(a)&&r.push(s)}),r}makeReviewsVisible(e){e=e||!1,e&&(this.config.visibleRatings=0);const i=this.shadowRoot.querySelectorAll("etrusted-review-list etrusted-review-element");
307if(i.length===0)return;const n=this.getFilteredReviews(i);i.forEach(a=>{a.style.display="none"});const r=Math.min(this.config.visibleRatings+this.config.maxRatingsPerStep,n.length);this.config.visibleRatings=r,n.forEach((a,l)=>{l<r?a.style.removeProperty("display"):a.style.display="none"});const s=this.shadowRoot.querySelector("etrusted-review-list .footer .load-more"),o=this.shadowRoot.querySelector("etrusted-review-list .footer span:nth-child(2)");n.length<=this.config.maxRatingsPerStep?(s&&(s.style.display="none"),o&&(o.style.display="none")):(this.config.visibleRatings>=n.length&&(this.config.visibleRatings=n.length,s&&(s.style.display="none"),o&&o.style.removeProperty("display")),this.config.visibleRatings<n.length&&(s&&s.style.removeProperty("display"),o&&(o.style.display="none")))}}class Tl{lang;pluralRulesCache;constructor(e="en"){this.lang=e,this.pluralRulesCache=new Map}getPluralKey(e,i){return i===0?"zero":(this.pluralRulesCache.has(e)||this.pluralRulesCache.set(e,new Intl.PluralRules(e,{type:"cardinal"})),this.pluralRulesCache.get(e)?.select(i))}getLanguageName(e){return new Intl.DisplayNames([this.lang],{type:"language"}).of(e)}}class ri{I18N_KEYS;constructor(){this.I18N_KEYS=ri.I18N_KEYS}static I18N_KEYS={COMMON:{LEGAL_TEXT:"product.reviews.pda.common.legalText",LEGAL_TEXT2:"product.reviews.pda.common.legalText2",VERIFIED_TOOLTIP:"product.reviews.pda.common.verifiedTooltip"},FILTER:{HEADER:"product.reviews.pda.filter.header",LABEL:"product.reviews.pda.filter.label",REMOVE_FILTER:"product.reviews.pda.filter.removeFilter",HIDE_ARIA_LABEL:"product.reviews.pda.filter.hideAriaLabel",SHOW_ARIA_LABEL:"product.reviews.pda.filter.showAriaLabel"},HEADER:{TOTAL_REVIEW_COUNT:"product.reviews.pda.header.totalReviewCount"},IMPORTED:{SHORT:"product.reviews.pda.imported.short",LONG:"product.reviews.pda.imported.long"},RATING:{BAR_ARIA_LABEL:"product.reviews.pda.rating.barAriaLabel",STARS_TEXT:"product.reviews.pda.rating.starsText",TOTAL_RATING_ARIA_LABEL:"product.reviews.pda.rating.totalRatingAriaLabel"},REVIEW:{TOOLTIP:{TITLE:"product.reviews.pda.review.tooltip.title",DATE:"product.reviews.pda.review.dateTooltip"},REPLY_FROM:"product.reviews.pda.review.replyFrom",SHOW_TRANSLATION:"product.reviews.pda.review.showTranslation",SHOW_ORIGIN:"product.reviews.pda.review.showOrigin"},REVIEW_LIST:{LOAD_MORE:"product.reviews.pda.reviewList.loadMore",NO_MORE_REVIEWS:"product.reviews.pda.reviewList.noMoreReviews",SHOW_LESS:"product.reviews.pda.reviewList.showLess"}};getTranslationTexts(){return{de:{[this.I18N_KEYS.COMMON.LEGAL_TEXT]:'Gesammelt unter den Trusted Shops <a target="_blank" href="https://policies.etrusted.com/DE/de/tos.html" data-key-nav="{{dateKeyNav}}" tabindex="0">Nutzungsbedingungen</a>',[this.I18N_KEYS.COMMON.LEGAL_TEXT2]:'<a target="_blank" href="https://help.etrusted.com/hc/de/articles/23970864566162" data-key-nav="{{dateKeyNav}}" tabindex="0">Über die Echtheit der Trusted Shops Bewertungen.</a>',[this.I18N_KEYS.COMMON.VERIFIED_TOOLTIP]:'{{shopName}} hat Trusted Shops verwendet, um diese Bewertung zu sammeln. Das bedeutet, dass wir überprüfen können, ob diese Bewertung auf einer echten Kundenerfahrung beruht. <a href="https://help.etrusted.com/hc/de/articles/23970864566162-So-funktionieren-Bewertungen-bei-Trusted-Shops" target="_blank" data-key-nav="{{dataKeyNav}}">Erfahre mehr über die Echtheit von Bewertungen.</a>',[this.I18N_KEYS.FILTER.HEADER]:"Bewertungen",[this.I18N_KEYS.FILTER.LABEL]:"Filter",[this.I18N_KEYS.FILTER.REMOVE_FILTER]:"Filter entfernen",[this.I18N_KEYS.FILTER.HIDE_ARIA_LABEL]:"Filteroptionen ausblenden",[this.I18N_KEYS.FILTER.SHOW_ARIA_LABEL]:"Filteroptionen anzeigen",[this.I18N_KEYS.IMPORTED.SHORT]:"Importiert",[this.I18N_KEYS.IMPORTED.LONG]:"Importierte Bewertungen:",[this.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT]:{zero:"Dieses Produkt wurde noch nicht bewertet.",one:"{{count}} Bewertung",other:"{{count}} Bewertungen"},[this.I18N_KEYS.RATING.BAR_ARIA_LABEL]:"Bar überprüfen",[this.I18N_KEYS.RATING.STARS_TEXT]:"Sterne",[this.I18N_KEYS.RATING.TOTAL_RATING_ARIA_LABEL]:"Sternebewertung von {{rating}} von 5 Sternen",[this.I18N_KEYS.REVIEW.TOOLTIP.TITLE]:"{{date}} von {{username}}",[this.I18N_KEYS.REVIEW.TOOLTIP.DATE]:"Datum der Bewertung: {{date}} <br/>Datum der Erfahrung: {{date}}",[this.I18N_KEYS.REVIEW.REPLY_FROM]:"Antwort von {{replyFrom}}",[this.I18N_KEYS.REVIEW.SHOW_TRANSLATION]:"Automatische Übersetzung in {{language}} anzeigen",[this.I18N_KEYS.REVIEW.SHOW_ORIGIN]:"Original in {{language}} anzeigen",[this.I18N_KEYS.REVIEW_LIST.LOAD_MORE]:"Mehr anzeigen",[this.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS]:"Keine weiteren Bewertungen.",[this.I18N_KEYS.REVIEW_LIST.SHOW_LESS]:"Weniger anzeigen"},en:{[this.I18N_KEYS.COMMON.LEGAL_TEXT]:'Collected according to the <a target="_blank" href="https://policies.etrusted.com/GB/en/tos.html" data-key-nav="{{dateKeyNav}}" tabindex="0">terms and conditions</a> of Trusted Shops',[this.I18N_KEYS.COMMON.LEGAL_TEXT2]:'<a target="_blank" href="https://help.etrusted.com/hc/en-gb/articles/23970864566162" data-key-nav="{{dateKeyNav}}" tabindex="0">About the authenticity of reviews</a>',[this.I18N_KEYS.COMMON.VERIFIED_TOOLTIP]:'{{shopName}} has used Trusted Shops to collect this customer review. This means that we can verify that this review is based on an actual experience. <a href="https://help.etrusted.com/hc/en-gb/articles/23970864566162-Measures-for-Reviews-Feedback-Verification" target="_blank" data-key-nav="{{dataKeyNav}}">Learn more about the authenticity of customer reviews.</a>',[this.I18N_KEYS.FILTER.HEADER]:"Reviews",[this.I18N_KEYS.FILTER.LABEL]:"Filter",[this.I18N_KEYS.FILTER.REMOVE_FILTER]:"Remove filter",[this.I18N_KEYS.FILTER.HIDE_ARIA_LABEL]:"Hide filter options",[this.I18N_KEYS.FILTER.SHOW_ARIA_LABEL]:"Show filter options",[this.I18N_KEYS.IMPORT
307ED.SHORT]:"Imported",[this.I18N_KEYS.IMPORTED.LONG]:"Imported reviews:",[this.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT]:{zero:"This product has not yet been rated.",one:"{{count}} Review",other:"{{count}} Reviews"},[this.I18N_KEYS.RATING.BAR_ARIA_LABEL]:"Review Bar",[this.I18N_KEYS.RATING.STARS_TEXT]:"stars",[this.I18N_KEYS.RATING.TOTAL_RATING_ARIA_LABEL]:"Star rating of {{rating}} out of 5 stars",[this.I18N_KEYS.REVIEW.TOOLTIP.TITLE]:"{{date}} by {{username}}",[this.I18N_KEYS.REVIEW.TOOLTIP.DATE]:"Date of review: {{date}} <br/>Date of experience: {{date}}",[this.I18N_KEYS.REVIEW.REPLY_FROM]:"Answer from {{replyFrom}}",[this.I18N_KEYS.REVIEW.SHOW_TRANSLATION]:"Show automatic translation in {{language}}",[this.I18N_KEYS.REVIEW.SHOW_ORIGIN]:"Show original in {{language}}",[this.I18N_KEYS.REVIEW_LIST.LOAD_MORE]:"Load more",[this.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS]:"No more reviews.",[this.I18N_KEYS.REVIEW_LIST.SHOW_LESS]:"Show less"},es:{[this.I18N_KEYS.COMMON.LEGAL_TEXT]:'Recopilado de acuerdo con las <a target="_blank" href="https://policies.etrusted.com/ES/es/tos.html" data-key-nav="{{dateKeyNav}}" tabindex="0">Condiciones de uso</a> de Trusted Shops',[this.I18N_KEYS.COMMON.LEGAL_TEXT2]:'<a target="_blank" href="https://help.etrusted.com/hc/es/articles/23970864566162" data-key-nav="{{dateKeyNav}}" tabindex="0">Acerca de la autenticidad de las valoraciones de Trusted Shops</a>',[this.I18N_KEYS.COMMON.VERIFIED_TOOLTIP]:'{{shopName}} ha utilizado Trusted Shops para recopilar esta valoración de cliente. Esto significa que podemos verificar que esta opinión se basa en una experiencia real. <a href="https://help.etrusted.com/hc/es/articles/23970864566162-Medidas-para-la-verificaci%C3%B3n-de-rese%C3%B1as" target="_blank" data-key-nav="{{dataKeyNav}}">Infórmate sobre la autenticidad de las valoraciones de clientes.</a>',[this.I18N_KEYS.FILTER.HEADER]:"Valoraciones",[this.I18N_KEYS.FILTER.LABEL]:"Filtros",[this.I18N_KEYS.FILTER.REMOVE_FILTER]:"Restablecer",[this.I18N_KEYS.FILTER.HIDE_ARIA_LABEL]:"Ocultar opciones de filtro.",[this.I18N_KEYS.FILTER.SHOW_ARIA_LABEL]:"Mostrar opciones de filtro.",[this.I18N_KEYS.IMPORTED.SHORT]:"Importado",[this.I18N_KEYS.IMPORTED.LONG]:"Valoraciones importadas:",[this.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT]:{zero:"Esta valoración no contiene ningún comentario.",one:"{{count}} valoración",other:"{{count}} valoraciones"},[this.I18N_KEYS.RATING.BAR_ARIA_LABEL]:"Bar de reseñas.",[this.I18N_KEYS.RATING.STARS_TEXT]:"estrellas",[this.I18N_KEYS.RATING.TOTAL_RATING_ARIA_LABEL]:"Calificación de {{rating}} de 5 estrellas",[this.I18N_KEYS.REVIEW.TOOLTIP.TITLE]:"{{date}} por {{username}}",[this.I18N_KEYS.REVIEW.TOOLTIP.DATE]:"Fecha de la valoración: {{date}} <br/>Fecha de experiencia: {{date}}",[this.I18N_KEYS.REVIEW.REPLY_FROM]:"Respuesta de {{replyFrom}}",[this.I18N_KEYS.REVIEW.SHOW_TRANSLATION]:"Mostrar traducción automática en {{language}}",[this.I18N_KEYS.REVIEW.SHOW_ORIGIN]:"Mostrar original en {{language}}",[this.I18N_KEYS.REVIEW_LIST.LOAD_MORE]:"Mostrar más",[this.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS]:"Ninguna otra valoración.",[this.I18N_KEYS.REVIEW_LIST.SHOW_LESS]:"Ver menos"},fr:{[this.I18N_KEYS.COMMON.LEGAL_TEXT]:'Rassemblés dans les <a target="_blank" href="https://policies.etrusted.com/FR/fr/tos.html" data-key-nav="{{dateKeyNav}}" tabindex="0">Conditions d’utilisation</a> de Trusted Shops',[this.I18N_KEYS.COMMON.LEGAL_TEXT2]:'<a target="_blank" href="https://help.etrusted.com/hc/fr/articles/23970864566162" data-key-nav="{{dateKeyNav}}" tabindex="0">À propos de l’authenticité des avis clients Trusted Shops.</a>',[this.I18N_KEYS.COMMON.VERIFIED_TOOLTIP]:'{{shopName}} a utilisé Trusted Shops pour collecter cet avis client. Cela signifie que nous pouvons vérifier que cet avis est fondé sur une expérience réelle. <a href="https://help.etrusted.com/hc/fr/articles/23970864566162-Pourquoi-les-avis-clients-publi%C3%A9s-par-Trusted-Shops-sont-ils-fiables" target="_blank" data-key-nav="{{dataKeyNav}}">En savoir plus sur l’authenticité des avis clients.</a>',[this.I18N_KEYS.FILTER.HEADER]:"Avis",[this.I18N_KEYS.FILTER.LABEL]:"Filtres",[this.I18N_KEYS.FILTER.REMOVE_FILTER]:"Réinitialisez",[this.I18N_KEYS.FILTER.HIDE_ARIA_LABEL]:"Masquer les options de filtre",[this.I18N_KEYS.FILTER.SHOW_ARIA_LABEL]:"Afficher les options de filtre",[this.I18N_KEYS.IMPORT
307ED.SHORT]:"Importé",[this.I18N_KEYS.IMPORTED.LONG]:"Avis importés:",[this.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT]:{zero:"Ce produit n’a pas encore été évalué.",one:"{{count}} avis",other:"{{count}} avis"},[this.I18N_KEYS.RATING.BAR_ARIA_LABEL]:"Bar de révision",[this.I18N_KEYS.RATING.STARS_TEXT]:"étoiles",[this.I18N_KEYS.RATING.TOTAL_RATING_ARIA_LABEL]:"Note de {{rating}} sur 5 étoiles",[this.I18N_KEYS.REVIEW.TOOLTIP.TITLE]:"{{date}} par le {{username}}",[this.I18N_KEYS.REVIEW.TOOLTIP.DATE]:"Date de l’avis : {{date}} <br/>Date de l’expérience : {{date}}",[this.I18N_KEYS.REVIEW.REPLY_FROM]:"Réponse de {{replyFrom}}",[this.I18N_KEYS.REVIEW.SHOW_TRANSLATION]:"Afficher la traduction automatique en {{language}}",[this.I18N_KEYS.REVIEW.SHOW_ORIGIN]:"Afficher l’original en {{language}}",[this.I18N_KEYS.REVIEW_LIST.LOAD_MORE]:"Afficher plus",[this.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS]:"Aucun autre avis.",[this.I18N_KEYS.REVIEW_LIST.SHOW_LESS]:"Voir moins"},nl:{[this.I18N_KEYS.COMMON.LEGAL_TEXT]:'Verzameld onder de Trusted Shops <a target="_blank" href="https://policies.etrusted.com/NL/nl/tos.html" data-key-nav="{{dateKeyNav}}" tabindex="0">Gebruiksvoorwaarden</a>',[this.I18N_KEYS.COMMON.LEGAL_TEXT2]:'<a target="_blank" href="https://help.etrusted.com/hc/nl/articles/23970864566162" data-key-nav="{{dateKeyNav}}" tabindex="0">Over de authenticiteit van beoordelingen van Trusted Shops.</a>',[this.I18N_KEYS.COMMON.VERIFIED_TOOLTIP]:'{{shopName}} heeft Trusted Shops gebruikt om deze klantenbeoordeling te verzamelen. Dit betekent dat we kunnen verifiëren dat deze beoordeling gebaseerd is op een daadwerkelijke ervaring. <a href="https://help.etrusted.com/hc/nl/articles/23970864566162-Maatregelen-ter-verificatie-van-beoordelingen-feedback" target="_blank" data-key-nav="{{dataKeyNav}}">Leer meer over de authenticiteit van klantenbeoordelingen.</a>',[this.I18N_KEYS.FILTER.HEADER]:"Beoordelingen",[this.I18N_KEYS.FILTER.LABEL]:"Filter",[this.I18N_KEYS.FILTER.REMOVE_FILTER]:"Resetten",[this.I18N_KEYS.FILTER.HIDE_ARIA_LABEL]:"Verberg filteropties",[this.I18N_KEYS.FILTER.SHOW_ARIA_LABEL]:"Toon filteropties",[this.I18N_KEYS.IMPORTED.SHORT]:"Geïmporteerd",[this.I18N_KEYS.IMPORTED.LONG]:"Geïmporteerde beoordelingen:",[this.I18N_KEYS.HEADER.TOTAL_REVIEW_COUNT]:{zero:"Dit product werd nog niet beoordeeld.",one:"{{count}} beoordeling",other:"{{count}} beoordelingen"},[this.I18N_KEYS.RATING.BAR_ARIA_LABEL]:"Bar beoordelen",[this.I18N_KEYS.RATING.STARS_TEXT]:"sterren",[this.I18N_KEYS.RATING.TOTAL_RATING_ARIA_LABEL]:"Sterrenbeoordeling van {{rating}} uit 5 sterren",[this.I18N_KEYS.REVIEW.TOOLTIP.TITLE]:"{{date}} door {{username}}",[this.I18N_KEYS.REVIEW.TOOLTIP.DATE]:"Datum van de beoordeling: {{date}} <br/>Datum van de ervaring: {{date}}",[this.I18N_KEYS.REVIEW.REPLY_FROM]:"Antwoord van {{replyFrom}}",[this.I18N_KEYS.REVIEW.SHOW_TRANSLATION]:"Automatische vertaling in {{language}} weergeven",[this.I18N_KEYS.REVIEW.SHOW_ORIGIN]:"Origineel in {{language}} weergeven",[this.I18N_KEYS.REVIEW_LIST.LOAD_MORE]:"Meer tonen",[this.I18N_KEYS.REVIEW_LIST.NO_MORE_REVIEWS]:"Geen andere beoordelingen.",[this.I18N_KEYS.REVIEW_LIST.SHOW_LESS]:"Minder bekijken"}}}}const Rl=new bl;Rl.inititialize();document.addEventListener("DOMContentLoaded",Nl);function Nl(){document.querySelectorAll("[data-tab-list]").forEach(e);function e(a){const l=a.querySelectorAll('input[type="radio"]'),c=i(l);n(c),l.forEach(d=>r(d,c))}function i(a){const l=[];return a.forEach(c=>{const d=c.dataset.panelTarget;if(!d)return;const g=document.getElementById(d);g&&l.push(g)}),l}function n(a){a.forEach(l=>s(l,!1))}function r(a,l){const c=l.find(d=>d.id===a.dataset.panelTarget);c&&(s(c,a.checked),a.addEventListener("change",()=>o(l,c,a.checked)))}function s(a,l){l?(a.classList.remove("hidden"),a.classList.add("block")):(a.classList.add("hidden"),a.classList.remove("block"))}function o(a,l,c){n(a),s(l,c)}}function Cl(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ol(t,e,i){return e&&Cl(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}/*!
308 * Splide.js
309 * Version  : 4.1.4
310 * License  : MIT
311 * Copyright: 2022 Naotoshi Fujita
312 */var Bn="(prefers-reduced-motion: reduce)",Ze=1,Dl=2,nt=3,st=4,_t=5,Ut=6,Qt=7,Pl={CREATED:Ze,MOUNTED:Dl,IDLE:nt,MOVING:st,SCROLLING:_t,DRAGGING:Ut,DESTROYED:Qt};function Te(t){t.length=0}function Fe(t,e,i){return Array.prototype.slice.call(t,e,i)}function U(t){return t.bind.apply(t,[null].concat(Fe(arguments,1
vendor: 4,463 bytes, line 312
312)))}var Nr=setTimeout,Pi=function(){};function Vn(t){return requestAnimationFrame(t)}function si(t,e){return typeof e===t}function vt(t){return!Qi(t)&&si("object",t)}var Ji=Array.isArray,Cr=U(si,"function"),Pe=U(si,"string"),Tt=U(si,"undefined");function Qi(t){return t===null}function Or(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Rt(t){return Ji(t)?t:[t]}function he(t,e){Rt(t).forEach(e)}function en(t,e){return t.indexOf(e)>-1}function $t(t,e){return t.push.apply(t,Rt(e)),t}function Ae(t,e,i){t&&he(e,function(n){n&&t.classList[i?"add":"remove"](n)})}function ye(t,e){Ae(t,Pe(e)?e.split(" "):e,!0)}function Nt(t,e){he(e,t.appendChild.bind(t))}function tn(t,e){he(t,function(i){var n=(e||i).parentNode;n&&n.insertBefore(i,e)})}function St(t,e){return Or(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Dr(t,e){var i=t?Fe(t.children):[];return e?i.filter(function(n){return St(n,e)}):i}function Ct(t,e){return e?Dr(t,e)[0]:t.firstElementChild}var yt=Object.keys;function Ye(t,e,i){return t&&(i?yt(t).reverse():yt(t)).forEach(function(n){n!=="__proto__"&&e(t[n],n)}),t}function bt(t){return Fe(arguments,1).forEach(function(e){Ye(e,function(i,n){t[n]=e[n]})}),t}function De(t){return Fe(arguments,1).forEach(function(e){Ye(e,function(i,n){Ji(i)?t[n]=i.slice():vt(i)?t[n]=De({},vt(t[n])?t[n]:{},i):t[n]=i})}),t}function Yn(t,e){he(e||yt(t),function(i){delete t[i]})}function be(t,e){he(t,function(i){he(e,function(n){i&&i.removeAttribute(n)})})}function Y(t,e,i){vt(e)?Ye(e,function(n,r){Y(t,r,n)}):he(t,function(n){Qi(i)||i===""?be(n,e):n.setAttribute(e,String(i))})}function Qe(t,e,i){var n=document.createElement(t);return e&&(Pe(e)?ye(n,e):Y(n,e)),i&&Nt(i,n),n}function ge(t,e,i){if(Tt(i))return getComputedStyle(t)[e];Qi(i)||(t.style[e]=""+i)}function Lt(t,e){ge(t,"display",e)}function Pr(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Ee(t,e){return t.getAttribute(e)}function Gn(t,e){return t&&t.classList.contains(e)}function ce(t){return t.getBoundingClientRect()}function We(t){he(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function kr(t){return Ct(new DOMParser().parseFromString(t,"text/html").body)}function Ie(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function xr(t,e){return t&&t.querySelector(e)}function nn(t,e){return e?Fe(t.querySelectorAll(e)):[]}function we(t,e){Ae(t,e,!1)}function ki(t){return t.timeStamp}function Be(t){return Pe(t)?t:t?t+"px":""}var Ot="splide",rn="data-"+Ot;function mt(t,e){if(!t)throw new Error("["+Ot+"] "+(e||""))}var ke=Math.min,ei=Math.max,ti=Math.floor,It=Math.ceil,se=Math.abs;function Fr(t,e,i){return se(t-e)<i}function Kt(t,e,i,n){var r=ke(e,i),s=ei(e,i);return n?r<t&&t<s:r<=t&&t<=s}function je(t,e,i){var n=ke(e,i),r=ei(e,i);return ke(ei(n,t),r)}function xi(t){return+(t>0)-+(t<0)}function Fi(t,e){return he(e,function(i){t=t.replace("%s",""+i)}),t}function sn(t){return t<10?"0"+t:""+t}var Hn={};function kl(t){return""+t+sn(Hn[t]=(Hn[t]||0)+1)}function Mr(){var t=[];function e(o,a,l,c){r(o,a,function(d,g,f){var E="addEventListener"in d,m=E?d.removeEventListener.bind(d,g,l,c):d.removeListener.bind(d,l);E?d.addEventListener(g,l,c):d.addListener(l),t.push([d,g,f,l,m])})}function i(o,a,l){r(o,a,function(c,d,g){t=t.filter(function(f){return f[0]===c&&f[1]===d&&f[2]===g&&(!l||f[3]===l)?(f[4](),!1):!0})})}function n(o,a,l){var c,d=!0;return typeof CustomEvent=="function"?c=new CustomEvent(a,{bubbles:d,detail:l}):(c=document.createEvent("CustomEvent"),c.initCustomEvent(a,d,!1,l)),o.dispatchEvent(c),c}function r(o,a,l){he(o,function(c){c&&he(a,function(d){d.split(" ").forEach(function(g){var f=g.split(".");l(c,f[0],f[1])})})})}function s(){t.forEach(function(o){o[4]()}),Te(t)}return{bind:e,unbind:i,dispatch:n,destroy:s}}var $e="mounted",Wn="ready",xe="move",Dt="moved",qr="click",xl="active",Fl="inactive",Ml="visible",ql="hidden",J="refresh",oe="updated",At="resize",on="resized",Bl="drag",Vl="dragging",Yl="dragged",an="scroll",ot="scrolled",Gl="overflow",Br="destroy",Hl="arrows:mounted",Wl="arrows:updated",Ul="pagination:mounted",$l="pagination:updated",Vr="navigation:mounted",Yr="autoplay:play",Kl="autoplay:playing",Gr="autoplay:pause",Hr="lazyload:loaded",Wr="sk",Ur="sh",ii="ei";function j(t){var e=t?t.event.bus:document.createDocumentFragment(),i=Mr();function n(s,o){i.bind(e,Rt(s).join(" "),function(a){o.apply(o,Ji(a.detail)?a.detail:[])})}
vendor: 4,142 bytes, line 312
312function r(s){i.dispatch(e,s,Fe(arguments,1))}return t&&t.event.on(Br,i.destroy),bt(i,{bus:e,on:n,off:U(i.unbind,e),emit:r})}function oi(t,e,i,n){var r=Date.now,s,o=0,a,l=!0,c=0;function d(){if(!l){if(o=t?ke((r()-s)/t,1):1,i&&i(o),o>=1&&(e(),s=r(),n&&++c>=n))return f();a=Vn(d)}}function g(S){S||m(),s=r()-(S?o*t:0),l=!1,a=Vn(d)}function f(){l=!0}function E(){s=r(),o=0,i&&i(o)}function m(){a&&cancelAnimationFrame(a),o=0,a=0,l=!0}function h(S){t=S}function p(){return l}return{start:g,rewind:E,pause:f,cancel:m,set:h,isPaused:p}}function zl(t){var e=t;function i(r){e=r}function n(r){return en(Rt(r),e)}return{set:i,is:n}}function jl(t,e){var i=oi(0,t,null,1);return function(){i.isPaused()&&i.start()}}function Xl(t,e,i){var n=t.state,r=i.breakpoints||{},s=i.reducedMotion||{},o=Mr(),a=[];function l(){var m=i.mediaQuery==="min";yt(r).sort(function(h,p){return m?+h-+p:+p-+h}).forEach(function(h){d(r[h],"("+(m?"min":"max")+"-width:"+h+"px)")}),d(s,Bn),g()}function c(m){m&&o.destroy()}function d(m,h){var p=matchMedia(h);o.bind(p,"change",g),a.push([m,p])}function g(){var m=n.is(Qt),h=i.direction,p=a.reduce(function(S,b){return De(S,b[1].matches?b[0]:{})},{});Yn(i),E(p),i.destroy?t.destroy(i.destroy==="completely"):m?(c(!0),t.mount()):h!==i.direction&&t.refresh()}function f(m){matchMedia(Bn).matches&&(m?De(i,s):Yn(i,yt(s)))}function E(m,h,p){De(i,m),h&&De(Object.getPrototypeOf(i),m),(p||!n.is(Ze))&&t.emit(oe,i)}return{setup:l,destroy:c,reduce:f,set:E}}var ai="Arrow",li=ai+"Left",ci=ai+"Right",$r=ai+"Up",Kr=ai+"Down",Un="rtl",di="ttb",Li={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[$r,ci],ArrowRight:[Kr,li]};function Zl(t,e,i){function n(s,o,a){a=a||i.direction;var l=a===Un&&!o?1:a===di?0:-1;return Li[s]&&Li[s][l]||s.replace(/width|left|right/i,function(c,d){var g=Li[c.toLowerCase()][l]||c;return d>0?g.charAt(0).toUpperCase()+g.slice(1):g})}function r(s){return s*(i.direction===Un?1:-1)}return{resolve:n,orient:r}}var _e="role",et="tabindex",Jl="disabled",pe="aria-",Pt=pe+"controls",zr=pe+"current",$n=pe+"selected",de=pe+"label",ln=pe+"labelledby",jr=pe+"hidden",cn=pe+"orientation",wt=pe+"roledescription",Kn=pe+"live",zn=pe+"busy",jn=pe+"atomic",dn=[_e,et,Jl,Pt,zr,de,ln,jr,cn,wt],Le=Ot+"__",Me="is-",Ii=Ot,Xn=Le+"track",Ql=Le+"list",ui=Le+"slide",Xr=ui+"--clone",ec=ui+"__container",un=Le+"arrows",hi=Le+"arrow",Zr=hi+"--prev",Jr=hi+"--next",fi=Le+"pagination",Qr=fi+"__page",tc=Le+"progress",ic=tc+"__bar",nc=Le+"toggle",rc=Le+"spinner",sc=Le+"sr",oc=Me+"initialized",Ue=Me+"active",es=Me+"prev",ts=Me+"next",Mi=Me+"visible",qi=Me+"loading",is=Me+"focus-in",ns=Me+"overflow",ac=[Ue,Mi,es,ts,qi,is,ns],lc={slide:ui,clone:Xr,arrows:un,arrow:hi,prev:Zr,next:Jr,pagination:fi,page:Qr,spinner:rc};function cc(t,e){if(Cr(t.closest))return t.closest(e);for(var i=t;i&&i.nodeType===1&&!St(i,e);)i=i.parentElement;return i}var dc=5,Zn=200,rs="touchstart mousedown",Ai="touchmove mousemove",wi="touchend touchcancel mouseup click";function uc(t,e,i){var n=j(t),r=n.on,s=n.bind,o=t.root,a=i.i18n,l={},c=[],d=[],g=[],f,E,m;function h(){y(),k(),b()}function p(){r(J,S),r(J,h),r(oe,b),s(document,rs+" keydown",function(L){m=L.type==="keydown"},{capture:!0}),s(o,"focusin",function(){Ae(o,is,!!m)})}function S(L){var D=dn.concat("style");Te(c),we(o,d),we(f,g),be([f,E],D),be(o,L?D:["style",wt])}function b(){we(o,d),we(f,g),d=q(Ii),g=q(Xn),ye(o,d),ye(f,g),Y(o,de,i.label),Y(o,ln,i.labelledby)}function y(){f=O("."+Xn),E=Ct(f,"."+Ql),mt(f&&E,"A track/list element is missing."),$t(c,Dr(E,"."+ui+":not(."+Xr+")")),Ye({arrows:un,pagination:fi,prev:Zr,next:Jr,bar:ic,toggle:nc},function(L,D){l[D]=O("."+L)}),bt(l,{root:o,track:f,list:E,slides:c})}function k(){var L=o.id||kl(Ot),D=i.role;o.id=L,f.id=f.id||L+"-track",E.id=E.id||L+"-list",!Ee(o,_e)&&o.tagName!=="SECTION"&&D&&Y(o,_e,D),Y(o,wt,a.carousel),Y(E,_e,"presentation")}function O(L){var D=xr(o,L);return D&&cc(D,"."+Ii)===o?D:void 0}function q(L){return[L+"--"+i.type,L+"--"+i.direction,i.drag&&L+"--draggable",i.isNavigation&&L+"--nav",L===Ii&&Ue]}return bt(l,{setup:h,mount:p,destroy:S})}var rt="slide",at="loop",kt="fade";
vendor: 16,545 bytes, line 312
312function hc(t,e,i,n){var r=j(t),s=r.on,o=r.emit,a=r.bind,l=t.Components,c=t.root,d=t.options,g=d.isNavigation,f=d.updateOnMove,E=d.i18n,m=d.pagination,h=d.slideFocus,p=l.Direction.resolve,S=Ee(n,"style"),b=Ee(n,de),y=i>-1,k=Ct(n,"."+ec),O;function q(){y||(n.id=c.id+"-slide"+sn(e+1),Y(n,_e,m?"tabpanel":"group"),Y(n,wt,E.slide),Y(n,de,b||Fi(E.slideLabel,[e+1,t.length]))),L()}function L(){a(n,"click",U(o,qr,C)),a(n,"keydown",U(o,Wr,C)),s([Dt,Ur,ot],_),s(Vr,V),f&&s(xe,M)}function D(){O=!0,r.destroy(),we(n,ac),be(n,dn),Y(n,"style",S),Y(n,de,b||"")}function V(){var R=t.splides.map(function(I){var x=I.splide.Components.Slides.getAt(e);return x?x.slide.id:""}).join(" ");Y(n,de,Fi(E.slideX,(y?i:e)+1)),Y(n,Pt,R),Y(n,_e,h?"button":""),h&&be(n,wt)}function M(){O||_()}function _(){if(!O){var R=t.index;N(),v(),Ae(n,es,e===R-1),Ae(n,ts,e===R+1)}}function N(){var R=A();R!==Gn(n,Ue)&&(Ae(n,Ue,R),Y(n,zr,g&&R||""),o(R?xl:Fl,C))}function v(){var R=B(),I=!R&&(!A()||y);if(t.state.is([st,_t])||Y(n,jr,I||""),Y(nn(n,d.focusableNodes||""),et,I?-1:""),h&&Y(n,et,I?-1:0),R!==Gn(n,Mi)&&(Ae(n,Mi,R),o(R?Ml:ql,C)),!R&&document.activeElement===n){var x=l.Slides.getAt(t.index);x&&Pr(x.slide)}}function w(R,I,x){ge(x&&k||n,R,I)}function A(){var R=t.index;return R===e||d.cloneStatus&&R===i}function B(){if(t.is(kt))return A();var R=ce(l.Elements.track),I=ce(n),x=p("left",!0),H=p("right",!0);return ti(R[x])<=It(I[x])&&ti(I[H])<=It(R[H])}function F(R,I){var x=se(R-e);return!y&&(d.rewind||t.is(at))&&(x=ke(x,t.length-x)),x<=I}var C={index:e,slideIndex:i,slide:n,container:k,isClone:y,mount:q,destroy:D,update:_,style:w,isWithin:F};return C}function fc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=n.bind,a=e.Elements,l=a.slides,c=a.list,d=[];function g(){f(),r(J,E),r(J,f)}function f(){l.forEach(function(_,N){h(_,N,-1)})}function E(){O(function(_){_.destroy()}),Te(d)}function m(){O(function(_){_.update()})}function h(_,N,v){var w=hc(t,N,v,_);w.mount(),d.push(w),d.sort(function(A,B){return A.index-B.index})}function p(_){return _?q(function(N){return!N.isClone}):d}function S(_){var N=e.Controller,v=N.toIndex(_),w=N.hasFocus()?1:i.perPage;return q(function(A){return Kt(A.index,v,v+w-1)})}function b(_){return q(_)[0]}function y(_,N){he(_,function(v){if(Pe(v)&&(v=kr(v)),Or(v)){var w=l[N];w?tn(v,w):Nt(c,v),ye(v,i.classes.slide),D(v,U(s,At))}}),s(J)}function k(_){We(q(_).map(function(N){return N.slide})),s(J)}function O(_,N){p(N).forEach(_)}function q(_){return d.filter(Cr(_)?_:function(N){return Pe(_)?St(N.slide,_):en(Rt(_),N.index)})}function L(_,N,v){O(function(w){w.style(_,N,v)})}function D(_,N){var v=nn(_,"img"),w=v.length;w?v.forEach(function(A){o(A,"load error",function(){--w||N()})}):N()}function V(_){return _?l.length:d.length}function M(){return d.length>i.perPage}return{mount:g,destroy:E,update:m,register:h,get:p,getIn:S,getAt:b,add:y,remove:k,forEach:O,filter:q,style:L,getLength:V,isEnough:M}}function mc(t,e,i){var n=j(t),r=n.on,s=n.bind,o=n.emit,a=e.Slides,l=e.Direction.resolve,c=e.Elements,d=c.root,g=c.track,f=c.list,E=a.getAt,m=a.style,h,p,S;function b(){y(),s(window,"resize load",jl(U(o,At))),r([oe,J],y),r(At,k)}function y(){h=i.direction===di,ge(d,"maxWidth",Be(i.width)),ge(g,l("paddingLeft"),O(!1)),ge(g,l("paddingRight"),O(!0)),k(!0)}function k(C){var R=ce(d);(C||p.width!==R.width||p.height!==R.height)&&(ge(g,"height",q()),m(l("marginRight"),Be(i.gap)),m("width",D()),m("height",V(),!0),p=R,o(on),S!==(S=F())&&(Ae(d,ns,S),o(Gl,S)))}function O(C){var R=i.padding,I=l(C?"right":"left");return R&&Be(R[I]||(vt(R)?0:R))||"0px"}function q(){var C="";return h&&(C=L(),mt(C,"height or heightRatio is missing."),C="calc("+C+" - "+O(!1)+" - "+O(!0)+")"),C}function L(){return Be(i.height||ce(f).width*i.heightRatio)}function D(){return i.autoWidth?null:Be(i.fixedWidth)||(h?"":M())}function V(){return Be(i.fixedHeight)||(h?i.autoHeight?null:M():L())}function M(){var C=Be(i.gap);return"calc((100%"+(C&&" + "+C)+")/"+(i.perPage||1)+(C&&" - "+C)+")"}function _(){return ce(f)[l("width")]}function N(C,R){var I=E(C||0);return I?ce(I.slide)[l("width")]+(R?0:A()):0}function v(C,R){var I=E(C);if(I){var x=ce(I.slide)[l("right")],H=ce(f)[l("left")];return se(x-H)+(R?0:A())}return 0}function w(C){return v(t.length-1)-v(0)+N(0,C)}function A(){var C=E(0);return C&&parseFloat(ge(C.slide,l("marginRight")))||0}function B(C){return parseFloat(ge(g,l("padding"+(C?"Right":"Left"))))||0}function F(){return t.is(kt)||w(!0)>_()}return{mount:b,resize:k,listSize:_,slideSize:N,sliderSize:w,totalSize:v,getPadding:B,isOverflow:F}}var gc=2;function Ec(t,e,i){var n=j(t),r=n.on,s=e.Elements,o=e.Slides,a=e.Direction.resolve,l=[],c;function d(){r(J,g),r([oe,At],E),(c=p())&&(m(c),e.Layout.resize(!0))}function g(){f(),d()}function f(){We(l),Te(l),n.destroy()}function E(){var S=p();c!==S&&(c<S||!S)&&n.emit(J)}function m(S){var b=o.get().slice(),y=b.length;if(y){for(;b.length<S;)$t(b,b);$t(b.slice(-S),b.slice(0,S)).forEach(function(k,O){var q=O<S,L=h(k.slide,O);q?tn(L,b[0].slide):Nt(s.list,L),$t(l,L),o.register(L,O-S+(q?0:y),k.index)})}}function h(S,b){var y=S.cloneNode(!0);return ye(y,i.classes.clone),y.id=t.root.id+"-clone"+sn(b+1),y}function p(){var S=i.clones;if(!t.is(at))S=0;else if(Tt(S)){var b=i[a("fixedWidth")]&&e.Layout.slideSize(0),y=b&&It(ce(s.track)[a("width")]/b);S=y||i[a("autoWidth")]&&t.length||i.perPage*gc}return S}return{mount:d,destroy:f}}function pc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=t.state.set,a=e.Layout,l=a.slideSize,c=a.getPadding,d=a.totalSize,g=a.listSize,f=a.sliderSize,E=e.Direction,m=E.resolve,h=E.orient,p=e.Elements,S=p.list,b=p.track,y;function k(){y=e.Transition,r([$e,on,oe,J],O)}function O(){e.Controller.isBusy()||(e.Scroll.cancel(),L(t.index),e.Slides.update())}function q(I,x,H,ie){I!==x&&C(I>H)&&(_(),D(M(w(),I>H),!0)),o(st),s(xe,x,H,I),y.start(x,function(){o(nt),s(Dt,x,H,I),ie&&ie()})}function L(I){D(v(I,!0))}function D(I,x){if(!t.is(kt)){var H=x?I:V(I);ge(S,"transform","translate"+m("X")+"("+H+"px)"),I!==H&&s(Ur)}}function V(I){if(t.is(at)){var x=N(I),H=x>e.Controller.getEnd(),ie=x<0;(ie||H)&&(I=M(I,H))}return I}function M(I,x){var H=I-F(x),ie=f();return I-=h(ie*(It(se(H)/ie)||1))*(x?1:-1),I}function _(){D(w(),!0),y.cancel()}function N(I){for(var x=e.Slides.get(),H=0,ie=1/0,ee=0;ee<x.length;ee++){var Re=x[ee].index,T=se(v(Re,!0)-I);if(T<=ie)ie=T,H=Re;else break}return H}function v(I,x){var H=h(d(I-1)-B(I));return x?A(H):H}function w(){var I=m("left");return ce(S)[I]-ce(b)[I]+h(c(!1))}function A(I){return i.trimSpace&&t.is(rt)&&(I=je(I,0,h(f(!0)-g()))),I}function B(I){var x=i.focus;return x==="center"?(g()-l(I,!0))/2:+x*l(I)||0}function F(I){return v(I?e.Controller.getEnd():0,!!i.trimSpace)}function C(I){var x=h(M(w(),I));return I?x>=0:x<=S[m("scrollWidth")]-ce(b)[m("width")]}function R(I,x){x=Tt(x)?w():x;var H=I!==!0&&h(x)<h(F(!1)),ie=I!==!1&&h(x)>h(F(!0));return H||ie}return{mount:k,move:q,jump:L,translate:D,shift:M,cancel:_,toIndex:N,toPosition:v,getPosition:w,getLimit:F,exceededLimit:R,reposition:O}}function vc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=e.Move,a=o.getPosition,l=o.getLimit,c=o.toPosition,d=e.Slides,g=d.isEnough,f=d.getLength,E=i.omitEnd,m=t.is(at),h=t.is(rt),p=U(w,!1),S=U(w,!0),b=i.start||0,y,k=b,O,q,L;function D(){V(),r([oe,J,ii],V),r(on,M)}function V(){O=f(!0),q=i.perMove,L=i.perPage,y=C();var T=je(b,0,E?y:O-1);T!==b&&(b=T,o.reposition())}function M(){y!==C()&&s(ii)}function _(T,W,re){if(!Re()){var Z=v(T),ne=F(Z);ne>-1&&(W||ne!==b)&&(H(ne),o.move(Z,ne,k,re))}}function N(T,W,re,Z){e.Scroll.scroll(T,W,re,function(){var ne=F(o.toIndex(a()));H(E?ke(ne,y):ne),Z&&Z()})}function v(T){var W=b;if(Pe(T)){var re=T.match(/([+\-<>])(\d+)?/)||[],Z=re[1],ne=re[2];Z==="+"||Z==="-"?W=A(b+ +(""+Z+(+ne||1)),b):Z===">"?W=ne?R(+ne):p(!0):Z==="<"&&(W=S(!0))}else W=m?T:je(T,0,y);return W}function w(T,W){var re=q||(ee()?1:L),Z=A(b+re*(T?-1:1),b,!(q||ee()));return Z===-1&&h&&!Fr(a(),l(!T),1)?T?0:y:W?Z:F(Z)}function A(T,W,re){if(g()||ee()){var Z=B(T);Z!==T&&(W=T,T=Z,re=!1),T<0||T>y?!q&&(Kt(0,T,W,!0)||Kt(y,W,T,!0))?T=R(I(T)):m?T=re?T<0?-(O%L||L):O:T:i.rewind?T=T<0?y:0:T=-1:re&&T!==W&&(T=R(I(W)+(T<W?-1:1)))}else T=-1;return T}function B(T){if(h&&i.trimSpace==="move"&&T!==b)for(var W=a();W===c(T,!0)&&Kt(T,0,t.length-1,!i.rewind);)T<b?--T:++T;return T}function F(T){return m?(T+O)%O||0:T}function C(){for(var T=O-(ee()||m&&q?1:L);E&&T-- >0;)if(c(O-1,!0)!==c(T,!0)){T++;break}return je(T,0,O-1)}function R(T){return je(ee()?T:L*T,0,y)}function I(T){return ee()?ke(T,y):ti((T>=y?O-1:T)/L)}function x(T){var W=o.toIndex(T);return h?je(W,0,y):W}function H(T){T!==b&&(k=b,b=T)}function ie(T){return T?k:b}function ee(){return!Tt(i.focus)||i.isNavigation}function Re(){return t.state.is([st,_t])&&!!i.waitForTransition}return{mount:D,go:_,scroll:N,getNext:p,getPrev:S,getAdjacent:w,getEnd:C,setIndex:H,getIndex:ie,toIndex:R,toPage:I,toDest:x,hasFocus:ee,isBusy:Re}}var Sc="http://www.w3.org/2000/svg",yc="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",Yt=40;function bc(t,e,i){var n=j(t),r=n.on,s=n.bind,o=n.emit,a=i.classes,l=i.i18n,c=e.Elements,d=e.Controller,g=c.arrows,f=c.track,E=g,m=c.prev,h=c.next,p,S,b={};function y(){O(),r(oe,k)}function k(){q(),y()}function O(){var N=i.arrows;N&&!(m&&h)&&V(),m&&h&&(bt(b,{prev:m,next:h}),Lt(E,N?"":"none"),ye(E,S=un+"--"+i.direction),N&&(L(),_(),Y([m,h],Pt,f.id),o(Hl,m,h)))}function q(){n.destroy(),we(E,S),p?(We(g?[m,h]:E),m=h=null):be([m,h],dn)}function L(){r([$e,Dt,J,ot,ii],_),s(h,"click",U(D,">")),s(m,"click",U(D,"<"))}function D(N){d.go(N,!0)}function V(){E=g||Qe("div",a.arrows),m=M(!0),h=M(!1),p=!0,Nt(E,[m,h]),!g&&tn(E,f)}function M(N){var v='<button class="'+a.arrow+" "+(N?a.prev:a.next)+'" type="button"><svg xmlns="'+Sc+'" viewBox="0 0 '+Yt+" "+Yt+'" width="'+Yt+'" height="'+Yt+'" focusable="false"><path d="'+(i.arrowPath||yc)+'" />';return kr(v)}function _(){if(m&&h){var N=t.index,v=d.getPrev(),w=d.getNext(),A=v>-1&&N<v?l.last:l.prev,B=w>-1&&N>w?l.first:l.next;m.disabled=v<0,h.disabled=w<0,Y(m,de,A),Y(h,de,B),o(Wl,m,h,v,w)}}return{arrows:b,mount:y,destroy:q,update:_}}var Lc=rn+"-interval";function Ic(t,e,i){var n=j(t),r=n.on,s=n.bind,o=n.emit,a=oi(i.interval,t.go.bind(t,">"),L),l=a.isPaused,c=e.Elements,d=e.Elements,g=d.root,f=d.toggle,E=i.autoplay,m,h,p=E==="pause";function S(){E&&(b(),f&&Y(f,Pt,c.track.id),p||y(),q())}function b(){i.pauseOnHover&&s(g,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",O()}),i.pauseOnFocus&&s(g,"focusin focusout",function(V){h=V.type==="focusin",O()}),f&&s(f,"click",function(){p?y():k(!0)}),r([xe,an,J],a.rewind),r(xe,D)}function y(){l()&&e.Slides.isEnough()&&(a.start(!i.resetProgress),h=m=p=!1,q(),o(Yr))}function k(V){V===void 0&&(V=!0),p=!!V,q(),l()||(a.pause(),o(Gr))}function O(){p||(m||h?k(!1):y())}function q(){f&&(Ae(f,Ue,!p),Y(f,de,i.i18n[p?"play":"pause"]))}function L(V){var M=c.bar;M&&ge(M,"width",V*100+"%"),o(Kl,V)}function D(V){var M=e.Slides.getAt(V);a.set(M&&+Ee(M.slide,Lc)||i.interval)}return{mount:S,destroy:a.cancel,play:y,pause:k,isPaused:l}}function Ac(t,e,i){var n=j(t),r=n.on;function s(){i.cover&&(r(Hr,U(a,!0)),r([$e,oe,J],U(o,!0)))}function o(l){e.Slides.forEach(function(c){var d=Ct(c.container||c.slide,"img");d&&d.src&&a(l,d,c)})}function a(l,c,d){d.style("background",l?'center/cover no-repeat url("'+c.src+'")':"",!0),Lt(c,l?"none":"")}return{mount:s,destroy:U(o,!1)}}var wc=10,_c=600,Tc=.6,Rc=1.5,Nc=800;function Cc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=t.state.set,a=e.Move,l=a.getPosition,c=a.getLimit,d=a.exceededLimit,g=a.translate,f=t.is(rt),E,m,h=1;function p(){r(xe,k),r([oe,J],O)}function S(L,D,V,M,_){var N=l();if(k(),V&&(!f||!d())){var v=e.Layout.sliderSize(),w=xi(L)*v*ti(se(L)/v)||0;L=a.toPosition(e.Controller.toDest(L%v))+w}var A=Fr(N,L,1);h=1,D=A?0:D||ei(se(L-N)/Rc,Nc),m=M,E=oi(D,b,U(y,N,L,_),1),o(_t),s(an),E.start()}function b(){o(nt),m&&m(),s(ot)}function y(L,D,V,M){var _=l(),N=L+(D-L)*q(M),v=(N-_)*h;g(_+v),f&&!V&&d()&&(h*=Tc,se(v)<wc&&S(c(d(!0)),_c,!1,m,!0))}function k(){E&&E.cancel()}function O(){E&&!E.isPaused()&&(k(),b())}function q(L){var D=i.easingFunc;return D?D(L):1-Math.pow(1-L,4)}return{mount:p,destroy:k,scroll:S,cancel:O}}var Xe={passive:!1,capture:!0};function Oc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=n.bind,a=n.unbind,l=t.state,c=e.Move,d=e.Scroll,g=e.Controller,f=e.Elements.track,E=e.Media.reduce,m=e.Direction,h=m.resolve,p=m.orient,S=c.getPosition,b=c.exceededLimit,y,k,O,q,L,D=!1,V,M,_;function N(){o(f,Ai,Pi,Xe),o(f,wi,Pi,Xe),o(f,rs,w,Xe),o(f,"click",F,{capture:!0}),o(f,"dragstart",Ie),r([$e,oe],v)}function v(){var P=i.drag;gn(!P),q=P==="free"}function w(P){if(V=!1,!M){var K=ne(P);Z(P.target)&&(K||!P.button)&&(g.isBusy()?Ie(P,!0):(_=K?f:window,L=l.is([st,_t]),O=null,o(_,Ai,A,Xe),o(_,wi,B,Xe),c.cancel(),d.cancel(),C(P)))}}function A(P){if(l.is(Ut)||(l.set(Ut),s(Bl)),P.cancelable)if(L){c.translate(y+re(ee(P)));var K=Re(P)>Zn,qe=D!==(D=b());(K||qe)&&C(P),V=!0,s(Vl),Ie(P)}else x(P)&&(L=I(P),Ie(P))}function B(P){l.is(Ut)&&(l.set(nt),s(Yl)),L&&(R(P),Ie(P)),a(_,Ai,A),a(_,wi,B),L=!1}function F(P){!M&&V&&Ie(P,!0)}function C(P){O=k,k=P,y=S()}function R(P){var K=H(P),qe=ie(K),lt=i.rewind&&i.rewindByDrag;E(!1),q?g.scroll(qe,0,i.snap):t.is(kt)?g.go(p(xi(K))<0?lt?"<":"-":lt?">":"+"):t.is(rt)&&D&&lt?g.go(b(!0)?">":"<"):g.go(g.toDest(qe),!0),E(!0)}function I(P){var K=i.dragMinThreshold,qe=vt(K),lt=qe&&K.mouse||0,os=(qe?K.touch:+K)||10;return se(ee(P))>(ne(P)?os:lt)}function x(P){return se(ee(P))>se(ee(P,!0))}function H(P){if(t.is(at)||!D){var K=Re(P);if(K&&K<Zn)return ee(P)/K}return 0}function ie(P){return S()+xi(P)*ke(se(P)*(i.flickPower||600),q?1/0:e.Layout.listSize()*(i.flickMaxPages||1))}function ee(P,K){return W(P,K)-W(T(P),K)}function Re(P){return ki(P)-ki(T(P))}function T(P){return k===P&&O||k}function W(P,K){return(ne(P)?P.changedTouches[0]:P)["page"+h(K?"Y":"X")]}function re(P){return P/(D&&t.is(rt)?dc:1)}function Z(P){var K=i.noDrag;return!St(P,"."+Qr+", ."+hi)&&(!K||!St(P,K))}function ne(P){return typeof TouchEvent<"u"&&P instanceof TouchEvent}function ss(){return L}function gn(P){M=P}return{mount:N,disable:gn,isDragging:ss}}var Dc={Spacebar:" ",Right:ci,Left:li,Up:$r,Down:Kr};function hn(t){return t=Pe(t)?t:t.key,Dc[t]||t}var Jn="keydown";function Pc(t,e,i){var n=j(t),r=n.on,s=n.bind,o=n.unbind,a=t.root,l=e.Direction.resolve,c,d;function g(){f(),r(oe,E),r(oe,f),r(xe,h)}function f(){var S=i.keyboard;S&&(c=S==="global"?window:a,s(c,Jn,p))}function E(){o(c,Jn)}function m(S){d=S}function h(){var S=d;d=!0,Nr(function(){d=S})}function p(S){if(!d){var b=hn(S);b===l(li)?t.go("<"):b===l(ci)&&t.go(">")}}return{mount:g,destroy:E,disable:m}}var gt=rn+"-lazy",zt=gt+"-srcset",kc="["+gt+"], ["+zt+"]";function xc(t,e,i){var n=j(t),r=n.on,s=n.off,o=n.bind,a=n.emit,l=i.lazyLoad==="sequential",c=[Dt,ot],d=[];function g(){i.lazyLoad&&(f(),r(J,f))}function f(){Te(d),E(),l?S():(s(c),r(c,m),m())}function E(){e.Slides.forEach(function(b){nn(b.slide,kc).forEach(function(y){var k=Ee(y,gt),O=Ee(y,zt);if(k!==y.src||O!==y.srcset){var q=i.classes.spinner,L=y.parentElement,D=Ct(L,"."+q)||Qe("span",q,L);d.push([y,b,D]),y.src||Lt(y,"none")}})})}function m(){d=d.filter(function(b){var y=i.perPage*((i.preloadPages||1)+1)-1;return b[1].isWithin(t.index,y)?h(b):!0}),d.length||s(c)}function h(b){var y=b[0];ye(b[1].slide,qi),o(y,"load error",U(p,b)),Y(y,"src",Ee(y,gt)),Y(y,"srcset",Ee(y,zt)),be(y,gt),be(y,zt)}function p(b,y){var k=b[0],O=b[1];we(O.slide,qi),y.type!=="error"&&(We(b[2]),Lt(k,""),a(Hr,k,O),a(At)),l&&S()}function S(){d.length&&h(d.shift())}return{mount:g,destroy:U(Te,d),check:m}}function Fc(t,e,i){var n=j(t),r=n.on,s=n.emit,o=n.bind,a=e.Slides,l=e.Elements,c=e.Controller,d=c.hasFocus,g=c.getIndex,f=c.go,E=e.Direction.resolve,m=l.pagination,h=[],p,S;function b(){y(),r([oe,J,ii],b);var M=i.pagination;m&&Lt(m,M?"":"none"),M&&(r([xe,an,ot],V),k(),V(),s(Ul,{list:p,items:h},D(t.index)))}function y(){p&&(We(m?Fe(p.children):p),we(p,S),Te(h),p=null),n.destroy()}function k(){var M=t.length,_=i.classes,N=i.i18n,v=i.perPage,w=d()?c.getEnd()+1:It(M/v);p=m||Qe("ul",_.pagination,l.track.parentElement),ye(p,S=fi+"--"+L()),Y(p,_e,"tablist"),Y(p,de,N.select),Y(p,cn,L()===di?"vertical":"");for(var A=0;A<w;A++){var B=Qe("li",null,p),F=Qe("button",{class:_.page,type:"button"},B),C=a.getIn(A).map(function(I){return I.slide.id}),R=!d()&&v>1?N.pageX:N.slideX;o(F,"click",U(O,A)),i.paginationKeyboard&&o(F,"keydown",U(q,A)),Y(B,_e,"presentation"),Y(F,_e,"tab"),Y(F,Pt,C.join(" ")),Y(F,de,Fi(R,A+1)),Y(F,et,-1),h.push({li:B,button:F,page:A})}}function O(M){f(">"+M,!0)}function q(M,_){var N=h.length,v=hn(_),w=L(),A=-1;
vendor: 4,311 bytes, line 312
312v===E(ci,!1,w)?A=++M%N:v===E(li,!1,w)?A=(--M+N)%N:v==="Home"?A=0:v==="End"&&(A=N-1);var B=h[A];B&&(Pr(B.button),f(">"+A),Ie(_,!0))}function L(){return i.paginationDirection||i.direction}function D(M){return h[c.toPage(M)]}function V(){var M=D(g(!0)),_=D(g());if(M){var N=M.button;we(N,Ue),be(N,$n),Y(N,et,-1)}if(_){var v=_.button;ye(v,Ue),Y(v,$n,!0),Y(v,et,"")}s($l,{list:p,items:h},M,_)}return{items:h,mount:b,destroy:y,getAt:D,update:V}}var Mc=[" ","Enter"];function qc(t,e,i){var n=i.isNavigation,r=i.slideFocus,s=[];function o(){t.splides.forEach(function(m){m.isParent||(c(t,m.splide),c(m.splide,t))}),n&&d()}function a(){s.forEach(function(m){m.destroy()}),Te(s)}function l(){a(),o()}function c(m,h){var p=j(m);p.on(xe,function(S,b,y){h.go(h.is(at)?y:S)}),s.push(p)}function d(){var m=j(t),h=m.on;h(qr,f),h(Wr,E),h([$e,oe],g),s.push(m),m.emit(Vr,t.splides)}function g(){Y(e.Elements.list,cn,i.direction===di?"vertical":"")}function f(m){t.go(m.index)}function E(m,h){en(Mc,hn(h))&&(f(m),Ie(h))}return{setup:U(e.Media.set,{slideFocus:Tt(r)?n:r},!0),mount:o,destroy:a,remount:l}}function Bc(t,e,i){var n=j(t),r=n.bind,s=0;function o(){i.wheel&&r(e.Elements.track,"wheel",a,Xe)}function a(c){if(c.cancelable){var d=c.deltaY,g=d<0,f=ki(c),E=i.wheelMinThreshold||0,m=i.wheelSleep||0;se(d)>E&&f-s>m&&(t.go(g?"<":">"),s=f),l(g)&&Ie(c)}}function l(c){return!i.releaseWheel||t.state.is(st)||e.Controller.getAdjacent(c)!==-1}return{mount:o}}var Vc=90;function Yc(t,e,i){var n=j(t),r=n.on,s=e.Elements.track,o=i.live&&!i.isNavigation,a=Qe("span",sc),l=oi(Vc,U(d,!1));function c(){o&&(f(!e.Autoplay.isPaused()),Y(s,jn,!0),a.textContent="…",r(Yr,U(f,!0)),r(Gr,U(f,!1)),r([Dt,ot],U(d,!0)))}function d(E){Y(s,zn,E),E?(Nt(s,a),l.start()):(We(a),l.cancel())}function g(){be(s,[Kn,jn,zn]),We(a)}function f(E){o&&Y(s,Kn,E?"off":"polite")}return{mount:c,disable:f,destroy:g}}var Gc=Object.freeze({__proto__:null,Media:Xl,Direction:Zl,Elements:uc,Slides:fc,Layout:mc,Clones:Ec,Move:pc,Controller:vc,Arrows:bc,Autoplay:Ic,Cover:Ac,Scroll:Cc,Drag:Oc,Keyboard:Pc,LazyLoad:xc,Pagination:Fc,Sync:qc,Wheel:Bc,Live:Yc}),Hc={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},Wc={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:lc,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Uc(t,e,i){var n=e.Slides;function r(){j(t).on([$e,J],s)}function s(){n.forEach(function(a){a.style("transform","translateX(-"+100*a.index+"%)")})}function o(a,l){n.style("transition","opacity "+i.speed+"ms "+i.easing),Nr(l)}return{mount:r,start:o,cancel:Pi}}function $c(t,e,i){var n=e.Move,r=e.Controller,s=e.Scroll,o=e.Elements.list,a=U(ge,o,"transition"),l;function c(){j(t).bind(o,"transitionend",function(E){E.target===o&&l&&(g(),l())})}function d(E,m){var h=n.toPosition(E,!0),p=n.getPosition(),S=f(E);se(h-p)>=1&&S>=1?i.useScroll?s.scroll(h,S,!1,m):(a("transform "+S+"ms "+i.easing),n.translate(h,!0),l=m):(n.jump(E),m())}function g(){a(""),s.cancel()}function f(E){var m=i.rewindSpeed;if(t.is(rt)&&m){var h=r.getIndex(!0),p=r.getEnd();if(h===0&&E>=p||h>=p&&E===0)return m}return i.speed}return{mount:c,start:d,cancel:g}}var Kc=function(){function t(i,n){this.event=j(),this.Components={},this.state=zl(Ze),this.splides=[],this._o={},this._E={};var r=Pe(i)?xr(document,i):i;mt(r,r+" is invalid."),this.root=r,n=De({label:Ee(r,de)||"",labelledby:Ee(r,ln)||""},Wc,t.defaults,n||{});try{De(n,JSON.parse(Ee(r,rn)))}catch{mt(!1,"Invalid JSON")}this._o=Object.create(De({},n))}var e=t.prototype;return e.mount=function(n,r){var s=this,o=this.state,a=this.Components;mt(o.is([Ze,Qt]),"Already mounted!"),o.set(Ze),this._C=a,this._T=r||this._T||(this.is(kt)?Uc:$c),this._E=n||this._E;var l=bt({},Gc,this._E,{Transition:this._T});return Ye(l,function(c,d){var g=c(s,a,s._o);a[d]=g,g.setup&&g.setup()}),Ye(a,function(c){c.mount&&c.mount()}
312),this.emit($e),ye(this.root,oc),o.set(nt),this.emit(Wn),this},e.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(nt)&&(this._C.Sync.remount(),n.Components.Sync.remount()),this},e.go=function(n){return this._C.Controller.go(n),this},e.on=function(n,r){return this.event.on(n,r),this},e.off=function(n){return this.event.off(n),this},e.emit=function(n){var r;return(r=this.event).emit.apply(r,[n].concat(Fe(arguments,1))),this},e.add=function(n,r){return this._C.Slides.add(n,r),this},e.remove=function(n){return this._C.Slides.remove(n),this},e.is=function(n){return this._o.type===n},e.refresh=function(){return this.emit(J),this},e.destroy=function(n){n===void 0&&(n=!0);var r=this.event,s=this.state;return s.is(Ze)?j(this).on(Wn,this.destroy.bind(this,n)):(Ye(this._C,function(o){o.destroy&&o.destroy(n)},!0),r.emit(Br),r.destroy(),n&&Te(this.splides),s.set(Qt)),this},Ol(t,[{key:"options",get:function(){return this._o},set:function(n){this._C.Media.set(n,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t}(),Et=Kc;Et.defaults={};Et.STATES=Pl;class zc{pdaGallery(){if(document.querySelector("#pda-gallery-thumbnails")&&document.querySelector("#pda-gallery-hero")&&document.querySelector("#gallery-storage")){const e=document.querySelector(".pda-gallery")?.getAttribute("data-variant")||"",i=[].slice.call(document.querySelectorAll("#pda-gallery-thumbnails li"));i.forEach(function(o,a){i.length<=1&&(document.querySelector("#pda-gallery-thumbnails").style.display="none",document.querySelector("#pda-gallery-hero").classList.add("no-border")),o.dataset.index=a.toString()});const n=new Et("#pda-gallery-hero",{type:"fade",rewind:!1,pagination:window.innerWidth<992&&e!=="b",drag:window.innerWidth<992,arrows:e==="c",arrowPath:"M36.5,18.9c0-.3-.3-.7-.6-1L22,3.9c-.3-.3-.6-.4-1-.6-.3-.1-.7-.3-1.1-.3-.7,0-1.4.3-2,.8-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1,0,.7.3,1.4.8,2l9.2,9.2H5.9c-.7,0-1.4.3-2,.8s-.8,1.3-.8,2,.3,1.4.8,2,1.3.8,2,.8h21.2l-9.2,9.2c-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1s0,.7.3,1.1c.1.3.4.7.6,1,.3.3.6.4,1,.6.3.1.7.3,1.1.3s.7,0,1.1-.3c.3-.1.7-.4,1-.6l14-14c.3-.3.4-.6.6-1,.3-.7.3-1.4,0-2.1v-.3Z"}).mount();window.sl1=n;let r;e==="c"&&(r=new Et("#pda-gallery-thumbnails",{type:"slide",rewind:!1,pagination:!1,drag:window.innerWidth<992,arrows:e==="c",perPage:5,gap:"20px",arrowPath:"M36.5,18.9c0-.3-.3-.7-.6-1L22,3.9c-.3-.3-.6-.4-1-.6-.3-.1-.7-.3-1.1-.3-.7,0-1.4.3-2,.8-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1,0,.7.3,1.4.8,2l9.2,9.2H5.9c-.7,0-1.4.3-2,.8s-.8,1.3-.8,2,.3,1.4.8,2,1.3.8,2,.8h21.2l-9.2,9.2c-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1s0,.7.3,1.1c.1.3.4.7.6,1,.3.3.6.4,1,.6.3.1.7.3,1.1.3s.7,0,1.1-.3c.3-.1.7-.4,1-.6l14-14c.3-.3.4-.6.6-1,.3-.7.3-1.4,0-2.1v-.3Z"}).mount(),window.sl2=r);let s=!1;if(n.on("move",o=>{document.querySelectorAll(".splide__slide.product-video video").forEach(l=>l.pause()),e==="c"&&(s||(r.go(o),r.Components?.Elements?.slides.forEach(function(l){l.classList.remove("active")}),r.Components?.Elements?.slides[o]?.classList.add("active")),s=!1)}
312),i.forEach(function(o,a){a==0&&o.classList.add("active"),o.addEventListener("click",function(){if(document.querySelector(".pda.pda-lightbox")&&(o.getAttribute("data-type")=="360"||o.getAttribute("data-type")=="video"))return;i.forEach(function(c){c.classList.remove("active")}),o.classList.add("active");const l=parseInt(this.dataset.index);s=!0,n.go(l)})}),e==="b"){const o=document.getElementById("pda-gallery-thumbnails-expander");if(o){const a=document.getElementById("pda-gallery-expander-button"),l=document.querySelector("#pda-gallery-expander-button span"),c=document.getElementById("pda-gallery-thumbnails"),d=c?.querySelector(".splide__slide"),g=d?.offsetHeight*2;let f=c?.offsetHeight;f!==void 0&&a&&(i.length<5||g>f)?(a.style.opacity="0",a.style.pointerEvents="none",o.style.maxHeight=f+"px"):o.style.maxHeight=g+"px",window.addEventListener("resize",()=>{f=c?.offsetHeight,f!==void 0&&a&&g<f&&(a.style.opacity="1",a.style.pointerEvents="all")}),l?.addEventListener("click",()=>{f!==void 0&&a&&g<f&&(o.style.maxHeight=g+"px",a.style.opacity="0",a.style.pointerEvents="none")})}}}}lightbox(){const e=document.getElementById("pda-gallery-hero"),i=document.getElementById("pda-gallery-thumbnails"),n=[].slice.call(document.querySelectorAll('#pda-gallery-thumbnails li[data-type="360"]')),r=document.querySelector("#mobile-360-button"),s=document.querySelector("#pda-gallery-360-button"),o=document.querySelector("#pda-gallery-view-all"),a=document.getElementById("pda-lightbox-outer"),l=a?.querySelector(".pda-lightbox-left"),c=a?.querySelector(".lightbox-close"),d=a?.querySelector(".lightbox-mobile-close"),g=[].slice.call(a?.querySelectorAll(".thumb-views li")),f=[].slice.call(a?.querySelectorAll(".lightbox-tabs-header > div")),E=[].slice.call(a?.querySelectorAll(".lightbox-tabs-content > div"));if(!e||!r||!a||!l||!c||!d||!f||!E)return;n.length>0&&(r.parentElement?.classList.add("active"),s?.classList.add("visible")),[].slice.call(document.querySelectorAll('#pda-gallery-thumbnails li[data-type="normal"]')).length>1&&(o?.classList.add("visible"),e?.classList.add("arrows-visible")),[].slice.call(document.querySelectorAll("#pda-gallery-thumbnails li")).length>5&&i?.classList.add("arrows-visible");let m,h=!1,p,S,b;const y=new Et("#pda-lightbox-outer .main-view",{type:"fade",pagination:!1,drag:window.innerWidth<992,arrows:window.innerWidth>=992,arrowPath:"M36.5,18.9c0-.3-.3-.7-.6-1L22,3.9c-.3-.3-.6-.4-1-.6-.3-.1-.7-.3-1.1-.3-.7,0-1.4.3-2,.8-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1,0,.7.3,1.4.8,2l9.2,9.2H5.9c-.7,0-1.4.3-2,.8s-.8,1.3-.8,2,.3,1.4.8,2,1.3.8,2,.8h21.2l-9.2,9.2c-.3.3-.4.6-.6,1-.1.3-.3.7-.3,1.1s0,.7.3,1.1c.1.3.4.7.6,1,.3.3.6.4,1,.6.3.1.7.3,1.1.3s.7,0,1.1-.3c.3-.1.7-.4,1-.6l14-14c.3-.3.4-.6.6-1,.3-.7.3-1.4,0-2.1v-.3Z"}).mount();window.lsl1=y,e.querySelector(".splide__list")?.addEventListener("click",V),c.addEventListener("click",M),d.addEventListener("click",M),r.addEventListener("click",V),s?.addEventListener("click",V),o?.addEventListener("click",V),document.addEventListener("keydown",function(v){v.key=="Escape"&&M()}),document.addEventListener("click",v=>{v.target.id=="pda-lightbox-outer"&&M()});const k='#pda-gallery-thumbnails li[data-type="360"], #pda-gallery-thumbnails li[data-type="360"] img, #pda-gallery-thumbnails li[data-type="video"], #pda-gallery-thumbnails li[data-type="video"] img';document.addEventListener("click",v=>{v.target instanceof HTMLElement&&v.target.matches(k)&&(v.preventDefault(),V(v))});function O(){a?.querySelector(".lightbox-tabs-header")?.addEventListener("click",function(v){const w=v.target;w.classList.contains("lightbox-tab")&&L(w,!0)})}function q(){const v=document.getElementById("article-id")?.getAttribute("data-article-id");for(let w=0;w<f.length;w++)E[w]?.querySelector('.thumb-views li[data-article-id="'+v+'"], .thumb-views li[data-gallery="alwaysshown"]')?f[w].style.display="block":f[w].style.display="none"}function L(v,w){for(let A=0;A<f.length;A++)if(v==f[A]){const B=E[A];[].slice.call(document.querySelectorAll("#pda-lightbox-outer .main-view li")).forEach(function(R){document.querySelector("#pda-lightbox-outer .main-view-storage")?.appendChild(R)}),p=[].slice.call(B?.querySelectorAll(".thumb-views li"));const C=document.getElementById("article-id")?.getAttribute("data-article-id");if(S=[],p.forEach(R=>{if(R.getAttribute("data-article-id")==C||R.getAttribute("data-gallery")=="alwaysshown"){S.push(R),R.style.display="list-item";const I=R.getAttribute("data-thumbnail-index");y.add(document.querySelector('#pda-lightbox-outer .main-view-storage [data-image-index="'+
312I+'"]'))}else R.style.display="none";R.classList.remove("active")}),y.refresh(),w){y.options={drag:window.innerWidth<992};const R=S[0]?.getAttribute("data-thumbnail-index");R&&D(R)}v?.classList.add("active"),B?.classList.add("active")}else f[A]?.classList.remove("active"),E[A]?.classList.remove("active")}y.on("move",function(v){S.forEach((w,A)=>{A==v?w.classList.add("active"):w.classList.remove("active")}),b&&(b.style.backgroundSize="0",y.root.classList.remove("zoom-active"),b.classList.remove("active"))}),y.on("active",function(v){if(a?.querySelectorAll(".main-view .splide__slide.product-video video")?.forEach(A=>A.pause()),v.slide.getAttribute("data-type")=="normal"){const A=l.getBoundingClientRect().width/l.getBoundingClientRect().height,B=v.slide.querySelector("img"),F=B.naturalWidth,C=B.naturalHeight,R=F/C;A<=R?v.slide.classList.add("useMaxWidth"):v.slide.classList.remove("useMaxWidth"),N(v.slide.querySelector(".containerZoom"),{zoom:200})}else if(v.slide.getAttribute("data-type")=="360"){const A=Math.min(l?.getBoundingClientRect().width,l?.getBoundingClientRect().height,800),B=v.slide.querySelector("div");B&&(B.style.width=A+"px",B.style.height=A+"px")}});function D(v){if(v==null)return;const w=a?.querySelector('[data-thumbnail-index="'+v+'"]');let A;S.forEach((B,F)=>{B==w&&(A=F,y.go(A),B.classList.add("active"))})}function V(v){if(document.getElementById("pda-gallery-hero-list")?.innerHTML.trim()=="")return;let w=null,A;if(document.documentElement.style.overflow="hidden",v.target.id=="mobile-360-button"||v.target.id=="pda-gallery-360-button")A="360";else if(v.target.id=="pda-gallery-view-all")w=document.querySelector("#pda-gallery-hero .splide__slide.is-active")?.getAttribute("data-image-index"),A=document.querySelector("#pda-gallery-hero .splide__slide.is-active")?.getAttribute("data-type");else if(v.target.tagName=="LI")w=v.target.getAttribute("data-image-index"),A=v.target.getAttribute("data-type");else{m=v.target;const C=m?.parentElement?.parentElement;w=C?.getAttribute("data-image-index")??C?.getAttribute("data-thumbnail-index")??"",A=a?.querySelector('[data-thumbnail-index="'+w+'"]')?.getAttribute("data-type")}const B=document.getElementById("article-title"),F=a?.querySelector(".lightbox-product-title");a&&B&&F&&(F.innerHTML=B.innerHTML,a.style.display="block"),h||(O(),g.forEach(C=>{C.addEventListener("click",function(){y.options={drag:window.innerWidth<992},D(this.getAttribute("data-thumbnail-index"))})}),h=!0),q(),L(a?.querySelector('.lightbox-tabs-header [data-type="'+A+'"]'),v.target.id=="mobile-360-button"||v.target.id=="pda-gallery-360-button"),v.target.id!="mobile-360-button"&&v.target.id!="pda-gallery-360-button"&&w!==null&&D(w),a?.classList.add("active")}function M(){a?.classList.remove("active"),a?.querySelectorAll(".main-view .splide__slide.product-video video")?.forEach(A=>A.pause()),document.documentElement.style.overflow="auto",[].slice.call(a?.querySelectorAll(".tabs-header > div")).forEach(A=>{A.classList.remove("active")})}function _(v){const w=v.currentTarget;let A,B,F,C;v.offsetX?(F=v.offsetX,A=F/w.offsetWidth*100):v.touches[0]&&(F=v.touches[0]?.pageX??0,A=100-F/w.offsetWidth*100),v.offsetY?(C=v.offsetY,B=C/w.offsetHeight*100):v.touches[0]&&(C=v.touches[0]?.pageY??0,B=100-C/w.offsetHeight*100),w.style.backgroundPosition=`${A}% ${B}%`}function N(v,w){if(!v)return;const A=Object.assign({zoom:200},w);if(v.classList.contains("initialized"))return;v.classList.add("initialized");let B=!1;const F=v;F.style.backgroundSize="0",F.addEventListener("click",function(I){I.pointerType!="touch"&&(B?(B=!1,F.style.backgroundSize="0",y.root.classList.remove("zoom-active"),F.classList.remove("active")):(B=!0,b=F,F.style.backgroundSize=A.zoom+"%",y.root.classList.add("zoom-active"),F.classList.add("active"),_(I)))}),F.addEventListener("mousemove",function(I){B&&_(I)}),F.addEventListener("mouseleave",function(){}),F.addEventListener("touchmove",function(I){B&&_(I)});let C,R=0;F.addEventListener("touchend",function(I){const x=new Date().getTime(),H=x-R;clearTimeout(C),H<500&&H>0?(B=!B,B?(y.options={drag:!1},b=F,F.style.backgroundSize=A.zoom+"%",y.root.classList.add("zoom-active"),F.classList.add("active"),_(I)):(y.options={drag:window.innerWidth<992},F.style.backgroundSize="0",y.root.classList.remove("zoom-active"),F.classList.remove("active"))):C=setTimeout(function(){clearTimeout(C)},500),R=x})}}init(){document.querySelector(".pda.pda-v4")&&(this.pdaGallery(),document.querySelector(".pda.pda-lightbox")&&this.lightbox())}}const jc=new zc;jc.init();const Xc=/packstation/i;class fn{form;elements;validationPatterns;isSmasuRegistration=!1;constructor(e){this.form=e,this.elements=this.collectAllElements();const i=this.elements.inputFields.get("tenant")?.value??"";this.validationPatterns=this.initializeValidationPatterns(i),this.validateElementsAvailability()&&this.initialize()}static create(){const e=document.querySelector("form[data-registration]");return e?new fn(e):null}initializeValidationPatterns(e){const i={ssh_be:"^(0208:\\d{10}|9925:BE\\d{10}|0088:\\d{13}|[Nn]\\.? ?[Aa]\\.?|[Nn] ?\\/ ?[Aa])$",ssh_nl:"^(0106:\\d{8}|0190:\\d{20}|9944:NL\\d{9}B\\d{2}|[Nn]\\.? ?[Aa]\\.?|[Nn] ?\\/ ?[Aa])$",ssh_lu:"^(9938:LU\\d{8}|[Nn]\\.? ?[Aa]\\.?|[Nn] ?\\/ ?[Aa])$",default:"^(\\d{4}:[A-Za-z0-9\\-\\.]+|[Nn]\\.? ?[Aa]\\.?|[Nn] ?\\/ ?[Aa])$"};return{email:"[a-zA-Z0-9\\._%+\\-]+@[a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,}",street:{LU:"^(?=^.{0,60}$)\\d+.*$",ES:"^.*\\d+.*$",default:"^(?=.{0,60}$).+\\d+\\.?[a-zA-Z0-9_\\-]*\\s*\\/?\\w*$"},postalCode:{LU:"^(?=^.{0,10}$)[0-9]{4}$",AT:"^(?=^.{0,10}$)[0-9]{4}$",CH:"^(?=^.{0,10}$)[0-9]{4}$",LI:"^(?=^.{0,10}$)[0-9]{4}$",BE:"^(?:(?:[1-9])(?:\\d{3}))$",NL:"^[1-9][0-9]{3} ?[a-zA-Z]{2}$",default:"^(?=^.{0,10}$)[0-9]{5}$"},vatId:{DE:"^DE[0-9]{9}$",AT:"^ATU[0-9]{8}$",CH:"^CHE-[0-9]{3}\\.[0-9]{3}\\.[0-9]{3} (MWST|IVA|TVA)$",LI:"^\\d{5}$",BE:"^[0-9]{10}$|^N.A.$",NL:"^NL[0-9]{9}B[0-9]{2}$",LU:"^LU[0-9]{8}$",ES:"^ES[A-Z][0-9]{7}(?:[0-9]|[A-Z])$",default:""},customerNumber:"^\\d{0,10}$",phone:"^[\\d+\\-.\\(\\)\\/\\s]{0,16}$",password:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^A-Za-z\\d]).{8,}$",peppolId:i[e]??i.default??""}}collectAllElements(){const e=["step1","step2","step3"],i=["email","password","passwordConfirmation","frc-captcha-response","title","givenName","familyName","phone","b2b_name","b2b_name2","b2b_peppol_id","b2b_vatId","b2b_smasuPassword","b2b_street","b2b_postalCode","b2b_city","b2b_nameAdditional","b2b_countryCode","b2b_industryName","b2b_customerNumber","b2c_street","b2c_nameAdditional","b2c_postalCode","b2c_city","b2c_countryCode","b2c_customerNumber","subscribeNewsletter","terms","gotoUrl","baseUrl","tenant"],n=["title","customerProfile"],r=["step1-submit","step2-submit","step3-submit"],s=["panel-b2b","panel-b2c"];return{optionalElements:["b2b_peppol_id"],sections:this.collectElements(e),inputFields:this.collectElements(i),radioButtons:this.collectRadioButtons(n),buttons:this.collectElements(r),tabPanels:this.collectElements(s)}}collectElements(e){const i=new Map;return e.forEach(n=>{const r=this.form.querySelector(`[name="${n}"], [id="${n}"]`);i.set(n,r)}),i}collectRadioButtons(e){const i=new Map;return e.forEach(n=>{const r=this.form.querySelectorAll(`[name="${n}"], [id="${n}"]`);i.set(n,r)}),i}validateElementsAvailability(){return[()=>this.checkElementsAvailable(this.elements.sections,"sections"),()=>this.checkElementsAvailable(this.elements.inputFields,"input fields"),()=>this.checkElementsAvailable(this.elements.radioButtons,"radio buttons"),()=>this.checkElementsAvailable(this.elements.buttons,"buttons"),()=>this.checkElementsAvailable(this.elements.tabPanels,"tabpanels")].every(i=>i())}checkElementsAvailable(e,i){const n=Array.from(e.entries()).filter(([,r])=>r===null).filter(([r])=>!this.elements.optionalElements.includes(r)).map(([r])=>r);return n.length>0?(console.error(`Missing ${i} in template:`,n),!1):!0}initialize(){this.registerEventListeners(),this.setupStepValidations()}registerEventListeners(){const e=this.elements.inputFields.get("email");e?.addEventListener("input",()=>this.resetEmailValidation(e));const i=this.elements.inputFields.get("b2b_street");i?.addEventListener("input",()=>this.validateStreetInput(i));const n=this.elements.inputFields.get("b2c_street");n?.addEventListener("input",()=>this.validateStreetInput(n));const r=this.elements.inputFields.get("b2b_countryCode"),s=this.elements.inputFields.get("b2c_countryCode");r?.addEventListener("change",()=>this.setAllInputValidations()),s?.addEventListener("change",()=>this.setAllInputValidations()),document.addEventListener("input.country-codes-ready",()=>{this.setAllInputValidations()}),document.addEventListener("ssi.captcha-complete",()=>{this.elements.buttons.forEach(o=>{const a=o.getAttribute("data-text");o.textContent=a??o.textContent,o.disabled=!1})}),document.addEventListener("ssi.captcha-statechange",()=>{this.elements.buttons.forEach(o=>{const a=o.getAttribute("data-captcha-text");o.textContent=a??"Wait for captcha to complete ...",o.disabled=!0})})}setupStepValidations(){this.setupStep1Validation(),this.setupStep2Validation(),this.setupStep3Validation()}setupStep1Validation(){const{inputFields:e,buttons:i,sections:n}=this.elements,r=e.get("email"),s=e.get("password"),o=e.get("passwordConfirmation"),a=i.get("step1-submit"),l=n.get("step2");a?.addEventListener("click",async c=>{if(c.preventDefault(),s?.value!==o?.value){const g=o?.getAttribute("data-password-field-mismatch");return o?.setCustomValidity(g??"Passwords do not match"),o?.reportValidity(),!1}else o?.setCustomValidity("");if(!this.validateInputs([r,s,o]))return;await this.checkEmailAvailability()&&(this.removeElementParent(a),l?.removeAttribute("hidden"))})}setupStep2Validation(){const{inputFields:e,buttons:i,sections:n}=this.elements,r=e.get("title"),s=e.get("givenName"),o=e.get("familyName"),a=e.get("phone"),l=i.get("step2-submit"),c=n.get("step3");l?.addEventListener("click",d=>{d.preventDefault(),this.validateInputs([r,s,o,a])&&(this.removeElementParent(l),c?.removeAttribute("hidden"))})}setupStep3Validation(){const{buttons:e,tabPanels:i}=this.elements,n=e.get("step3-submit"),r=i.get("panel-b2b"),s=i.get("panel-b2c");n?.addEventListener("click",async o=>{o.preventDefault();const a=!r?.classList.contains("hidden"),l=!s?.classList.contains("hidden");this.handlePanelRequiredFields(a,l),this.form.reportValidity()&&await this.submitRegistration(a,l)})}validateInputs(e){return e.every(i=>i?.reportValidity()??!1)}removeElementParent(e){e?.parentElement?.remove()}setAllInputValidations(){const{inputFields:e}=this.elements,i=e.get("b2b_countryCode")?.value??"",n=e.get("b2c_countryCode")?.value??"";this.setInputPattern(e.get("email"),this.validationPatterns.email),this.setInputPattern(e.get("password"),this.validationPatterns.password),this.setInputPattern(e.get("passwordConfirmation"),this.validationPatterns.password),this.setInputPattern(e.get("b2b_street"),this.getPattern("street",i)),this.validateStreetInput(e.get("b2b_street")),this.setInputPattern(e.get("b2b_postalCode"),this.getPattern("postalCode",i)),this.setInputPattern(e.get("b2b_vatId"),this.getPattern("vatId",i)),this.setInputPattern(e.get("b2b_customerNumber"),this.validationPatterns.customerNumber),this.setInputPattern(e.get("b2b_peppol_id"),this.validationPatterns.peppolId),this.setInputPattern(e.get("b2c_street"),this.getPattern("street",n)),this.validateStreetInput(e.get("b2c_street")),this.setInputPattern(e.get("b2c_postalCode"),this.getPattern("postalCode",n)),this.setInputPattern(e.get("b2c_customerNumber"),this.validationPatterns.customerNumber),this.setInputPattern(e.get("phone"),this.validationPatterns.phone)}getPattern(e,i){const n=this.validationPatterns[e];return n[i]??n.default??""}setInputPattern(e,i){e instanceof HTMLInputElement?e.pattern=i:e instanceof HTMLSelectElement&&e.setAttribute("pattern",
312i)}validateStreetInput(e){if(e===void 0)return;const i=Xc.test(e.value);e.setCustomValidity(i?"packstation":"");const n=e.closest("[data-id]"),r=n?.querySelector('[data-type="invalid"]'),s=n?.querySelector('[data-type="mismatch"]');r&&(r.hidden=i),s&&(s.hidden=!i)}resetEmailValidation(e){e.setCustomValidity(""),e.reportValidity()}resetCaptcha(){document.dispatchEvent(new CustomEvent("registration.reset-captcha"))}async checkEmailAvailability(){const i={method:"POST",body:new FormData(this.form)},n=await Ge(fetch("/user/registration/email-available",i));if(n.error)return console.error("Error checking email availability:",n.error),!1;const r=n.data?.headers.get("Location");if(r)return window.location.replace(r),!1;this.resetCaptcha();const s=await n.data?.text();return this.handleEmailValidityResponse(s),s==="OK"}handleEmailValidityResponse(e,i=this.elements.inputFields.get("email")){if(e==="EMAIL_EXISTING"){const n=i?.getAttribute("data-custom-email-existing-error-message");i?.setCustomValidity(n??"Email already exists"),i?.reportValidity()}else i?.setCustomValidity("")}handlePanelRequiredFields(e,i){const n=this.elements.inputFields.get("tenant")?.value==="ssh_be",r=["b2b_name","b2b_street","b2b_postalCode","b2b_city","b2b_countryCode","b2b_industryName"];n&&r.push("b2b_peppol_id");const s=["b2c_street","b2c_postalCode","b2c_city","b2c_countryCode"],o=r.map(l=>this.elements.inputFields.get(l)).filter(Boolean),a=s.map(l=>this.elements.inputFields.get(l)).filter(Boolean);o.forEach(l=>l.removeAttribute("required")),a.forEach(l=>l.removeAttribute("required")),e&&!i&&o.forEach(l=>l.setAttribute("required","")),i&&!e&&a.forEach(l=>l.setAttribute("required",""))}async submitRegistration(e,i){this.handleSmasuGotoUrl();const r={method:"POST",body:this.buildFormData(e,i)},s=await Ge(fetch("/user/registration?version=v2",r));if(this.isSmasuRegistration&&s.data?.status===200){const a=this.elements.inputFields.get("gotoUrl")?.value??"";return window.location.replace(new URL(a))}if(s.data?.status!==200){this.resetCaptcha();const a=await s.data?.json();if(a.fieldErrors){const l=document.querySelector("[data-alert-registration]"),c=a.fieldErrors.map(g=>`${g.field}: ${g.message}`).join(`
313`),d=l?.querySelector("[data-alert-content]");d&&(d.textContent=c),l?.removeAttribute("hidden");return}else{console.error("Registration failed:",s.data);return}}if(s.data?.url)return window.location.replace(new URL(s.data.url));const o=this.elements.inputFields.get("gotoUrl")?.value??"/user/login?created=true";window.location.replace(o)}buildFormData(e,i){const n=new FormData,{inputFields:r,radioButtons:s}=this.elements;return this.appendFormField(n,"login.email",r.get("email")?.value),this.appendFormField(n,"identity.password",r.get("password")?.value),this.appendFormField(n,"identity.passwordConfirmation",r.get("passwordConfirmation")?.value),this.appendFormField(n,"frc-captcha-response",r.get("frc-captcha-response")?.value),this.appendFormField(n,"customerProfile",this.getSelectedRadioValue(s,"customerProfile")),this.appendFormField(n,"identity.customerProfile",this.getSelectedRadioValue(s,"customerProfile")),this.appendFormField(n,"identity.title",this.getSelectedRadioValue(s,"title")),this.appendFormField(n,"identity.givenName",r.get("givenName")?.value),this.appendFormField(n,"identity.familyName",r.get("familyName")?.value),this.appendFormField(n,"identity.phone",r.get("phone")?.value),e&&!i?this.appendB2BFields(n):i&&!e&&this.appendB2CFields(n),this.appendBooleanField(n,"identity.terms",r.get("terms")?.checked),this.appendBooleanField(n,"subscribeNewsletter",r.get("subscribeNewsletter")?.checked),this.appendFormField(n,"gotoUrl",r.get("gotoUrl")?.value),this.appendStaticFields(n),n}appendFormField(e,i,n){e.append(i,n??"")}appendBooleanField(e,i,n){e.append(i,n?"1":"0")}getSelectedRadioValue(e,i){const n=e.get(i);return Array.from(n??[]).find(s=>s.checked)?.value??""}appendB2BFields(e){const{inputFields:i,radioButtons:n}=this.elements;this.appendFormField(e,"organisation.name",i.get("b2b_name")?.value),this.appendFormField(e,"organisation.name2",i.get("b2b_name2")?.value),this.appendFormField(e,"organisation.vatId",i.get("b2b_vatId")?.value),this.appendFormField(e,"organisation.nameAdditional",i.get("b2b_nameAdditional")?.value),this.appendFormField(e,"organisation.industryName",i.get("b2b_industryName")?.value),this.appendFormField(e,"organisation.industrySsiCode",this.getIndustryCode("data-industry-ssi-code")),this.appendFormField(e,"organisation.industryNaceCode",this.getIndustryCode("data-industry-nace-code")),this.appendFormField(e,"organisation.customerNumber",i.get("b2b_customerNumber")?.value),this.appendFormField(e,"organisation.countryCode",i.get("b2b_countryCode")?.value);let r=i.get("b2b_peppol_id")?.value?.trim()??"";r.replace(/[^a-zA-Z]/g,"").toLowerCase()==="na"&&(r="N/A"),this.appendFormField(e,"organisation.peppolId",r),this.appendFormField(e,"addressList[0].name",i.get("b2b_name")?.value),this.appendFormField(e,"addressList[0].name2",i.get("b2b_name2")?.value),this.appendFormField(e,"addressList[0].nameAdditional",i.get("b2b_nameAdditional")?.value),this.appendFormField(e,"addressList[0].title",this.get
313SelectedRadioValue(n,"title")),this.appendFormField(e,"addressList[0].givenName",i.get("givenName")?.value),this.appendFormField(e,"addressList[0].familyName",i.get("familyName")?.value),this.appendFormField(e,"addressList[0].street",i.get("b2b_street")?.value),this.appendFormField(e,"addressList[0].postalCode",i.get("b2b_postalCode")?.value),this.appendFormField(e,"addressList[0].city",i.get("b2b_city")?.value),this.appendFormField(e,"addressList[0].countryCode",i.get("b2b_countryCode")?.value),this.appendFormField(e,"identity.countryCode",i.get("b2b_countryCode")?.value),this.appendFormField(e,"smasuPassword",i.get("b2b_smasuPassword")?.value)}appendB2CFields(e){const{inputFields:i,radioButtons:n}=this.elements;this.appendFormField(e,"addressList[0].street",i.get("b2c_street")?.value),this.appendFormField(e,"addressList[0].nameAdditional",i.get("b2c_nameAdditional")?.value),this.appendFormField(e,"addressList[0].postalCode",i.get("b2c_postalCode")?.value),this.appendFormField(e,"addressList[0].city",i.get("b2c_city")?.value),this.appendFormField(e,"addressList[0].countryCode",i.get("b2c_countryCode")?.value),this.appendFormField(e,"identity.countryCode",i.get("b2c_countryCode")?.value),this.appendFormField(e,"countryCode",i.get("b2c_countryCode")?.value),this.appendFormField(e,"organisation.countryCode",i.get("b2c_countryCode")?.value),this.appendFormField(e,"organisation.customerNumber",i.get("b2c_customerNumber")?.value),this.appendFormField(e,"addressList[0].title",this.getSelectedRadioValue(n,"title")),this.appendFormField(e,"addressList[0].givenName",i.get("givenName")?.value),this.appendFormField(e,"addressList[0].familyName",i.get("familyName")?.value)}getIndustryCode(e){const i=this.elements.inputFields.get("b2b_industryName");return i?.options[i.selectedIndex]?.getAttribute(e)??""}appendStaticFields(e){Object.entries({"addressList[0].delivery":"1","addressList[0].billing":"1","addressList[0].primaryBilling":"1","addressList[0].primaryDelivery":"1","addressList[0].main":"1","identity.birthday":"1900-01-01",isGuest:"0",isUpdateMode:"0"}).forEach(([n,r])=>{e.append(n,r)})}handleSmasuGotoUrl(){const e=this.elements.inputFields.get("gotoUrl"),i=this.elements.inputFields.get("baseUrl")?.value,n=this.elements.inputFields.get("b2b_smasuPassword");if(n&&n.value.length>0&&e&&i){const r=new URL(e.value,i);r.searchParams.append("smasuPassword",n.value),e.value=r.toString(),this.isSmasuRegistration=!0}}}window.addEventListener("load",()=>{fn.create()});class Zc{serviceInfo={YouTubeVideo:{id:"BJz7qNsdj-7",name:"youtube-video",handlerLoading:{selector:"iframe",deactivatedAttr:"data-src",activatedAttr:"src"},handlerViewSelector:""},Userlike:{id:"xyKq_EfQf",name:"Userlike",handlerLoading:{selector:"",deactivatedAttr:"data-src",activatedAttr:"src"},handlerViewSelector:""},Zoovu:{id:"J4VjROu2H",name:"Zoovu",handlerLoading:{selector:"",deactivatedAttr:"",activatedAttr:""},handlerViewSelector:""}};attributeNames={serviceName:"data-uc-type",activateButton:"data-uc-activate-service",showConsentDetails:"data-uc-show-consent-details",viewController:"data-uc-is-allowed",userlikeTrigger:"data-uc-userlike-trigger"};USERCENTRICS_ACTIONS={ACCEPT_ALL:"ACCEPT_ALL",DENY_ALL:"DENY_ALL",SAVE:"SAVE"};usercentricsController;constructor(){this.usercentricsExist()?this.initialization().then(()=>{}):window.addEventListener("UC_UI_INITIALIZED",this.initialization.bind(this))}async initialization(){if(this.usercentricsExist()){const e=window;this.usercentricsController=e.__ucCmp,await this.scanDom(),this.registerUsercentricsEventListener(),this.registerButtonEventListeners(),this.registerUserlikeTriggerListeners()}else this.usercentricsController=null}registerUsercentricsEventListener(){window.addEventListener("UC_UI_CMP_EVENT",e=>{const i=e;i?.detail&&Object.values(this.USERCENTRICS_ACTIONS).includes(i.detail.type)&&this.scanDom().then(()=>{})})}registerButtonEventListeners(){const e=document.querySelectorAll(`[${this.attributeNames.activateButton}]`),i=document.querySelectorAll(`[${this.attributeNames.showConsentDetails}]`);e.length!==0&&e.forEach(n=>n.addEventListener("click",this.onActivateServiceHandler.bind(this))),i.length!==0&&i.forEac
313h(n=>n.addEventListener("click",this.onShowConsentDetails.bind(this)))}registerUserlikeTriggerListeners(){document.querySelectorAll(`[${this.attributeNames.userlikeTrigger}]`).forEach(i=>{this.relocateUserlikeStatusMessages(i),i.addEventListener("click",()=>this.onUserlikeTriggerClick(i))})}relocateUserlikeStatusMessages(e){const i=e.parentElement,n=i?.querySelector('[data-type="loading"]'),r=i?.querySelector('[data-type="offline"]'),s=e.querySelector(".head-tool-service-item-text-content");s&&(n&&s.insertAdjacentElement("afterend",n),r&&(n??s).insertAdjacentElement("afterend",r))}async onUserlikeTriggerClick(e){const i=e.parentElement,n=i?.querySelector('[data-type="loading"]'),r=i?.querySelector('[data-type="offline"]'),s=e.querySelector(".head-tool-service-item-text-content");if(!r)return;r.hidden=!0,n&&(n.hidden=!1),s&&(s.hidden=!0);const o=await hs(),a=o==="Offline"||o==="Timeout";n&&(n.hidden=!0),r.hidden=!a,s&&(s.hidden=a),a||fs()}async scanDom(){const e=Array.from(document.querySelectorAll(`[${this.attributeNames.serviceName}]`)).filter(n=>n.tagName.toLowerCase()!=="script");if(e.length===0)return;const i=e.map(async n=>{const r=n?.getAttribute(this.attributeNames.serviceName);if(!r)return;
313const s=await this.getServiceIdByName(r);if(!s)return;const o=await this.getServiceDetailById(s);if(!o)return;const a=this.getServiceInfoById(s);a&&(o?.consent?.given?this.serviceHasConsent(a,n):this.serviceHasNoConsent(a,n))});await Promise.all(i)}serviceHasConsent(e,i){const n=this.getViewTarget(i,e.handlerViewSelector);n&&n.getAttribute(this.attributeNames.viewController)!=="true"&&(this.updateTargetSource(i,e,[e.handlerLoading.deactivatedAttr,e.handlerLoading.activatedAttr]),this.updateServiceView(n,!0))}serviceHasNoConsent(e,i){const n=this.getViewTarget(i,e.handlerViewSelector);n&&n.getAttribute(this.attributeNames.viewController)!=="false"&&(this.updateTargetSource(i,e,[e.handlerLoading.activatedAttr,e.handlerLoading.deactivatedAttr]),this.updateServiceView(n,!1))}async onShowConsentDetails(e){const i=e.currentTarget;if(!this.isHTMLElement(i))return;const n=i.getAttribute(this.attributeNames.showConsentDetails);if(!n)return;const r=await this.getServiceIdByName(n)||"";r&&await this.showServiceDetails(r)}async onActivateServiceHandler(e){const i=e.currentTarget;if(!this.isHTMLElement(i))return;const n=i.getAttribute(this.attributeNames.activateButton);if(!n)return;await this.updateServiceByName(n,!0);const s=i.closest(`[${this.attributeNames.serviceName}]`)?.querySelector(`[${this.attributeNames.userlikeTrigger}]`);s&&await this.onUserlikeTriggerClick(s)}async getServiceDetailById(e){return this.usercentricsController&&(await this.usercentricsController?.getConsentDetails())?.services[e]||void 0}async getServiceIdByName(e){if(e)return Object.values(this.serviceInfo).find(i=>i.name===e)?.id}getServiceInfoById(e){return Object.values(this.serviceInfo).find(i=>i.id===e)}getViewTarget(e,i){const n=i?e.querySelector(i):null;return this.isHTMLElement(n)?n:e}updateTargetSource(e,i,n){if(!i.handlerLoading.selector||!e||!i||!n)return;const r=e.querySelector(i.handlerLoading.selector);if(!r)return;const[s,o]=n;if(!s||!o)return;const a=r.getAttribute(s);a&&(r.setAttribute(o,a),r.removeAttribute(s))}
313async updateServiceByName(e,i){const n=await this.getServiceIdByName(e);!n||!this.usercentricsController||(await this.usercentricsController?.updateServicesConsents([{id:n,consent:i}]),await this.usercentricsController.saveConsents())}updateServiceView(e,i){if(!e)return;const n=i?"true":"false";e.setAttribute(this.attributeNames.viewController,n)}async showServiceDetails(e){this.usercentricsController&&await this.usercentricsController.showServiceDetails(e)}isHTMLElement(e){return e instanceof HTMLElement}usercentricsExist(){return window?.__ucCmp?.ready===!0}}new Zc;const Jc={selectors:{rootElement:'[data-profile-switch="radio"]',radioSwitches:'input[id^="profile-switch-radio"]',radioClickTarget:"data-radio-click-target",dialogTrigger:"[data-trigger=profile-switch-radio-dialog-b2b]",cancelButton:"[data-profile-switch-cancel]",confirmButton:"[data-profile-switch-confirm]"}};class Qc{#e;#i;#t=null;#n=null;#s="b2b";#r;constructor(e=Jc){if(this.#e=e.selectors,!this.#e||!this.#e.rootElement||!this.#e.radioSwitches||!this.#e.dialogTrigger||!this.#e.cancelButton||!this.#e.confirmButton)throw new Error("selectors not found");const i=document.querySelector(this.#e.rootElement);if(!i)throw new Error("root not found");const n=document.querySelector("#dialog-profile-switch-radio");if(!n)throw new Error("dialog target not found");this.#r=n,this.#i=i;const r=i.querySelectorAll(this.#e.radioSwitches),s=i.querySelectorAll(`[${this.#e.radioClickTarget}]`);if(r.length===0)throw new Error("radioSwitches not found");this.#t=Array.from(r).find(o=>o.checked)||null,s.forEach(o=>{o.addEventListener("click",()=>{const a=o.getAttribute(this.#e.radioClickTarget);if(a!=="b2b"&&a!=="b2c")throw new Error(`Invalid profile type: ${a}`);this.#t?.value!==a&&this.openDialog(a)})})}openDialog(e){const i=this.#r.querySelector(this.#e.cancelButton),n=this.#r.querySelector(this.#e.confirmButton);if(!i)throw new Error("cancel button not found");if(!n)throw new Error("confirm button not found");this.#n=this.#t,this.#s=e,this.#r.addEventListener("close",this.#o,{once:!0}),i.addEventListener("click",this.#a,{once:!0}),n.addEventListener("click",this.#l,{once:!0}),this.#r.showModal()}#o=()=>{this.#n&&(this.#n.checked=!0)};#a=()=>{this.#n&&(this.#n.checked=!0),this.#r.close()};#l=()=>{const e=this.#i.getAttribute(`data-target-url-${this.#s}`);e&&e.startsWith("/user/")&&(window.location.href=e)}}function Qn(){try{new Qc}catch{}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Qn()}):Qn();function ed(t){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}const ht="[data-article-on-wishlist], [data-article-not-on-wishlist]";class td{#e;#i;#t=new Set;#n=null;#s=!1;#r=null;constructor(e){this.#e=e,ed(()=>void this.#a()),this.#e.addEventListener("click",this.#o),this.#i=this.#c()}onItemAdded(e){this.#n?.add(e),this.#d(e,!0)}destroy(){this.#i.disconnect(),this.#e.removeEventListener("click",this.#o),this.#r!==null&&clearTimeout(this.#r),this.#t.clear()}#o=async e=>{const i=e.target.closest("[data-article-on-wishlist]");if(!i)return;const n=Gt(i,this.#e),{productId:r}=i.dataset;if(!n||!r||this.#t.has(n))return;this.#t.add(n);const{error:s}=await Ge(ds(n,r));this.#t.delete(n),s===null&&(this.#n?.delete(n),this.#d(n,!1))};async#a(){if(!this.#s&&this.#e.querySelector(ht)){this.#s=!0;try{const{data:e,error:i}=await Ge(us());if(i!==null)return;this.#n=e,this.#l()}finally{this.#s=!1}}}#l(){const e=this.#n;e&&this.#e.querySelectorAll(ht).forEach(i=>{const n=Gt(i,this.#e);n&&this.#u(i,e.has(n))})}#c(){const e=new MutationObserver(i=>{i.some(r=>Array.from(r.addedNodes).some(s=>s instanceof Element&&(s.matches(ht)||s.querySelector(ht)!==null)))&&(this.#r!==null&&clearTimeout(this.#r),this.#r=setTimeout(()=>{this.#r=null,this.#n===null?this.#a():this.#l()},50))});return e.observe(this.#e,{childList:!0,subtree:!0}),e}#d(e,i){this.#e.querySelectorAll(ht).forEach(n=>{Gt(n,this.#e)===e&&this.#u(n,i)})}#u(e,i){const n=e.hasAttribute("data-article-on-wishlist");e.style.display=n===i?"inline-flex":"none"}}
313const mn="[data-add-to-wishlist]",id=`${mn}, [data-article-on-wishlist], [data-article-not-on-wishlist]`;class nd extends ms{#e;#i;#t=null;#n=async e=>{const i=e.target.closest(mn);if(!i)return;const n=Gt(i,this.#i);if(n)try{(await this.#s()).open({...i.dataset,articleId:n})}catch{}};constructor(e,i){super(),this.#e=e,this.#i=i,i.addEventListener("click",this.#n)}async#s(){return this.#t||(this.#t=(async()=>{const{AddToWishlistDialog:e}=await Bi(async()=>{const{AddToWishlistDialog:n}=await import("./chunks/add-item-dialog.YqnBDvCS.js");return{AddToWishlistDialog:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8])),i=new e(this.#e);return i.addEventListener("item-added",n=>{this.dispatchEvent(new CustomEvent("item-added",{detail:n.detail}))}),i})(),this.#t.catch(()=>{this.#t=null})),this.#t}}class rd{#e=e=>{e.target.closest(mn)&&as()};constructor(e){e.addEventListener("click",this.#e)}}function sd(){try{if(!document.querySelector(id))return;const t=document.querySelector("#add-to-wishlist-dialog");if(t){const e=new td(document.body);new nd(t,document.body).addEventListener("item-added",n=>e.onItemAdded(n.detail.articleId));return}new rd(document.body)}catch(t){console.error("Failed to initialize wishlist:",t)}}function od(){try{const t=document.querySelector('[data-component="warranty-seal"]');if(!t)return;const e=Oe(HTMLButtonElement,t.querySelector('[data-action="open-dialog"]')),i=new er(Oe(HTMLDialogElement,t.querySelector("#dialog-warranty-seal")));e.addEventListener("click",()=>i.showModal())}catch(t){console.error("Failed to initialize warranty seal:",t)}}const ad='[data-action="open-warranty-notice"]';class ld{#e;constructor(e,i){this.#e=new er(i),e.addEventListener("click",this.#i)}#i=()=>{this.#e.showModal()}}function cd(){try{const t=document.querySelector('[data-component="warranty-notice"]');if(!t)return;const e=Oe(HTMLElement,t.querySelector(ad)),i=Oe(HTMLDialogElement,document.getElementById("dialog-warranty-notice"));new ld(e,i)}catch(t){console.error("Failed to initialize warranty notice dialog:",t)}}class dd{#e;#i;#t=!1;constructor(e){this.#e=Array.from(e.querySelectorAll("[data-tab-accordion-tab]")),this.#i=new Map(Array.from(e.querySelectorAll("[data-tab-accordion-panel]")).map(i=>{const n=i.dataset.tabAccordionPanel;return gi(n),[n,i]})),this.#e.forEach(i=>{i.addEventListener("mousedown",this.#n),i.addEventListener("click",this.#s),i.addEventListener("focus",this.#o),i.addEventListener("keydown",this.#r),i.tabIndex=i.dataset.tabAccordionActive==="true"?0:-1})}#n=()=>{this.#t=!0};#s=e=>{const i=Oe(HTMLButtonElement,e.currentTarget),n=i.dataset.tabAccordionTarget;gi(n),this.#t=!1,this.#l(n),this.#a(i,"center")};#r=e=>{const i=Oe(HTMLButtonElement,e.currentTarget),n=this.#e.indexOf(i);let r;switch(e.key){case"ArrowLeft":r=(n-1+this.#e.length)%this.#e.length;break;case"ArrowRight":r=(n+1)%this.#e.length;break;case"Home":r=0;break;case"End":r=this.#e.length-1;break;default:return}e.preventDefault();const s=Oe(HTMLButtonElement,this.#e[r]),o=s.dataset.tabAccordionTarget;gi(o),this.#t=!1,this.#l(o),s.focus(),this.#a(s,"center")};#o=e=>{if(this.#t){this.#t=!1;return}const i=Oe(HTMLButtonElement,e.currentTarget);this.#a(i,"nearest")};#a(e,i){e.scrollIntoView({inline:i,block:"nearest",behavior:"smooth"})}#l(e){this.#e.forEach(i=>{const n=i.dataset.tabAccordionTarget===e;i.dataset.tabAccordionActive=String(n),i.setAttribute("aria-selected",String(n)),i.tabIndex=n?0:-1}),this.#i.forEach((i,n)=>{i.hidden=n!==e})}}function ud(){document.querySelectorAll('[data-component="tab-accordion"]').forEach(t=>{try{new dd(t)}catch(e){console.error("Failed to initialize tab accordion:",e)}})}window.location.pathname.match(/\/my-shop\/dashboard($|\/)/)&&Bi(()=>import("./chunks/dashboard.CVgemfDs.js"),__vite__mapDeps([9,1,2,3,5,10,11,12]));sd();od();cd();ud();window.location.pathname.match(/\/service-ueberblick/)&&document.querySelector("#ab-test-service-overview-new-header")!==null&&Bi(async()=>{const{bootstrapSecondaryChrome:t}=await import("./chunks/secondary-layout.BJ01yHiG.js");return{bootstrapSecondaryChrome:t}},__vite__mapDeps([13,14,2,5,10,11,12])).then(({bootstrapSecondaryChrome:t})=>t());
314//# sourceMappingURL=main.CP1vJH61.js.map

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.