PageSourceSearch

https://www.dmtrade.pl/gfx/eng/common_shop.js.gzip?r=1791375834

js dmtrade.pl collected 2026-10-08 02:29:07 UTC 498,979 bytes, 5 lines download raw bytes

1function calculateSubscriptionPrice(t){return this.params=t||{},this.roundPrice=t=>{const e=currency_decimal_separator;currency_decimal_separator=".";const i=format_price(t,{mask:"#####0.00"});return currency_decimal_separator=e,i},this.formatPrice=t=>format_price(t,{mask:this.currencyFormat,currency:this.symbol,currency_space:this.currencySpace,currency_before_price:this.currencyBeforeValue}),this.percentagePrice=(t,e,i,n)=>{let s=0===n?0:i*(n/100);return s+=e,s=t-s,s>0?s:0},this.quotaPrice=(t,e,i)=>{let n=e+i;return n=t-n,n>0?n:0},this.calculatePercent=(t,e)=>100-100*e/t,this.netPrice=(t,e)=>{const i=t-t*e/100;return i>0?i:0},this.init=()=>{const{max:e,maxNet:i,save:n,before:s,rebateValue:o,rebateType:a,currencyFormat:r,symbol:c,currencySpace:l,currencyBeforeValue:u}=t;if(!e&&!o)return!1;this.currencyFormat=r||app_shop.vars?.currency?.format||app_shop.vars?.currency_format,this.symbol=c||app_shop.vars?.currency?.symbol||app_shop.vars?.symbol,this.currencySpace=l||app_shop.vars?.currency?.space||app_shop.vars?.currency_space,this.currencyBeforeValue=u||app_shop.vars?.currency?.beforeValue||app_shop.vars.currency_before_value,this.rebateType=a||"percentage";const d="percentage"===this.rebateType?this.percentagePrice(+e,+n,+s,+o):this.quotaPrice(+e,+n,+o),h=this.calculatePercent(e,d),p=this.netPrice(i,h);return{gross:{value:this.roundPrice(d),formatted:this.formatPrice(d)},net:{value:this.roundPrice(p),formatted:this.formatPrice(p)},percent:Math.round(h)}},this.init()}app_shop.graphql||(app_shop.graphql={}),app_shop.graphql.getLowestPrice=async t=>{const e=JSON.stringify({query:`query {\n      getLastLowestProductPrices(${t}) {\n        id\n        sizes {\n          id\n          price {\n            ${app_shop?.vars?.priceType||"gross"} {\n              value\n              currency\n              formatted\n            }\n          }\n        }\n      }\n    }`});try{const t=app_shop?.urls?.graphql?`${app_shop?.urls?.graphql}?getLastLowestProductPrices`:"/graphql/v1/?getLastLowestProductPrices",i=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e});return await i.json()}catch(t){return!1}};class VanillaCalendar{constructor(t,e){this.HTMLElement="object"==typeof t?t:document.querySelector(t),this.HTMLElement&&(this.type=e?.type??"default",this.date={min:e?.date?.min??"1970-01-01",max:e?.date?.max??"2470-12-31",today:e?.date?.today??new Date},this.info={top:e?.info?.top??!1,bottom:e?.info?.bottom??!1},this.customDayNames=e?.customDayNames??[],this.settings={lang:e?.settings?.lang??app_shop?.vars?.language?.symbol??"pl",iso8601:e?.settings?.iso8601??!0,workingDays:e?.settings?.workingDays??null,disabled:{weekDay:e?.settings?.disabled?.weekDay??null,weekends:e?.settings?.disabled?.weekends??!1},range:{min:e?.settings?.range?.min??this.date.min,max:e?.settings?.range?.max??this.date.max,disabled:e?.settings?.range?.disabled??null,enabled:e?.settings?.range?.enabled??null},selection:{day:e?.settings?.selection?.day??"single",month:e?.settings?.selection?.month??!0,year:e?.settings?.selection?.year??!0,time:e?.settings?.selection?.time??!1,controlTime:e?.settings?.selection?.controlTime??"all",stepHours:e?.settings?.selection?.stepHours??1,stepMinutes:e?.settings?.selection?.stepMinutes??1}
1,selected:{dates:e?.settings?.selected?.dates??null,month:e?.settings?.selected?.month??null,year:e?.settings?.selected?.year??null,holidays:e?.settings?.selected?.holidays??null,time:e?.settings?.selected?.time??null},visibility:{templateHeader:e?.settings?.visibility?.templateHeader??"%M %Y",monthShort:e?.settings?.visibility?.monthShort??!0,weekNumbers:e?.settings?.visibility?.weekNumbers??!1,weekend:e?.settings?.visibility?.weekend??!0,today:e?.settings?.visibility?.today??!0,disabled:e?.settings?.visibility?.disabled??!1}},this.locale={months:e?.locale?.months??[],weekday:e?.locale?.weekday??[]},this.actions={clickDay:e?.actions?.clickDay??null,clickMonth:e?.actions?.clickMonth??null,clickYear:e?.actions?.clickYear??null,changeTime:e?.actions?.changeTime??null,afterRender:e?.actions?.afterRender??null,afterFocus:e?.actions?.afterFocus??null},this.popups=e?.popups??null,this.currentType=this.type,this.selectedKeeping=null,this.userTime=!1)}generateDate(t){const e=t.getUTCFullYear();let i=t.getUTCMonth()+1,n=t.getUTCDate();return i=i<10?`0${i}`:i,n=n<10?`0${n}`:n,`${e}-${i}-${n}`}transformTime12(t){const e=Number(t);let i=e;return 0===e?i="12":13===e?i="01":14===e?i="02":15===e?i="03":16===e?i="04":17===e?i="05":18===e?i="06":19===e?i="07":20===e?i="08":21===e?i="09":22===e?i="10":23===e&&(i="11"),i}transformTime24(t,e){const i=Number(t);let n=i;return"AM"===e?12===i&&(n="00"):"PM"===e&&(1===i?n="13":2===i?n="14":3===i?n="15":4===i?n="16":5===i?n="17":6===i?n="18":7===i?n="19":8===i?n="20":9===i?n="21":10===i?n="22":11===i&&(n="23")),n}setVariablesDates(){null!==this.settings.selected.dates?this.selectedDates=this.settings.selected.dates:this.selectedDates=[],null!==this.settings.selected.month&&this.settings.selected.month>=0&&this.settings.selected.month<12?this.selectedMonth=this.settings.selected.month:this.selectedMonth=this.date.today.getUTCMonth(),null!==this.settings.selected.year&&this.settings.selected.year>=0&&this.settings.selected.year<=9999?this.selectedYear=this.settings.selected.year:this.selectedYear=this.date.today.getUTCFullYear(),this.viewYear=this.selectedYear,this.dateMin=this.settings.visibility.disabled?new Date(this.date.min):new Date(this.settings.range.min),this.dateMax=this.settings.visibility.disabled?new Date(this.date.max):new Date(this.settings.range.max);const t=!0===this.settings.selection.time||12===this.settings.selection.time;if(t||24===this.settings.selection.time){if("string"==typeof this.settings.selected.time){const e=t?/^([0-9]|0[1-9]|1[0-2]):([0-5][0-9])|(AM|PM)/g:/^([0-1]?[0-9]|2[0-3]):([0-5][0-9])/g;this.settings.selected.time.replace(e,((e,i,n,s)=>{i&&n&&(this.userTime=!0,this.selectedHours=i,this.selectedMinutes=n),s&&t?this.selectedKeeping=s:t&&(this.selectedKeeping="AM")}))}!this.userTime&&t?(this.selectedHours=this.transformTime12(this.date.today.getHours()),this.selectedMinutes=this.date.today.getMinutes(),this.selectedKeeping=Number(this.date.today.getHours())>12?"PM":"AM"):this.userTime||(this.selectedHours=this.date.today.getHours(),this.selectedMinutes=this.date.today.getMinutes()),this.selectedHours=Number(this.selectedHours)<10?`0${Number(this.selectedHours)}`:`${this.selectedHours}`,this.selectedMinutes=Number(this.selectedMinutes)<10?`0${Number(this.selectedMinutes)}`:`${this.selectedMinutes}`,this.selectedTime=`${this.selectedHours}:${this.selectedMinutes}${this.selectedKeeping?` ${this.selectedKeeping}`:""}`}else this.settings.selection.time&&(this.settings.selection.time=null)}createDOM(){"default"===this.currentType?(this.HTMLElement.classList.add("vanilla-calendar_default"),this.HTMLElement.classList.remove("vanilla-calendar_month"),this.HTMLElement.classList.remove("vanilla-calendar_year"),this.HTMLElement.innerHTML=`\n      ${this.info.top?'\n      <div class="vanilla-calendar-info --top"></div>\n      ':""}\n      <div class="vanilla-calendar-header">\n        <button type="button"\n          class="vanilla-calendar-arrow vanilla-calendar-arrow_prev"\n          data-calendar-arrow="prev"\n          title="Prev">\n        </button>\n        <div class="vanilla-calendar-header__content"></div>\n        <button type="button"\n          class="vanilla-calendar-arrow vanilla-calendar-arrow_next"\n          data-calendar-arrow="next"\n          title="Next">\n        </button>\n      </div>\n      ${this.settings.visibility.weekNumbers?'\n      <div class="vanilla-calendar-column">\n        <b class="vanilla-calendar-column__title">#</b>\n        <div class="vanilla-calendar-column__content vanilla-calendar-week-numbers"></div>\n      </div>\n      ':""}\n      <div class="vanilla-calendar-content">\n        <div class="vanilla-calendar-week"></div>\n        <div class="vanilla-calendar-days"></div>\n        ${this.settings.selection.time?'\n        <div class="vanilla-calendar-time"></div>\n        ':""}\n      </div>\n      ${this.info.bottom?'\n      <div class="vanilla-calendar-info --bottom"></div>\n      ':""}\n    `):"month"===this.currentType?(this.HTMLElement.classList.remove("vanilla-calendar_default"),this.HTMLElement.classList.add("vanilla-calendar_month"),this.HTMLElement.classList.remove("vanilla-calendar_year"),this.HTMLElement.innerHTML='\n      <div class="vanilla-calendar-header">\n        <div class="vanilla-calendar-header__content"></div>\n      </div>\n      <div class="vanilla-calendar-content">\n        <div class="vanilla-calendar-months"></div>\n      </div>'):"year"===this.currentType&&(this.HTMLElement.classList.remove("vanilla-calendar_default"),this.HTMLElement.classList.remove("vanilla-calendar_month"),this.HTMLElement.classList.add("vanilla-calendar_year"),this.HTMLElement.innerHTML='\n      <div class="vanilla-calendar-header">\n        <button type="button"\n          class="vanilla-calendar-arrow vanilla-calendar-arrow_prev"\n          title="prev">\n        </button>\n        <div class="vanilla-calendar-header__content"></div>\n        <button type="button"\n          class="vanilla-calendar-arrow vanilla-calendar-arrow_next"\n          title="next">\n        </button>\n      </div>\n      <div class="vanilla-calendar-content">\n        <div class="vanilla-calendar-years"></div>\n      </div>')}createHeader(){const t=this.HTMLElement.querySelector(".vanilla-calendar-header__content"),e=this.settings.selection.month?"":" vanilla-calendar-month_disabled",i=this.settings.selection.year?"":" vanilla-calendar-year_disabled",n=`\n    <button type="button"\n      class="vanilla-calendar-month${e}"\n      ${e?' tabindex="-1" ':""}\n      data-calendar-selected-month="${this.selectedMonth}">\n      ${this.locale.months[this.selectedMonth]}\n    </button>`.replace(/[\n\t]/g,""),s=`\n    <button type="button"\n      class="vanilla-calendar-year${i}"\n      ${i?' tabindex="-1" ':""}\n      data-calendar-selected-year="${this.selectedYear}">\n      ${this.selectedYear}\n    </button>`.replace(/[\n\t]/g,"");let o=this.settings.visibility.templateHeader.replace("%M",n);o=o.replace("%Y",s),t.innerHTML=o}controlArrows(){if(!["default","year"].includes(this.currentType))return;const t=this.HTMLElement.querySelector(".vanilla-calendar-arrow_prev"),e=this.HTMLElement.querySelector(".vanilla-calendar-arrow_next");(()=>{if("default"!==this.currentType)return;const i=this.selectedMonth===this.dateMin.getUTCMonth(),n=this.selectedMonth===this.dateMax.getUTCMonth(),s=!this.settings.selection.year||this.selectedYear===this.dateMin.getUTCFullYear(),o=!this.settings.selection.year||this.selectedYear===this.dateMax.getUTCFullYear();i&&s||!this.settings.selection.month?t.style.visibility="hidden":t.style.visibility=null,n&&o||!this.settings.selection.month?e.style.visibility="hidden":e.style.visibility=null})(),(()=>{"year"===this.currentType&&(this.dateMin.getUTCFullYear()&&this.viewYear-7<=this.dateMin.getUTCFullYear()?t.style.visibility="hidden":t.style.visibility=null,this.dateMax.getUTCFullYear()&&this.viewYear+7>=this.dateMax.getUTCFullYear()?e.style.visibility="hidden":e.style.visibility=null)})()}createWeek(){const t=this.HTMLElement.querySelector(".vanilla-calendar-week"),e=d
1ocument.createElement("b");e.className="vanilla-calendar-week__day";const i=[...this.locale.weekday];this.settings.iso8601&&i.push(i.shift()),t.innerHTML="";for(let n=0;n<i.length;n++){const s=i[n],o=e.cloneNode(!0);this.settings.visibility.weekend&&this.settings.iso8601?5!==n&&6!==n||o.classList.add("vanilla-calendar-week__day_weekend"):this.settings.visibility.weekend&&!this.settings.iso8601&&(0!==n&&6!==n||o.classList.add("vanilla-calendar-week__day_weekend")),o.innerText=`${s}`,t.append(o)}}getWeekNumber(t){const e=new Date(t).getUTCDate(),i=new Date(t).getUTCMonth(),n=new Date(t).getUTCFullYear(),s=new Date(n,i,e),o=new Date(Date.UTC(s.getUTCFullYear(),0,1)),a=Math.ceil(((s-o)/864e5+1)/7);return{year:s.getUTCFullYear(),week:a}}createWeekNumbers(t,e){if(!this.settings.visibility.weekNumbers)return;const i=this.HTMLElement.querySelector(".vanilla-calendar-week-numbers"),n=this.HTMLElement.querySelectorAll(".vanilla-calendar-day__btn"),s=Math.ceil((t+e)/7),o=document.createElement("span");o.className="vanilla-calendar-week-number",i.innerHTML="";for(let t=0;t<s;t++){const e=this.getWeekNumber(n[7*t].dataset.calendarDay),s=o.cloneNode(!0);s.innerText=`${e.week}`,s.dataset.calendarYearWeek=`${e.year}`,i.append(s)}}createPopup(t){if(this.popups)for(const e in this.popups)if(Object.hasOwnProperty.call(this.popups,e)){const i=t.querySelector(`[data-calendar-day="${e}"]`);if(i){const t=this.popups[e];i.classList.add(t.modifier),i.parentNode.innerHTML+=`<div class="vanilla-calendar-day__popup">${t.html}</div>`}}}createDays(){const t=new Date(Date.UTC(this.selectedYear,this.selectedMonth,1)),e=new Date(Date.UTC(this.selectedYear,this.selectedMonth+1,0)).getUTCDate();let i=Number(t.getUTCDay());this.settings.iso8601&&(i=Number((0!==t.getUTCDay()?t.getUTCDay():7)-1));const n=this.HTMLElement.querySelector(".vanilla-calendar-days"),s=document.createElement("div"),o=document.createElement("button");s.className="vanilla-calendar-day",o.className="vanilla-calendar-day__btn",o.type="button",["single","multiple","multiple-ranged"].includes(this.settings.selection.day)&&n.classList.add("vanilla-calendar-days_selecting"),n.innerHTML="";const a=(t,e,i,n)=>{!this.settings.visibility.weekend||0!==e&&6!==e||t.classList.add("vanilla-calendar-day__btn_weekend"),Array.isArray(this.settings.selected.holidays)&&this.settings.selected.holidays.forEach((e=>{e===i&&t.classList.add("vanilla-calendar-day__btn_holiday")}));let s=this.date.today.getUTCDate(),o=this.date.today.getUTCMonth()+1;s=s<10?`0${s}`:s,o=o<10?`0${o}`:o;const a=`${this.date.today.getUTCFullYear()}-${o}-${s}`;if(this.settings.visibility.today&&t.dataset.calendarDay===a&&t.classList.add("vanilla-calendar-day__btn_today"),0===this.selectedDates.indexOf(i)||this.selectedDates[0]&&this.selectedDates.indexOf(i)===this.selectedDates.length-1?t.classList.add("vanilla-calendar-day__btn_selected"):"multiple-ranged"===this.settings.selection.day&&this.selectedDates.indexOf(i)>0?(t.classList.add("vanilla-calendar-day__btn_selected"),t.classList.add("vanilla-calendar-day__btn_intermediate")):this.selectedDates.indexOf(i)>0&&t.classList.add("vanilla-calendar-day__btn_selected"),(this.settings.range.min>i||this.settings.range.max<i)&&(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")),this.settings.selection.month||n||(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")),this.settings.selection.year||new Date(i).getFullYear()===this.selectedYear||(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")),Array.isArray(this.settings.range.disabled)?this.settings.range.disabled.forEach((e=>{e===i&&(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"))})):Array.isArray(this.settings.range.enabled)&&(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),this.settings.range.enabled.forEach((e=>{e===i&&(t.classList.remove("vanilla-calendar-day__btn_disabled"),t.removeAttribute("tabindex"),t.removeAttribute("aria-hidden"))}))),!this.settings.disabled.weekends||0!==e&&6!==e||(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")),Array.isArray(this.settings.disabled.weekDay)&&this.settings.disabled.weekDay.forEach((i=>{i===e&&(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"))})),Array.isArray(this.settings.workingDays)&&(this.settings.workingDays.includes(e)||(t.classList.add("vanilla-calendar-day__btn_disabled"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"))),this.customDayNames?.length){const e=this.customDayNames.find((t=>t.date===i));if(e){const{class:i="",name:n}=e||{};t.classList.add(i),n&&(t.innerHTML=n)}}},r=(t,e,i,r,c)=>{const l=s.cloneNode(!0),u=o.cloneNode(!0);c&&u.classList.add(c),u.innerText=t,u.dataset.calendarDay=i,a(u,e,i,r),l.append(u),n.append(l)};(()=>{let t=new Date(Date.UTC(this.selectedYear,this.selectedMonth,0)).getUTCDate()-i,e=this.selectedYear,n=this.selectedMonth;0===this.selectedMonth?(n=this.locale.months.length,e=this.selectedYear-1):this.selectedMonth<10&&(n=`0${this.selectedMonth}`);for(let s=0;s<i;s++){t+=1;const i=`${e}-${n}-${t}`,s=new Date(Date.UTC(this.selectedYear,this.selectedMonth,t-1)).getUTCMonth()-1,o=new Date(Date.UTC(this.selectedYear,s,t)).getUTCDay();r(t,o,i,!1,"vanilla-calendar-day__btn_prev")}})(),(()=>{for(let t=1;t<=e;t++){const e=new Date(Date.UTC(this.selectedYear,this.selectedMonth,t)),i=this.generateDate(e),n=e.getUTCDay();r(t,n,i,!0)}})(),(()=>{const t=i+e,n=Math.ceil(t/this.locale.weekday.length),s=this.locale.weekday.length*n-t;let o=this.selectedYear,a=this.selectedMonth+2;this.selectedMonth+1===this.locale.months.length?(a="01",o=this.selectedYear+1):this.selectedMonth+2<10&&(a=`0${this.selectedMonth+2}`);for(let t=1;t<=s;t++){const e=`${o}-${a}-${t<10?`0${t}`:t}`,i=new Date(Date.UTC(this.selectedYear,this.selectedMonth,t)).getUTCMonth()+1,n=new Date(Date.UTC(this.selectedYear,i,t)).getUTCDay();r(t,n,e,!1,"vanilla-calendar-day__btn_next")}})(),this.createPopup(n),this.createWeekNumbers(i,e),this.actions.afterRender&&this.actions.afterRender(this)}changeMonth(t){const e=this.locale.months.length-1;switch(t){case"prev":0!==this.selectedMonth?this.selectedMonth-=1:this.settings.selection.year&&(this.selectedYear-=1,this.selectedMonth=e);break;case"next":this.selectedMonth!==e?this.selectedMonth+=1:this.settings.selection.year&&(this.selectedYear+=1,this.selectedMonth=0)}this.settings.selected.month=this.selectedMonth,this.settings.selected.year=this.selectedYear,this.createHeader(),this.controlArrows(),this.createDays()}createYears(){this.currentType="year",this.createDOM(),this.createHeader(),this.controlArrows();const t=this.HTMLElement.querySelector(".vanilla-calendar-years");this.settings.selection.year&&t.classList.add("vanilla-calendar-years_selecting");const e=document.createElement("button");e.type="button",e.className="vanilla-calendar-years__year";for(let i=this.viewYear-7;i<this.viewYear+8;i++){const n=i,s=e.cloneNode(!0);n===this.selectedYear&&s.classList.add("vanilla-calendar-years__year_selected"),n<this.dateMin.getUTCFullYear()&&(s.classList.add("vanilla-calendar-years__year_disabled"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true")),n>this.dateMax.getUTCFullYear()&&(s.classList.add("vanilla-calendar-years__year_disabled"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true")),s.dataset.calendarYear=n,s.innerText=`${n}`,t.append(s)}this.actions.afterRender&&this.actions.afterRender(this)}createMonths(){this.currentType="month",this.createDOM(),this.createHeader();const t=this.HTMLElement.querySelector(".vanilla-calendar-months");this.settings.selection.month&&t.classList.add("vanilla-calendar-months_selecting");const e=document.createElement("button");e.type="button",e.className="vanilla-calendar-months__month";for(let i=0;i<this.locale.months.length;i++){const n=this.locale.months[i],s=e.cloneNode(!0);i===this.selectedMonth&&s.classList.add("vanilla-calendar-months__month_selected"),i<this.dateMin.getUTCMonth()&&this.selectedYear===this.dateMin.getUTCFullYear()&&(s.classList.add("vanilla-calendar-months__month_disabled"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true")),i>this.dateMax.getUTCMonth()&&this.selectedYear===this.dateMax.getUTCFullYear()&&(s.classList.add("vanilla-calendar-months__month_disabled"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true")),s.dataset.calendarMonth=i,s.title=`${n}`,s.innerText=`${this.settings.visibility.monthShort?n.substring(0,3):n}`,t.append(s)}this.actions.afterRender&&this.actions.afterRender(this)}controlTime(t){const e=this.HTMLElement.querySelector('.vanilla-calendar-time__range input[name="hours"]'),i=this.HTMLElement.querySelector('.vanilla-calendar-time__range input[name="minutes"]'),n=this.HTMLElement.querySelector('.vanilla-calendar-time__hours input[name="hours"]'),s=this.HTMLElement.querySelector('.vanilla-calendar-time__minutes input[name="minutes"]'),o=this.HTMLElement.querySelector(".vanilla-calendar-time__keeping"),a=(t,e)=>{t.addEventListener("mouseover",(()=>e.classList.add("is-focus")))},r=(t,e)=>{t.addEventListener("mouseout",(()=>e.classList.remove("is-focus")))}
1,c=(t,e,i)=>{"hours"===i?this.selectedHours=`${e}`:"minutes"===i&&(this.selectedMinutes=`${e}`),this.selectedTime=`${this.selectedHours}:${this.selectedMinutes}${this.selectedKeeping?` ${this.selectedKeeping}`:""}`,this.settings.selected.time=this.selectedTime,this.actions.changeTime&&this.actions.changeTime(t,this.selectedTime,this.selectedHours,this.selectedMinutes,this.selectedKeeping)},l=(t,e,i,n)=>{t.addEventListener("input",(t=>{let s=Number(t.target.value);s=s<10?`0${s}`:`${s}`,"hours"===i&&12===n?Number(t.target.value)<n&&Number(t.target.value)>0?(e.value=s,this.selectedKeeping="AM",o.innerText=this.selectedKeeping,c(t,s,i)):(0===Number(t.target.value)?(this.selectedKeeping="AM",o.innerText="AM"):(this.selectedKeeping="PM",o.innerText="PM"),e.value=this.transformTime12(t.target.value),c(t,this.transformTime12(t.target.value),i)):(e.value=s,c(t,s,i))}))},u=(t,e,i,n)=>{e.addEventListener("change",(e=>{let s=Number(e.target.value);s=s<10?`0${s}`:`${s}`,"hours"===i&&12===n?e.target.value&&Number(e.target.value)<=n&&Number(e.target.value)>0?(e.target.value=s,t.value=this.transformTime24(s,this.selectedKeeping),c(e,s,i)):e.target.value&&Number(e.target.value)<24&&(Number(e.target.value)>n||0===Number(e.target.value))?(0===Number(e.target.value)?(this.selectedKeeping="AM",o.innerText="AM"):(this.selectedKeeping="PM",o.innerText="PM"),e.target.value=this.transformTime12(e.target.value),t.value=s,c(e,this.transformTime12(e.target.value),i)):e.target.value=this.selectedHours:e.target.value&&Number(e.target.value)<=n&&Number(e.target.value)>=0?(e.target.value=s,t.value=s,c(e,s,i)):"hours"===i?e.target.value=this.selectedHours:"minutes"===i&&(e.target.value=this.selectedMinutes)}))};a(e,n),a(i,s),r(e,n),r(i,s),l(e,n,"hours",24===t?23:t),l(i,s,"minutes"),u(e,n,"hours",24===t?23:t),u(i,s,"minutes",59),o&&o.addEventListener("click",(t=>{o.innerText.includes("AM")?this.selectedKeeping="PM":this.selectedKeeping="AM",e.value=this.transformTime24(this.selectedHours,this.selectedKeeping),c(t,this.selectedHours,"hours"),o.innerText=this.selectedKeeping}))}createTime(){const t=this.HTMLElement.querySelector(".vanilla-calendar-time");if(!t)return;const e=!0===this.settings.selection.time?12:this.settings.selection.time,i="range"===this.settings.selection.controlTime;t.innerHTML=`\n    <div class="vanilla-calendar-time__content">\n      <label class="vanilla-calendar-time__hours">\n        <input type="text"\n          name="hours"\n          maxlength="2"\n          value="${this.selectedHours}"\n          ${i?"disabled":""}>\n      </label>\n      <label class="vanilla-calendar-time__minutes">\n        <input type="text"\n          name="minutes"\n          maxlength="2"\n          value="${this.selectedMinutes}"\n          ${i?"disabled":""}>\n      </label>\n      ${12===e?`\n      <button type="button"\n        class="vanilla-calendar-time__keeping"\n        ${i?"disabled":""}>${this.selectedKeeping}</button>\n      `:""}\n    </div>\n    <div class="vanilla-calendar-time__ranges">\n      <label class="vanilla-calendar-time__range">\n        <input type="range"\n          name="hours"\n          min="0"\n          max="23"\n          step="${this.settings.selection.stepHours}"\n          value="${this.selectedKeeping?this.transformTime24(this.selectedHours,this.selectedKeeping):this.selectedHours}">\n      </label>\n      <label class="vanilla-calendar-time__range">\n        <input type="range"\n          name="minutes"\n          min="0"\n          max="59"\n          step="${this.settings.selection.stepMinutes}"\n          value="${this.selectedMinutes}">\n      </label>\n    </div>`,this.controlTime(e)}getLocale(){if("define"!==this.settings.lang){this.locale.weekday=[];for(let t=0;t<7;t++){let e=new Date(0,0,t).toLocaleString(this.settings.lang,{weekday:"short"});e=`${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,e=e.replace(/\./,""),this.locale.weekday.push(e)}this.locale.months=[];for(let t=0;t<12;t++){let e=new Date(0,t).toLocaleString(this.settings.lang,{month:"long"});e=`${e.charAt(0).toUpperCase()}${e.substring(1,e.length)}`,e=e.replace(/\./,""),this.locale.months.push(e)}}}createInfo(){if(this.info.top){this.HTMLElement.querySelector(".vanilla-calendar-info.--top").innerHTML=this.info.top}if(this.info.bottom){this.HTMLElement.querySelector(".vanilla-calendar-info.--bottom").innerHTML=this.info.bottom}}update(){this.setVariablesDates(),this.getLocale(),this.createDOM(),this.createHeader(),this.controlArrows(),this.createTime(),this.createInfo(),"default"===this.currentType?(this.createWeek(),this.createDays()):"month"===this.currentType?this.createMonths():"year"===this.currentType&&this.createYears(),this.actions.afterRender&&this.actions.afterRender(this)}focusElement({type:t="day"}){const e=this.HTMLElement.querySelector(".vanilla-calendar-day__btn_selected:not(.disabled)");if("day"===t&&e)return e.focus(),void(this.actions.afterFocus&&this.actions.afterFocus(this,t));const i=Array.from(this.HTMLElement.querySelectorAll(".vanilla-calendar-content button"));i.find((t=>-1===t?.className.indexOf("disabled")&&-1===t?.className.indexOf("prev")))?.focus?.(),this.actions.afterFocus&&this.actions.afterFocus(this,t)}click(){this.HTMLElement.addEventListener("click",(t=>{const e=t.target.closest(".vanilla-calendar-arrow"),i=t.target.closest(".vanilla-calendar-arrow_prev"),n=t.target.closest(".vanilla-calendar-arrow_next"),s=t.target.closest(".vanilla-calendar-day__btn"),o=t.target.closest(".vanilla-calendar-day__btn_prev"),a=t.target.closest(".vanilla-calendar-day__btn_next"),r=t.target.closest(".vanilla-calendar-year"),c=t.target.closest(".vanilla-calendar-years__year"),l=t.target.closest(".vanilla-calendar-month"),u=t.target.closest(".vanilla-calendar-months__month"),d=()=>{s.classList.contains("vanilla-calendar-day__btn_selected")?this.selectedDates.splice(this.selectedDates.indexOf(s.dataset.calendarDay),1):(this.selectedDates=[],this.selectedDates.push(s.dataset.calendarDay))},h=()=>{s.classList.contains("vanilla-calendar-day__btn_selected")?this.selectedDates.splice(this.selectedDates.indexOf(s.dataset.calendarDay),1):this.selectedDates.push(s.dataset.calendarDay)},p=()=>
1{if(this.selectedDates.length>1&&(this.selectedDates=[]),this.selectedDates.push(s.dataset.calendarDay),!this.selectedDates[1])return;const t=new Date(Date.UTC(new Date(this.selectedDates[0]).getUTCFullYear(),new Date(this.selectedDates[0]).getUTCMonth(),new Date(this.selectedDates[0]).getUTCDate())),e=new Date(Date.UTC(new Date(this.selectedDates[1]).getUTCFullYear(),new Date(this.selectedDates[1]).getUTCMonth(),new Date(this.selectedDates[1]).getUTCDate())),i=t=>{const e=this.generateDate(t);this.settings.range.disabled&&this.settings.range.disabled.includes(e)||this.selectedDates.push(e)};if(this.selectedDates=[],e>t)for(let n=t;n<=e;n.setUTCDate(n.getUTCDate()+1))i(n);else for(let n=t;n>=e;n.setUTCDate(n.getUTCDate()-1))i(n)};(()=>{e&&"year"!==this.currentType&&"month"!==this.currentType&&(this.changeMonth(t.target.dataset.calendarArrow),this.focusElement({type:"arrow"}))})(),(()=>{if(["single","multiple","multiple-ranged"].includes(this.settings.selection.day)&&s){switch(this.settings.selection.day){case"single":d();break;case"multiple":h();break;case"multiple-ranged":p()}this.actions.clickDay&&this.actions.clickDay(t,this.selectedDates),this.settings.selected.dates=this.selectedDates,o?this.changeMonth("prev"):a?this.changeMonth("next"):this.createDays(),this.focusElement({type:"day"})}})(),(()=>{this.settings.selection.year&&(e&&"year"===this.currentType?(n?this.viewYear+=15:i&&(this.viewYear-=15),this.createYears(),this.focusElement({type:"year"})):"year"!==this.currentType&&r?(this.createYears(),this.focusElement({type:"year"})):"year"===this.currentType&&r?(this.currentType=this.type,this.update(),this.focusElement({type:"year"})):c&&(this.selectedYear=Number(c.dataset.calendarYear),this.currentType=this.type,this.selectedMonth<this.dateMin.getUTCMonth()&&this.selectedYear===this.dateMin.getUTCFullYear()&&(this.settings.selected.month=this.dateMin.getUTCMonth()),this.selectedMonth>this.dateMax.getUTCMonth()&&this.selectedYear===this.dateMax.getUTCFullYear()&&(this.settings.selected.month=this.dateMax.getUTCMonth()),this.actions.clickYear&&this.actions.clickYear(t,this.selectedYear),this.settings.selected.year=this.selectedYear,this.update(),this.focusElement({type:"year"})))})(),(()=>{this.settings.selection.month&&("month"!==this.currentType&&l?(this.createMonths(),this.focusElement({type:"month"})):"month"===this.currentType&&l?(this.currentType=this.type,this.update(),this.focusElement({type:"month"})):u&&(this.selectedMonth=Number(u.dataset.calendarMonth),this.currentType=this.type,this.actions.clickMonth&&this.actions.clickMonth(t,this.selectedMonth),this.settings.selected.month=this.selectedMonth,this.update(),this.focusElement({type:"month"})))})()}))}init(){this.HTMLElement&&(this.update(),this.click())}}function FormValidation(t){const{form:e,formSelector:i,afterValidate:n,afterValidateForm:s}=t||{};this.debounce=(t,e=500)=>{let i;return(...n)=>{clearTimeout(i),i=setTimeout((()=>t(...n)),e)}},this.fetchData=async t=>{try{const e=await fetch(`${app_shop?.urls?.graphql||"/graphql/v1/"}?query=validateClientData`,{method:"POST",body:JSON.stringify({query:`query {${t}}`})});return await e.json()}catch(t){return!1}},this.vars={passwordLengthMin:6,passwordLengthMax:30,changedInputs:[]},this.callbacks={validate:n,validateAll:s},this.errorCode={birth_date:app_shop?.txt?.errorCode?.birth_date||"Wpisz poprawną datę urodzenia w formacie RRRR-MM-DD",illegal_characters_client_city:app_shop?.txt?.errorCode?.illegal_characters_client_city||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_firm:app_shop?.txt?.errorCode?.illegal_characters_client_firm||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_firstname:app_shop?.txt?.errorCode?.illegal_characters_client_firstname||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_lastname:app_shop?.txt?.errorCode?.illegal_characters_client_lastname||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_nip:app_shop?.txt?.errorCode?.illegal_characters_client_nip||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_phone:app_shop?.txt?.errorCode?.illegal_characters_client_phone||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_phone2:app_shop?.txt?.errorCode?.illegal_characters_client_phone2||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_client_street:app_shop?.txt?.errorCode?.illegal_characters_client_street||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_additional:app_shop?.txt?.errorCode?.illegal_characters_delivery_additional||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_city:app_shop?.txt?.errorCode?.illegal_characters_delivery_city||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_firstname:app_shop?.txt?.errorCode?.illegal_characters_delivery_firstname||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_lastname:app_shop?.txt?.errorCode?.illegal_characters_delivery_lastname||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_phone:app_shop?.txt?.errorCode?.illegal_characters_delivery_phone||"Jeden z użytych znaków jest niedozwolony.",illegal_characters_delivery_street:
1app_shop?.txt?.errorCode?.illegal_characters_delivery_street||"Jeden z użytych znaków jest niedozwolony.",incorect_delivery_region:app_shop?.txt?.errorCode?.incorect_delivery_region||"Wybierz kraj odbiorcy przesyłki.",incorect_delivery_zipcode:app_shop?.txt?.errorCode?.incorect_delivery_zipcode||"Wpisz kod pocztowy odbiorcy przesyłki.",incorect_email:app_shop?.txt?.errorCode?.incorect_email||"Błędnie wpisany e-mail. Wpisz pełny adres e-mail, np. [email protected]",incorect_invoice_phone:app_shop?.txt?.errorCode?.incorect_invoice_phone||"Wpisz telefon klienta.",incorect_invoice_zipcode:app_shop?.txt?.errorCode?.incorect_invoice_zipcode||"Wpisz kod pocztowy klienta.",incorect_login:app_shop?.txt?.errorCode?.incorect_login||"Błędnie wpisany login. Login musi mieć minimum 3, a maksimum 40 znaków. Możesz użyć liter i cyfr oraz symboli @ . - _.",incorect_nip:app_shop?.txt?.errorCode?.incorect_nip||"Niepoprawny NIP dla wybranego kraju.",incorect_phone:app_shop?.txt?.errorCode?.incorect_phone||"Wpisz swój telefon.",incorect_shops:app_shop?.txt?.errorCode?.incorect_shops||"Wybierz sklep z listy.",incorect_zipcode:app_shop?.txt?.errorCode?.incorect_zipcode||"Błędnie wpisany kod pocztowy.",incorrect_region:app_shop?.txt?.errorCode?.incorrect_region||"Błędnie wybrany region.",invalid_format:app_shop?.txt?.errorCode?.invalid_format||"Nieprawidłowy format. Pole musi zawierać przynajmniej jedną literę.",login_equals_password:app_shop?.txt?.errorCode?.login_equals_password||"Hasło jest takie samo jak login. Wpisz inne hasło.",login_taken:app_shop?.txt?.errorCode?.login_taken||"Podany login jest już zajęty",login_taken_login_propose:app_shop?.txt?.errorCode?.login_taken_login_propose||"Podany login jest już zajęty.<br/><br/>Proponowany login: ",no_city:app_shop?.txt?.errorCode?.no_city||"Wpisz w to pole nazwę miasta.",no_delivery_city:app_shop?.txt?.errorCode?.no_delivery_city||"Wpisz miejscowość odbiorcy przesyłki.",no_delivery_firstname:app_shop?.txt?.errorCode?.no_delivery_firstname||"Wpisz imię odbiorcy przesyłki.",no_delivery_lastname:app_shop?.txt?.errorCode?.no_delivery_lastname||"Wpisz nazwisko odbiorcy przesyłki.",no_delivery_street:app_shop?.txt?.errorCode?.no_delivery_street||"Wpisz ulicę i numer domu odbiorcy przesyłki.",no_firmname:app_shop?.txt?.errorCode?.no_firmname||"Błędnie wpisana nazwa firmy.",no_firstname:app_shop?.txt?.errorCode?.no_firstname||"Wpisz w to pole swoje imię.",no_invoice_city:app_shop?.txt?.errorCode?.no_invoice_city||"Wpisz miejscowość klienta.",no_invoice_firmname:app_shop?.txt?.errorCode?.no_invoice_firmname||"Wpisz nazwę firmy klienta.",no_invoice_firstname:app_shop?.txt?.errorCode?.no_invoice_firstname||"Wpisz imię klienta.",no_invoice_lastname:app_shop?.txt?.errorCode?.no_invoice_lastname||"Wpisz nazwisko klienta.",no_invoice_street:app_shop?.txt?.errorCode?.no_invoice_street||"Wpisz ulicę i numer domu klienta.",no_invoice_street_number:app_shop?.txt?.errorCode?.no_invoice_street_number||"Wpisz ulicę i numer domu klienta.",no_login:app_shop?.txt?.errorCode?.no_login||"Wpisz w to pole swój login.",no_name:app_shop?.txt?.errorCode?.no_name||"Wpisz w to pole swoje nazwisko.",no_password:app_shop?.txt?.errorCode?.no_password||"Wpisz w to pole swoje hasło.",no_street:app_shop?.txt?.errorCode?.no_street||"Wpisz nazwę ulicy lub miejscowości.",no_street_number:app_shop?.txt?.errorCode?.no_street_number||"Podaj nr domu.",no_street_number_uk:app_shop?.txt?.errorCode?.no_street_number_uk||"Brakuje numeru domu.",not_equal_passwords:app_shop?.txt?.errorCode?.not_equal_passwords||"Wpisane hasła nie są takie same. Wpisz ponownie hasło i potwierdzenie.",password_to_long:app_shop?.txt?.errorCode?.password_to_long||"Za długie hasło. Wpisz krótsze hasło (maksimum",password_to_short:app_shop?.txt?.errorCode?.password_to_short||"Zbyt krótkie hasło. Wpisz dłuższe hasło (minimum",used_login:app_shop?.txt?.errorCode?.used_login||"Podany login jest już zajęty",incorrect_iban:app_shop?.txt?.errorCode?.incorrect_iban||app_shop.txt.txt_validation5||"Format numeru konta bankowego jest niepoprawny"},this.passwordErrorCodes=["no_password","not_equal_passwords","password_to_long","password_to_short","login_equals_password"],this.loginErrorCodes=["incorect_login","login_taken","login_taken_login_propose","no_login","used_login"],this.txt={mandatoryField:app_shop?.txt?.formValidation?.mandatoryField||"Proszę wypełnić to pole.",zipcodeFormat:app_shop?.txt?.formValidation?.z
1ipcodeFormat||"Poprawne formaty kodu pocztowego dla wybranego kraju to [X - cyfra; Y - litera]:",characters:app_shop?.txt?.formValidation?.characters||"znaków).",noOptionSelected:app_shop?.txt?.formValidation?.noOptionSelected||"Proszę wybrać opcję.",minimalCharacters:app_shop?.txt?.formValidation?.minimalCharacters||app_shop.txt?.txt_validation1||"Minimalna liczba znaków dla tego pola to ",maximumCharacters:app_shop?.txt?.formValidation?.maximumCharacters||app_shop.txt?.txt_validation2||"Maksymalna liczba znaków dla tego pola to ",onlyDigital:app_shop?.txt?.formValidation?.onlyDigital||"Pole nie może zawierać cyfr."},this.queries={VALIDATE_FIRSTNAME_QUERY:t=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        firstname: "${t?.replace?.(/"/g,'\\"')}"\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_LASTNAME_QUERY:t=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        lastname: "${t?.replace?.(/"/g,'\\"')}"\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_ADDITIONAL_QUERY:t=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        companyName: "${t?.replace?.(/"/g,'\\"')}"\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_NIP_QUERY:(t,e)=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        country: ${e}\n      }\n      taxNumber: "${t?.replace?.(/"/g,'\\"')}"\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_STREET_QUERY:(t,e)=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        street: "${t?.replace?.(/"/g,'\\"')}"\n        country: ${e}\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_ZIPCODE_QUERY:(t,e)=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        zipcode: "${t?.replace?.(/"/g,'\\"')}"\n        country: ${e}\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_CITY_QUERY:t=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        city: "${t?.replace?.(/"/g,'\\"')}"\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_PHONE_QUERY:(t,e)=>`validateClientData(ClientDataInput: { clientData: {\n      clientBillingData: {\n        phone: "${t?.replace?.(/"/g,'\\"')}"\n        country: ${e}\n      }\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_EMAIL_QUERY:t=>`validateClientData(ClientDataInput: {clientData: {\n      email: "${t?.replace?.(/"/g,'\\"')}"\n    }}) {\n      messages {\n        code\n        message\n      }\n      clientExists\n    }`,VALIDATE_BIRTHDATE_QUERY:t=>`validateClientData(ClientDataInput: {clientData: {\n      birthDate: "${t?.replace?.(/"/g,'\\"')}"\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_LOGIN_QUERY:(t,e)=>`validateClientData(ClientDataInput: {loginAndPassword: {\n      login: "${t?.replace?.(/"/g,'\\"')}"\n      ${e?`password: "${e?.replace?.(/"/g,'\\"')}"`:""}\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_PASSWORD_QUERY:(t,e)=>`validateClientData(ClientDataInput: {loginAndPassword: {\n      ${e?`login: "${e?.replace?.(/"/g,'\\"')}"`:""}\n      password: "${t?.replace?.(/"/g,'\\"')}"\n    }}) {\n      messages {\n        code\n        message\n      }\n    }`,VALIDATE_INPUTS_QUERY:t=>JSON.stringify({query:`query {\n        validateClientData(${t}) {\n          messages {\n            code\n            message\n          }\n        }\n      }`})},this.events={onInput:t=>{const{target:e}=t;this.vars.changedInputs.push(e),this.debounces.validateInput(e)},onChange:t=>{const{target:e}=t;this.validateCheckbox(e)},onSubmit:async t=>{if("true"===this.form.dataset.handled)return void delete this.form.dataset.handled;t.preventDefault();await this.validateForm()?(this.form.classList.remove("--fail-validation"),this.form.dataset.handled="true",this.form.submit()):this.form.classList.add("--fail-validation")}},this.concatErrorMessages=t=>{const{code:e}=t[0];switch(e){case"incorect_zipcode":return`${this.errorCode[e]} ${this.txt.zipcodeFormat} ${t[1]?.message}`;case"password_to_short":return`${this.errorCode[e]} ${this.vars.passwordLengthMin} ${this.txt.characters}`;case"password_to_long":return`${this.errorCode[e]} ${this.vars.passwordLengthMax} ${this.txt.characters}`;default:return this.errorCode[e]}},this.checkDigital=t=>!!/\d/.test(t),this.validateFirstnameGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_FIRSTNAME_QUERY(s);if(i)return this.queries.VALIDATE_FIRSTNAME_QUERY(s);const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return this.checkDigital(s)?this.txt.onlyDigital:r?.length?this.concatErrorMessages(r):""},this.validateLastnameGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_LASTNAME_QUERY(s);if(i)return this.queries.VALIDATE_LASTNAME_QUERY(s);const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return this.checkDigital(s)?this.txt.onlyDigital:r?.length?this.concatErrorMessages(r):""},this.validateAdditionalGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_ADDITIONAL_QUERY(s);if(i)return o;const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return r?.length?this.concatErrorMessages(r):""},this.validateNipGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{region:o}=e.dataset,a=this.queries.VALIDATE_NIP_QUERY(s,o);if(i)return a;const r=n||await this.fetchData(a),{messages:c}=r?.data?.validateClientData||r;return c?.length?this.concatErrorMessages(c):""},this.validateStreetGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{concatFrom:o,region:a}=e.dataset,r=this.form?.querySelector(o),c=`${s} ${r?.value||""}`,l=this.queries.VALIDATE_STREET_QUERY(c,a);if(i)return l;const u=n||await this.fetchData(l),{messages:d}=u?.data?.validateClientData||u;return d?.length?r&&"no_street_number"===d[0].code?(this.setValidityState(r,this.concatErrorMessages(d)),""):this.concatErrorMessages(d):(r&&this.setValidityState(r,""),"")},this.validateZipcodeGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{region:o}=e.dataset,a=this.queries.VALIDATE_ZIPCODE_QUERY(s,o);if(i)return a;const r=n||await this.fetchData(a),{messages:c}=r?.data?.validateClientData||r;return c?.length?this.concatErrorMessages(c):""},this.validateCityGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_CITY_QUERY(s);if(i)return o;const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return r?.length?this.concatErrorMessages(r):""},this.validatePhone=t=>{const{input:e,getQuery:i}=t;if(i)return"";const{value:n}=e;return n.length>=9?"":this.concatErrorMessages([{code:"incorect_phone"}])},this.validatePhoneGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{concatFrom:o,region:a}=e.dataset,r=this.form?.querySelector(o),c=r?.value||"",l=c?`${c}${s}`:s;if(!a)return this.validatePhone(t);const u=this.queries.VALIDATE_PHONE_QUERY(l,a);if(i)return u;const d=n||await this.fetchData(u),{messages:h}=d?.data?.validateClientData||d;return h?.length?this.concatErrorMessages(h):""},this.validateEmailGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_EMAIL_QUERY(s);if(i)return o;const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return r?.length?this.concatErrorMessages(r):""},this.validateBirthdateGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,o=this.queries.VALIDATE_BIRTHDATE_QUERY(s);if(i)return o;const a=n||await this.fetchData(o),{messages:r}=a?.data?.validateClientData||a;return r?.length?this.concatErrorMessages(r):""},this.setPasswordState=({element:t,messages:e})=>
1{if(!e.length)return void this.removeValidityState(t);const i=e.filter((t=>this.passwordErrorCodes.includes(t.code)));if(!i.length)return void this.removeValidityState(t);const n=this.concatErrorMessages(i);this.setValidityState(t,n)},this.validateLoginGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{concatPassword:o}=e.dataset,a=this.form?.querySelector(o),r=a?.value||"",c=this.queries.VALIDATE_LOGIN_QUERY(s,r);if(i)return c;const l=n||await this.fetchData(c),{messages:u}=l?.data?.validateClientData||l;if(r&&this.setPasswordState({element:a,messages:u}),!u?.length)return"";const d=u.filter((t=>!this.passwordErrorCodes.includes(t.code)));return d.length?this.concatErrorMessages(d):""},this.validatePasswordGQL=async t=>{const{input:e,getQuery:i,response:n}=t,{value:s}=e,{concatLogin:o}=e.dataset,a=this.form?.querySelector(o),r=a?.value||"",c=this.queries.VALIDATE_PASSWORD_QUERY(s,r);if(i)return c;const l=n||await this.fetchData(c),{messages:u}=l?.data?.validateClientData||l;if(!u?.length)return"";const d=u.filter((t=>!this.loginErrorCodes.includes(t.code)));return d.length?this.concatErrorMessages(d):""},this.validateIBANGQL=async t=>{const{input:e,getQuery:i}=t,{value:n}=e;if(i)return"";const s=await fetch(`/ajax/payments.php?action=verify_iban&bankAccount=${n}`),o=await s.json(),{errno:a}=o||{};return a?this.concatErrorMessages([{code:"incorrect_iban"}]):""},this.getInputQueries=async t=>(await Promise.all(t.map((async t=>{const e=await this.validateGraphQL({input:t,getQuery:!0});return`${t.id}:${e}`})))).join(""),this.validateInputsGQL=async t=>{const e=await this.getInputQueries(t),i=await this.fetchData(e);i?.data&&Object.keys(i.data).forEach((async e=>{const[n]=t.filter((t=>t.id===e));if(!n)return;const s=await this.validateGraphQL({input:n,response:i.data[e]});this.setValidityState(n,s)}))},this.clientExists=async t=>{const e=this.queries.VALIDATE_EMAIL_QUERY(t),i=await this.fetchData(e),{clientExists:n}=i?.data?.validateClientData||i;return n},this.validateMinLength=t=>{const e=t.getAttribute("minlength");return e?+e<=t.value.length?"":`${this.txt.minimalCharacters}${e}`:""},this.validateMaxLength=t=>{const e=t.getAttribute("maxlength");return e?+e>=t.value.length?"":`${this.txt.maximumCharacters}${e}`:""},this.validateInputs=async t=>{t.forEach((t=>{const e=this.validateNotEmpty(t)||this.validateMinLength(t)||this.validateMaxLength(t);""!==e&&this.setValidityState(t,e)}));const e=[...t].filter((t=>t.closest(".f-feedback:not(.--error)")));if(!e.length)return;[...e].filter((t=>!t.hasAttribute("data-graphql"))).forEach((t=>{this.setValidityState(t,"")}));const i=[...e].filter((t=>t.hasAttribute("data-graphql")));if(!i.length)return;const n=i.findIndex((t=>"iban"===t.dataset.graphql));-1!==n&&(await this.validateInput(i[n]),i.splice(n,1)),i.length&&await this.validateInputsGQL(i)},this.isPhoneNumber=t=>new RegExp("^[0-9*#+() ]+$").test(t),this.getGQLType=t=>{const{graphql:e}=t.dataset,i=e.split(" ");if(2===i.filter((t=>"phone"===t||"email"===t)).length){return this.isPhoneNumber(t.value)?"phone":"email"}return i[0]},this.validateGraphQL=async t=>{const{input:e,getQuery:i,response:n}=t,{graphql:s}=e.dataset;if(!s)return!1;const o=s.split(" ");switch(1===o.length?o[0]:this.getGQLType(e)){case"firstname":return await this.validateFirstnameGQL({input:e,getQuery:i,response:n});case"lastname":return await this.validateLastnameGQL({input:e,getQuery:i,response:n});case"additional":case"firm":return await this.validateAdditionalGQL({input:e,getQuery:i,response:n});case"nip":return await this.validateNipGQL({input:e,getQuery:i,response:n});case"street":return await this.validateStreetGQL({input:e,getQuery:i,response:n});case"zipcode":return await this.validateZipcodeGQL({input:e,getQuery:i,response:n});case"city":return await this.validateCityGQL({input:e,getQuery:i,response:n});case"phone":return await this.validatePhoneGQL({input:e,getQuery:i,response:n});case"email":return await this.validateEmailGQL({input:e,getQuery:i,response:n});case"birthdate":return await this.validateBirthdateGQL({input:e,getQuery:i,response:n});case"login":return await this.validateLoginGQL({input:e,getQuery:i,response:n});case"password":return await this.validatePasswordGQL({input:e,getQuery:i,response:n});case"iban":return await this.validateIBANGQL({input:e,getQuery:i,response:n});default:return this.setValidityState(e,"")}},this.validateInput=async t=>{const e=[...new Set(this.vars.changedInputs)].filter((t=>"username"!==t.autocomplete&&"current-password"!==t.autocomplete));if(this.vars.changedInputs=[],e.length>1)return this.removeAllValidityState(),this.validateForm(),!1;const{concatTo:i}=t.dataset;if(i)return this.validateInput(this.form.querySelector(i));let n=this.validateNotEmpty(t)||this.validateMinLength(t)||this.validateMaxLength(t);if(""!==n)return this.setValidityState(t,n);return t.getAttribute("data-graphql")?(n=await this.validateGraphQL({input:t}),this.setValidityState(t,n)):this.setValidityState(t,n)},this.validateSelects=t=>{t.forEach((t=>{this.validateSelect(t)}))},this.validateSelect=t=>{if(!t)return!0;let e="";return t.closest(".--placeholder")&&t.selectedIndex<1?(e=this.txt.noOptionSelected,this.setValidityState(t,e)):this.setValidityState(t,e)},this.validateCheckboxes=t=>{t.forEach((t=>{this.validateCheckbox(t)}))},this.validateCheckbox=t=>!t||(t.checked?this.setValidityState(t,"",!0):this.setValidityState(t,"error",!0)),this.validateObjectGQL=async(t={})=>{let e="";for(const[i,n]of Object.entries(t)){const s={dataset:{}};s.value="street"===i&&t.streetNumber?`${n} ${t.streetNumber}`:n,s.dataset.region=t.region,s.dataset.graphql=i;const o=await this.validateGraphQL({input:s,getQuery:!0});o&&(e+=`${i}:${o}`)}if(""===e)return!0;const i=await this.fetchData(e);if(!i?.data)return!0;const n=[];for(const[e,s]of Object.entries(i.data)){const o={dataset:{}};o.value="street"===e&&t.streetNumber?`${s} ${t.streetNumber}`:s,o.dataset.region=t.region,o.dataset.graphql=e,n.push(await this.validateGraphQL({input:o,response:i.data[e]}))}return!n.filter((t=>""!==t)).length},this.validateObjectRequired=(t={},e=[])=>{if(!e.length)return!0;for(const[i,n]of Object.entries(t))if(e.includes(i)&&""===n)return validRequired=!1,!1;return!0},this.validateObject=async(t={},e)=>{if(!this.validateObjectRequired(t,e))return!1;return!!await this.validateObjectGQL(t,e)},this.validateForm=async t=>{const e=t||this.form,i=e.querySelectorAll('.f-control.--validate:not(:disabled):not([type="checkbox"])'),n=[...i].filter((t=>t.closest(".f-feedback:not(.--error):not(.--success)")));await this.validateInputs(n);const s=e.querySelectorAll("select.f-select.--validate:not(:disabled), div.f-select.--validate select:not(:disabled)"),o=[...s].filter((t=>t.closest(".f-feedback:not(.--error):not(.--success)")));this.validateSelects(o);const a=e.querySelectorAll('.f-control.--validate[type="checkbox"]:not(:disabled)'),r=[...a].filter((t=>t.closest(".--checkbox:not(.--error):not(.--success), .--switch:not(.--error):not(.--success)")));this.validateCheckboxes(r);const c=[...i].filter((t=>t.closest(".f-feedback.--error"))),l=[...s].filter((t=>t.closest(".f-feedback.--error"))),u=[...a].filter((t=>t.closest(".--checkbox.--error, .--switch.--error, .f-feedback.--error")));return c.length||l.length||u.length?("function"==typeof this.callbacks.validateAll&&this.callbacks.validateAll(t,!1),!1):("function"==typeof this.callbacks.validateAll&&this.callbacks.validateAll(t,!0),!0)},this.validateNotEmpty=t=>t.required||0!==t.value.length?t.value.length>0?"":this.txt.mandatoryField:"",this.createMessageElement=t=>{const e=document.createElement("div");return e.classList.add("f-message"),e.setAttribute("aria-live","polite"),t.append(e),e},this.setValidityState=(t,e,i)=>{if(!(t&&t instanceof HTMLElement))return!1;const n=t.closest(".f-feedback")||t.parentNode;n.classList.remove("--success","--error");const s=!i&&(n.querySelector(".f-message")||this.createMessageElement(n));return n.classList.toggle("--empty",""===t.value),""===e?(n.classList.add("--success"),s&&(s.textContent=""),"function"==typeof this.callbacks.validate&&this.callbacks.validate(t,!0),!0):(n.classList.add("--error"),s&&(s.textContent=e),"function"==typeof this.callbacks.validate&&this.callbacks.validate(t,!1),!1)},this.getValidityState=t=>{if(!t)return"";const e=t.closest(".f-feedback")||t.parentNode;return e.classList.contains("--success")?"success":e.classList.contains("--error")?"error":""},this.removeAllValidityState=t=>{(t||this.form).querySelectorAll(".f-control.--validate").forEach((t=>{this.removeValidityState(t)}))},this.removeValidityState=t=>{const e=t.closest(".f-feedback")||t.parentNode;e.classList.remove("--success","--error");const i=e.querySelector(".f-message");i&&(i.textContent="")},this.removeEvents=()=>{this.form&&(this.form.querySelectorAll(".f-control.--validate").forEach((t=>{"checkbox"!==t.type?t.removeEventListener("input",this.events.onInput):t.removeEventListener("change",this.events.onChange)})),"FORM"===this.form.tagName&&this.form.removeEventListener("submit",this.events.onSubmit))},this.initEvents=()=>{this.form&&(this.form.querySelectorAll(".f-control.--validate").forEach((t=>{"checkbox"!==t.type?t.addEventListener("input",this.events.onInput):t.addEventListener("change",this.events.onChange)})),"FORM"===this.form.tagName&&this.form.addEventListener("submit",this.events.onSubmit))},this.init=()=>{this.form=e||document.querySelector(i)||document,this.initEvents()},this.destroy=()=>{this.removeEvents()},this.reInit=()=>{this.destroy(),this.init()},this.debounces={validateInput:this.debounce(this.validateInput)}}app_shop.graphql||(app_shop.graphql={}),app_shop.graphql.trackingEvents=async t=>{const{headers:e}=t||{};if(!e)return!1;const i=e.get("x-iai-tracking-events");if(!i||+i<1)return!1;const n=JSON.stringify({query:"query {\n      trackingEvents\n    }"});try{const t=await fetch(`${app_shop?.urls?.graphql||"/graphql/v1/"}?trackingEvents`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:n}),e=await t.json();return e.data.trackingEvents?.forEach((t=>{const e=new Function(t);try{e()}catch(t){}})),e.data.trackingEvents}catch(t){return[]}},app_shop.fn.ajaxLoadSite=function(t){if((()=>{const t=document.getElementById("ajaxLoadSite"),e=document.getElementById("ajaxLoadSite_cover");t&&t.remove(),e&&e.remove()})(),!t)return;const e=`\n    <div id="ajaxLoadSite_cover" style="height:${document.body.scrollHeight}px;width:100%;position:absolute;
1left:0;top:0;"></div>\n    <div id="ajaxLoadSite" style="left:50%;transform:translateX(-50%);"></div>\n  `;document.body.insertAdjacentHTML("beforeend",e)},app_shop.fn.ajaxLoadSiteMessage=function(t){const e=document.getElementById("ajaxLoadSite");e&&e.append(t)};class WebAuthn{constructor(t={}){this.IAIAccountsUrl=t.IAIAccountsUrl||"https://accounts.idosell.com/",this.urls=t.urls||{generateRegister:`${this.IAIAccountsUrl}webAuthn/generateRegisterRequest.php`,register:`${this.IAIAccountsUrl}webAuthn/register.php`,generateLogin:`${this.IAIAccountsUrl}webAuthn/generateLoginRequest.php`,login:`${this.IAIAccountsUrl}webAuthn/login.php`,gql:"/graphql/v1/"},this.supportMac=t.supportMac??!0,this.supportIos=t.supportIos??!0,this.supportSafari=t.supportSafari??!0,this.supportOpera=t.supportOpera??!0}async fetchDataGQL(t={}){const{data:e,url:i,urlParameter:n=""}=t;if(!e)return!1;const s=`${i||this.urls.gql||"/graphql/v1/"}${n}`;try{const t=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}catch(t){throw new Error(`A connection error occurred. It was not possible to retrieve data from ${s}`)}}async fetchData(t={}){const{data:e,url:i}=t;if(!e||!i)return!1;try{const t=await fetch(i,{method:"POST",body:e,credentials:"include",cache:"no-cache"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}catch(t){throw new Error(`A connection error occurred. It was not possible to retrieve data from ${i}`)}}browserNotSupported(){const t=new Error("Browser not supported.");throw t.code=1,t}isOpera(){const{browser:t}=document.documentElement.dataset;return!!t&&("Opera"===t||"Safari"===t&&navigator.userAgent.indexOf("OP")>-1)}isNotSupportedSafari(){const{browser:t,browserVersion:e}=document.documentElement.dataset;return!(!t||!e)&&("Safari"===t&&+e<15)}async checkBrowserSupport(){return!(!window.fetch||!navigator.credentials||!navigator.credentials.create||!window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable||!await(window.PublicKeyCredential?.isUserVerifyingPlatformAuthenticatorAvailable())||!this.supportMac&&app_shop.vars.isMac||!this.supportIos&&app_shop.vars.isIos||!this.supportSafari&&app_shop.vars.isSafari||!this.supportOpera&&this.isOpera()||this.isNotSupportedSafari())}checkResponse(t){if(!t)throw new Error("Failed to retrieve data.");if("error"===t.status)throw new Error(t.errorMsg||"Unknown error occured.")}recursiveBase64StrToArrayBuffer(t){const e="=?BINARY?B?";let i={};if(Array.isArray(t))i=t.map((t=>this.recursiveBase64StrToArrayBuffer(t)));else{if("object"!=typeof t)return t;Object.keys(t).forEach((n=>{if("string"==typeof t[n]){let s=t[n];if(s.startsWith(e)&&s.endsWith("?=")){s=s.slice(11,-2);const t=window.atob(s),e=new Uint8Array(t.length);for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);i[n]=e.buffer}else i[n]=t[n]}else i[n]=this.recursiveBase64StrToArrayBuffer(t[n])}))}return i}arrayBufferToBase64(t){const e=new Uint8Array(t),i=Array.from(e,(t=>String.fromCharCode(t))).join("");return window.btoa(i)}async registration({userLogin:t="",authorizeToken:e=""}){if(await this.checkBrowserSupport()||this.browserNotSupported(),!t)throw new Error('"userLogin" is required.');if(!e)throw new Error('"authorizeToken" is required. GraphQL expressCheckoutVerifyOtp > verificationToken.');const i=await this.fetchData({data:e,url:this.urls.generateRegister});this.checkResponse(i);const n=JSON.parse(i.data),s=this.recursiveBase64StrToArrayBuffer(n),o=await navigator.credentials.create(s),{clientDataJSON:a,attestationObject:r}=o?.response||{},c={userLogin:t,domain:window.location.hostname,authenticatorTransportMethods:o.response.getTransports?o.response.getTransports():[],clientDataJSONBase64:a?this.arrayBufferToBase64(a):"",attestationObjectBase64:r?this.arrayBufferToBase64(r):""},l=await this.fetchData({data:JSON.stringify(c),url:this.urls.register});this.checkResponse(l)}async login(){await this.checkBrowserSupport()||this.browserNotSupported();const t={domain:window.location.hostname},e=await this.fetchData({data:JSON.stringify(t),url:this.urls.generateLogin});this.checkResponse(e);const i=JSON.parse(e.data),n=this.recursiveBase64StrToArrayBuffer(i),s=await navigator.credentials.get(n),{rawId:o,response:{clientDataJSON:a,authenticatorData:r,signature:c,userHandle:l}}=s||{},u={domain:window.location.hostname,publicKeyCredentialBinRawId:o?this.arrayBufferToBase64(o):null,clientDataJSONBase64:a?this.arrayBufferToBase64(a):null,authenticatorDataBase64:r?this.arrayBufferToBase64(r):null,signatureBase64:c?this.arrayBufferToBase64(c):null,userHandleBinBase64:l?this.arrayBufferToBase64(l):null},d=await this.fetchData({data:JSON.stringify(u),url:this.urls.login});if(this.checkResponse(d),"success"!==d.status)throw new Error(d.ms);return await this.loginToShop(d.loginToken)}async loginToShop(t){if(!t)throw new Error('"loginToken" is invali
1d.');const e=JSON.stringify({query:`mutation{\n        loginByIAIAccountsToken(token: "${t}") {\n          status\n          login\n        }\n      }`}),i=await this.fetchDataGQL({data:e,urlParameter:"?mutation=loginByToken"});return i?.data?.loginByIAIAccountsToken}}app_shop.fn.cookie={get:function(t){const e=document.cookie.split(";");for(let i=0;i<e.length;i++){const n=e[i].trim(),[s,o]=n.split("=");if(s===t)return decodeURIComponent(o)}return null},set:function(t,e,i){let n="";if(i){const t=new Date;t.setTime(t.getTime()+24*i*60*60*1e3),n=`; expires=${t.toUTCString()}`}document.cookie=`${t}=${encodeURIComponent(e)}${n}; path=/`},remove:function(t){this.set(t,"",-1)}};var projectorv3_disable_ajax=projectorv3_disable_ajax||1,projectorClass=function(){classObj=this,this.currency="",this.curr_class="",this.firstRun=!0,this.onDisableAlert=!0,this.timeoutAjax=18e3,this.errorMsg=[],this.currentSizeObj={},this.configObj={},this.action="",this.innerHTML="",this.nettoPrice="net"===app_shop.vars.priceType,this.options=[],this.options.hide_unit=!1,this.options.friendly_shipping_format=[],this.options.endStartFunction=function(){},this.options.endInitFunction=function(){},this.options.beginStartFunction=function(){},this.options.endShippingFunction=function(){},this.options.formatPrice=function(t){},this.externalFormatFn=!1,this.options.endGetAjaxProductDataFunction=function(){},this.options.clearXMLGetAjaxProductDataFunction=function(t){},this.options.beginGetAjaxProductDataFunction=function(){},this.options.endSetCurrentSizeFunction=function(){},this.options.ajaxAddFunction=function(t){classObj.alert(classObj.txt.dodano_produkt)},this.options.contenersPrefix="projector_",this.options.curr_before_price=!1,this.options.choiceSize=!1,this.options.contact_link="/contact.php",this.options.hoursBeforeOrderBy=3,this.isStarted=!1,this.prefix=this.options.contenersPrefix,this.actions={},this.txt=[],this.txt.oszczedzasz="Oszczędzasz ",this.txt.taniej="%, czyli ",this.txt.wzestawie=" kupując w zestawie",this.txt.niedostepny="Produkt niedostępny",this.txt.tylkotel="Cena na telefon. Skontaktuj się ze sprzedawcą",this.txt.tylko_punkty="Towar dostępny tylko w programie lojalnościowym.",this.txt.gratis="Dostawa gratis!",this.txt.gratis_produkt="Gratis!",this.txt.niemastanu="Produkt niedostępny",this.txt.status_24="24 godz.",this.txt.status_48="48 godz.",this.txt.status_natychmiast="w ciągu 24h",this.txt.day=" dzień ",this.txt.days=" dni ",this.txt.hour=" godz. ",this.txt.hours=" godz. ",this.txt.min=" min ",this.txt.mins=" min ",this.txt.za=" za ",this.txt.proc="%",this.txt.wybrany_rozmiar="Rozmiar",this.txt.wysylka="Wysyłka ",this.txt.wysylka_za="Wysyłka w ciągu ",this.txt.dostepny="Dostawa ",this.txt.dostepny_za="Dostawa za ",this.txt.pkt="pkt.",this.txt.status_full="większa ilość",this.txt.status_amount_null="brak w magazynie",this.txt.forpointsonly="Produkt możesz kupić za punkty",this.txt.disable_desc="Skontaktuj się z nami",this.txt.choiceSize="Wybierz rozmiar",this.txt.maksymalnie="Maksymalnie możesz zamówić",this.txt.minimalnie="Minimalnie możesz zamówić",this.txt.brak_magazyn="Brak na magazynie",this.txt.dodano_produkt="Produkt został dodany.",this.txt.dodano_produkt_blad="Wystąpił błąd podczas dodawania produktu.",this.txt.ilosc_mm="",this.txt.ilosc_mo="",this.txt.ilosc_mo_inf="",this.txt.infinity="",this.txt.koszt_od="Koszt od ",this.txt.wysylka_total_begin="<br/>(z tow. z koszyka ",this.txt.wysylka_total_end=")",this.txt.nawias_end="",this.txt.amount="",this.txt.order_by="Zamów do ",this.txt.it_will_ship_today=" to wyślemy dzisiaj";var t=!0;this.isset=function(t){return void 0!==window[t]},this.getAttr=function(t,e){return t&&t.hasAttribute(e)?t.getAttribute(e):""},this.getData=function(t){try{return t}catch(t){}},this.getIndex=function(t,e){var i=0;for(var n in t){if(e===i)return n;i++}return null},this.formatPrice=function(t,e,i,n,s){return currency=i||this.currentSizeObj.currency,s=!!s,e&&(this.configObj.rebateNumber&&s&&(t=this.configObj.rebateNumber.price),t*=this.configObj.valueOfNumberInput),n?parseFloat(t.toFixed(2)):this.externalFormatFn?this.options.formatPrice({price:t,currency:currency}):this.options.curr_before_price?'<span class="projector_price"><span class="projector_currency">'+currency+"</span>"+(1*t).toFixed(2)+"</span>":'<span class="projector_price">'+(1*t).toFixed(2)+'<span class="projector_currency">'+currency+"</span></span>"},this.status_description=function(){if(this.hide(document.querySelector("#"+this.prefix+"status_gfx")),document.querySelector("#"+this.prefix+"status")?.classList.add("--status-hide"),this.currentSizeObj.amount_mm&&this.currentSizeObj.amount_mo&&""!=this.txt.ilosc_mm){var t=this.currentSizeObj.amount_mm,e=this.currentSizeObj.amount_mo,i=t+" "+(t>1?this.currentSizeObj.unit_plural:this.currentSizeObj.unit),n=e+" "+(e>1?this.currentSizeObj.unit_plural:this.currentSizeObj.unit),s=this.txt.ilosc_mm.format(i),o=this.txt.ilosc_mo.format(n);if(t>0&&-1==e)return document.querySelector("#"+this.prefix+"status_description")&&(document.querySelector("#"+this.prefix+"status_description").innerHTML='<div id="#'+this.prefix+'amount_mm">'+s+'</div><div id="#'+this.prefix+'amount_mo">'+this.txt.ilosc_mo_inf+"</div>"),!1;if(t>0&&e>0)return document.querySelector("#"+this.prefix+"status_description")&&(document.querySelector("#"+this.prefix+"status_description").innerHTML='<div id="#'+this.prefix+'amount_mm">'+s+'</div><div id="#'+this.prefix+'amount_mo">'+o+"</div>"),!1}this.currentSizeObj.availability.delivery_date&&"disable"==this.currentSizeObj.availability.status?document.querySelector("#"+this.prefix+"status_description")&&(document.querySelector("#"+this.prefix+"status_description").innerHTML=this.currentSizeObj.availability.status_description+" <span>"+this.currentSizeObj.availability.delivery_date+"</span>"):this.currentSizeObj.availability.status_description?(document.querySelector("#"+this.prefix+"status_description")&&(document.querySelector("#"+this.prefix+"status_description").innerHTML=this.currentSizeObj.availability.status_description),document.querySelector("#"+this.prefix+"status_description")?.classList.remove("--status-hide","--phone-disable")):"disable"==this.currentSizeObj.availability.status?(document.querySelector("#"+this.prefix+"status")?.classList.add("--status-hide","--phone-disable"),this.hide(document.querySelector("#"+this.prefix+"status_description_wrapper"))):(document.querySelector("#"+this.prefix+"status")?.classList.remove("--status-hide","--phone-disable"),this.hide(document.querySelector("#"+this.prefix+"status_description_wrapper"))),this.currentSizeObj.availability.status_gfx&&(this.show(document.querySelector("#"+this.prefix+"status_gfx")),document.querySelector("#"+this.prefix+"status_gfx")?.setAttribute("src",this.currentSizeObj.availability.status_gfx),document.querySelector("#"+this.prefix+"status")?.classList.remove("--status-hide"))}
1,this.sellBy=function(t,e,i){if("disable"==this.currentSizeObj.availability.status)return!this.onDisableAlert||"product_bundle"==this.currentSizeObj.product_type&&1==this.firstRun||this.alert(this.txt.niedostepny),t;if(t=parseFloat(t),e=parseFloat(e),i=parseFloat(i),(isNaN(i)||i<=t)&&0===Object.keys(product_data.order_quantity_range).length)return t.toFixed(e);number=Math.floor(i/t)*t,number=(i/t*t-number).toFixed(e+1)>0?(1*number+t).toFixed(e):number.toFixed(e),number=parseFloat(number);var n=this.currentSizeObj.amount,s=t;if(0!==Object.keys(product_data.order_quantity_range).length){var o=product_data.order_quantity_range;if(o.max_quantity_per_order){var a=parseFloat(o.max_quantity_per_order);n=n>a||-1==n?a:n}if(o.max_size_quantity_per_order){var r=parseFloat(o.max_size_quantity_per_order);n=n>r||-1==n?r:n}if(o.min_quantity_per_order){var c=parseFloat(o.min_quantity_per_order);s=c>s?c:s}if(o.min_size_quantity_per_order){var l=parseFloat(o.min_size_quantity_per_order);s=l>s?l:s}if(o.minimum_quantity_subscription){var u=parseFloat(o.minimum_quantity_subscription);s=u>s?u:s}}if(s&&number<s){if(this.isStarted){const i=(Math.ceil(parseFloat(s)/t)*t).toFixed(e)>1?this.currentSizeObj.unit_plural:this.currentSizeObj.unit;this.alert(this.txt.minimalnie+" "+(Math.ceil(parseFloat(s)/t)*t).toFixed(e)+" "+i)}return this.isStarted=!0,(Math.ceil(parseFloat(s)/t)*t).toFixed(e)}if(number>n&&-1!=n){const i=(Math.floor(parseFloat(n)/t)*t).toFixed(e)>1?this.currentSizeObj.unit_plural:this.currentSizeObj.unit;return this.alert(this.txt.maksymalnie+" "+(Math.floor(parseFloat(n)/t)*t).toFixed(e)+" "+i),this.isStarted=!0,(Math.floor(parseFloat(n)/t)*t).toFixed(e)}return this.isStarted=!0,number},this.projectorInit=function(t){if(!this.isset("product_data"))return this.errorMsg.push("no data"),!1;this.curr_class=document.querySelector("#"+this.prefix+"form")?.className,t.contenersPrefix&&(this.options.contenersPrefix=t.contenersPrefix,this.prefix=t.contenersPrefix),"undefined"!==t.onDisableAlert&&(this.onDisableAlert=t.onDisableAlert),t.beginStartFunction&&(this.options.beginStartFunction=t.beginStartFunction),t.formatPrice&&(this.options.formatPrice=t.formatPrice,this.externalFormatFn=!0),t.endInitFunction&&(this.options.endInitFunction=t.endInitFunction),t.endStartFunction&&(this.options.endStartFunction=t.endStartFunction),t.endShippingFunction&&(this.options.endShippingFunction=t.endShippingFunction),t.endSetCurrentSizeFunction&&(this.options.endSetCurrentSizeFunction=t.endSetCurrentSizeFunction),t.ajaxAddFunction&&(this.options.ajaxAddFunction=t.ajaxAddFunction),t.clearXMLGetAjaxProductDataFunction&&(this.options.clearXMLGetAjaxProductDataFunction=t.clearXMLGetAjaxProductDataFunction),t.endGetAjaxProductDataFunction&&(this.options.endGetAjaxProductDataFunction=t.endGetAjaxProductDataFunction),t.beginGetAjaxProductDataFunction&&(this.options.beginGetAjaxProductDataFunction=t.beginGetAjaxProductDataFunction),t.hide_unit&&(this.options.hide_unit=t.hide_unit),t.curr_before_price&&(this.options.curr_before_price=t.curr_before_price),t.contact_link&&(this.options.contact_link=t.contact_link),t.hoursBeforeOrderBy&&(this.options.hoursBeforeOrderBy=t.hoursBeforeOrderBy),t.getShippingTimeFunction&&t.productParamsFunction&&(this.options.getShippingTimeFunction=t.getShippingTimeFunction,this.options.productParamsFunction=t.productParamsFunction),t.friendly_shipping_format&&(this.options.friendly_shipping_format=t.friendly_shipping_format),product_data.currency&&(this.currency=product_data.currency),this.txt.amount=document.querySelector("#"+this.prefix+"amount")?.innerHTML,product_data.sizes&&product_data.sizes.onesize&&(this.setCurrentSizeObj(this.getIndex(product_data.sizes,0)),this.start()),this.options.endInitFunction()},this.variety=function(t,e,i){return 1==t?e:i},this.formatDate=t=>t.slice(0,10).split("-").reverse().slice(0,-1).join("."),this.shippingTimeBuffer=[],this.timeoutHandle="",this.updateShippingTime=async()=>{const t=await this.options.getShippingTimeFunction(this.options.productParamsFunction());if(t&&t.data&&t.data.shipping&&t.data.shipping.shippingTime){const e=t.data.shipping.shippingTime;this.currentSizeObj.shipping_time={},this.currentSizeObj.shipping_time.unknown_time=e.unknownTime,this.currentSizeObj.shipping_time.today=`${e.shippingTime.today}`,this.currentSizeObj.shipping_time.today_shipment_deadline=e.todayShipmentDeadline,this.currentSizeObj.shipping_time.days=e.shippingTime.time.days,this.currentSizeObj.shipping_time.hours=e.shippingTime.time.hours,this.currentSizeObj.shipping_time.minutes=e.shippingTime.time.minutes,this.currentSizeObj.shipping_time.week_day=e.shippingTime.weekDay,this.currentSizeObj.shipping_time.week_amount=e.shippingTime.weekAmount,this.currentSizeObj.shipping_time.time=e.time}return t},this.shippingTime=async function(t){result=[];
1const e=md5(this.options.productParamsFunction()),i=this.shippingTimeBuffer.filter((t=>t.key===e));let n={};if(i.length)return i[0];if(projectorv3_disable_ajax&&0==projectorv3_disable_ajax||(n=await this.updateShippingTime()),"disable"!==this.currentSizeObj.availability.status&&this.currentSizeObj.shipping_time){const t=this.currentSizeObj.shipping_time;let i=!1;if(t.today_shipment_deadline){const e=t.today_shipment_deadline.split(":"),n=new Date;n.setHours(e[0],e[1],e[2]);const s=new Date;s.setHours(s.getHours()+this.options.hoursBeforeOrderBy),i=n.getTime()-s.getTime()<0}if(t.today_shipment_deadline&&i){result[0]=this.txt.order_by,result[1]=t.today_shipment_deadline.slice(0,-3)+this.txt.it_will_ship_today;const i={key:e,value:result,response:n};return this.shippingTimeBuffer.push(i),i}if("true"==t.today){result[0]=this.txt.wysylka,result[1]=this.options.friendly_shipping_format[0];const t={key:e,value:result,response:n};return this.shippingTimeBuffer.push(t),t}if(0===+t.days||1===+t.days&&0===+t.hours&&0===+t.minutes){this.txt.tomorrow?(result[0]=this.txt.wysylka,result[1]=this.txt.tomorrow):(result[0]=this.txt.wysylka_za,result[1]=this.txt.status_24);const t={key:e,value:result,response:n};return this.shippingTimeBuffer.push(t),t}if(+t.days>29&&this.txt.shipmentIn){result[0]=this.txt.shipmentIn,result[1]=+t.days+this.txt.days;const i={key:e,value:result,response:n};return this.shippingTimeBuffer.push(i),i}result[0]=this.txt.wysylka,result[1]=this.options.friendly_shipping_format[+t.week_day],+t.week_amount>0&&(result[1]+=`(${this.formatDate(t.time)})`)}const s={key:e,value:result,response:n};return this.shippingTimeBuffer.push(s),s},this.show=function(t){if(!t)return;if(""!==t.style.display)return void(t.style.display="");const{display:e}=getComputedStyle(t);t.style.display="none"!==e?e:"block"},this.hide=function(t){t&&(t.style.display="none")},this.off=function(t){if(!t)return;const e=t.cloneNode(!0);t.parentNode.replaceChild(e,t)},this.start=function(){if(this.options.beginStartFunction(),window.projectorv3_disable_ajax=projectorv3_disable_ajax||1,!this.currentSizeObj.type)return!1;var e=this;const n=document.getElementById("projector_form")?.getAttribute("data-subscription");var s=async function(){(product_data.sizes.uniw||product_data.sizes.onesize)&&e.setCurrentSizeObj("uniw"),"true"===n?e.currentSizeObj.price=product_data.sizes[e.currentSizeObj.type].price_subscription:"false"===n&&(e.currentSizeObj.price=product_data.sizes[e.currentSizeObj.type].price_normal),document.querySelector("#"+e.prefix+"form")&&(document.querySelector("#"+e.prefix+"form").className=e.curr_class+" "+e.currentSizeObj.availability.status),e.configObj.displaySize="onesize"!=e.currentSizeObj.type,e.currentSizeObj.availability&&(e.configObj.disableNumberInput="disable"==e.currentSizeObj.availability.status),e.configObj.disableBuyButton=!1,"disable"!=e.currentSizeObj.availability.status&&"true"!=e.currentSizeObj.phone_price||(e.configObj.disableBuyButton=!0),e.configObj.displayBuySection=!!e.currentSizeObj.gratis;var s=e.currentSizeObj.unit_sellby+"";if(document.querySelector("#"+e.options.contenersPrefix+"number")&&(s=document.querySelector("#"+e.options.contenersPrefix+"number").value),e.configObj.valueOfNumberInput=e.sellBy(e.currentSizeObj.unit_sellby,e.currentSizeObj.unit_precision,s.replace(",",".")),e.currentSizeObj.rebateNumber)for(i in e.configObj.rabatIndex=-1,e.configObj.rabatIndex_last=-1,e.currentSizeObj.rebateNumber){var o=e.currentSizeObj.rebateNumber[i].threshold_end?e.currentSizeObj.rebateNumber[i].threshold_end:e.configObj.valueOfNumberInput;if(parseFloat(e.configObj.valueOfNumberInput)>=parseFloat(e.currentSizeObj.rebateNumber[i].threshold)&&parseFloat(e.configObj.valueOfNumberInput)<=parseFloat(o)){if(e.configObj.rabatIndex=i,e.configObj.rabatIndex_last=i,!e.currentSizeObj.rebateNumber[1*i+1]||parseFloat(e.configObj.valueOfNumberInput)<parseFloat(e.currentSizeObj.rebateNumber[1*i+1].threshold))break}else parseFloat(e.configObj.valueOfNumberInput)>=parseFloat(e.currentSizeObj.rebateNumber[i].threshold)&&(e.configObj.rabatIndex_last=i)}if(e.configObj.rabatIndex&&-1!=e.configObj.rabatIndex?(e.configObj.rebateNumber=e.currentSizeObj.rebateNumber[e.configObj.rabatIndex],e.configObj.rebateNumberNext=e.configObj.rebateNumber):e.configObj.rebateNumber=!1,e.currentSizeObj.rebateNumber&&e.currentSizeObj.rebateNumber[1*e.configObj.rabatIndex+1]&&(e.configObj.rebateNumberNext=e.currentSizeObj.rebateNumber[1*e.configObj.rabatIndex+1]),e.configObj.rabatIndex_last&&e.currentSizeObj.rebateNumber[1*e.configObj.rabatIndex_last+1]&&
1(e.configObj.rebateNumberNext=e.currentSizeObj.rebateNumber[1*e.configObj.rabatIndex_last+1]),"onesize"==e.currentSizeObj.type||"uniw"==e.currentSizeObj.type?e.hide(document.querySelector("#"+e.prefix+"sizes_cont")):e.show(document.querySelector("#"+e.prefix+"sizes_cont")),e.status_description(),document.querySelector("#"+e.prefix+"amount")){e.show(document.querySelector("#"+e.prefix+"amount"));var a=e.currentSizeObj.amount;0==a?e.hide(document.querySelector("#"+e.prefix+"amount")):-1==a&&(a=e.txt.infinity,""==e.txt.infinity&&e.hide(document.querySelector("#"+e.prefix+"amount"))),1==a?a=a+" "+e.currentSizeObj.unit:a>1&&(a=a+" "+e.currentSizeObj.unit_plural),document.querySelector("#"+e.prefix+"amount")&&(document.querySelector("#"+e.prefix+"amount").innerHTML=e.txt.amount.format(a))}if(e.currentSizeObj.product_type&&"product_virtual"==e.currentSizeObj.product_type&&e.hide(document.querySelector("#"+e.prefix+"amount")),"y"==e.currentSizeObj.availability.visible&&e.currentSizeObj&&e.currentSizeObj.availability.status_description?(e.show(document.querySelector("#"+e.prefix+"status_description_wrapper")),e.currentSizeObj.availability.status_gfx&&e.show(document.querySelector("#"+e.prefix+"status_gfx")),document.querySelector("#"+e.prefix+"status")?.classList.remove("--status-hide")):(e.hide(document.querySelector("#"+e.prefix+"status_description_wrapper")),e.hide(document.querySelector("#"+e.prefix+"status_gfx")),document.querySelector("#"+e.prefix+"status")?.classList.add("--status-hide")),"true"==e.currentSizeObj.availability.delivery_days_undefined&&"true"==e.currentSizeObj.delivery.undefined?e.hide(document.querySelector("#"+e.prefix+"delivery_wrapper")):e.show(document.querySelector("#"+e.prefix+"delivery_wrapper")),e.hide(document.querySelector("#"+e.prefix+"delivery_days")),projectorv3_disable_ajax&&0==projectorv3_disable_ajax){if(e.hide(document.querySelector("#"+e.prefix+"delivery_days")),e.currentSizeObj&&"true"!=e.currentSizeObj.availability.delivery_days_undefined){document.querySelector("#"+e.prefix+"status")?.classList.add("--loading","--time-show");const t=await e.shippingTime();if(t.value.length?(document.querySelector("#"+e.prefix+"delivery_label")&&(e.show(document.querySelector("#"+e.prefix+"delivery_label")),document.querySelector("#"+e.prefix+"delivery_label").innerHTML=t.value[0]),document.querySelector("#"+e.prefix+"delivery_days")&&(e.show(document.querySelector("#"+e.prefix+"delivery_days")),document.querySelector("#"+e.prefix+"delivery_days").innerHTML=t.value[1])):document.querySelector("#"+e.prefix+"status")?.classList.remove("--time-show"),document.querySelector("#"+e.prefix+"status_wrapper")){const t=document.querySelector("#"+e.prefix+"status_wrapper");t.style.minHeight="0px",t.style.minHeight=`${t.offsetHeight}px`}document.querySelector("#"+e.prefix+"status")?.classList.remove("--loading"),e.options.endShippingFunction(t.response)}}else if("true"!=e.currentSizeObj.availability.delivery_days_undefined){var r=e;clearTimeout(r.timeHandle),document.querySelector("#"+r.prefix+"delivery_days")&&document.querySelector("#"+r.prefix+"delivery_days").closest(".product_section")?.classList.add("loading"),r.timeHandle=setTimeout((async function(){document.querySelector("#"+e.prefix+"status")?.classList.add("--loading","--time-show");const t=await e.shippingTime();if(t.value.length?(document.querySelector("#"+e.prefix+"delivery_label")&&(e.show(document.querySelector("#"+e.prefix+"delivery_label")),document.querySelector("#"+e.prefix+"delivery_label").innerHTML=t.value[0]),document.querySelector("#"+e.prefix+"delivery_days")&&(e.show(document.querySelector("#"+e.prefix+"delivery_days")),document.querySelector("#"+e.prefix+"delivery_days").innerHTML=t.value[1])):document.querySelector("#"+e.prefix+"status")?.classList.remove("--time-show"),document.querySelector("#"+e.prefix+"status_wrapper")){const t=document.querySelector("#"+e.prefix+"status_wrapper");t.style.minHeight="0px",t.style.minHeight=`${t.offsetHeight}px`}document.querySelector("#"+e.prefix+"status")?.classList.remove("--loading"),e.options.endShippingFunction(t.response)}),50)}e.hide(document.querySelector("#"+e.prefix+"shipping_unknown")),e.currentSizeObj.product_type&&("product_virtual"==e.currentSizeObj.product_type||"product_service"==e.currentSizeObj.product_type)||"disable"==e.currentSizeObj.availability.status?(e.hide(document.querySelector("#"+e.prefix+"shipping_info")),e.hide(document.querySelector("#"+e.prefix+"shipping_dialog")),e.currentSizeObj.availability.status_description?e.show(document.querySelector("#"+e.prefix+"status_description")):e.hide(document.querySelector("#"+e.prefix+"status_description"))):(e.show(document.querySelector("#"+e.prefix+"shipping_info")),e.show(document.querySelector("#"+e.prefix+"shipping_dialog")),e.hide(document.querySelector("#"+e.prefix+"status_description"))),e.currentSizeObj.delay_time&&"true"==e.currentSizeObj.delay_time.unknown_delivery_time&&"order"==e.currentSizeObj.availability.status?(e.hide(document.querySelector("#"+e.prefix+"shipping_info")),e.hide(document.querySelector("#"+e.prefix+"shipping_dialog")),e.hide(document.querySelector("#"+e.prefix+"status_description")),e.hide(document.querySelector("#"+e.prefix+"status_wrapper")),document.querySelector("#"+e.prefix+"status")?.classList.add("--unknown-show"),e.show(document.querySelector("#"+e.prefix+"shipping_unknown"))):(document.querySelector("#"+e.prefix+"status")?.classList.remove("--unknown-show"),e.show(document.querySelector("#"+e.prefix+"status_wrapper"))),document.querySelector("#"+e.prefix+"shipping")&&(0==e.currentSizeObj.delivery.shipping?document.querySelector("#"+e.prefix+"shipping").innerHTML=e.txt.gratis:(document.querySelector("#"+e.prefix+"shipping").innerHTML=e.txt.koszt_od+e.formatPrice(e.currentSizeObj.delivery.shipping,t),document.querySelector("#"+e.prefix+"shipping")?.setAttribute("data-price",e.txt.koszt_od+e.formatPrice(e.currentSizeObj.delivery.shipping,t,!1,!0))),"true"==e.currentSizeObj.delivery.undefined?e.hide(document.querySelector("#"+e.prefix+"shipping")):e.show(document.querySelector("#"+e.prefix+"shipping"))),e.currentSizeObj.price.advanceprice?(e.show(document.querySelector("#"+e.prefix+"advanceprice_wrapper")),document.querySelector("#"+e.prefix+"advanceprice")&&(document.querySelector("#"+e.prefix+"advanceprice").innerHTML=e.formatPrice(e.currentSizeObj.price.advanceprice,t),document.querySelector("#"+e.prefix+"advanceprice")?.setAttribute("data-price",e.formatPrice(e.currentSizeObj.price.advanceprice,t,!1,!0)))):e.hide(document.querySelector("#"+e.prefix+"advanceprice_wrapper")),e.show(document.querySelector("#"+e.prefix+"sellbyprice_wrapper")),document.querySelector("#"+e.prefix+"sellbyprice")&&(document.querySelector("#"+e.prefix+"sellbyprice").innerHTML=e.nettoPrice?e.currentSizeObj.price.price_net_formatted:e.currentSizeObj.price.price_formatted,document.querySelector("#"+e.prefix+"sellbyprice")?.setAttribute("data-price",e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value)),e.hide(document.querySelector("#"+e.prefix+"prices_wrapper")),e.currentSizeObj.price.srp&&e.currentSizeObj.price.srp>0&&e.currentSizeObj.price.srp!=e.currentSizeObj.price.value?(e.show(document.querySelector("#"+e.prefix+"price_srp_wrapper")),e.show(document.querySelector("#"+e.prefix+"prices_wrapper")),document.querySelector("#"+e.prefix+"price_srp")&&(document.querySelector("#"+e.prefix+"price_srp").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.srp_net:e.currentSizeObj.price.srp,t),document.querySelector("#"+e.prefix+"price_srp")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.srp_net:e.currentSizeObj.price.srp,t,!1,!0)))):e.hide(document.querySelector("#"+e.prefix+"price_srp_wrapper")),e.currentSizeObj.price.price_net&&e.currentSizeObj.price.price_net>0?(e.show(document.querySelector("#"+e.prefix+"price_net_wrapper")),e.show(document.querySelector("#"+e.prefix+"price_net")),document.querySelector("#"+e.prefix+"price_net")&&(document.querySelector("#"+e.prefix+"price_net").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.value:e.currentSizeObj.price.price_net,t),document.querySelector("#"+e.prefix+"price_net")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.value:e.currentSizeObj.price.price_net,t,!1,!0)))):(e.hide(document.querySelector("#"+e.prefix+"price_net_wrapper")),e.hide(document.querySelector("#"+e.prefix+"price_net")));let c="";if("true"==e.currentSizeObj.phone_price)e.currentSizeObj.price.points>0?(e.hide(document.querySelector("#"+e.prefix+"price_value")),e.show(document.querySelector("#"+e.prefix+"prices_wrapper")),document.querySelector("#"+e.prefix+"prices_wrapper")?.classList.add("--only-points")):(e.show(document.querySelector("#"+e.prefix+"price_value")),e.show(document.querySelector("#"+e.prefix+"prices_wrapper")),document.querySelector("#"+e.prefix+"prices_wrapper")?.classList.remove("--only-points"),document.querySelector("#"+e.prefix+"price_value")&&(e.currentSizeObj.availability.status_gfx_tel&&""!=e.currentSizeObj.availability.status_gfx_tel?document.querySelector("#"+e.prefix+"price_value").innerHTML='<a class="projector_prices__contact" target="_blank" href="'+e.options.contact_link+'"><img src="'+e.currentSizeObj.availability.status_gfx_tel+'"/><span>'+e.currentSizeObj.availability.status_description_tel+"</span></a>":document.querySelector("#"+e.prefix+"price_value").innerHTML='<a class="projector_prices__contact" target="_blank" href="'+e.options.contact_link+'">'+e.currentSizeObj.availability.status_description_tel+"</a>"));else if(e.show(document.querySelector("#"+e.prefix+"price_value")),e.show(document.querySelector("#"+e.prefix+"prices_wrapper")),document.querySelector("#"+e.prefix+"prices_wrapper")?.classList.remove("--only-points"),e.currentSizeObj.price.rebateNumber){const t=e.configObj.valueOfNumberInput;if(e.currentSizeObj.price.rebateNumber.items.includes(null))document.querySelector("#"+e.prefix+"price_value")&&(+t>=+e.currentSizeObj.price.rebateNumber.nextleft?(document.querySelector("#"+e.prefix+"price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.rebateNumber.nextprice_net:e.currentSizeObj.price.rebateNumber.nextprice,!0,!1,!1),document.querySelector("#"+e.prefix+"price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.rebateNumber.nextprice_net:e.currentSizeObj.price.rebateNumber.nextprice,!0,!1,!0)),c=e.nettoPrice?e.currentSizeObj.price.rebateNumber.nextprice_net:e.currentSizeObj.price.rebateNumber.nextprice,e.rebateThreshold=e.currentSizeObj.price.rebateNumber.nextthreshold):(document.querySelector("#"+e.prefix+"price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!1),document.querySelector("#"+e.prefix+"price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!0)),e.rebateThreshold=!1));else{const i=[...e.currentSizeObj.price.rebateNumber.items].reverse().find((e=>t>=+e.left));document.querySelector("#"+e.prefix+"price_value")&&(i?(document.querySelector("#"+e.prefix+"price_value").innerHTML=e.formatPrice(e.nettoPrice?i.price_net:i.price,!0,!1,!1),document.querySelector("#"+e.prefix+"price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?i.price_net:i.price,!0,!1,!0)),c=e.nettoPrice?i.price_net:i.price,e.rebateThreshold=i.threshold):(document.querySelector("#"+e.prefix+"price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!1),document.querySelector("#"+e.prefix+"price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!0)),e.rebateThreshold=!1))}}else document.querySelector("#"+e.prefix+"price_value")&&(document.querySelector("#"+e.prefix+"price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!1),document.querySelector("#"+e.prefix+"price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.price_net:e.currentSizeObj.price.value,!0,!1,!0)));if(e.currentSizeObj.price.maxprice?e.currentSizeObj.price.maxprice>0?(e.show(document.querySelector("#"+e.prefix+"price_maxprice")),document.querySelector("#"+e.prefix+"price_maxprice")&&(document.querySelector("#"+e.prefix+"price_maxprice").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t),document.querySelector("#"+e.prefix+"price_maxprice")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t,!1,!0)))):e.hide(document.querySelector("#"+e.prefix+"price_maxprice")):""!=c?(e.currentSizeObj.price.maxprice=e.currentSizeObj.price.value,e.currentSizeObj.price.maxprice_net=e.currentSizeObj.price.price_net,e.currentSizeObj.price.maxprice>0?(e.show(document.querySelector("#"+e.prefix+"price_maxprice")),document.querySelector("#"+e.prefix+"price_maxprice")&&(document.querySelector("#"+e.prefix+"price_maxprice").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t),document.querySelector("#"+e.prefix+"price_maxprice")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t,!1,!0)))):e.hide(document.querySelector("#"+e.prefix+"price_maxprice"))):e.hide(document.querySelector("#"+e.prefix+"price_maxprice")),e.currentSizeObj.price.omnibus_price&&document.querySelector("#"+e.prefix+"omnibus_price_value")&&(document.querySelector("#"+e.prefix+"omnibus_price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.omnibus_price_net:e.currentSizeObj.price.omnibus_price,t),document.querySelector("#"+e.prefix+"omnibus_price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.omnibus_price_net:e.currentSizeObj.price.omnibus_price,t,!1,!0))),e.currentSizeObj.price.beforerebate&&document.querySelector("#"+e.prefix+"price_beforerebate")&&(document.querySelector("#"+e.prefix+"price_beforerebate").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.beforerebate_net:e.currentSizeObj.price.beforerebate,t),document.querySelector("#"+e.prefix+"price_beforerebate")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.beforerebate_net:e.currentSizeObj.price.beforerebate,t,!1,!0))),e.currentSizeObj.price.maxprice&&document.querySelector("#"+e.prefix+"new_price_value")&&(document.querySelector("#"+e.prefix+"new_price_value").innerHTML=e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t),document.querySelector("#"+e.prefix+"new_price_value")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.price.maxprice_net:e.currentSizeObj.price.maxprice,t,!1,!0))),e.options.hide_unit?(e.hide(document.querySelector("#"+e.prefix+"price_unit_sellby")),e.hide(document.querySelector("#"+e.prefix+"price_unit"))):1==e.configObj.valueOfNumberInput?(e.hide(document.querySelector("#"+e.prefix+"price_unit_sellby")),document.querySelector("#"+e.prefix+"price_unit_sellby")&&(document.querySelector("#"+e.prefix+"price_unit_sellby").innerHTML=e.configObj.valueOfNumberInput),document.querySelector("#"+e.prefix+"price_unit")&&(document.querySelector("#"+e.prefix+"price_unit").innerHTML=e.currentSizeObj.unit)):(e.show(document.querySelector("#"+e.prefix+"price_unit_sellby")),document.querySelector("#"+e.prefix+"price_unit_sellby")&&(document.querySelector("#"+e.prefix+"price_unit_sellby").innerHTML=e.configObj.valueOfNumberInput),document.querySelector("#"+e.prefix+"price_unit")&&(document.querySelector("#"+e.prefix+"price_unit").innerHTML=e.currentSizeObj.unit_plural?e.currentSizeObj.unit_plural:e.currentSizeObj.unit)),e.currentSizeObj.bundle_price||e.currentSizeObj.price.yousave_percent?e.show(document.querySelector("#"+e.prefix+"yousave_bundle_wrapper")):e.hide(document.querySelector("#"+e.prefix+"yousave_bundle_wrapper")),yousaveTmp=e.nettoPrice?e.currentSizeObj.price.yousave_net:e.currentSizeObj.price.yousave,yousave_percentTmp=e.currentSizeObj.price.yousave_percent,""!=c&&(yousaveTmp=e.nettoPrice?+e.curren
1tSizeObj.price.maxprice_net-+c:+e.currentSizeObj.price.maxprice-+c,yousave_percentTmp=(100*+yousaveTmp/(e.nettoPrice?+e.currentSizeObj.price.maxprice_net:+e.currentSizeObj.price.maxprice)).toFixed()),0===+yousave_percentTmp&&(yousave_percentTmp=(+yousaveTmp/(e.nettoPrice?+e.currentSizeObj.price.price_net:+e.currentSizeObj.price.value)*100).toFixed(1)),document.querySelector("#"+e.prefix+"price_yousave")&&("true"!=e.currentSizeObj.phone_price&&e.currentSizeObj.bundle_price&&e.currentSizeObj.bundle_price.amount_diff_gross>0?(e.show(document.querySelector("#"+e.prefix+"price_yousave")),document.querySelector("#"+e.prefix+"price_yousave").innerHTML=e.txt.oszczedzasz+e.currentSizeObj.bundle_price.percent_diff+e.txt.taniej+e.formatPrice(e.nettoPrice?e.currentSizeObj.bundle_price.amount_diff_net:e.currentSizeObj.bundle_price.amount_diff_gross,t)+e.txt.wzestawie,document.querySelector("#"+e.prefix+"price_yousave")?.setAttribute("data-price",e.formatPrice(e.nettoPrice?e.currentSizeObj.bundle_price.amount_diff_net:e.currentSizeObj.bundle_price.amount_diff_gross,t,!1,!0))):"true"!=e.currentSizeObj.phone_price&&yousaveTmp?(e.show(document.querySelector("#"+e.prefix+"price_yousave")),document.querySelector("#"+e.prefix+"price_yousave").innerHTML=e.txt.oszczedzasz+yousave_percentTmp+e.txt.taniej+e.formatPrice(yousaveTmp,t)+e.txt.nawias_end,document.querySelector("#"+e.prefix+"price_yousave")?.setAttribute("data-price",e.formatPrice(yousaveTmp,t,!1,!0))):e.hide(document.querySelector("#"+e.prefix+"price_yousave"))),e.hide(document.querySelector("#"+e.prefix+"price_points_wrapper")),e.currentSizeObj.price.points>0&&(e.show(document.querySelector("#"+e.prefix+"price_points")),document.querySelector("#"+e.prefix+"price_points")&&(document.querySelector("#"+e.prefix+"price_points").innerHTML=e.formatPrice(e.currentSizeObj.price.points,t,e.txt.pkt,!0).toFixed(2)+e.txt.pkt,document.querySelector("#"+e.prefix+"price_points")?.setAttribute("data-price",e.formatPrice(e.currentSizeObj.price.points,t,e.txt.pkt,!0).toFixed(2))),e.show(document.querySelector("#"+e.prefix+"points_wrapper")),e.show(document.querySelector("#"+e.prefix+"price_points_wrapper"))),e.currentSizeObj.price.points_recive>0?(e.show(document.querySelector("#"+e.prefix+"points_wrapper")),e.show(document.querySelector("#"+e.prefix+"points_recive_points")),document.querySelector("#"+e.prefix+"points_recive_points")&&(document.querySelector("#"+e.prefix+"points_recive_points").innerHTML=e.formatPrice(e.currentSizeObj.price.points_recive,t,e.txt.pkt,!0).toFixed(2)+e.txt.pkt,document.querySelector("#"+e.prefix+"points_recive_points")?.setAttribute("data-price",e.formatPrice(e.currentSizeObj.price.points_recive,t,e.txt.pkt,!0).toFixed(2))),e.show(document.querySelector("#"+e.prefix+"price_points_recive_wrapper"))):e.hide(document.querySelector("#"+e.prefix+"price_points_recive_wrapper")),e.currentSizeObj.for_points,e.hide(document.querySelector("#"+e.prefix+"tell_availability")),document.querySelector("#"+e.prefix+"tell_availability")){document.querySelector("#"+e.prefix+"tell_availability").querySelectorAll("input").forEach((t=>t.disabled=!0))}var l=e;if(e.configObj.addBasketFnBtn)e.off(document.querySelector("#"+e.prefix+"button_basket")),document.querySelector("#"+e.prefix+"button_basket")&&document.querySelector("#"+e.prefix+"button_basket").addEventListener("click",(function(t){l.configObj.addBasketFnBtn(),t.preventDefault()})),document.querySelector("#"+e.prefix+"button_basket")?.classList.remove("disabled");else if(e.configObj.disableBuyButtonTXT){var u=e.configObj.disableBuyButtonTXT;document.querySelector("#"+e.prefix+"button_basket")&&document.querySelector("#"+e.prefix+"button_basket").addEventListener("click",(function(t){classObj.alert(u),t.preventDefault()})),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!0)}else if("disable"==e.currentSizeObj.availability.status){if(e.hide(document.querySelector("#"+e.prefix+"price_points_wrapper")),document.querySelector("#"+e.prefix+"button_basket")&&document.querySelector("#"+e.prefix+"button_basket").addEventListener("click",(function(t){classObj.alert(classObj.txt.niedostepny),t.preventDefault()})),document.querySelector("#"+e.prefix+"button_basket")?.classList.add("disabled"),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!0),e.show(document.querySelector("#"+e.prefix+"tell_availability")),document.querySelector("#"+e.prefix+"tell_availability")){document.querySelector("#"+e.prefix+"tell_availability").querySelectorAll("input").forEach((t=>t.disabled=!1))}}else"true"==e.currentSizeObj.phone_price&&e.currentSizeObj.price.points>0?(document.querySelector("#"+e.prefix+"button_basket")&&document.querySelector("#"+e.prefix+"button_basket").addEventListener("click",(function(t){classObj.alert(classObj.txt.tylko_punkty),t.preventDefault()})),document.querySelector("#"+e.prefix+"button_basket")?.classList.add("disabled"),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!0)):"true"==e.currentSizeObj.phone_price?(document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!1),document.querySelector("#"+e.prefix+"button_basket")&&document.querySelector("#"+e.prefix+"button_basket").addEventListener("click",(function(t){classObj.alert(classObj.txt.tylkotel),t.preventDefault()})),document.querySelector("#"+e.prefix+"button_basket")?.classList.add("disabled"),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!0),document.querySelector("#"+e.prefix+"form")?.classList.add("--phone")):(e.off(document.querySelector("#"+e.prefix+"button_basket")),document.querySelector("#"+e.prefix+"button_basket")?.classList.remove("disabled"),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!1),document.querySelector("#"+e.prefix+"form")?.classList.remove("--phone"));return e.currentSizeObj.gratis&&(e.hide(document.querySelector("#"+e.prefix+"buy_section")),e.hide(document.querySelector("#"+e.prefix+"price_points_wrapper"))),e.currentSizeObj.price.basket_enable&&"y"==e.currentSizeObj.price.basket_enable&&"true"==e.currentSizeObj.phone_price&&(e.off(document.querySelector("#"+e.prefix+"button_basket")),document.querySelector("#"+e.prefix+"button_basket")?.classList.remove("disabled"),document.querySelector("#"+e.prefix+"number")&&(document.querySelector("#"+e.prefix+"number").disabled=!1),document.querySelector("#"+e.prefix+"price_value")&&(document.querySelector("#"+e.prefix+"price_value").innerHTML='<span class="'+e.prefix+'_price_gratis">'+e.txt.gratis_produkt+"</span>")),document.querySelector("#"+e.options.contenersPrefix+"number")&&(document.querySelector("#"+e.options.contenersPrefix+"number").value=e.configObj.valueOfNumberInput),document.querySelector("#"+e.options.contenersPrefix+"buy_section .f-dropdown-button")&&(document.querySelector("#"+e.options.contenersPrefix+"buy_section .f-dropdown-button").textContent=e.configObj.valueOfNumberInput),e.configObj.rebateNumberNext&&(document.querySelector("#"+e.prefix+"product_rebatenumber_value")&&(document.querySelector("#"+e.prefix+"product_rebatenumber_value").textContent=(e.configObj.rebateNumberNext.value+e.txt.proc).replace(/\.00/gi,"")),document.querySelector("#"+e.prefix+"product_rebatenumber_threshold")&&(
1document.querySelector("#"+e.prefix+"product_rebatenumber_threshold").textContent=e.configObj.rebateNumberNext.threshold.replace(/\.00/gi,""))),e.firstRun=!1,e.options.endStartFunction(),!0};const o=async t=>{const e=await fetch(t);return await e.json()};product_data.sizes[e.currentSizeObj.type].availability?"true"!==n||product_data.sizes[e.currentSizeObj.type].price_subscription?"false"!==n||product_data.sizes[e.currentSizeObj.type].price_normal?s():o("/ajax/projector.php?action=get&product="+product_data.product_id+"&size="+e.currentSizeObj.type+"&get=sizeprices").then((t=>{product_data.sizes[e.currentSizeObj.type].price=t.sizeprices,product_data.sizes[e.currentSizeObj.type].price_normal=t.sizeprices,s()})):o("/ajax/projector.php?action=get&product="+product_data.product_id+"&size="+e.currentSizeObj.type+"&get=sizeprices&subscription=1").then((t=>{product_data.sizes[e.currentSizeObj.type].price=t.sizeprices,product_data.sizes[e.currentSizeObj.type].price_subscription=t.sizeprices,s()})):product_data.sizes&&("product_bundle"!=product_data.product_type?o("/ajax/projector.php?action=get&product="+product_data.product_id+"&size="+e.currentSizeObj.type+"&get=sizeavailability,sizedelivery,sizeprices"+("true"===n?"&subscription=1":"")).then((t=>{product_data.sizes[e.currentSizeObj.type].availability=t.sizeavailability,product_data.sizes[e.currentSizeObj.type].delivery=t.sizedelivery,product_data.sizes[e.currentSizeObj.type].price=t.sizeprices,product_data.sizes[e.currentSizeObj.type].delay_time=t.sizeavailability.delay_time,"true"===n?product_data.sizes[e.currentSizeObj.type].price_subscription=t.sizeprices:product_data.sizes[e.currentSizeObj.type].price_normal=t.sizeprices,s()})):"product_bundle"==product_data.product_type&&app_shop.fn.update_bundle&&app_shop.fn.update_bundle())},this.liczProcent=function(t,e){return(t=parseFloat(t))-t*((e=parseFloat(e))/100)},this.addAction=function(t,e,i){this.actions[t]||(this.actions[t]={}),this.actions[t][e]=i},this.getConfigObj=function(){return this.configObj},this.alert=function(t){Alertek.show_alert(t)},this.setCurrentSizeObj=async function(t){if(projectorv3_disable_ajax&&0==projectorv3_disable_ajax)product_data.sizes[t]?(this.currentSizeObj=product_data.sizes[t],this.currentSizeObj.product_type=product_data.product_type,this.currentSizeObj.currency=product_data.currency,this.currentSizeObj.unit=product_data.unit,this.currentSizeObj.unit_plural=product_data.unit_plural?product_data.unit_plural:"",this.currentSizeObj.unit_sellby=""!=product_data.unit_sellby?product_data.unit_sellby:1,this.currentSizeObj.unit_precision=""!=product_data.unit_precision?product_data.unit_precision:0):this.errorMsg.push("setCurrentSize no data"),this.options.endSetCurrentSizeFunction();else{var e=this,i=function(){"onesize"==t&&(t="uniw"),product_data.sizes[t]?(e.currentSizeObj=product_data.sizes[t],e.currentSizeObj.product_type=product_data.product_type,e.currentSizeObj.currency=product_data.currency,e.currentSizeObj.unit=product_data.unit,e.currentSizeObj.unit_plural=product_data.unit_plural?product_data.unit_plural:"",e.currentSizeObj.unit_sellby=""!=product_data.unit_sellby?product_data.unit_sellby:1,e.currentSizeObj.unit_precision=""!=product_data.unit_precision?product_data.unit_precision:0,product_data.for_points&&(e.currentSizeObj.for_points=product_data.for_points)):e.errorMsg.push("setCurrentSize no data")};if(product_data.sizes)i();else{const t=await fetch("/ajax/projector.php?action=get&product="+product_data.product_id+"&get=sizes"),n=await t.json();if(n.sizes){product_data.sizes={};for(const t of n.sizes.items)product_data.sizes[t.type]=t;i(),e.start()}}this.options.endSetCurrentSizeFunction()}},this.getCurrentSizeObj=function(t){return this.currentSizeObj},this.getCalculatedPrice=(t="price")=>{switch(t){case"advance":return{value:parseFloat(document.querySelector(`#${this.prefix}advanceprice`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}advanceprice`)?.innerHTML};case"srp":return{value:parseFloat(document.querySelector(`#${this.prefix}price_srp`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_srp`)?.innerHTML};case"net":return{value:parseFloat(document.querySelector(`#${this.prefix}price_net`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_net`)?.innerHTML};case"max":return{value:parseFloat(document.querySelector(`#${this.prefix}price_maxprice`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_maxprice`)?.innerHTML};case"omnibus":return{value:parseFloat(document.querySelector(`#${this.prefix}omnibus_price_value`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}omnibus_price_value`)?.innerHTML};case"before":return{value:parseFloat(document.querySelector(`#${this.prefix}price_beforerebate`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_beforerebate`)?.innerHTML};case"new":return{value:parseFloat(document.querySelector(`#${this.prefix}new_price_value`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}new_price_value`)?.innerHTML};case"points":return{value:parseFloat(document.querySelector(`#${this.prefix}price_points`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_points`)?.innerHTML};case"pointsRecive":return{value:parseFloat(document.querySelector(`#${this.prefix}points_recive_points`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}points_recive_points`)?.innerHTML};default:return{value:parseFloat(document.querySelector(`#${this.prefix}price_value`)?.getAttribute("data-price")),formatted:document.querySelector(`#${this.prefix}price_value`)?.innerHTML}}}};app_shop.vars.xhr="",app_shop.getFile=t=>{const e=document.createElement("script");e.src=`${app_shop.urls.prefix}${t}.js`,document.body.appendChild(e)},app_shop.getOuterJS=t=>{t.forEach((t=>{const e=document.createElement("script");e.src=`${app_shop.urls.prefix}${t}.js`,document.body.appendChild(e)}))},app_shop.run=(t,e,i,n)=>
1{(Array.isArray(e)?e:[e]).forEach((e=>{app_shop.fnrun[e]=app_shop.fnrun[e]||[],app_shop.fnrun[e].push({w:i,fn:t,a:n})}))},app_shop.runArr=(t,e,i)=>{t&&t.forEach((t=>{const{w:e,fn:n,a:s}=t;(!e||null!==document.querySelector(e))&&(i&&e&&!s||n())}))};class iaiGetAjax{constructor(){this.data={},this.cache={},this.fn={}}addToData(t,e,i){this.data[t]||(this.data[t]=e,this.fn[t]=i)}projector(t){this.addToData("Projector",{format:"json",params:{}},t)}basket(t){this.addToData("Basket",{},t)}wishlist(t){this.addToData("Wishlist",{},t)}comparers(t){this.addToData("Comparers",{},t)}snippets(t,e){this.addToData("Snippets",{format:"json",params:{mobile:e.mobile,tablet:e.tablet,pc:e.pc,request_uri:e.request_uri,additional_ajax:e.additional_ajax}},t)}toplayersAndWidgets(t,e){this.addToData("ToplayersAndWidgets",{format:"json",params:{mobile:e.mobile,tablet:e.tablet,pc:e.pc,request_uri:e.request_uri,additional_ajax:e.additional_ajax}},t)}reInit(t=[]){t.length?(Object.keys(this.data).forEach((e=>{t.includes(e)||(delete this.data[e],delete this.fn[e],delete this.cache[e])})),this.init()):this.init()}init(){const t=`request=${JSON.stringify(this.data)}`;fetch("/ajax/get.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t}).then((t=>t.json())).then((t=>{this.cache=t,Object.values(this.fn).forEach((t=>t(this.cache)))})).catch((t=>{}))}}const iaiGet=new iaiGetAjax;app_shop.fn.change_url=t=>{history.pushState&&history.pushState({foo:"bar"},"",decodeURIComponent(t))},app_shop.fn.evalJSFromHtml=function(t){(t?.querySelectorAll("script.ajaxLoad")||[]).forEach((t=>{const e=document.createElement("script");e.innerHTML=t.innerHTML,document.body.appendChild(e)}))},app_shop.fn.load=async(t,e,i,n="")=>{const s=`${t}${n}`,o=new AbortController,a=setTimeout((()=>o.abort()),16e3);e.forEach((([t])=>document.querySelector(t)?.classList.add("load-content")));try{const n=await fetch(s,{signal:o.signal}),a=await n.text(),r=(new DOMParser).parseFromString(a,"text/html");e.forEach((t=>{const[e,i]=t,n=document.querySelector(e),s=r.querySelector(i);n&&s&&(n.outerHTML=s.outerHTML)})),app_shop.fn.change_url(t),app_shop.fn.evalJSFromHtml(r),i&&i(r)}catch(e){window.location.href=t}finally{clearTimeout(a)}},app_shop.fn.variety=(t,e,i)=>1===+t?e:i,app_shop.fn.setGrid=()=>{if(1===app_shop.vars.view){return void document.querySelectorAll(".setMobileGrid").forEach((t=>{const e=t.dataset.item,i=document.querySelector(e);if(!i)return;const n=document.createElement("del");n.className="domHandler",n.dataset.item=e,n.style.display="none",t.before(n),t.append(i)}))}document.querySelectorAll(".domHandler").forEach((t=>{const e=t.dataset.item,i=document.querySelector(e);i&&(t.after(i),t.remove())}))},app_shop.fn.runAjaxFn=()=>{if(app_shop.runArr(app_shop.fnrun.all,"all",!0),app_shop.vars.view)return void app_shop.runArr(app_shop.fnrun[app_shop.vars.view],app_shop.vars.view,!0);const t=document.getElementById("viewType");if(!t)return;const{width:e}=window.getComputedStyle(t);app_shop.vars.view=parseInt(e,10),app_shop.runArr(app_shop.fnrun[app_shop.vars.view],app_shop.vars.view,!0)},app_shop.runApp=()=>{const t=document.getElementById("viewType"),{width:e}=window.getComputedStyle(t)||{};app_shop.vars.view=parseInt(e,10)||1,app_shop.runArr(app_shop.fnrun.all,"all"),app_shop.runArr(app_shop.fnrun[app_shop.vars.view],app_shop.vars.view),app_shop.fn.setGrid(),app_shop.getOuterJS(app_shop.files),iaiGet.init();let i,n=app_shop.vars.view;const s=()=>{clearTimeout(i),i=setTimeout((()=>{const{width:e}=window.getComputedStyle(t);app_shop.vars.view=parseInt(e,10),app_shop.vars.view!==n&&(n=app_shop.vars.view,app_shop.runArr(app_shop.fnrun[app_shop.vars.view],app_shop.vars.view),app_shop.fn.setGrid())}),100)};window.removeEventListener("resize",s),window.addEventListener("resize",s)},app_shop.fn.getRwdSrc=t=>{if(!t)return"";const{src_mobile:e,src_tablet:i,src_desktop:n}=t.dataset||t.data()||{},s=[e,i,n,n][app_shop.vars.view-1];return s||""},app_shop.fn.rwdBanner=(t,e)=>{t&&e&&e.forEach((e=>{app_shop.run((()=>{document.querySelectorAll(t).forEach((t=>{t.querySelectorAll("img.rwd-src").forEach((t=>{t.setAttribute("src",app_shop.fn.getRwdSrc(t))}))}))}),e,t)}))},String.prototype.format=function(...t){let e=this;return t.forEach((t=>{e=e.replace(/%[a-z]/,t)})),e},app_shop.fn.news_data=function(t){const{data:e,month_names:i,format:n="%d-%m-%y"}=t||{};if(!e)return!1;const s=e.split("-");return!(s.length<3)&&(i&&(s[1]=i[parseInt(s[1],10)-1]),n.format(s[2],s[1],s[0]))},app_shop.fn.setHeight=t=>{const{selector:e,selectors:i,container:n}=t||{};if(!e&&!i||!n)return;const s=document.querySelector(n);if(!s)return;const o=t=>{if(!t)return 0;const{marginLeft:e,marginRight:i}=window.getComputedStyle(t);return t.offsetWidth+parseInt(e,10)+parseInt(i,10)},a=o(s),r=o(s.firstElementChild),c=t=>{if(!document.querySelectorAll(t).length)return;if(!r)return;const e=Math.round(a/r);if(!e)return;const i=[...s.children];for(let n=0;n<i.length;n+=e){const s=i.slice(n,n+e).map((e=>e.querySelector(t))),o=Math.max(...s.map((t=>t?.offsetHeight)));
vendor: 10,983 bytes, line 1
1s.forEach((t=>{t&&(t.style.minHeight=`${o}px`)}))}};e&&c(e),i?.length&&i.forEach((t=>c(t)))};var markerClusterer=function(t){"use strict";function e(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i}class i{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class n{constructor(t){let{markers:e,position:i}=t;this.markers=e,i&&(i instanceof google.maps.LatLng?this._position=i:this._position=new google.maps.LatLng(i))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(i.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>i.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(i.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const s=(t,e,n,s)=>{const a=o(t.getBounds(),e,s);return n.filter((t=>a.contains(i.getPosition(t))))},o=(t,e,i)=>{const{northEast:n,southWest:s}=c(t,e),o=l({northEast:n,southWest:s},i);return u(o,e)},a=(t,e,i)=>{const n=o(t,e,i),s=n.getNorthEast(),a=n.getSouthWest();return[a.lng(),a.lat(),s.lng(),s.lat()]},r=(t,e)=>{const i=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,s=Math.sin(i/2),o=Math.sin(n/2),a=s*s+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*o*o;return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))*6371},c=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}),l=(t,e)=>{let{northEast:i,southWest:n}=t;return i.x+=e,i.y-=e,n.x-=e,n.y+=e,{northEast:i,southWest:n}},u=(t,e)=>{let{northEast:i,southWest:n}=t;const s=e.fromDivPixelToLatLng(n),o=e.fromDivPixelToLatLng(i);return new google.maps.LatLngBounds(s,o)};class d{constructor(t){let{maxZoom:e=16}=t;this.maxZoom=e}noop(t){let{markers:e}=t;return p(e)}}class h extends d{constructor(t){var{viewportPadding:i=60}=t;super(e(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=i}calculate(t){let{markers:e,map:i,mapCanvasProjection:n}=t;return i.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:s(i,n,e,this.viewportPadding),map:i,mapCanvasProjection:n})}}}const p=t=>t.map((t=>new n({position:i.getPosition(t),markers:[t]})));var m=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var n,s,o;if(Array.isArray(e)){if((n=e.length)!=i.length)return!1;for(s=n;0!=s--;)if(!t(e[s],i[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(i,o[s]))return!1;for(s=n;0!=s--;){var a=o[s];if(!t(e[a],i[a]))return!1}return!0}return e!=e&&i!=i}));const _=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class f{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,i]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const n=i>>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);const s=_[15&i];if(!s)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new f(a,o,s,t)}constructor(t,e=64,i=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=_.indexOf(this.ArrayType),o=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,r=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${i}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+r,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+o+a+r),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+r,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+s]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=e,i}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return g(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,i,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:a}=this,r=[0,s.length-1,0],c=[];for(;r.length;){const l=r.pop()||0,u=r.pop()||0,d=r.pop()||0;if(u-d<=a){for(let a=d;a<=u;a++){const r=o[2*a],l=o[2*a+1];r>=t&&r<=i&&l>=e&&l<=n&&c.push(s[a])}continue}const h=d+u>>1,p=o[2*h],m=o[2*h+1];p>=t&&p<=i&&m>=e&&m<=n&&c.push(s[h]),(0===l?t<=p:e<=m)&&(r.push(d),r.push(h-1),r.push(1-l)),(0===l?i>=p:n>=m)&&(r.push(h+1),r.push(u),r.push(1-l))}return c}within(t,e,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:s,nodeSize:o}=this,a=[0,n.length-1,0],r=[],c=i*i;for(;a.length;){const l=a.pop()||0,u=a.pop()||0,d=a.pop()||0;if(u-d<=o){for(let i=d;i<=u;i++)w(s[2*i],s[2*i+1],t,e)<=c&&r.push(n[i]);continue}const h=d+u>>1,p=s[2*h],m=s[2*h+1];w(p,m,t,e)<=c&&r.push(n[h]),(0===l?t-i<=p:e-i<=m)&&(a.push(d),a.push(h-1),a.push(1-l)),(0===l?t+i>=p:e+i>=m)&&(a.push(h+1),a.push(u),a.push(1-l))}return r}}function g(t,e,i,n,s,o){if(s-n<=i)return;const a=n+s>>1;y(t,e,a,n,s,o),g(t,e,i,n,a-1,1-o),g(t,e,i,a+1,s,1-o)}function y(t,e,i,n,s,o){for(;s>n;){if(s-n>600){const a=s-n+1,r=i-n+1,c=Math.log(a),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(a-l)/a)*(r-a/2<0?-1:1);y(t,e,i,Math.max(n,Math.floor(i-r*l/a+u)),Math.min(s,Math.floor(i+(a-r)*l/a+u)),o)}const a=e[2*i+o];let r=n,c=s;for(v(t,e,n,i),e[2*s+o]>a&&v(t,e,n,s);r<c;){for(v(t,e,r,c),r++,c--;e[2*r+o]<a;)r++;for(;e[2*c+o]>a;)c--}e[2*n+o]===a?v(t,e,n,c):(c++,v(t,e,c,s)),c<=i&&(n=c+1),i<=c&&(s=c-1)}}function v(t,e,i,n){b(t,i,n),b(e,2*i,2*n),b(e,2*i+1,2*n+1)}function b(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function w(t,e,i,n){const s=t-i,o=e-n;return s*s+o*o}const x={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},S=Math.fround||(k=new Float32Array(1),t=>(k[0]=+t,k[0]));var k;class L{constructor(t){this.options=Object.assign(Object.create(x),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:i,maxZoom:n}=this.options;t.length;this.points=t;const s=[];for(let e=0;e<t.length;e++){const i=t[e];if(!i.geometry)continue;const[n,o]=i.geometry.coordinates,a=S(T(n)),r=S(z(o));s.push(a,r,1/0,e,-1,1),this.options.reduce&&s.push(0)}let o=this.trees[n+1]=this._createTree(s);for(let t=n;t>=i;t--){Date.now();o=this.trees[t]=this._createTree(this._cluster(o,t))}return this}getClusters(t,e){let i=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let s=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,s=180;else if(i>s){const t=this.getClusters([i,n,180,o],e),a=this.getClusters([-180,n,s,o],e);return t.concat(a)}const a=this.trees[this._limitZoom(e)],r=a.range(T(i),z(o),T(s),z(n)),c=a.data,l=[];for(const t of r){const e=this.stride*t;l.push(c[e+5]>1?C(c,e,this.clusterProps):this.points[c[e+3]])}return l}getChildren(t){const e=this._getOriginId(t),i=this._getOriginZoom(t),n="No cluster with the specified id.",s=this.trees[i];if(!s)throw new Error(n);const o=s.data;if(e*this.stride>=o.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),r=o[e*this.stride],c=o[e*this.stride+1],l=s.within(r,c,a),u=[];for(const e of l){const i=e*this.stride;o[i+4]===t&&u.push(o[i+5]>1?C(o,i,this.clusterProps):this.points[o[i+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,i){e=e||10,i=i||0;const n=[];return this._appendLeaves(n,t,e,i,0),n}getTile(t,e,i){const n=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:o,radius:a}=this.options,r=a/o,c=(i-r)/s,l=(i+1+r)/s,u={features:[]};return this._addTileFeatures(n.range((e-r)/s,c,(e+1+r)/s,l),n.data,e,i,s,u),0===e&&this._addTileFeatures(n.range(1-r/s,c,1,l),n.data,s,i,s,u),e===s-1&&this._addTileFeatures(n.range(0,c,r/s,l),n.data,-1,i,s,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const i=this.getChildren(t);if(e++,1!==i.length)break;t=i[0].properties.cluster_id}return e}_appendLeaves(t,e,i,n,s){const o=this.getChildren(e);for(const e of o){const o=e.properties;if(o&&o.cluster?s+o.point_count<=n?s+=o.point_count:s=this._appendLeaves(t,o.cluster_id,i,n,s):s<n?s++:t.push(e),t.length===i)break}return s}_createTree(t){const e=new f(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<t.length;i+=this.stride)e.add(t[i],t[i+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,i,n,s,o){for(const a of t){const t=a*this.stride,r=e[t+5]>1;let c,l,u;if(r)c=E(e,t,this.clusterProps),l=e[t],u=e[t+1];else{const i=this.points[e[t+3]];c=i.properties;const[n,s]=i.geometry.coordinates;l=T(n),u=z(s)}const d={type:1,geometry:[[Math.round(this.options.extent*(l*s-i)),Math.round(this.options.extent*(u*s-n))]],tags:c};let h;h=r||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==h&&(d.id=h),o.features.push(d)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:i,extent:n,reduce:s,minPoints:o}=this.options,a=i/(n*Math.pow(2,e)),r=t.data,c=[],l=this.stride;for(let i=0;i<r.length;i+=l){if(r[i+2]<=e)continue;
vendor: 2,131 bytes, line 1
1r[i+2]=e;const n=r[i],u=r[i+1],d=t.within(r[i],r[i+1],a),h=r[i+5];let p=h;for(const t of d){const i=t*l;r[i+2]>e&&(p+=r[i+5])}if(p>h&&p>=o){let t,o=n*h,a=u*h,m=-1;const _=(i/l<<5)+(e+1)+this.points.length;for(const n of d){const c=n*l;if(r[c+2]<=e)continue;r[c+2]=e;const u=r[c+5];o+=r[c]*u,a+=r[c+1]*u,r[c+4]=_,s&&(t||(t=this._map(r,i,!0),m=this.clusterProps.length,this.clusterProps.push(t)),s(t,this._map(r,c)))}r[i+4]=_,c.push(o/p,a/p,1/0,_,-1,p),s&&c.push(m)}else{for(let t=0;t<l;t++)c.push(r[i+t]);if(p>1)for(const t of d){const i=t*l;if(!(r[i+2]<=e)){r[i+2]=e;for(let t=0;t<l;t++)c.push(r[i+t])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,i){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return i?Object.assign({},n):n}const n=this.points[t[e+3]].properties,s=this.options.map(n);return i&&s===n?Object.assign({},s):s}}function C(t,e,i){return{type:"Feature",id:t[e+3],properties:E(t,e,i),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),M(t[e+1])]}};var n}function E(t,e,i){const n=t[e+5],s=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+6],a=-1===o?{}:Object.assign({},i[o]);return Object.assign(a,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:s})}function T(t){return t/360+.5}function z(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function M(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}class P extends d{constructor(t){var{maxZoom:i,radius:n=60}=t,s=e(t,["maxZoom","radius"]);super({maxZoom:i}),this.state={zoom:-1},this.superCluster=new L(Object.assign({maxZoom:this.maxZoom,radius:n},s))}calculate(t){let e=!1;const n={zoom:t.map.getZoom()};if(!m(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const n=this.markers.map((t=>{const e=i.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(n)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!m(this.state,n)),this.state=n,e&&(this.cluster
vendor: 6,244 bytes, line 1
1s=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster(t){let{map:e}=t;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,s]},properties:o}=t;if(o.cluster)return new n({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:s,lng:e}});const a=o.marker;return new n({markers:[a],position:i.getPosition(a)})}}class B{constructor(t,e){this.markers={sum:t.length};const i=e.map((t=>t.count)),n=i.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...i),max:Math.max(...i)}}}}class I{render(t,e,n){let{count:s,position:o}=t;const a=`<svg fill="${s>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${s}</text>\n</svg>`,r=`Cluster of ${s} markers`,c=Number(google.maps.Marker.MAX_ZINDEX)+s;if(i.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(a,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const e={map:n,position:o,zIndex:c,title:r,content:t};return new google.maps.marker.AdvancedMarkerElement(e)}const l={position:o,zIndex:c,title:r,icon:{url:`data:image/svg+xml;base64,${btoa(a)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}class A{constructor(){!function(t,e){for(let i in e.prototype)t.prototype[i]=e.prototype[i]}(A,google.maps.OverlayView)}}var j;t.MarkerClustererEvents=void 0,(j=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",j.CLUSTERING_END="clusteringend",j.CLUSTER_CLICK="click";const W=(t,e,i)=>{i.fitBounds(e.bounds)};return t.AbstractAlgorithm=d,t.AbstractViewportAlgorithm=h,t.Cluster=n,t.ClusterStats=B,t.DefaultRenderer=I,t.GridAlgorithm=class extends h{constructor(t){var{maxDistance:i=4e4,gridSize:n=40}=t;super(e(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=i,this.gridSize=n}calculate(t){let{markers:e,map:i,mapCanvasProjection:n}=t;const o={zoom:i.getZoom()};let a=!1;return this.state.zoom>=this.maxZoom&&o.zoom>=this.maxZoom||(a=!m(this.state,o)),this.state=o,i.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:a}:{clusters:this.cluster({markers:s(i,n,e,this.viewportPadding),map:i,mapCanvasProjection:n})}}cluster(t){let{markers:e,map:i,mapCanvasProjection:n}=t;return this.clusters=[],e.forEach((t=>{this.addToClosestCluster(t,i,n)})),this.clusters}addToClosestCluster(t,e,s){let a=this.maxDistance,c=null;for(let e=0;e<this.clusters.length;e++){const n=this.clusters[e],s=r(n.bounds.getCenter().toJSON(),i.getPosition(t).toJSON());s<a&&(a=s,c=n)}if(c&&o(c.bounds,s,this.gridSize).contains(i.getPosition(t)))c.push(t);else{const e=new n({markers:[t]});this.clusters.push(e)}}},t.MarkerClusterer=class extends A{constructor(t){let{map:e,markers:i=[],algorithmOptions:n={},algorithm:s=new P(n),renderer:o=new I,onClusterClick:a=W}=t;super(),this.markers=[...i],this.clusters=[],this.algorithm=s,this.renderer=o,this.onClusterClick=a,e&&this.setMap(e)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const n=this.markers.indexOf(t);return-1!==n&&(i.setMap(t,null),this.markers.splice(n,1),e||this.render(),!0)}removeMarkers(t,e){let i=!1;return t.forEach((t=>{i=this.removeMarker(t,!0)||i})),i&&!e&&this.render(),i}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);const{clusters:n,changed:s}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(s||null==s){const t=new Set;for(const e of n)1==e.markers.length&&t.add(e.markers[0]);const e=[];for(const n of this.clusters)null!=n.marker&&(1==n.markers.length?t.has(n.marker)||i.setMap(n.marker,null):e.push(n.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame((()=>e.forEach((t=>i.setMap(t,null)))))}google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>i.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const e=new B(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((s=>{1===s.markers.length?s.marker=s.markers[0]:(s.marker=this.renderer.render(s,e,n),s.markers.forEach((t=>i.setMap(t,null))),this.onClusterClick&&s.marker.addListener("click",(e=>{google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTER_CLICK,s),this.onClusterClick(e,s,n)}))),i.setMap(s.marker,n)}))}},t.MarkerUtils=i,t.NoopAlgorithm=class extends d{constructor(t){super(e(t,[]))}calculate(t){let{markers:e,map:i,mapCanvasProjection:n}=t;return{clusters:this.cluster({markers:e,map:i,mapCanvasProjection:n}),changed:!1}}cluster(t){return this.noop(t)}},t.SuperClusterAlgorithm=P,t.SuperClusterViewportAlgorithm=class extends h{constructor(t){var{maxZoom:i,radius:n=60,viewportPadding:s=60}=t,o=e(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:i,viewportPadding:s}),this.superCluster=new L(Object.assign({maxZoom:this.maxZoom,radius:n},o)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){const e={zoom:Math.round(t.map.getZoom()),view:a(t.map.getBounds(),t.mapCanvasProjection,this.viewportPadding)};let n=!m(this.state,e);if(!m(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const e=this.markers.map((t=>{const e=i.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(e)}
1return n&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:n}}cluster(t){let{map:e,mapCanvasProjection:i}=t;const n={zoom:Math.round(e.getZoom()),view:a(e.getBounds(),i,this.viewportPadding)};return this.superCluster.getClusters(n.view,n.zoom).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,s]},properties:o}=t;if(o.cluster)return new n({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:s,lng:e}});const a=o.marker;return new n({markers:[a],position:i.getPosition(a)})}},t.defaultOnClusterClickHandler=W,t.distanceBetweenPoints=r,t.extendBoundsToPaddedViewport=o,t.extendPixelBounds=l,t.filterMarkersToPaddedViewport=s,t.getPaddedViewport=a,t.noop=p,t.pixelBoundsToLatLngBounds=u,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
2/* @preserve
3 * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com
4 * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
5 */!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,(function(t){"use strict";function e(t){for(var e,i,n=1,s=arguments.length;n<s;n++)for(e in i=arguments[n])t[e]=i[e];return t}var i=Object.create||function(t){return n.prototype=t,new n};function n(){}function s(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var o=0;function a(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function r(t,e,i){var n,s,o=function(){n=!1,s&&(a.apply(i,s),s=!1)},a=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(o,e),n=!0)};return a}function c(t,e,i){var n=e[1],s=n-(e=e[0]);return t===n&&i?t:((t-e)%s+s)%s+e}function l(){return!1}function u(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function d(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function h(t){return d(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function m(t,e,i){var n,s=[];for(n in t)s.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+s.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function f(t,e){return t.replace(_,(function(t,i){if(void 0===(i=e[i]))throw new Error("No value provided for variable "+t);return"function"==typeof i?i(e):i}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var S=window.requestAnimationFrame||b("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,i){if(!i||S!==x)return S.call(window,s(t,e));t.call(e)}function E(t){t&&k.call(window,t)}var T={__proto__:null,extend:e,create:i,bind:s,get lastId(){return o},stamp:a,throttle:r,wrapNum:c,falseFn:l,formatNum:u,trim:d,splitWords:h,setOptions:p,getParamString:m,template:f,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:S,cancelFn:k,requestAnimFrame:C,cancelAnimFrame:E};function z(){}z.extend=function(t){function n(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var s,o=n.__super__=this.prototype,a=i(o);for(s in(a.constructor=n).prototype=a,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(n[s]=this[s]);if(t.statics&&e(n,t.statics),t.includes){var r=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){r=g(r)?r:[r];for(var c=0;c<r.length;c++)r[c],L.Mixin.Events}e.apply(null,[a].concat(t.includes))}return e(a,t),delete a.statics,delete a.includes,a.options&&(a.options=o.options?i(o.options):{},e(a.options,t.options)),a._initHooks=[],a.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=a._initHooks.length;t<e;t++)a._initHooks[t].call(this)}},n},z.include=function(t){var i=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},z.mergeOptions=function(t){return e(this.prototype.options,t),this},z.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1
5),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var M={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var s=0,o=(t=h(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=h(t);for(var s=1===arguments.length,o=0,a=t.length;o<a;o++)s?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i){if("function"!=typeof e);else{this._events=this._events||{};for(var n=this._events[t],s=(t=(n||(this._events[t]=n=[]),{fn:e,ctx:i=i===this?void 0:i}),n),o=0,a=s.length;o<a;o++)if(s[o].fn===e&&s[o].ctx===i)return;s.push(t)}},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=l;delete this._events[t]}else if(i===this&&(i=void 0),"function"!=typeof e);else for(s=0,o=n.length;s<o;s++){var a=n[s];if(a.ctx===i&&a.fn===e)return this._firingCount&&(a.fn=l,this._events[t]=n=n.slice()),void n.splice(s,1)}},fire:function(t,i,n){if(!this.listens(t,n))return this;var s=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var c=o[a];c.fn.call(c.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=s((function(){this.off(t,e,i).off(t,o,i)}),this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}},P=(M.addEventListener=M.on,M.removeEventListener=M.clearAllEventListeners=M.off,M.addOneTimeEventListener=M.once,M.fireEvent=M.fire,M.hasEventListeners=M.listens,z.extend(M));function B(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var I=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function A(t,e,i){return t instanceof B?t:g(t)?new B(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new B(t.x,t.y):new B(t,e,i)}function j(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function W(t,e){return!t||t instanceof j?t:new j(t,e)}function q(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function O(t,e){return t instanceof q?t:new q(t,e)}function Z(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function N(t,e,i){return t instanceof Z?t:g(t)&&"object"!=typeof t[0]?3===t.length?new Z(t[0],t[1],t[2]):2===t.length?new Z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Z(t,e,i)}B.prototype={clone:function(){return new B(this.x,this.y)},add:function(t){return this.clone()._add(A(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(A(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new B(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new B(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=A(t)).x-this.x;t=t.y-this.y;return Math.sqrt(e*e+t*t)},equals:function(t){return(t=A(t)).x===this.x&&t.y===this.y},contains:function(t){return t=A(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},j.prototype={extend:function(t){return t=A(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new B(this.min.x,this.max.y)},getTopRight:function(){return new B(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t=("number"==typeof t[0]||t instanceof B?A:W)(t))instanceof j?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=W(t);var e=this.min,i=this.max,n=t.min,s=(t=t.max).x>=e.x&&n.x<=i.x;t=t.y>=e.y&&n.y<=i.y;return s&&t},overlaps:function(t){t=W(t);var e=this.min,i=this.max,n=t.min,s=(t=t.max).x>e.x&&n.x<i.x;t=t.y>e.y&&n.y<i.y;return s&&t},isValid:function(){return!(!this.min||!this.max)}},q.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof Z)i=e=t;else{if(!(t instanceof q))return t?this.extend(N(t)||O(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new Z(e.lat,e.lng),this._northEast=new Z(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t;t=Math.abs(e.lng-i.lng)*t;return new q(new Z(e.lat-n,e.lng-t),new Z(i.lat+n,i.lng+t))},getCenter:function(){return new Z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new Z(this.getNorth(),this.getWest())},getSouthEast:function(){return new Z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
5,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof Z||"lat"in t?N:O)(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof q?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=(t=t.getNorthEast()).lat>=e.lat&&n.lat<=i.lat;t=t.lng>=e.lng&&n.lng<=i.lng;return s&&t},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=(t=t.getNorthEast()).lat>e.lat&&n.lat<i.lat;t=t.lng>e.lng&&n.lng<i.lng;return s&&t},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=O(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var D={latLngToPoint:function(t,e){return t=this.projection.project(t),e=this.scale(e),this.transformation._transform(t,e)},pointToLatLng:function(t,e){return e=this.scale(e),t=this.transformation.untransform(t,e),this.projection.unproject(t)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds;t=this.scale(t);return new j(this.transformation.transform(e.min,t),this.transformation.transform(e.max,t))},infinite:!(Z.prototype={equals:function(t,e){return!!t&&(t=N(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,N(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=(t=180*t/40075017)/Math.cos(Math.PI/180*this.lat);return O([this.lat-t,this.lng-e],[this.lat+t,this.lng+e])},clone:function(){return new Z(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?c(t.lng,this.wrapLng,!0):t.lng;return new Z(this.wrapLat?c(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat;e=e.lng-i.lng;
vendor: 6,964 bytes, line 5
5return 0==n&&0==e?t:(i=t.getSouthWest(),t=t.getNorthEast(),new q(new Z(i.lat-n,i.lng-e),new Z(t.lat-n,t.lng-e)))}},F=e({},D,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2);e=Math.sin((e.lng-t.lng)*i/2),t=o*o+Math.cos(n)*Math.cos(s)*e*e,i=2*Math.atan2(Math.sqrt(t),Math.sqrt(1-t));return this.R*i}}),G={R:G=6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE;i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new B(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new Z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new j([-(G*=Math.PI),-G],[G,G])};function H(t,e,i,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function R(t,e,i,n){return new H(t,e,i,n)}H.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new B((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var V=e({},F,{code:"EPSG:3857",projection:G,transformation:R(V=.5/(Math.PI*G.R),.5,-V,.5)}),$=e({},V,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function U(t,e){for(var i,n,s,o,a="",r=0,c=t.length;r<c;r++){for(i=0,n=(s=t[r]).length;i<n;i++)a+=(i?"L":"M")+(o=s[i]).x+" "+o.y;a+=e?Tt.svg?"z":"x":""}return a||"M0 0"}var X=document.documentElement.style,Q="ActiveXObject"in window,J=Q&&!document.addEventListener,K="msLaunchUri"in navigator&&!("documentMode"in document),tt=Et("webkit"),et=Et("android"),it=Et("android 2")||Et("android 3"),nt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=(nt=et&&Et("Google")&&nt<537&&!("AudioNode"in window),!!window.opera),ot=!K&&Et("chrome"),at=Et("gecko")&&!tt&&!st&&!Q,rt=!ot&&Et("safari"),ct=Et("phantom"),lt="OTransition"in X,ut=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in X,ht="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!it,pt=(X="MozPerspective"in X,!window.L_DISABLE_3D&&(dt||ht||X)&&!lt&&!ct),mt=(Fi="undefined"!=typeof orientation||Et("mobile"))&&tt,_t=Fi&&ht,ft=!window.PointerEvent&&window.MSPointerEvent,gt=!(!window.PointerEvent&&!ft),yt="ontouchstart"in window||!!window.TouchEvent,vt=!window.L_NO_TOUCH&&(yt||gt),bt=Fi&&st,wt=Fi&&at,xt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(t){}return t}(),kt=!!document.createElement("canvas").getContext,Lt=!(!document.createElementNS||!Y("svg").createSVGRect),Ct=!!Lt&&((Ct=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Ct.firstChild&&Ct.firstChild.namespaceURI));function Et(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Tt={ie:Q,ielt9:J,edge:K,webkit:tt,android:et,android23:it,androidStock:nt,opera:st,chrome:ot,gecko:at,safari:rt,phantom:ct,opera12:lt,win:ut,ie3d:dt,webkit3d:ht,gecko3d:X,any3d:pt,mobile:Fi,mobileWebkit:mt,mobileWebkit3d:_t,msPointer:ft,pointer:gt,touch:vt,touchNative:yt,mobileOpera:bt,mobileGecko:wt,retina:xt,passiveEvents:St,canvas:kt,svg:Lt,vml:!Lt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='<v:shape adj="1"/>',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Ct},zt=Tt.msPointer?"MSPointerDown":"pointerdown",Mt=Tt.msPointer?"MSPointerMove":"pointermove",Pt=Tt.msPointer?"MSPointerUp":"pointerup",Bt=Tt.msPointer?"MSPointerCancel":"pointercancel",It={touchstart:zt,touchmove:Mt,touchend:Pt,touchcancel:Bt},At={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ze(e),Nt(t,e)},touchmove:Nt,touchend:Nt,touchcancel:Nt},jt={},Wt=!1;function qt(t){jt[t.pointerId]=t}function Ot(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Zt(t){delete jt[t.pointerId]}function Nt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],jt)e.touches.push(jt[i]);e.changedTouches=[e],t(e)}}var Dt,Ft,Gt,Ht,Rt,Vt,$t=le(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=le(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ut="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function Xt(t){return"string"==typeof t?document.getElementById(t):t}function Qt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function Jt(t,e,i){return(t=document.createElement(t)).className=e||"",i&&i.appendChild(t),t}function Kt(t){var e=t.parentNode;e&&e.removeChild(t)}function te(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ee(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ie(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ne(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=re(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var i;if(void 0!==t.classList)for(var n=h(e),s=0,o=n.length;s<o;s++)t.classList.add(n[s]);else ne(t,e)||ae(t,((i=re(t))?i+" ":"")+e)}function oe(t,e){void 0!==t.classList?t.classList.remove(e):ae(t,d((" "+re(t)+" ").replace(" "+e+" "," ")))}function ae(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function re(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function ce(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function le(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ue(t,e,i){e=e||new B(0,0),t.style[$t]=(Tt.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(i?" scale("+i+")":"")}function de(t,e){t._leaflet_pos=e,Tt.any3d?ue(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function he(t){return t._leaflet_pos||new B(0,0)}function pe(){ve(window,"dragstart",ze)}function me(){we(window,"dragstart",ze)}function _e(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(fe(),Vt=(Rt=t).style.outline,t.style.outline="none",ve(window,"keydown",fe))}function fe(){Rt&&(Rt.style.outline=Vt,Vt=Rt=void 0,we(window,"keydown",fe))}function ge(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function ye(t){var e=t.getBoundingClientRect();
5return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function ve(t,e,i,n){if(e&&"object"==typeof e)for(var s in e)ke(t,s,e[s],i);else for(var o=0,a=(e=h(e)).length;o<a;o++)ke(t,e[o],i,n);return this}Ht="onselectstart"in document?(Gt=function(){ve(window,"selectstart",ze)},function(){we(window,"selectstart",ze)}):(Ft=le(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Gt=function(){var t;Ft&&(t=document.documentElement.style,Dt=t[Ft],t[Ft]="none")},function(){Ft&&(document.documentElement.style[Ft]=Dt,Dt=void 0)}),Q={__proto__:null,TRANSFORM:$t,TRANSITION:Yt,TRANSITION_END:Ut,get:Xt,getStyle:Qt,create:Jt,remove:Kt,empty:te,toFront:ee,toBack:ie,hasClass:ne,addClass:se,removeClass:oe,setClass:ae,getClass:re,setOpacity:ce,testProp:le,setTransform:ue,setPosition:de,getPosition:he,get disableTextSelection(){return Gt},get enableTextSelection(){return Ht},disableImageDrag:pe,enableImageDrag:me,preventOutline:_e,restoreOutline:fe,getSizedParentNode:ge,getScale:ye};var be="_leaflet_events";function we(t,e,i,n){if(1===arguments.length)xe(t),delete t[be];else if(e&&"object"==typeof e)for(var s in e)Le(t,s,e[s],i);else if(e=h(e),2===arguments.length)xe(t,(function(t){return-1!==y(e,t)}));else for(var o=0,a=e.length;o<a;o++)Le(t,e[o],i,n);return this}function xe(t,e){for(var i in t[be]){var n=i.split(/\d/)[0];e&&!e(n)||Le(t,n,null,null,i)}}
5var Se={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function ke(t,e,i,n){var s,o,r=e+a(i)+(n?"_"+a(n):"");t[be]&&t[be][r]||(o=s=function(e){return i.call(n||t,e||window.event)},!Tt.touchNative&&Tt.pointer&&0===e.indexOf("touch")?s=function(t,e,i){return"touchstart"!==e||Wt||(document.addEventListener(zt,qt,!0),document.addEventListener(Mt,Ot,!0),document.addEventListener(Pt,Zt,!0),document.addEventListener(Bt,Zt,!0),Wt=!0),At[e]?(i=At[e].bind(this,i),t.addEventListener(It[e],i,!1),i):L.Util.falseFn}(t,e,s):Tt.touch&&"dblclick"===e?s=function(t,e){t.addEventListener("dblclick",e);var i,n=0;function s(t){var s;1!==t.detail?i=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((s=Date.now())-n<=200?2===++i&&e(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):i=1,n=s)}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Se[e]||e,s,!!Tt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(Se[e],s=function(e){e=e||window.event,Ae(t,e)&&o(e)},!1):t.addEventListener(e,o,!1):t.attachEvent("on"+e,s),t[be]=t[be]||{},t[be][r]=s)}function Le(t,e,i,n,s){var o,r;s=s||e+a(i)+(n?"_"+a(n):""),(i=t[be]&&t[be][s])&&(!Tt.touchNative&&Tt.pointer&&0===e.indexOf("touch")?(n=t,r=i,It[o=e]&&n.removeEventListener(It[o],r,!1)):Tt.touch&&"dblclick"===e?(n=i,(r=t).removeEventListener("dblclick",n.dblclick),r.removeEventListener("click",n.simDblclick)):"removeEventListener"in t?t.removeEventListener(Se[e]||e,i,!1):t.detachEvent("on"+e,i),t[be][s]=null)}function Ce(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ee(t){return ke(t,"wheel",Ce),this}function Te(t){return ve(t,"mousedown touchstart dblclick contextmenu",Ce),t._leaflet_disable_click=!0,this}function ze(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Me(t){return ze(t),Ce(t),this}function Pe(t,e){if(!e)return new B(t.clientX,t.clientY);var i=ye(e),n=i.boundingClientRect;return new B((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Be=Tt.win&&Tt.chrome?2*window.devicePixelRatio:Tt.gecko?window.devicePixelRatio:1;function Ie(t){return Tt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Be:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Ae(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}J={__proto__:null,on:ve,off:we,stopPropagation:Ce,disableScrollPropagation:Ee,disableClickPropagation:Te,preventDefault:ze,stop:Me,getMousePosition:Pe,getWheelDelta:Ie,isExternalTarget:Ae,addListener:ve,removeListener:we};var je=P.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=he(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){t=this._startPos.add(this._offset.multiplyBy(t)),e&&t._round(),de(this._el,t),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),We=P.extend({options:{crs:V,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(N(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Tt.any3d&&!Tt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ve(this._proxy,Ut,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
5,setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(N(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Tt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Tt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2);t=(t instanceof B?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),n=this.containerPointToLatLng(s.add(t));return this.setView(n,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():O(t);var i=A(e.paddingTopLeft||e.padding||[0,0]),n=A(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));return(s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0?{center:t.getCenter(),zoom:s}
5:(e=n.subtract(i).divideBy(2),n=this.project(t.getSouthWest(),s),i=this.project(t.getNorthEast(),s),{center:this.unproject(n.add(i).divideBy(2).add(e),s),zoom:s})},fitBounds:function(t,e){if(!(t=O(t)).isValid())throw new Error("Bounds are not valid.");return t=this._getBoundsCenterZoom(t,e),this.setView(t.center,t.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){return e=e||{},(t=A(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new je,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(se(this._mapPane,"leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var i},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Tt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),a=this._zoom,r=(t=N(t),e=void 0===e?a:e,Math.max(o.x,o.y)),c=r*this.getZoomScale(a,e),l=s.distanceTo(n)||1,u=1.42,d=u*u;function h(t){return t=(c*c-r*r+(t?-1:1)*d*d*l*l)/(2*(t?c:r)*d*l),(t=Math.sqrt(t*t+1)-t)<1e-9?-18:Math.log(t)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}var _=h(0);var f=Date.now(),g=(h(1)-_)/u,y=i.duration?1e3*i.duration:1e3*g*.8;return this._moveStart(!0,i.noMoveStart),function i(){var o=(Date.now()-f)/y,c=(1-Math.pow(1-o,1.5))*g;o<=1?(this._flyToFrame=C(i,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(function(t){return r*(m(_)*(p(t=_+u*t)/m(t))-p(_))/d}
5(c)/l)),a),this.getScaleZoom(r/(o=c,r*(m(_)/m(_+u*o))),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){return t=this._getBoundsCenterZoom(t,e),this.flyTo(t.center,t.zoom,e)},setMaxBounds:function(t){return(t=O(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter();t=this._limitCenter(i,this._zoom,O(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=A((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=A(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),o=(t=this.project(t),(i=W([(o=this.getPixelBounds()).min.add(i),o.max.subtract(n)])).getSize());return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(o),s.x+=n.x<0?-i.x:i.x,s.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),o=i.divideBy(2).round(),a=n.divideBy(2).round();return(o=o.subtract(a)).x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=s(this._handleGeolocationResponse,this),n=s(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new Z(t.coords.latitude,t.coords.longitude),s=n.toBounds(2*t.coords.accuracy),o=this._locateOptions,a=(o.setView&&(e=this.getBoundsZoom(s),this.setView(n,o.maxZoom?Math.min(e,o.maxZoom):e)),{latlng:n,bounds:s,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(a[i]=t.coords[i]);this.fire("locationfound",a)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),Kt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)Kt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=Jt("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new q(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZo
vendor: 8,103 bytes, line 5
5om?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=A(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=(t=t.getSouthEast(),i=this.getSize().subtract(i),t=W(this.project(t,n),this.project(a,n)).getSize(),a=Tt.any3d?this.options.zoomSnap:1,i.x/t.x);i=i.y/t.y,t=e?Math.max(r,i):Math.min(r,i),n=this.getScaleZoom(t,n);return a&&(n=Math.round(n/(a/100))*(a/100),n=e?Math.ceil(n/a)*a:Math.floor(n/a)*a),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new j(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e,t=i.zoom(t*i.scale(e));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(N(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(A(t),e)},layerPointToLatLng:function(t){return t=A(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(N(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(N(t),N(e))},containerPointToLayerPoint:function(t){return A(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return A(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(A(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return Pe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=Xt(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");ve(t,"scroll",this._onScroll,this),this._containerId=a(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&Tt.any3d,se(t,"leaflet-container"+(Tt.touch?" leaflet-touch":"")+(Tt.retina?" leaflet-retina":"")+(Tt.ielt9?" leaflet-oldie":"")+(Tt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Qt(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),de(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){de(this._mapPane,new B(0,0));var i=!this._loaded,n=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){de(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?we:ve;e((this._targets[a(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Tt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,r=!1;o;){if((i=this._targets[a(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(s&&!Ae(o,t))break;if(n.push(i),s)break}if(o===this._container)break;o=o.parentNode}return n.length||r||s||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&_e(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){"click"===t.type&&((c=e({},t)).type="preclick",this._fireDOMEvent(c,c.type,n));var s=this._findEventTargets(t,i);if(n){for(var o=[],a=0;a<n.length;a++)n[a].listens(i,!0)&&o.push(n[a]);s=o.concat(s)}if(s.length){"contextmenu"===i&&ze(t);var r,c=s[0],l={originalEvent:t};for("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(r=c.getLatLng&&(!c._radius||c._radius<=10),l.containerPoint=r?this.latLngToContainerPoint(c.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=r?c.getLatLng():this.layerPointToLatLng(l.layerPoint)),a=0;a<s.length;a++)if(s[a].fire(i,l,!0),l.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return he(this._mapPane)||new B(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){return i=this._getNewPixelOrigin(i,e),this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,i){return i=this._getNewPixelOrigin(i,e),W([this.project(t.getSouthWest
5(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2);s=new j(n.subtract(s),n.add(s));return(s=this._getBoundsOffset(s,i,e)).round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=new j((i=this.getPixelBounds()).min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,i){return i=(e=W(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i))).min.subtract(t.min),e=e.max.subtract(t.max),new B(this._rebound(i.x,-e.x),this._rebound(i.y,-e.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Tt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){oe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){return t=this._getCenterOffset(t)._trunc(),!(!0!==(e&&e.animate)&&!this.getSize().contains(t)||(this.panBy(t,e),0))},_createAnimProxy:function(){var t=this._proxy=Jt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=$t,i=this._proxy.style[e];ue(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Kt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ue(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e);n=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(n)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&oe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function qe(t){return new Ze(t)}var Oe,Ze=z.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition();t=t._controlCorners[i];return se(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(Kt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}}),Ne=(We.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this}
5,_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=Jt("div",e+"control-container",this._container);function n(n,s){t[n+s]=Jt("div",e+n+" "+e+s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)Kt(this._controlCorners[t]);Kt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),Ze.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ze.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){return t.off("add remove",this._onLayerChange,this),(t=this._getLayer(a(t)))&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){se(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(se(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):oe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return oe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=Jt("div",t),i=this.options.collapsed,n=(e.setAttribute("aria-haspopup",!0),Te(e),Ee(e),this._section=Jt("section",t+"-list")),s=(i&&(this._map.on("click",this.collapse,this),ve(e,{mouseenter:function(){ve(n,"click",ze),this.expand(),setTimeout((function(){we(n,"click",ze)}))},mouseleave:this.collapse},this)),this._layersLink=Jt("a",t+"-toggle",e));s.href="#",s.title="Layers",s.setAttribute("role","button"),ve(s,"click",ze),ve(s,"focus",this.expand,this),i||this.expand(),this._baseLayersList=Jt("div",t+"-base",n),this._separator=Jt("div",t+"-separator",n),this._overlaysList=Jt("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(s((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;te(this._baseLayersList),te(this._overlaysList),this._layerControlInputs=[];for(var t,e,i,n=0,s=0;s<this._layers.length;s++)i=this._layers[s],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,n+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<n)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target));(t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null)&&this._map.fire(t,e)},_createRadioElement:function(t,e){return t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),s=((n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),ve(e,"click",this._onInputClick,this),document.createElement("span"))).innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(s),s.appendChild(e),s.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),De=Ze.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=Jt("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}
5,_createButton:function(t,e,i,n,s){return(i=Jt("a",i,n)).innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Te(i),ve(i,"click",Me),ve(i,"click",s,this),ve(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";oe(this._zoomInButton,e),oe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Fe=(We.mergeOptions({zoomControl:!0}),We.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new De,this.addControl(this.zoomControl))})),Ze.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=Jt("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=Jt("div",e,i)),t.imperial&&(this._iScale=Jt("div",e,i))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i;5280<(t=3.2808399*t)?(i=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,i+" mi",i/e)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+" ft",i/t))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t=t/e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),Ge=Ze.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Tt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=Jt("div","leaflet-control-attribution"),Te(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}}),He=(K=(We.mergeOptions({attributionControl:!0}),We.addInitHook((function(){this.options.attributionControl&&(new Ge).addTo(this)})),Ze.Layers=Ne,Ze.Zoom=De,Ze.Scale=Fe,Ze.Attribution=Ge,qe.layers=function(t,e,i){return new Ne(t,e,i)},qe.zoom=function(t){return new De(t)},qe.scale=function(t){return new Fe(t)},qe.attribution=function(t){return new Ge(t)},z.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),tt=(K.addTo=function(t,e){return t.addHandler(e,this),this},{Events:M}),Tt.touch?"touchstart mousedown":"mousedown"),Re=P.extend({options:{clickTolerance:3}
5,initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ve(this._dragStartTarget,He,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Re._dragging===this&&this.finishDrag(!0),we(this._dragStartTarget,He,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ne(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Re._dragging===this&&this.finishDrag():Re._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Re._dragging=this)._preventOutline&&_e(this._element),pe(),Gt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=ge(this._element),this._startPoint=new B(i.clientX,i.clientY),this._startPos=he(this._element),this._parentScale=ye(e),i="mousedown"===t.type,ve(document,i?"mousemove":"touchmove",this._onMove,this),ve(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:!(e=new B((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.clientY)._subtract(this._startPoint)).x&&!e.y||Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,ze(t),this._moved||(this.fire("dragstart"),this._moved=!0,se(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),se(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),de(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){oe(document.body,"leaflet-dragging"),this._lastTarget&&(oe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),we(document,"mousemove touchmove",this._onMove,this),we(document,"mouseup touchend touchcancel",this._onUp,this),me(),Ht(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,Re._dragging=!1}});function Ve(t,e){return e&&t.length?function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,s,o){var a,r,c,l=0;for(r=s+1;r<=o-1;r++)l<(c=Qe(e[r],e[s],e[o],!0))&&(a=r,l=c);n<l&&(i[a]=1,t(e,i,n,s,a),t(e,i,n,a,o))}(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}(t=function(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)(function(t,e){var i=e.x-t.x;return i*i+(e=e.y-t.y)*e})(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}(t,e*=e),e):t.slice()}function $e(t,e,i){return Math.sqrt(Qe(t,e,i,!0))}function Ye(t,e,i,n,s){var o,a,r,c=n?Oe:Xe(t,i),l=Xe(e,i);for(Oe=l;;){if(!(c|l))return[t,e];if(c&l)return!1;r=Xe(a=Ue(t,e,o=c||l,i,s),i),o===c?(t=a,c=r):(e=a,l=r)}}function Ue(t,e,i,n,s){var o,a,r=e.x-t.x,c=(e=e.y-t.y,n.min);n=n.max;return 8&i?(o=t.x+r*(n.y-t.y)/e,a=n.y):4&i?(o=t.x+r*(c.y-t.y)/e,a=c.y):2&i?(o=n.x,a=t.y+e*(n.x-t.x)/r):1&i&&(o=c.x,a=t.y+e*(c.x-t.x)/r),new B(o,a,s)}function Xe(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Qe(t,e,i,n){var s=e.x,o=(e=e.y,i.x-s),a=i.y-e,r=o*o+a*a;return 0<r&&(1<(r=((t.x-s)*o+(t.y-e)*a)/r)?(s=i.x,e=i.y):0<r&&(s+=o*r,e+=a*r)),o=t.x-s,a=t.y-e,n?o*o+a*a:new B(s,e)}function Je(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ke(t){return Je(t)}function ti(t,e,i){for(var n,s,o,a,r,c,l,u=[1,4,2,8],d=0,h=t.length;d<h;d++)t[d]._code=Xe(t[d],e);for(o=0;o<4;o++){for(c=u[o],n=[],d=0,s=(h=t.length)-1;d<h;s=d++)a=t[d],r=t[s],a._code&c?r._code&c||((l=Ue(r,a,c,e,i))._code=Xe(l,e),n.push(l)):(r._code&c&&((l=Ue(r,a,c,e,i))._code=Xe(l,e),n.push(l)),n.push(a));t=n}return t}et={__proto__:null,simplify:Ve,pointToSegmentDistance:$e,closestPointOnSegment:function(t,e,
5i){return Qe(t,e,i)},clipSegment:Ye,_getEdgeIntersection:Ue,_getBitCode:Xe,_sqClosestPointOnSegment:Qe,isFlat:Je,_flat:Ke};it={__proto__:null,clipPolygon:ti},nt={project:function(t){return new B(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new j([-180,-90],[180,90])},st={R:6378137,R_MINOR:6356752.314245179,bounds:new j([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=(s=Math.sqrt(1-s*s))*Math.sin(n);o=Math.tan(Math.PI/4-n/2)/Math.pow((1-o)/(1+o),s/2),n=-i*Math.log(Math.max(o,1e-10));return new B(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),c=0,l=.1;c<15&&1e-7<Math.abs(l);c++)e=o*Math.sin(r),e=Math.pow((1-e)/(1+e),o/2),r+=l=Math.PI/2-2*Math.atan(a*e)-r;return new Z(r*i,t.x*i/n)}},ot={__proto__:null,LonLat:nt,Mercator:st,SphericalMercator:G},rt=e({},F,{code:"EPSG:3395",projection:st,transformation:R(at=.5/(Math.PI*st.R),.5,-at,.5)});var ei=e({},F,{code:"EPSG:4326",projection:nt,transformation:R(1/180,1,-1/180,.5)}),ii=(ct=e({},D,{projection:nt,transformation:R(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng;e=e.lat-t.lat;return Math.sqrt(i*i+e*e)},infinite:!0}),lt=(D.Earth=F,D.EPSG3395=rt,D.EPSG3857=V,D.EPSG900913=$,D.EPSG4326=ei,D.Simple=ct,P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,i=t.target;i.hasLayer(this)&&(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents&&(e=this.getEvents(),i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)),this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this}))}})),We.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return a(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=a(t),this._zoomBoundLayers[t]&&(
vendor: 8,596 bytes, line 5
5delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t].options;e=void 0===s.minZoom?e:Math.min(e,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),lt.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){return t=t in this._layers?t:this.getLayerId(t),this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:a})),ni=ii.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ii.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ii.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,e=new q;for(t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),si=z.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=this._createImg(i,e&&"IMG"===e.tagName?e:null),this._setIconStyles(i,t),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var i=this.options,n=A(n="number"==typeof(n=i[e+"Size"])?[n,n]:n),s=A("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Tt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),oi=si.extend({options:{iconUrl:"/gfx/standards/marker-icon.png",iconRetinaUrl:"/gfx/standards/marker-icon-2x.png",shadowUrl:"/gfx/standards/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof oi.imagePath&&(oi.imagePath=this._detectIconPath()),(this.options.imagePath||oi.imagePath)+si.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){function e(t,e,i){return(e=e.exec(t))&&e[i]}return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=Jt("div","leaflet-default-icon-path",document.body),e=Qt(t,"background-image")||Qt(t,"backgroundImage");return document.body.removeChild(t),(e=this._stripUrl(e))?e:(t=document.querySelector('link[href$="leaflet.css"]'))?t.href.substring(0,t.href.length-11-1):""}}),ai=K.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Re(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),se(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&oe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=he(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin();(r=W(a.min._subtract(r).add(s),a.max._subtract(r).subtract(s))).contains(o)||(s=A((Math.max(r.max.x,o.x)-r.max.x)/(a.max.x-r.max.x)-(Math.min(r.min.x,o.x)-r.min.x)/(a.min.x-r.min.x),(Math.max(r.max.y,o.y)-r.max.y)/(a.max.y-r.max.y)-(Math.min(r.min.y,o.y)-r.min.y)/(a.min.y-r.min.y)).multiplyBy(n),i.panBy(s,{animate:!1}),this._draggable._newPos._add(s),this._draggable._startPos._add(s),de(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=he(e._icon),s=e._map.layerPointToLatLng(n);i&&de(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ri=lt.extend({options:{icon:new oi,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=N(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t,e=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=!1,s=!1;(t=((t=e.icon.createIcon(this._icon))!==this._icon&&(this._icon&&this._removeIcon(),n=!0,e.title&&(t.title=e.title),"IMG"===t.tagName&&(t.alt=e.alt||"")),se(t,i),e.keyboard&&(t.tabIndex="0",t.setAttribute("role","button")),this._icon=t,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ve(t,"focus",this._panOnFocus,this),e.icon.createShadow(this._shadow)))!==this._shadow&&(this._removeShadow(),s=!0),t&&(se(t,i),t.alt=""),this._shadow=t,e.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),t&&s&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}
vendor: 5,478 bytes, line 5
5),this.options.autoPanOnFocus&&we(this._icon,"focus",this._panOnFocus,this),Kt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Kt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&de(this._icon,t),this._shadow&&de(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round(),this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(se(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ai&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ai(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&ce(this._icon,t),this._shadow&&ce(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t,e,i=this._map;i&&(t=(e=this.options.icon.options).iconSize?A(e.iconSize):A(0,0),e=e.iconAnchor?A(e.iconAnchor):A(0,0),i.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:t.subtract(e)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),ci=lt.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),li=ci.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ci.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance();t=[t+i,e+i];this._pxBounds=new j(this._point.subtract(t),this._point.add(t))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),ui=li.extend({initialize:function(t,i,n){if(p(this,i="number"==typeof i?e({},n,{radius:i}):i),this._latlng=N(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new q(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ci.prototype.setStyle,_project:function(){var t,e,i,n,s,o=this._latlng.lng,a=this._latlng.lat,r=this._map,c=r.options.crs;c.distance===F.distance?(n=Math.PI/180,s=this._mRadius/F.R/n,t=r.project([a+s,o]),e=r.project([a-s,o]),e=t.add(e).divideBy(2),i=r.unproject(e).lat,n=Math.acos((Math.cos(s*n)-Math.sin(a*n)*Math.sin(i*n))/(Math.cos(a*n)*Math.cos(i*n)))/n,!isNaN(n)&&0!==n||(n=s/Math.cos(Math.PI/180*a)),this._point=e.subtract(r.getPixelOrigin()),this._radius=isNaN(n)?0:e.x-r.project([i,o-n]).x,this._radiusY=e.y-t.y):(s=c.unproject(c.project(this._latlng).subtract([this._mRadius,0])),this._point=r.latLngToLayerPoint(this._latlng),this._radius=this._point.x-r.latLngToLayerPoint(s).x),this._updateBounds()}}),di=ci.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,i=null,n=Qe,s=0,o=this._parts.length;s<o;s++)for(var a=this._parts[s],r=1,c=a.length;r<c;r++){var l,u,d=n(t,l=a[r-1],u=a[r],!0);d<e&&(e=d,i=n(t,l,u))}return i&&(i.distance=Math.sqrt(e)),i}
5,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,s,o,a=this._rings[0],r=a.length;if(!r)return null;for(e=t=0;t<r-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(i=t=0;t<r-1;t++)if(n=a[t],s=a[t+1],e<(i+=o=n.distanceTo(s)))return this._map.layerPointToLatLng([s.x-(o=(i-e)/o)*(s.x-n.x),s.y-o*(s.y-n.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=N(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new q,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Je(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Je(t),n=0,s=t.length;n<s;n++)i?(e[n]=N(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=new B(t=this._clickTolerance(),t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof Z,a=t.length;if(o){for(s=[],n=0;n<a;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i,n,s,o=this._parts,a=0,r=0,c=this._rings.length;a<c;a++)for(e=0,i=(s=this._rings[a]).length;e<i-1;e++)(n=Ye(s[e],s[e+1],t,e,!0))&&(o[r]=o[r]||[],o[r].push(n[0]),n[1]===s[e+1]&&e!==i-2||(o[r].push(n[1]),r++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Ve(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,s,o,a,r,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(a=(r=this._parts[i]).length)-1;n<a;s=n++)if((e||0!==n)&&$e(t,r[s],r[n])<=c)return!0;return!1}});di._flat=Ke;var hi=di.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
5,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,s,o,a,r,c,l=this._rings[0],u=l.length;if(!u)return null;for(t=o=a=r=0,e=u-1;t<u;e=t++)i=l[t],n=l[e],s=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*s,r+=(i.y+n.y)*s,o+=3*s;return c=0===o?l[0]:[a/o,r/o],this._map.layerPointToLatLng(c)},_convertLatLngs:function(t){var e=(t=di.prototype._convertLatLngs.call(this,t)).length;return 2<=e&&t[0]instanceof Z&&t[0].equals(t[e-1])&&t.pop(),t},_setLatLngs:function(t){di.prototype._setLatLngs.call(this,t),Je(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(Je(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,e=new B(e=this.options.weight,e);t=new j(t.min.subtract(e),t.max.add(e));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,n=0,s=this._rings.length;n<s;n++)(i=ti(this._rings[n],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,a,r,c,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,r=this._parts.length;s<r;s++)for(o=0,a=(c=(e=this._parts[s]).length)-1;o<c;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||di.prototype._containsPoint.call(this,t,!0)}}),pi=ni.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=g(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=mi(t,o);return a?(a.feature=wi(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var i,n,s,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,c=[],l=e&&e.pointToLayer,u=e&&e.coordsToLatLng||fi;if(!r&&!a)return null;switch(a.type){case"Point":return _i(l,t,i=u(r),e);case"MultiPoint":for(s=0,o=r.length;s<o;s++)i=u(r[s]),c.push(_i(l,t,i,e));return new ni(c);case"LineString":case"MultiLineString":return n=gi(r,"LineString"===a.type?0:1,u),new di(n,e);case"Polygon":case"MultiPolygon":return n=gi(r,"Polygon"===a.type?1:2,u),new hi(n,e);case"GeometryCollection":for(s=0,o=a.geometries.length;s<o;s++){var d=mi({geometry:a.geometries[s],type:"Feature",properties:t.properties},e);d&&c.push(d)}return new ni(c);default:throw new Error("Invalid GeoJSON object.")}}function _i(t,e,i,n){return t?t(e,i):new ri(i,n&&n.markersInheritOptions&&n)}function fi(t){return new Z(t[1],t[0],t[2])}function gi(t,e,i){for(var n,s=[],o=0,a=t.length;o<a;o++)n=e?gi(t[o],e-1,i):(i||fi)(t[o]),s.push(n);return s}function yi(t,e){return void 0!==(t=N(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function vi(t,e,i,n){for(var s=[],o=0,a=t.length;o<a;o++)s.push(e?vi(t[o],e-1,i,n):yi(t[o],n));return!e&&i&&s.push(s[0]),s}function bi(t,i){return t.feature?e({},t.feature,{geometry:i}):wi(i)}function wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function xi(t,e){return new pi(t,e)}ut={toGeoJSON:function(t){return bi(this,{type:"Point",coordinates:yi(this.getLatLng(),t)})}},ri.include(ut),ui.include(ut),li.include(ut),di.include({toGeoJSON:function(t){var e=!Je(this._latlngs);return bi(this,{type:(e?"Multi":"")+"LineString",coordinates:vi(this._latlngs,e?1:0,!1,t)})}}),hi.include({toGeoJSON:function(t){var e=!Je(this._latlngs),i=e&&!Je(this._latlngs[0]);t=vi(this._latlngs,i?2:e?1:0,!0,t);return bi(this,{type:(i?"Multi":"")+"Polygon",coordinates:t=e?t:[t]})}}),ii.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),bi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){e.toGeoJSON&&(e=e.toGeoJSON(t),i?n.push(e.geometry):"FeatureCollection"===(e=wi(e)).type?n.push.apply(n,e.features):n.push(e))})),i?bi(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});dt=xi;var Si=lt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""}
vendor: 11,476 bytes, line 5
5,initialize:function(t,e,i){this._url=t,this._bounds=O(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(se(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Kt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ee(this._image),this},bringToBack:function(){return this._map&&ie(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:Jt("img");se(e,"leaflet-image-layer"),this._zoomAnimated&&se(e,"leaflet-zoom-animated"),this.options.className&&se(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=s(this.fire,this,"load"),e.onerror=s(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom);t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ue(this._image,t,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();de(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ce(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ki=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:Jt("video");if(se(e,"leaflet-image-layer"),this._zoomAnimated&&se(e,"leaflet-zoom-animated"),this.options.className&&se(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var r=Jt("source");r.src=this._url[a],e.appendChild(r)}}}}),Li=Si.extend({_initImage:function(){var t=this._image=this._url;se(t,"leaflet-image-layer"),this._zoomAnimated&&se(t,"leaflet-zoom-animated"),this.options.className&&se(t,this.options.className),t.onselectstart=l,t.onmousemove=l}}),Ci=lt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,e){p(this,t),this._source=e},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ce(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ce(this._container,1),this.bringToFront(),this.options.interactive&&(se(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ce(this._container,0),this._removeTimeout=setTimeout(s(Kt,void 0,this._container),200)):Kt(this._container),this.options.interactive&&(oe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ee(this._container),this},bringToBack:function(){return this._map&&ie(this._container),this},_prepareOpen:function(t){if(!(i=this._source)._map)return!1;if(i instanceof ni){var e,i=null,n=this._source._layers;for(e in n)if(n[e]._map){i=n[e];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,i;this._map&&(e=this._map.latLngToLayerPoint(this._latlng),t=A(this.options.offset),i=this._getAnchor(),this._zoomAnimated?de(this._container,e.add(i)):t=t.add(e).add(i),e=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x,this._container.style.bottom=e+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),Ei=(We.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),lt.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(p(s,n),s._source=this):(s=e&&!n?e:new t(n,this)).setContent(i),s}}),Ci.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ci.prototype.openOn.call(this,t)},onAdd:function(t){Ci.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ci||this._source.on("preclick",Ce))},onRemove:function(t){Ci.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ci||this._source.off("preclick",Ce))},getEvents:function(){var t=Ci.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=Jt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=Jt("div",t+"-content-wrapper",e);this._contentNode=Jt("div",t+"-content",i),Te(e),Ee(this._contentNode),ve(e,"contextmenu",Ce),this._tipContainer=Jt("div",t+"-tip-container",e),this._tip=Jt("div",t+"-tip",this._tipContainer),this.options.closeButton&&((i=this._closeButton=Jt("a",t+"-close-button",e)).setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',ve(i,"click",this.close,this))},_updateLayout:function(){var t=this._contentNode,e=t.style,i=(e.width="",e.whiteSpace="nowrap",t.offsetWidth),n=(i=Math.min(i,this.options.maxWidth),i=(i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="",t.offsetHeight),this.options.maxHeight),s="leaflet-popup-scrolled";n&&n<i?(e.height=n+"px",se(t,s)):oe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);var e=this._getAnchor();de(this._container,t.add(e))},_adjustPan:function(t){var e,i,n,s,o,a,r,c;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),e=this._map,i=parseInt(Qt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+i,c=this._containerWidth,(n=new B(this._containerLeft,-i-this._containerBottom))._add(he(this._container)),n=e.layerPointToContainerPoint(n),o=A(this.options.autoPanPadding),s=A(this.options.autoPanPaddingTopLeft||o),o=A(this.options.autoPanPaddingBottomRight||o),a=e.getSize(),r=0,n.x+c+o.x>a.x&&(r=n.x+c-a.x+o.x),n.x-r-s.x<(c=0)&&(r=n.x-s.x),n.y+i+o.y>a.y&&(c=n.y+i-a.y+o.y),n.y-c-s.y<0&&(c=n.y-s.y),(r||c)&&e.fire("autopanstart").panBy([r,c],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return A(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ti=(We.mergeOptions({closePopupOnClick:!0}),We.include({openPopup:function(t,e,i){return this._initOverlay(Ei,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),lt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ei,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Me(t),e=t.layer||t.target,this._popup._source!==e||e instanceof ci?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)}
vendor: 8,470 bytes, line 5
5,_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ci.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ci.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ci.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Jt("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=(i=i.layerPointToContainerPoint(t),this.options.direction),a=n.offsetWidth,r=n.offsetHeight,c=A(this.options.offset),l=this._getAnchor();i="top"===o?(e=a/2,r):"bottom"===o?(e=a/2,0):(e="center"===o?a/2:"right"===o?0:"left"===o?a:i.x<s.x?(o="right",0):(o="left",a+2*(c.x+l.x)),r/2);t=t.subtract(A(e,i,!0)).add(c).add(l),oe(n,"leaflet-tooltip-right"),oe(n,"leaflet-tooltip-left"),oe(n,"leaflet-tooltip-top"),oe(n,"leaflet-tooltip-bottom"),se(n,"leaflet-tooltip-"+o),de(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ce(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),this._setPosition(t)},_getAnchor:function(){return A(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),zi=(We.include({openTooltip:function(t,e,i){return this._initOverlay(Ti,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),lt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ti,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),e=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(e)}}),si.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){t=t&&"DIV"===t.tagName?t:document.createElement("div");var e=this.options;return e.html instanceof Element?(te(t),t.appendChild(e.html)):t.innerHTML=!1!==e.html?e.html:"",e.bgPos&&(e=A(e.bgPos),t.style.backgroundPosition=-e.x+"px "+-e.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}}));si.Default=oi;var Mi=lt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Tt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),Kt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ee(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ie(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof B?t:new B(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Tt.ielt9){ce(this._container,this.options.opacity);var t,e=+new Date,i=!1,n=!1;for(t in this._tiles){var s,o=this._tiles[t];o.current&&o.loaded&&(s=Math.min(1,(e-o.loaded)/200),ce(o.el,s),s<1?i=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0))}n&&!this._noPrune&&this._pruneTiles(),i&&(E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=Jt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(Kt(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=Jt("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var t,e,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)(i=this._tiles[t]).current&&!i.active&&(e=i.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)Kt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}
5,_retainParent:function(t,e,i,n){i-=1;var s=((s=new B(+(t=Math.floor(t/2)),+(e=Math.floor(e/2)))).z=i,this._tileCoordsToKey(s));return(s=this._tiles[s])&&s.active?s.retain=!0:(s&&s.loaded&&(s.retain=!0),n<i&&this._retainParent(t,e,i,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var a=((a=new B(s,o)).z=i+1,this._tileCoordsToKey(a));(a=this._tiles[a])&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var s=Math.round(e),o=(s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s),this.options.updateWhenZooming&&s!==this._tileZoom);n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom);e=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Tt.any3d?ue(t.el,e,n):de(t.el,e)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=(i=this._map)._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),i=(e=i.getZoomScale(e,this._tileZoom),t=i.project(t,this._tileZoom).floor(),i.getSize().divideBy(2*e));return new j(t.subtract(i),t.add(i))},_update:function(t){if(n=this._map){var e=this._clampZoom(n.getZoom());if(void 0===t&&(t=n.getCenter()),void 0!==this._tileZoom){var i,n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),a=[],r=(n=this.options.keepBuffer,new j(s.getBottomLeft().subtract([n,-n]),s.getTopRight().add([n,-n])));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(i in this._tiles){var c=this._tiles[i].coords;c.z===this._tileZoom&&r.contains(new B(c.x,c.y))||(this._tiles[i].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var l=s.min.y;l<=s.max.y;l++)for(var u=s.min.x;u<=s.max.x;u++){var d,h=new B(u,l);h.z=this._tileZoom,this._isValidTile(h)&&((d=this._tiles[this._tileCoordsToKey(h)])?d.current=!0:a.push(h))}if(a.sort((function(t,e){return t.distanceTo(o)-e.distanceTo(o)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var p=document.createDocumentFragment();for(u=0;u<a.length;u++)this._addTile(a[u],p);this._level.el.appendChild(p)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),O(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i);i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){return t=new q((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new B(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(Kt(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Tt.ielt9&&this.options.opacity<1&&ce(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&C(s(this._tileReady,this,t,null,o)),de(o,i),this._tiles[n]={el:o,c
vendor: 5,954 bytes, line 5
5oords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ce(i.el,0),E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(se(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Tt.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new B(this._wrapX?c(t.x,this._wrapX):t.x,this._wrapY?c(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Pi=Mi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Tt.retina&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return ve(i,"load",s(this._tileOnLoad,this,e,i)),ve(i,"error",s(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:Tt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(i.y=t),i["-y"]=t),f(this._url,e(i,this.options))},_tileOnLoad:function(t,e){Tt.ielt9?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return(t=this.options.zoomReverse?e-t:t)+this.options.zoomOffset},_getSubdomain:function(t){return t=Math.abs(t.x+t.y)%this.options.subdomains.length,this.options.subdomains[t]},_abortLoading:function(){var t,e,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=l,i.onerror=l,i.complete||(i.src=v,e=this._tiles[t].coords,Kt(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})))},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),Mi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return Mi.prototype._tileReady.call(this,t,e,i)}});function Bi(t,e){return new Pi(t,e)}var Ii=Pi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var n,s=e({},this.defaultWmsParams);for(n in i)n in this.options||(s[n]=i[n]);t=(i=p(this,i)).detectRetina&&Tt.retina?2:1;var o=this.getTileSize();s.width=o.x*t,s.height=o.y*t,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Pi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=(e=(i=W((i=this._crs).project(e[0]),i.project(e[1]))).min,i.max);e=(1.3<=this._wmsVersion&&this._crs===ei?[e.y,e.x,i.y,i.x]:[e.x,e.y,i.x,i.y]).join(",");return(i=Pi.prototype.getTileUrl.call(this,t))+m(this.wmsParams,i,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});Pi.WMS=Ii,Bi.wms=function(t,e){return new Ii(t,e)};var Ai=lt.extend({options:{padding:.1},initialize:function(t){p(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&se(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e);n=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));Tt.any3d?ue(this._container,n,i):de(this._container,n)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).roun
vendor: 5,433 bytes, line 5
5d();this._bounds=new j(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ji=Ai.extend({options:{tolerance:0},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ai.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ve(t,"mousemove",this._onMouseMove,this),ve(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ve(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,Kt(this._container),we(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,e,i,n;this._map._animatingZoom&&this._bounds||(Ai.prototype._update.call(this),t=this._bounds,e=this._container,i=t.getSize(),n=Tt.retina?2:1,de(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Tt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Ai.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),t=(this._layers[a(t)]=t)._order={layer:t,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=(i=t._order).next,i=i.prev;e?e.prev=i:this._drawLast=i,i?i.next=e:this._drawFirst=e,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var e,i=t.options.dashArray.split(/[, ]+/),n=[],s=0;s<i.length;s++){if(e=Number(i[s]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,e,i=this._redrawBounds;this._ctx.save(),i&&(e=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,s,o,a=t._parts,r=a.length,c=this._ctx;if(r){for(c.beginPath(),i=0;i<r;i++){for(n=0,s=a[i].length;n<s;n++)o=a[i][n],c[n?"lineTo":"moveTo"](o.x,o.y);e&&c.closePath()}this._fillStroke(c,t)}}},_updateCircle:function(t){var e,i,n,s;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(s=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!=s&&i.restore(),this._fillStroke(i,t))},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&(("click"===t.type||"preclick"===t.type)&&this._map._draggableMoved(e)||(i=e));this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(oe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(se(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(s((function(){this._mouseHoverThrottled=!1}),this),32)}}
vendor: 5,347 bytes, line 5
5,_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e,i,n=t._order;n&&(e=n.next,i=n.prev,e&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var e,i,n=t._order;n&&(e=n.next,(i=n.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function Wi(t){return Tt.canvas?new ji(t):null}var qi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Oi=(ht={_initContainer:function(){this._container=Jt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ai.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=qi("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=qi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;Kt(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e=e||(t._stroke=qi("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=qi("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ee(t._container)},_bringToBack:function(t){ie(t._container)}},Tt.vml?qi:Y),Zi=Ai.extend({_initContainer:function(){this._container=Oi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Oi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Kt(this._container),we(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Ai.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),de(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Oi("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){Kt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,U(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ee(t._path)},_bringToBack:function(t){ie(t._path)}});function Ni(t){return Tt.svg||Tt.vml?new Zi(t):null}Tt.vml&&Zi.include(ht),We.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Wi(t)||Ni(t)}});var Di=hi.extend({initialize:function(t,e){hi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
vendor: 11,311 bytes, line 5
5,_boundsToLatLngs:function(t){return[(t=O(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Zi.create=Oi,Zi.pointsToPath=U,pi.geometryToLayer=mi,pi.coordsToLatLng=fi,pi.coordsToLatLngs=gi,pi.latLngToCoords=yi,pi.latLngsToCoords=vi,pi.getFeature=bi,pi.asFeature=wi,We.mergeOptions({boxZoom:!0});X=K.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ve(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){we(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Kt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),ve(document,{contextmenu:Me,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Jt("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new j(this._point,this._startPoint)).getSize();de(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(Kt(this._box),oe(this._container,"leaflet-crosshair")),Ht(),me(),we(document,{contextmenu:Me,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0),t=new q(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),We.addInitHook("addHandler","boxZoom",X),We.mergeOptions({doubleClickZoom:!0}),pt=K.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta;i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});var Fi=(We.addInitHook("addHandler","doubleClickZoom",pt),We.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),K.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Re(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){oe(this._map._container,"leaflet-grab"),oe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=O(this._map.options.maxBounds),this._offsetLimit=W(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=((s=this._draggable._newPos.x)-e+i)%t+e-i,s=(s+e+i)%t-e-i;t=Math.abs(n+i)<Math.abs(s+i)?n:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=t},_onDragEnd:function(t){var e,i,n,s,o=this._map,a=o.options,r=!a.inertia||t.noInertia||this._times.length<2;o.fire("dragend",t),r?o.fire("moveend"):(this._prunePositions(+new Date),t=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,e=a.easeLinearity,r=(t=t.multiplyBy(e/r)).distanceTo([0,0]),i=Math.min(a.inertiaMaxSpeed,r),t=t.multiplyBy(i/r),n=i/(a.inertiaDeceleration*e),(s=t.multiplyBy(-n/2).round()).x||s.y?(s=o._limitOffset(s,o.options.maxBounds),C((function(){o.panBy(s,{duration:n,easeLinearity:e,noMoveStart:!0,animate:!0})}))):o.fire("moveend"))}})),Gi=(mt=(We.addInitHook("addHandler","dragging",Fi),We.mergeOptions({keyboard:!0,keyboardPanDelta:80}),K.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ve(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),we(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,e,i;this._focused||(i=document.body,t=document.documentElement,e=i.scrollTop||t.scrollTop,i=i.scrollLeft||t.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},i=this.keyCodes,n=0,s=i.left.length;n<s;n++)e[i.left[n]]=[-1*t,0];for(n=0,s=i.right.length;n<s;n++)e[i.right[n]]=[t,0];for(n=0,s=i.down.length;n<s;n++)e[i.down[n]]=[0,t];for(n=0,s=i.up.length;n<s;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},i=this.keyCodes,n=0,s=i.zoomIn.length;n<s;n++)e[i.zoomIn[n]]=t;for(n=0,s=i.zoomOut.length;n<s;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){ve(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){we(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=A(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Me(t)}}})),_t=(We.addInitHook("addHandler","keyboard",mt),We.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),K.extend({addHooks:function(){ve(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){we(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ie(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date),e=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),e),Me(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0,n=(t._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel));n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,i=i?Math.ceil(n/i)*i:n,n=t._limitZoom(e+(0<this._delta?i:-i))-e;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(e+n):t.setZoomAround(this._lastMousePos,e+n))}})),ft=(We.addInitHook("addHandler","scrollWheelZoom",_t),We.mergeOptions({tapHold:Tt.touchNative&&Tt.safari&&Tt.mobile,tapTolerance:15}),K.extend({addHooks:function(){ve(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){we(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){var e;clearTimeout(this._holdTimeout),1===t.touches.length&&(e=t.touches[0],this._startPos=this._newPos=new B(e.clientX,e.clientY),this._holdTimeout=setTimeout(s((function(){this._cancel(),this._isTapValid()&&(ve(document,"touchend",ze),ve(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),ve(document,"touchend touchcancel contextmenu",this._cancel,this),ve(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function t(){we(document,"touchend",ze),we(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),we(document,"touchend touchcancel contextmenu",this._cancel,this),we(document,"touchmove",this._onMove,this)},_onMove:function(t){t=t.touches[0],this._newPos=new B(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){(t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY}))._simulated=!0,e.target.dispatchEvent(t)}})),gt=(We.addInitHook("addHandler","tapHold",ft),We.mergeOptions({touchZoom:Tt.touch,bounceAtZoomLimits:!0}),K.extend({addHooks:function(){se(this._map._container,"leaflet-touch-zoom"),ve(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){oe(this._map._container,"leaflet-touch-zoom"),we(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,i,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(e=n.mouseEventToContainerPoint(t.touches[0]),i=n.mou
5seEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ve(document,"touchmove",this._onTouchMove,this),ve(document,"touchend touchcancel",this._onTouchEnd,this),ze(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{if(i=i._add(n)._divideBy(2)._subtract(this._centerPoint),1==o&&0===i.x&&0===i.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(i),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest),n=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1}),this._animRequest=C(n,this,!0),ze(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),we(document,"touchmove",this._onTouchMove,this),we(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),We.addInitHook("addHandler","touchZoom",gt),We.BoxZoom=X,We.DoubleClickZoom=pt,We.Drag=Fi,We.Keyboard=mt,We.ScrollWheelZoom=_t,We.TapHold=ft,We.TouchZoom=gt,t.Bounds=j,t.Browser=Tt,t.CRS=D,t.Canvas=ji,t.Circle=ui,t.CircleMarker=li,t.Class=z,t.Control=Ze,t.DivIcon=zi,t.DivOverlay=Ci,t.DomEvent=J,t.DomUtil=Q,t.Draggable=Re,t.Evented=P,t.FeatureGroup=ni,t.GeoJSON=pi,t.GridLayer=Mi,t.Handler=K,t.Icon=si,t.ImageOverlay=Si,t.LatLng=Z,t.LatLngBounds=q,t.Layer=lt,t.LayerGroup=ii,t.LineUtil=et,t.Map=We,t.Marker=ri,t.Mixin=tt,t.Path=ci,t.Point=B,t.PolyUtil=it,t.Polygon=hi,t.Polyline=di,t.Popup=Ei,t.PosAnimation=je,t.Projection=ot,t.Rectangle=Di,t.Renderer=Ai,t.SVG=Zi,t.SVGOverlay=Li,t.TileLayer=Pi,t.Tooltip=Ti,t.Transformation=H,t.Util=T,t.VideoOverlay=ki,t.bind=s,t.bounds=W,t.canvas=Wi,t.circle=function(t,e,i){return new ui(t,e,i)},t.circleMarker=function(t,e){return new li(t,e)},t.control=qe,t.divIcon=function(t){return new zi(t)},t.extend=e,t.featureGroup=function(t,e){return new ni(t,e)},t.geoJSON=xi,t.geoJson=dt,t.gridLayer=function(t){return new Mi(t)},t.icon=function(t){return new si(t)},t.imageOverlay=function(t,e,i){return new Si(t,e,i)},t.latLng=N,t.latLngBounds=O,t.layerGroup=function(t,e){return new ii(t,e)},t.map=function(t,e){return new We(t,e)},t.marker=function(t,e){return new ri(t,e)},t.point=A,t.polygon=function(t,e){return new hi(t,e)},t.polyline=function(t,e){return new di(t,e)},t.popup=function(t,e){return new Ei(t,e)},t.rectangle=function(t,e){return new Di(t,e)},t.setOptions=p,t.stamp=a,t.svg=Ni,t.svgOverlay=function(t,e,i){return new Li(t,e,i)},t.tileLayer=Bi,t.tooltip=function(t,e){return new Ti(t,e)},t.transformation=R,t.version="1.8.0",t.videoOverlay=function(t,e,i){return new ki(t,e,i)},window.L);t.noConflict=function(){return window.L=Gi,this},window.L=t})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).Leaflet=t.Leaflet||{},t.Leaflet.markercluster={}))}(this,(function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster
vendor: 10,998 bytes, line 5
5=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,s=this._nonPointGroup,o=this.options.chunkedLoading,a=this.options.chunkInterval,r=this.options.chunkProgress,c=t.length,l=0,u=!0;if(this._map){var d=(new Date).getTime(),h=L.bind((function(){var p=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();l<c;l++){if(o&&l%200==0){var m=(new Date).getTime()-p;if(a<m)break}if((i=t[l])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),c=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),f=_[0]===i?_[1]:_[0];n.removeLayer(f)}}else s.addLayer(i),e||this.fire("layeradd",{layer:i})}r&&r(l,c,(new Date).getTime()-d),l===c?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(h,this.options.chunkDelay)}),this);h()}else for(var p=this._needsClustering;l<c;l++)(i=t[l])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),c=t.length):i.getLatLng?this.hasLayer(i)||p.push(i):s.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,s=this._featureGroup,o=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),o.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var r=t.slice(),c=n;for(e=0;e<c;e++)(i=r[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,r),c=r.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),s.hasLayer(i)&&(s.removeLayer(i),i.clusterShow&&i.clusterShow())):(o.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,s,o=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(o),n=o.length-1;0<=n;n--){for(i=!0,s=a.length-1;0<=s;s--)if(a[s].layer===o[n]){i=!1;break}i&&t.call(e,o[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;0<=e;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;0<=e;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());s<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,a=this._map,r=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var c,l=t.__parent,u=l._markers;for(this._arraySplice(u,t);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<r));)e&&l._childCount<=1?(c=l._markers[0]===t?l._markers[1]:l._markers[0],n[l._zoom].removeObject(l,a.project(l._cLatLng,l._zoom)),s[l._zoom].addObject(c,a.project(c.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(c),c.__parent=l.__parent,l._icon&&(o.removeLayer(l),i||o.addLayer(c))):l._iconNeedsUpdate=!0,l=l.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,s=this.options.spiderfyOnEveryZoom;(e||n||s)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,s=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),s.off("zoomend",this._hideCoverage,this))}
vendor: 4,879 bytes, line 5
5,_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var s=t;e<=s;s--)this._gridClusters[s]=new L.DistanceGrid(n(s)),this._gridUnclustered[s]=new L.DistanceGrid(n(s));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,o=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);a<=e;e--){i=this._map.project(t.getLatLng(),e);var r=s[e].getNearObject(i);if(r)return r._addChild(t),void(t.__parent=r);if(r=o[e].getNearObject(i)){var c=r.__parent;c&&this._removeLayer(r,!1);var l=new this._markerCluster(this,e,r,t);s[e].addObject(l,this._map.project(l._cLatLng,e)),r.__parent=l;var u=t.__parent=l;for(n=e-1;n>c._zoom;n--)u=new this._markerCluster(this,n,u),s[n].addObject(u,this._map.project(r.getLatLng(),n));return c._addChild(u),void this._removeFromGridUnclustered(r,e)}o[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),s=0;for(e=e||[];s<n.length;s++)(i=n[s])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),s=this._featureGroup,o=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,o,(function(o){var a,r=o._latlng,c=o._markers;
vendor: 3,221 bytes, line 5
5for(n.contains(r)||(r=null),o._isSingleParent()&&t+1===e?(s.removeLayer(o),o._recursivelyAddChildrenToMap(null,e,n)):(o.clusterHide(),o._recursivelyAddChildrenToMap(r,e,n)),i=c.length-1;0<=i;i--)a=c[i],n.contains(a._latlng)||s.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),s.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,o,(function(t){s.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,s,e+1,i);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,s,(function(t){t._recursivelyRemoveChildrenFromMap(n,s,e+1)}));o._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,s=n.getBoundsZoom(this._bounds),o=this._zoom+1,a=n.getZoom();0<i.length&&o<s;){o++;var r=[];for(e=0;e<i.length;e++)r=r.concat(i[e]._childClusters);i=r}
vendor: 6,330 bytes, line 5
5o<s?this._group._map.setView(this._latlng,o):s<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,s=this._markers,o=this._childClusters,a=0,r=0,c=this._childCount;if(0!==c){for(this._resetBounds(),t=0;t<s.length;t++)i=s[t]._latlng,this._bounds.extend(i),a+=i.lat,r+=i.lng;for(t=0;t<o.length;t++)(e=o[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,r+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/c,r/c),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,s=t._markers;for(i=s.length-1;0<=i;i--)(n=s[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,s=t._childClusters;for(i=s.length-1;0<=i;i--)(n=s[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(s){s._recursivelyAnimateChildrenIn(t,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),i),s._isSingleParent()&&i-1===n?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(t,e,i)):s.clusterHide(),s._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var s=n._markers.length-1;0<=s;s--){var o=n._markers[s];i.contains(o._latlng)&&(t&&(o._backupLatlng=o.getLatLng(),o.setLatLng(t),o.clusterHide&&o.clusterHide()),n._group._featureGroup.addLayer(o))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;0<=s;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var s,o;this._recursively(t,e-1,i-1,(function(t){for(o=t._markers.length-1;0<=o;o--)s=t._markers[o],n&&n.contains(s._latlng)||(t._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())}),(function(t){for(o=t._childClusters.length-1;0<=o;o--)s=t._childClusters[o],n&&n.contains(s._latlng)||(t._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())}))},_recursively:function(t,e,i,n,s){var o,a,r=this._childClusters,c=this._zoom;if(e<=c&&(n&&n(this),s&&c===i&&s(this)),c<e||c<i)for(o=r.length-1;0<=o;o--)(a=r[o])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,s)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,o=s[n]=s[n]||{},a=o[i]=o[i]||[],r=L.Util.stamp(t);this._objectPoint[r]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),o=this._getCoord(e.y),a=this._grid,r=a[o]=a[o]||{},c=r[s]=r[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=c.length;i<n;i++)if(c[i]===t)return c.splice(i,1),1===n&&delete r[s],!0},eachObject:function(t,e){var i,n,s,o,a,r,c=this._grid;for(i in c)for(n in a=c[i])for(s=0,o=(r=a[n]).length;s<o;s++)t.call(e,r[s])&&(s--,o--)},getNearObject:function(t){var e,i,n,s,o,a,r,c,l=this._getCoord(t.x),u=this._getCoord(t.y),d=this._objectPoint,h=this._sqCellSize,p=null;for(e=u-1;e<=u+1;e++)if(s=this._grid[e])for(i=l-1;i<=l+1;i++)if(o=s[i])for(n=0,a=o.length;n<a;n++)r=o[n],((c=this._sqDist(d[L.Util.stamp(r)],t))<h||c<=h&&null===p)&&(h=c,p=r);return p},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,o=0,a=null,r=[];for(i=e.length-1;0<=i;i--)n=e[i],0<(s=this.getDistant(n,t))&&(r.push(n),o<s&&(o=s,a=n));return{maxPoint:a,newPoints:r}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i,n=!1,s=!1,o=!1,a=!1,r=null,c=null,l=null,u=null,d=null;for(e=t.length-1;0<=e;e--){var h=t[e];(!1===n||h.lat>n)&&(n=(r=h).lat),(!1===s||h.lat<s)&&(s=(c=h).lat),(!1===o||h.lng>o)&&(o=(l=h).lng),(!1===a||h.lng<a)&&(a=(u=h).lng)}
vendor: 4,524 bytes, line 5
5return i=s!==n?(d=c,r):(d=u,l),[].concat(this.buildConvexHull([d,i],t),this.buildConvexHull([i,d],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;0<=e;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),t=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,i):(i.y+=10,this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,o=this._2PI/t,a=[];for(s=Math.max(s,35),a.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+s*Math.cos(n),e.y+s*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,s=n*this._spiralLengthStart,o=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,r=0,c=[];for(i=c.length=t;0<=i;i--)i<t&&(c[i]=new L.Point(e.x+s*Math.cos(r),e.y+s*Math.sin(r))._round()),s+=a/(r+=o/s+5e-4*i);return c},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,o=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=o.length-1;0<=e;e--)t=o[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,s,o,a=this._group,r=a._map,c=a._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)o=r.layerPointToLatLng(e[i]),n=t[i],s=new L.Polyline([this._latlng,o],l),r.addLayer(s),n._spiderLeg=s,n._preSpiderfyLatlng=n._latlng,n.setLatLng(o),n.setZIndexOffset&&n.setZIndexOffset(1e6),c.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,s,o,a,r,c=this,l=this._group,u=l._map,d=l._featureGroup,h=this._latlng,p=u.latLngToLayerPoint(h),m=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),f=_.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=f,l._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],r=u.layerPointToLatLng(e[i]),s=new L.Polyline([h,r],_),u.addLayer(s),n._spiderLeg=s,m&&(a=(o=s._path).getTotalLength()+.1,o.style.strokeDasharray=a,o.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),d.addLayer(n),n._setPos&&n._setPos(p);for(l._forceLayout(),l._animationStart(),i=t.length-1;0<=i;i--)r=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.clusterShow&&n.clusterShow(),m&&((o=(s=n._spiderLeg)._path).style.strokeDashoffset=0,s.setStyle({opacity:f}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout((function(){l._animationEnd(),l.fire("spiderfied",{cluster:c,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,s,o,a,r=this,c=this._group,l=c._map,u=c._featureGroup,d=t?l._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):l.latLngToLayerPoint(this._latlng),h=this.getAllChildMarkers(null,!0),p=L.Path.SVG;for(c._ignoreMove=!0,c._animationStart(),this.setOpacity(1),i=h.length-1;0<=i;i--)(e=h[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(d),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),p&&(o=(s=(n=e._spiderLeg)._path).getTotalLength()+.1,s.style.strokeDashoffset=o,n.setStyle({opacity:0}
5)));c._ignoreMove=!1,setTimeout((function(){var t=0;for(i=h.length-1;0<=i;i--)(e=h[i])._spiderLeg&&t++;for(i=h.length-1;0<=i;i--)(e=h[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&u.removeLayer(e),l.removeLayer(e._spiderLeg),delete e._spiderLeg);c._animationEnd(),c.fire("unspiderfied",{cluster:r,markers:h})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}));const appModules={_debug:(t,e)=>{},list:new Map,types:["module","script"],positions:["head","body_top","body_bottom","before_shop_js","after_shop_js"],loadTimeout:5e3,shopJsName:"shop.js",validators:{moduleValid:(t,e)=>!t&&!e||(appModules._debug("load",`link wybranego modułu nie jest poprawny: ${t}`),!1),moduleInstalled:t=>!!appModules.list.has(t)||(appModules._debug("moduleInstalled","wskazany moduł nie został zainstalowany."),!1),allowedType:t=>{const{types:e}=appModules;return!!e.includes(t)||(appModules._debug("allowedType",`type skryptu musi być jedną z opcji: ${e.join(", ")}`),!1)},scriptPosition:t=>{const{positions:e}=appModules;return!!e.includes(t)||(appModules._debug("scriptPosition",`pozycja osadzenia skryptu musi być jedną z opcji: ${e.join(", ")}`),!1)},scriptNotLoaded:t=>!(document.querySelectorAll(`script[src*="${t}"]`).length>0)||(appModules._debug("scriptNotLoaded",`skrypt z linkiem ${t} został już załadowany`),!1),validateLink:t=>!!t||(appModules._debug("scriptNotLoaded",`skrypt z linkiem ${t} został już załadowany`),!1)},getModule:t=>appModules.list.has(t)?appModules.list.get(t):{link:"",content:null},installModule:(t,e)=>"string"!=typeof t||"string"!=typeof e?(appModules._debug("installModule","link/name musi być stringiem."),!1):appModules.list.has(t)?(appModules._debug("installModule",`wskazany moduł został już zainstalowany: ${t}`),!1):(appModules.list.set(t,{link:e,content:null}),!0),load:async(t,{type:e="module",position:i="head",scriptAttrs:n={}}={})=>{const{link:s,content:o}
5=appModules.getModule(t),{moduleInstalled:a,allowedType:r,scriptPosition:c}=appModules.validators;return!!a(t)&&(!!r(e)&&(o||("module"===e?appModules._loadModule({name:t,link:s}):"script"===e?!!c(i)&&appModules._loadScript({link:s,position:i,scriptAttrs:n}):void 0)))},_updateModule:(t,e)=>{if(appModules.list.has(t)){const i=appModules.getModule(t);return appModules.list.set(t,{...i,content:e}),!0}return!1},_loadModule:async({name:t,link:e})=>{try{const i=await import(e);return appModules._updateModule(t,i),i}catch(t){return appModules._debug("load",`Wystąpił błąd pobierania modułu: ${t}`),!1}},_loadScript:async({link:t="",position:e="head",scriptAttrs:i={}}={})=>new Promise(((n,s)=>{try{if(!appModules.validators.validateLink(t))return s(!1);if(!appModules.validators.scriptNotLoaded(t))return s(!1);const o=document.createElement("script");o.src=t,((t,e)=>{if(Object.getPrototypeOf(e)!==Object.prototype)return!1;Object.entries(e).forEach((([e,i])=>{t.setAttribute(e,i)}))})(o,i),o.addEventListener("load",(()=>{n(!0)})),o.addEventListener("error",((t,e,i,n,o)=>{appModules._debug("load",`błąd ładowania skryptu: ${t}, ${e}, ${i}, ${n}, ${o}`),s(!1)})),appModules._appendScript(o,e)}catch(t){appModules._debug("load",`błąd osadzania skryptu: ${t}`),s(!1)}})),_appendScript(t,e){const{shopJsName:i}=appModules;switch(e){case"body_top":document.body.insertAdjacentElement("afterbegin",t);break;case"body_bottom":document.body.insertAdjacentElement("beforeend",t);break;case"before_shop_js":{const e=document.querySelector(`script[src*="${i}"]`);if(!e){appModules._debug("_loadScript","before_shop_js - nie znaleziono tagu script z shop.js");break}e.insertAdjacentElement("beforeend",t);break}case"after_shop_js":{const e=document.querySelector(`script[src*="${i}"]`);if(!e){appModules._debug("_loadScript","after_shop_js - nie znaleziono tagu script z shop.js");break}e.insertAdjacentElement("afterend",t);break}default:document.head.appendChild(t)}}},serializeError=t=>{if(t instanceof Error)return t.stack||`${t.name}: ${t.message}`;if("string"==typeof t)return t;try{return JSON.stringify(t)}catch{return String(t)}};function customizeAllExpressButtons(){document.querySelectorAll('express-checkout, [id*="express"], [class*="express"]').forEach((t=>{customizeSingleExpressButton(t)}));["#express_button",".express-checkout",'[id$="_express_button"]',"express-checkout"].forEach((t=>{document.querySelectorAll(t).forEach((t=>{customizeSingleExpressButton(t)}))}))}function customizeSingleExpressButton(t){if(!t||!t.shadowRoot)return;const e=t.shadowRoot,i=e.querySelector('#checkout_button, button, [type="button"]');if(e.querySelectorAll(".checkout_button_smile_logo").forEach((t=>{t.style.setProperty("display","none","important")})),!i)return;if(i.dataset.customized)return;i.style.cssText="\n        background: transparent !important;\n        border: 1px solid #000000 !important;\n        border-radius: 8px !important;\n        padding: 15px 30px !important;\n        color: #000000 !important;\n        font-weight: bold !important;\n        font-size: 16px !important;\n        cursor: pointer !important;\n        min-width: 300px !important;\n        transition: all 0.2s ease !important;\n        width: 100% !important;\n        height: 55px !important;\n        text-transform: none !important;\n        letter-spacing: normal !important;\n    ",i.dataset.eventsAdded||(i.addEventListener("mouseenter",(()=>{i.style.background="#1a1a1a !important",i.style.transform="scale(1.01) !important"})),i.addEventListener("mouseleave",(()=>{i.style.background="#000000 !important",i.style.transform="scale(1) !important"})),i.addEventListener("mousedown",(()=>{i.style.transform="scale(0.99) !important",i.style.background="#0d0d0d !important"})),i.addEventListener("mouseup",(()=>{i.style.transform="scale(1.01) !important",i.style.background="#1a1a1a !important"})),i.addEventListener("mouseenter",(()=>{i.style.setProperty("background","#ffffff","important"),i.style.setProperty("color","#000000","important"),i.style.setProperty("border","1px solid #000000","important")})),i.addEventListener("mouseleave",(()=>{i.style.setProperty("background","#000000","important"),i.style.setProperty("color","#ffffff","important"),i.style.setProperty("border","none","important")})),i.dataset.eventsAdded="true"),i.dataset.customized="true"}function initGlobalExpressButtonCustomizer(){customizeAllExpressButtons();new MutationObserver((t=>{let e=!1;t.forEach((t=>
5{"childList"===t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&t.matches&&(t.matches("express-checkout")||t.matches('[id*="express"]')||t.matches('[class*="express"]')||t.querySelector('express-checkout, [id*="express"], [class*="express"]'))&&(e=!0)}))})),e&&setTimeout(customizeAllExpressButtons,100)})).observe(document.body,{childList:!0,subtree:!0,attributes:!1});let t=0;const e=setInterval((()=>{customizeAllExpressButtons(),t++,t>=5&&clearInterval(e)}),2e3)}window.errorLog=async t=>{const e=new URLSearchParams({JSerror:serializeError(t)});try{await fetch(`/graphql/v1/?${e}`,{method:"POST",body:"query { hello }"})}catch(t){return!1}},function(t){"use strict";function e(t,e){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}function i(t,i,n,s,o,a){return e(function(t,e){return t<<e|t>>>32-e}(e(e(i,t),e(s,a)),o),n)}function n(t,e,n,s,o,a,r){return i(e&n|~e&s,t,e,o,a,r)}function s(t,e,n,s,o,a,r){return i(e&s|n&~s,t,e,o,a,r)}function o(t,e,n,s,o,a,r){return i(e^n^s,t,e,o,a,r)}function a(t,e,n,s,o,a,r){return i(n^(e|~s),t,e,o,a,r)}function r(t,i){t[i>>5]|=128<<i%32,t[14+(i+64>>>9<<4)]=i;var r,c,l,u,d,h=1732584193,p=-271733879,m=-1732584194,_=271733878;for(r=0;r<t.length;r+=16)c=h,l=p,u=m,d=_,p=a(p=a(p=a(p=a(p=o(p=o(p=o(p=o(p=s(p=s(p=s(p=s(p=n(p=n(p=n(p=n(p,m=n(m,_=n(_,h=n(h,p,m,_,t[r],7,-680876936),p,m,t[r+1],12,-389564586),h,p,t[r+2],17,606105819),_,h,t[r+3],22,-1044525330),m=n(m,_=n(_,h=n(h,p,m,_,t[r+4],7,-176418897),p,m,t[r+5],12,1200080426),h,p,t[r+6],17,-1473231341),_,h,t[r+7],22,-45705983),m=n(m,_=n(_,h=n(h,p,m,_,t[r+8],7,1770035416),p,m,t[r+9],12,-1958414417),h,p,t[r+10],17,-42063),_,h,t[r+11],22,-1990404162),m=n(m,_=n(_,h=n(h,p,m,_,t[r+12],7,1804603682),p,m,t[r+13],12,-40341101),h,p,t[r+14],17,-1502002290),_,h,t[r+15],22,1236535329),m=s(m,_=s(_,h=s(h,p,m,_,t[r+1],5,-165796510),p,m,t[r+6],9,-1069501632),h,p,t[r+11],14,643717713),_,h,t[r],20,-373897302),m=s(m,_=s(_,h=s(h,p,m,_,t[r+5],5,-701558691),p,m,t[r+10],9,38016083),h,p,t[r+15],14,-660478335),_,h,t[r+4],20,-405537848),m=s(m,_=s(_,h=s(h,p,m,_,t[r+9],5,568446438),p,m,t[r+14],9,-1019803690),h,p,t[r+3],14,-187363961),_,h,t[r+8],20,1163531501),m=s(m,_=s(_,h=s(h,p,m,_,t[r+13],5,-1444681467),p,m,t[r+2],9,-51403784),h,p,t[r+7],14,1735328473),_,h,t[r+12],20,-1926607734),m=o(m,_=o(_,h=o(h,p,m,_,t[r+5],4,-378558),p,m,t[r+8],11,-2022574463),h,p,t[r+11],16,1839030562),_,h,t[r+14],23,-35309556),m=o(m,_=o(_,h=o(h,p,m,_,t[r+1],4,-1530992060),p,m,t[r+4],11,1272893353),h,p,t[r+7],16,-155497632),_,h,t[r+10],23,-1094730640),m=o(m,_=o(_,h=o(h,p,m,_,t[r+13],4,681279174),p,m,t[r],11,-358537222),h,p,t[r+3],16,-722521979),_,h,t[r+6],23,76029189),m=o(m,_=o(_,h=o(h,p,m,_,t[r+9],4,-640364487),p,m,t[r+12],11,-421815835),h,p,t[r+15],16,530742520),_,h,t[r+2],23,-995338651),m=a(m,_=a(_,h=a(h,p,m,_,t[r],6,-198630844),p,m,t[r+7],10,1126891415),h,p,t[r+14],15,-1416354905),_,h,t[r+5],21,-57434055),m=a(m,_=a(_,h=a(h,p,m,_,t[r+12],6,1700485571),p,m,t[r+3],10,-1894986606),h,p,t[r+10],15,-1051523),_,h,t[r+1],21,-2054922799),m=a(m,_=a(_,h=a(h,p,m,_,t[r+8],6,1873313359),p,m,t[r+15],10,-30611744),h,p,t[r+6],15,-1560198380),_,h,t[r+13],21,1309151649),m=a(m,_=a(_,h=a(h,p,m,_,t[r+4],6,-145523070),p,m,t[r+11],10,-1120210379),h,p,t[r+2],15,718787259),_,h,t[r+9],21,-343485551),h=e(h,c),p=e(p,l),m=e(m,u),_=e(_,d);return[h,p,m,_]}function c(t){var e,i="",n=32*t.length;for(e=0;e<n;e+=8)i+=String.fromCharCode(t[e>>5]>>>e%32&255);return i}function l(t){var e,i=[];for(i[(t.length>>2)-1]=void 0,e=0;e<i.length;e+=1)i[e]=0;var n=8*t.length;for(e=0;e<n;e+=8)i[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return i}function u(t){var e,i,n="";for(i=0;i<t.length;i+=1)e=t.charCodeAt(i),n+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return n}function d(t){return unescape(encodeURIComponent(t))}function h(t){return function(t){return c(r(l(t),8*t.length))}(d(t))}function p(t,e){return function(t,e){var i,n,s=l(t),o=[],a=[];for(o[15]=a[15]=void 0,s.length>16&&(s=r(s,8*t.length)),i=0;i<16;i+=1)o[i]=909522486^s[i],a[i]=1549556828^s[i];return n=r(o.concat(l(e)),512+8*e.length),c(r(a.concat(n),640))}(d(t),d(e))}function m(t,e,i){return e?i?p(e,t):function(t,e){return u(p(t,e))}(e,t):i?h(t):function(t){return u(h(t))}(t)}"function"==typeof define&&define.amd?define((function(){return m}
5)):"object"==typeof module&&module.exports?module.exports=m:t.md5=m}(window),window.format_price=function(t,e){var i=t,n=(e=e||{}).mask||"###&nbsp;##0,00";currency_grouping_separator&&(n=n.replace(",",currency_grouping_separator)),currency_decimal_separator&&(n=n.replace(".",currency_decimal_separator));var s=e.currency||"",o=e.currency_space?" ":"",a=!!e.currency_before_price;if(!n||isNaN(+i))return i;var r=(i="-"==n.charAt(0)?-i:+i)<0?i=-i:0,c=n.match(/[^\d\-\+#]/g),l=c&&c[c.length-1]||".",u=c&&c[1]&&c[0]||",";n=n.split(l);i=+(i=i.toFixed(n[1]&&n[1].length))+"";var d=n[1]&&n[1].lastIndexOf("0"),h=i.split(".");(!h[1]||h[1]&&h[1].length<=d)&&(i=(+i).toFixed(d+1));var p=n[0].split(u);n[0]=p.join("");var m=n[0]&&n[0].indexOf("0");if(m>-1)for(;h[0].length<n[0].length-m;)h[0]="0"+h[0];else 0==+h[0]&&(h[0]="");(i=i.split("."))[0]=h[0];var _=p[1]&&p[p.length-1].length;if(_){for(var f=i[0],g="",y=f.length%_,v=0,b=f.length;v<b;v++)g+=f.charAt(v),!((v-y+1)%_)&&v<b-_&&(g+=u);i[0]=g}i[1]=n[1]&&i[1]?l+i[1]:"";t=(r?"-":"")+i[0]+i[1];return t=a?s+o+t:t+o+s},app_shop.fn.fontCallback=()=>{void 0!==app_shop.fn.fontCallbackMenu&&app_shop.fn.fontCallbackMenu()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",initGlobalExpressButtonCustomizer):initGlobalExpressButtonCustomizer(),window.addEventListener("load",customizeAllExpressButtons);var google_map_style_array=[{featureType:"landscape",stylers:[{saturation:-100},{lightness:65},{visibility:"on"}]},{featureType:"poi",stylers:[{saturation:-100},{lightness:51},{visibility:"simplified"}]},{featureType:"road.highway",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"road.arterial",stylers:[{saturation:-100},{lightness:30},{visibility:"on"}]},{featureType:"road.local",stylers:[{saturation:-100},{lightness:40},{visibility:"on"}]},{featureType:"transit",stylers:[{saturation:-100},{visibility:"simplified"}]},{featureType:"administrative.province",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels",stylers:[{visibility:"on"},{lightness:-25},{saturation:-100}]},{featureType:"water",elementType:"geometry",stylers:[{hue:"#ffff00"},{lightness:-25},{saturation:-97}]}];app_shop.run((function(){document.documentElement.classList.remove("_mobile")}),[2,3,4],"body",!0),app_shop.run((function(){document.documentElement.classList.add("_mobile")}),1,"body",!0),app_shop.run((()=>{document.querySelectorAll(".cm img.rwd-src").forEach((t=>{t.setAttribute("src",app_shop.fn.getRwdSrc(t))}))}),[1,2,3,4],".cm img.rwd-src"),app_shop.run((function(){document.querySelectorAll("img.b-lazy").forEach((t=>{t.closest("a")?.classList.add("loading")})),app_shop.vars.bLazy=new Blazy({breakpoints:[{width:420,src:"data-src-small"}],success:function(t){t.closest(".loading")?.classList.remove("loading")}}),app_shop.fn.addFocusEventListeners();const t=document.querySelectorAll(".form-group .form-control, .f-group .f-control");setTimeout((()=>{t.forEach((t=>app_shop.fn.addFocused.call(t)))}),500),app_shop.fn.setupFileInputListeners(),app_shop.fn.backTop({txt:'<i class="icon-angle-up"></i>'});let e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",`${e}px`),window.addEventListener("resize",(()=>{e=.01*window.innerHeight,document.documentElement.style.setProperty("--vh",`${e}px`)}))}),"all"),app_shop.fn.fixed_scroll=(t,e)=>{let i=window.scrollY;const n=window;window.addEventListener("scroll",(function(s){n.scrollY>i&&n.scrollY>0?!t.classList.contains(e)&&t.classList.add(e):t.classList.contains(e)&&t.classList.remove(e),i=n.scrollY}))},app_shop.fn.isIos=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,app_shop.vars.isIos=app_shop.fn.isIos(),app_shop.fn.isSafari=()=>isSafari=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"),app_shop.vars.isSafari=app_shop.fn.isSafari(),app_shop.run((function(){app_shop.fn.fixed_scroll(document.documentElement,"scroll"),app_shop.vars.isIos&&document.documentElement.classList.add("--ios"),app_shop.vars.isSafari&&document.documentElement.classList.add("--safari")}),[1,2],"#container"),app_shop.run((function(){document.querySelectorAll(".moreInfo__show").forEach((t=>{t.addEventListener("click",(function(){this.parentElement.classList.toggle("--hover"),this.parentElement.querySelector(".moreInfo")?.classList.toggle("--hover")}))}))}),"all",".moreInfo__show"),app_shop.txt.txt_77752_1="File cannot be uploaded %s because it is larger than the allowed size of %dMB.",app_shop.txt.txt_77752_2="File cannot be uploaded %s, because its type of files is invali
5d.",app_shop.txt.txt_77752_3="Possible picture formats: .jpg.",app_shop.txt.txt_77752_4="Max. picture size is: %spx.";var hotspotAjaxWrapType="";app_shop.txt.txt_validation1="The minimum number of characters for this field is ",app_shop.txt.txt_validation2="The maximum number of characters for this field is ",app_shop.txt.txt_validation3="Incorrectly typed e-mail address. Enter the full e-mail address, e.g. [email protected].",app_shop.txt.txt_validation4="This field is required.",app_shop.txt.txt_validation5="Bank account number format is invalid ",app_shop.txt.txt_validation6="Phone number should contain a minimum of 9 characters ",app_shop.txt.hotspot_prev="Previous from this category",app_shop.txt.hotspot_next="Next in this category";const Alertek={alert_cover:"",cloudID:"",alert_timer:null,fadeIn:()=>{Alertek.cloudID.style.display="block",Alertek.cloudID.style.transition="opacity 0.5s",Alertek.cloudID.style.opacity=0,setTimeout((()=>{Alertek.cloudID.style.opacity=1}),0)},fadeOut:()=>{Alertek.cloudID.style.opacity=0,setTimeout((()=>{Alertek.cloudID.style.display="none"}),500)},Start:(t,e,i=4e3)=>{clearTimeout(Alertek.alert_timer),document.querySelector("#alert_cover")?.remove();const n=document.createElement("div");n.className="alertek"+(e?` ${e}`:""),n.id="alert_cover",n.style.display="none",n.onclick=Alertek.hide_alert,n.setAttribute("role","alert"),document.body.appendChild(n),e||n.classList.add("menu_messages_message"),Alertek.cloudID=n,t&&(Alertek.cloudID.innerHTML=t,Alertek.fadeIn(),Alertek.alert_timer=setTimeout(Alertek.End,i))},End:()=>{Alertek.fadeOut()},Info:(t,e)=>{Alertek.Start(t,"--info",e)},Warning:(t,e)=>{Alertek.Start(t,"--warning",e)},Error:(t,e)=>{Alertek.Start(t,"--error",e)},Success:(t,e)=>{Alertek.Start(t,"--success",e)},show_alert:(t,e)=>{Alertek.Start(t,!1,e)},hide_alert:()=>{Alertek.End()}};document.documentElement.classList.remove("_mobile"),app_shop.fn.addFocused=function(t,e){if("number"==typeof e)return;const{target:i}=t||{};let n=i?[i]:[this];e instanceof HTMLElement?n=[e]:e&&(n=document.querySelectorAll(e)),n.forEac
5h((t=>{const e=t.nextElementSibling;e&&["control-label","f-label"].some((t=>e.classList.contains(t)))&&t.classList.toggle("focused",""!==t.value)}))},app_shop.fn.addFocusEventListeners=function(t=".form-group .form-control, .f-group .f-control"){["change","input","focus","blur"].forEach((e=>{document.addEventListener(e,(e=>{const{target:i}=e;i.closest&&i?.closest(t)&&app_shop.fn.addFocused(e)}),!0)}))},app_shop.fn.setupFileInputListeners=()=>{document.addEventListener("change",(t=>{const{target:e}=t;e?.closest('input[type="file"]')&&(t=>{if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;(t=>{const{target:e}=t,i=e.nextElementSibling;if(i?.classList.contains("f-label")){if(e.value.length)return i.classList.add("--file"),i.getAttribute("data-label")||i.setAttribute("data-label",i.textContent),void(i.textContent=e.value.split("\\").pop());i.classList.remove("--file"),i.textContent=i.getAttribute("data-label")||""}})(t);const{files:e}=t.target;if(0===e.length)return;const{name:i="",size:n,type:s}=e[0],[o]=i.split(".").reverse();if(app_shop.vars.blacklist_mime?.includes(s)&&app_shop.txt.txt_77752_2)return t.target.value="",void Alertek.Start(app_shop.txt.txt_77752_2.replace("%s",i));if(app_shop.vars.blacklist_extension?.includes(o)&&app_shop.txt.txt_77752_2)return t.target.value="",void Alertek.Start(app_shop.txt.txt_77752_2.replace("%s",i));const{max_filesize:a}=t.target.dataset;a&&n>+a&&app_shop.txt.txt_77752_1&&(t.target.value="",Alertek.Start(app_shop.txt.txt_77752_1.replace("%s",i).replace("%d",(+a/1048576).toFixed(2))))})(t)}),!0)},app_shop.fn.backTop=({txt:t='<i class="icon-chevron-up"></i>'})=>{const e=()=>{const t=window.innerWidth,e=document.getElementById("container")?.offsetWidth,n=.5*(t-e)-20;return n>=(i.offsetWidth||50)?n-(i.offsetWidth||50)+"px":"10px"},i=document.createElement("a");i.id="backTop",i.innerHTML=t,i.style.right=e(),document.body.appendChild(i),i.addEventListener("click",(()=>{window.scrollTo({top:0,behavior:"smooth"})})),window.addEventListener("scroll",(()=>{window.scrollY>2*window.innerHeight?i.style.display="block":i.style.display="none"})),window.addEventListener("resize",(()=>{i.style.right=e()}))},function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.Blazy=e()}(this,(function(){function t(t){var i=t._util;i.elements=function(t){for(var e=[],i=(t=t.root.querySelectorAll(t.selector)).length;i--;e.unshift(t[i]));return e}(t.options),i.count=i.elements.length,i.destroyed&&(i.destroyed=!1,t.options.container&&d(t.options.container,(function(t){l(t,"scroll",i.validateT)})),l(window,"resize",i.saveViewportOffsetT),l(window,"resize",i.validateT),l(window,"scroll",i.validateT)),e(t)}function e(t){for(var e=t._util,n=0;n<e.count;n++){var s,o=e.elements[n],r=o;s=t.options;var c=r.getBoundingClientRect();s.container&&f&&(r=r.closest(s.containerClass))?s=!!i(r=r.getBoundingClientRect(),m)&&i(c,{top:r.top-s.offset,right:r.right+s.offset,bottom:r.bottom+s.offset,left:r.left-s.offset}):s=i(c,m),(s||a(o,t.options.successClass))&&(t.load(o),e.elements.splice(n,1),e.count--,n--)}0===e.count&&t.destroy()}function i(t,e){return t.right>=e.left&&t.bottom>=e.top&&t.left<=e.right&&t.top<=e.bottom}function n(t,e,i){if(!a(t,i.successClass)&&(e||i.loadInvisible||0<t.offsetWidth&&0<t.offsetHeight))if(e=t.getAttribute(p)||t.getAttribute(i.src)){var n=(e=e.split(i.separator))[_&&1<e.length?1:0],c=t.getAttribute(i.srcset),h="img"===t.nodeName.toLowerCase(),m=(e=t.parentNode)&&"picture"===e.nodeName.toLowerCase();if(h||void 0===t.src){var f=new Image,g=function(){i.error&&i.error(t,"invalid"),r(t,i.errorClass),u(f,"error",g),u(f,"load",y)},y=function(){h?m||o(t,n,c):t.style.backgroundImage='url("'+n+'")',s(t,i),u(f,"load",y),u(f,"error",g)};m&&(f=t,d(e.getElementsByTagName("source"),(function(t){var e=i.srcset,n=t.getAttribute(e);n&&(t.setAttribute("srcset",n),t.removeAttribute(e))}))),l(f,"error",g),l(f,"load",y),o(f,n,c)}else t.src=n,s(t,i)}else"video"===t.nodeName.toLowerCase()?(d(t.getElementsByTagName("source"),(function(t){var e=i.src,n=t.getAttribute(e);n&&(t.setAttribute("src",n),t.removeAttribute(e))})),t.load(),s(t,i)):(i.error&&i.error(t,"missing"),r(t,i.errorClass))}
5function s(t,e){r(t,e.successClass),e.success&&e.success(t),t.removeAttribute(e.src),t.removeAttribute(e.srcset),d(e.breakpoints,(function(e){t.removeAttribute(e.src)}))}function o(t,e,i){i&&t.setAttribute("srcset",i),t.src=e}function a(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function r(t,e){a(t,e)||(t.className+=" "+e)}function c(t){m.bottom=(window.innerHeight||document.documentElement.clientHeight)+t,m.right=(window.innerWidth||document.documentElement.clientWidth)+t}function l(t,e,i){t.attachEvent?t.attachEvent&&t.attachEvent("on"+e,i):t.addEventListener(e,i,{capture:!1,passive:!0})}function u(t,e,i){t.detachEvent?t.detachEvent&&t.detachEvent("on"+e,i):t.removeEventListener(e,i,{capture:!1,passive:!0})}function d(t,e){if(t&&e)for(var i=t.length,n=0;n<i&&!1!==e(t[n],n);n++);}function h(t,e,i){var n=0;return function(){var s=+new Date;s-n<e||(n=s,t.apply(i,arguments))}}var p,m,_,f;return function(i){if(!document.querySelectorAll){var s=document.createStyleSheet();document.querySelectorAll=function(t,e,i,n,o){for(o=document.all,e=[],i=(t=t.replace(/\[for\b/gi,"[htmlFor").split(",")).length;i--;){for(s.addRule(t[i],"k:v"),n=o.length;n--;)o[n].currentStyle.k&&e.push(o[n]);s.removeRule(0)}return e}}var o=this,a=o._util={};a.elements=[],a.destroyed=!0,o.options=i||{},o.options.error=o.options.error||!1,o.options.offset=o.options.offset||100,o.options.root=o.options.root||document,o.options.success=o.options.success||!1,o.options.selector=o.options.selector||".b-lazy",o.options.separator=o.options.separator||"|",o.options.containerClass=o.options.container,o.options.container=!!o.options.containerClass&&document.querySelectorAll(o.options.containerClass),o.options.errorClass=o.options.errorClass||"b-error",o.options.breakpoints=o.options.breakpoints||!1,o.options.loadInvisible=o.options.loadInvisible||!1,o.options.successClass=o.options.successClass||"b-loaded",o.options.validateDelay=o.options.validateDelay||25,o.options.saveViewportOffsetDelay=o.options.saveViewportOffsetDelay||50,o.options.srcset=o.options.srcset||"data-srcset",o.options.src=p=o.options.src||"data-src",f=Element.prototype.closest,_=1<window.devicePixelRatio,(m={}).top=0-o.options.offset,m.left=0-o.options.offset,o.revalidate=function(){t(this)},o.load=function(t,e){var i=this.options;void 0===t.length?n(t,e,i):d(t,(function(t){n(t,e,i)}))},o.destroy=function(){var t=this._util;this.options.container&&d(this.options.container,(function(e){u(e,"scroll",t.validateT)})),u(window,"scroll",t.validateT),u(window,"resize",t.validateT),u(window,"resize",t.saveViewportOffsetT),t.count=0,t.elements.length=0,t.destroyed=!0},a.validateT=h((function(){e(o)}),o.options.validateDelay,o),a.saveViewportOffsetT=h((function(){c(o.options.offset)}),o.options.saveViewportOffsetDelay,o),c(o.options.offset),d(o.options.breakpoints,(function(t){if(t.width>=window.screen.width)return p=t.src,!1})),setTimeout((function(){t(o)}))}}));const SelectToDropdown=function(t){return this.params=t,this.init=()=>{const{direction:t="down",selector:e,generateDropdownCallback:i,clickDropdownCallback:n,afterClickDropdownCallback:s,disableMobileView:o}=this.params;this.selects=document.querySelectorAll(e),this.direction=t,this.generateDropdownCallback=i,this.clickDropdownCallback=n,this.afterClickDropdownCallback=s,this.disableMobileView=o,this.selects.length&&(this.generateDropdown(),document.addEventListener("click",this.closeDropdown))},this.transformOptionListByDirection=t=>"top"===this.direction?t.reverse().join(""):t.join(""),this.generateDropdown=()=>{this.selects.forEach((t=>{t.selectedIndex<0&&(t.selectedIndex=0);const e=[...t.querySelectorAll("option")].map(((t,e)=>`\n        <li class="f-dropdown-li${t.hasAttribute("class")?` ${t.getAttribute("class")}`:""}${t.disabled?" --disabled":""}">\n          <a class="f-dropdown-item${t.selected?" --selected":""}" href="#${t.getAttribute("value")}" data-index="${e}" data-value="${t.getAttribute("value")}" ${[...t.attributes].filter((t=>t.name.startsWith("data-"))).map((t=>`${t.name}="${t.value}"`)).join(" ")}>${t.innerHTML}</a>\n        </li>\n      `)),i=`<div class="f-dropdown f-group ${t.getAttribute("class")} ${this.disableMobileView?"--disable-mobile-view":""}" data-direction="${this.direction}">\n        <button type="button" class="f-control f-dropdown-toggle${t.disabled?" --disabled":""}${t.hasAttribute("readonly")?" --readonly":""}" data-indexcurrent="${t.options[t.selectedIndex].index}" aria-expanded="false">\n          ${!t.hasAttribute("data-label")&&t.hasAttribute("aria-label")?`<span class="sr-only">${t.getAttribute("aria-label")}</span>`:""}\n          ${t.hasAttribute("data-label")?`<strong class="f-dropdown-label">${t.getAttribute("data-label")}</strong>`:""}
5\n          <span class="f-dropdown-button">${t.options[t.selectedIndex].text}</span>\n        </button>\n        <ul class="f-dropdown-menu">\n          ${this.transformOptionListByDirection(e)}\n        </ul>\n      </div>`,n=document.createElement("div");n.innerHTML=i;const s=n.firstChild;t.insertAdjacentElement("afterend",s),s.insertBefore(t,s.firstChild),Object.values(t.classList).forEach((e=>t.classList.replace(e,`${e}-select`))),this.openDropdown(s),this.clickDropdown(s),this.disableMobileView||this.mobileView(s),this.generateDropdownCallback&&this.generateDropdownCallback(s)}))},this.mobileView=t=>{t.querySelector("select").addEventListener("change",(function(){const e=this.selectedIndex;t.querySelectorAll(".f-dropdown-li").forEach((t=>{parseInt(t.querySelector(".f-dropdown-item").getAttribute("data-index"),10)===e&&t.click()}))}))},this.openDropdown=t=>{t.querySelector("button.f-dropdown-toggle").addEventListener("click",(function(t){if(t.preventDefault(),this.classList.contains("--disabled"))return!1;this.parentNode.classList.toggle("--open"),this.setAttribute("aria-expanded",this.parentNode.classList.contains("--open")?"true":"false"),document.documentElement.classList.toggle("--dropdown-open",this.parentNode.classList.contains("--open"))}))},this.closeDropdown=t=>{document.querySelectorAll(".f-dropdown").forEach((e=>!!e.classList.contains("--open")&&((!t||"click"!==t.type||e===t||!e.contains(t.target))&&(e.classList.remove("--open"),e.querySelector("button.f-dropdown-toggle")?.setAttribute("aria-expanded","false"),void document.documentElement.classList.remove("--dropdown-open")))))},this.clickDropdown=t=>{if(this.clickDropdownCallback)this.clickDropdownCallback(t);else{const e=this.afterClickDropdownCallback;t.querySelectorAll(".f-dropdown-li").forEach((i=>{i.addEventListener("click",(function(i){i.preventDefault();const n=this.querySelector(".f-dropdown-item"),s=t.querySelectorAll(".f-dropdown-item"),o=n.getAttribute("data-index"),a=n.innerHTML,r=t.querySelector("select"),c=t.querySelector("button.f-dropdown-toggle"),l=c.querySelector(".f-dropdown-button"),u=t.querySelector(".f-dropdown-item.--selected");s.forEach((t=>t.classList.remove("--selected","--prev"))),u.classList.add("--prev"),n.classList.add("--selected"),r.selectedIndex=o,l.innerHTML=a,c.setAttribute("data-indexcurrent",n.getAttribute("data-index")),t.classList.remove("--open"),c.setAttribute("aria-expanded","false"),document.documentElement.classList.remove("--dropdown-open"),e&&e(this)}))}))}},this.destroy=()=>{this.selects.forEach((t=>{const e=t.closest(".f-dropdown");e&&(e.insertAdjacentElement("afterend",t),e.remove(),t.classList.forEach((e=>t.classList.replace(e,e.slice(0,-7)))))}))},this.reInit=()=>{this.destroy(),this.init()},this.init()};function FixedElement(t="element",e="--fixed",i="spacerClass",n="top",s=()=>{}){const o=this;let a=!1;const r=document.querySelector(t),c={elH:r.getBoundingClientRect().height,elOffset:r.getBoundingClientRect().top+r.ownerDocument.defaultView.pageYOffset};this.revalidate=()=>{c.elH=r.getBoundingClientRect().height;const t=document.querySelector(`.${i}`);c.elOffset=t?t.getBoundingClientRect().top+t.ownerDocument.defaultView.pageYOffset:r.getBoundingClientRect().top+r.ownerDocument.defaultView.pageYOffset,a=!0},this.modifyElement=()=>{("top"===n?window.scrollY>c.elOffset:"bottom"===n?window.scrollY-c.elH+window.screen.height<c.elOffset:void 0)?!r.classList.contains(e)&&(r.classList.add(e),(t=>{let e=document.createElement("div");e.className=i,e.style.paddingTop=`${t}px`,r.after(e)})(c.elH),s(!0)):r.classList.contains(e)&&(r.classList.remove(e),(()=>{const t=document.querySelector(`.${i}`);t&&t.parentNode.removeChild(t)})(),s(!1))},this.init=()=>{if(null===r)return!1;window.addEventListener("scroll",(()=>{a=!0})),scroll=setInterval((function(){a&&(a=!1,o.modifyElement())}),30),o.modifyElement()},this.clear=()=>{clearInterval(scroll)}}app_shop.fn.changeLiteral=(t,e,i)=>{const n=t%10,s=t%100,o=[];return!0!==i&&o.push(t),1===t&&e[1]?o.push(e[1]):(0===t||n>=0&&n<=1||n>=5&&n<=9||s>10&&s<20)&&e[0]?o.push(e[0]):(s<10||s>20)&&n>=2&&n<=4&&e[2]&&o.push(e[2]),o.join(" ")},Modal=function(t){const e=this;if(this.params=t||{},this.viewportElement=document.querySelector('head meta[name="viewport"]'),this.viewportContentCopy=app_shop.vars?.meta?.viewportContent,this.txt={"Zamknij modal":"Close modal"},this.changeViewport=()=>{const{viewportContent:t}=this.params;if(!this.viewportElement&&!this.changeViewportFlag)return;const e="string"==typeof t&&t||"user-scalable=no, initial-scale=1, maximum-scale=1, width=device-width, viewport-fit=cover";this.viewportElement.setAttribute("content",e)},this.restoreViewport=()=>{(this.viewportElement||this.changeViewportFlag)&&this.viewportContentCopy&&this.viewportElement.setAttribute("content",this.viewportContentCopy)},this.closeModal=()=>{const t=document.getElementById("modal");this.beforeClose&&this.beforeClose(t);const e=document.getElementById("modal_placeholder");if(e){const i=t.querySelector(".modal__content > *");e.insertAdjacentElement("afterend",i),e.parentNode.removeChild(e)}t.parentNode.removeChild(t),document.documentElement.classList.remove("--modal"),document.removeEventListener("click",this.events.eventDelegation,!0),document.removeEventListener("keydown",this.events.escClick),this.enableTabIndexes&&document.removeEventListener("keyup",this.events.tabFocusClick),this.afterClose&&this.afterClose(t,this),this.changeViewportFlag&&this.restoreViewport(),this.lastFocusedElement&&this.lastFocusedElement.focus()},this.createElement=t=>{const{element:e,classes:i,id:n,href:s,attributes:o}=t,a=document.createElement(e);return void 0!==i&&(a.className=i),void 0!==n&&(a.id=n),void 0!==s&&(a.href=s),void 0!==o&&Array.isArray(o)&&o.forEach((({name:t,value:e})=>{a.setAttribute(t,e)})),a},this.injectionElement=(t,e)=>{if(this.element||this.html)if(this.html)t.innerHTML=this.html;else if(this.element&&(!("function"==typeof jQuery&&this.element instanceof jQuery)||this.element.length)){if("function"==typeof jQuery&&this.element instanceof jQuery)return document.body.contains(this.element[0])&&this.element[0].insertAdjacentElement("afterend",e),void t.appendChild(this.element[0]);document.body.contains(this.element)&&this.element.insertAdjacentElement("afterend",e),t.appendChild(this.element)}},this.createModal=()=>{document.getElementById("modal")&&this.closeModal();const t=this.createElement({element:"div",classes:this.classList?`modal ${this.classList}`:"modal",id:"modal",attributes:[{name:"role",value:"dialog"}]}),e=this.createElement({element:"div",classes:"modal__wrapper"}),i=this.createElement({element:"div",id:"modal_placeholder"}),n=this.createElement({element:"a",classes:"modal__close",href:"#modalClose",attributes:[{name:"aria-label",value:this.txt["Zamknij modal"]}]}),s=this.createElement({element:"div",classes:"modal__content"});this.injectionElement(s,i),e.appendChild(n),e.appendChild(s),t.appendChild(e),document.documentElement.classList.add("--modal"),this.initEvents(),this.changeViewportFlag&&this.restoreViewport(),this.changeViewportFlag&&this.changeViewport(),this.beforeShow&&this.beforeShow(t,this),document.body.appendChild(t),this.classList&&this.classList.includes("--absolute")&&window.scrollTo(0,0),app_shop?.vars?.bLazy?.revalidate(),this.afterShow&&this.afterShow(t,this),this.enableTabIndexes&&(this.assignTabIndexes(),this.setFocusOnFirstElement&&this.focusFirstElement())},this.assignTabIndexes=()=>{const t=document.querySelector('#modal[role="dialog"]');if(!t)return;let e=1;const i=t=>{t.matches(this.allowedElementsForTabIndex)&&t.setAttribute("tabindex",e++),[...t.children].forEac
5h((t=>{i(t)}))};i(t)},this.focusFirstElement=(t=!1)=>{const e=document.querySelector('#modal[role="dialog"]');e&&(t?e.querySelector("[tabindex]")?.focus?.():e.querySelector("[tabindex]:not(.modal__close)")?.focus?.())},this.getFocusableElements=()=>{const t=document.querySelector('#modal[role="dialog"]');return t?[...t.querySelectorAll("[tabindex]")]:[]},this.restoreModalFocus=(t=()=>{},i=!1)=>{const n=e.getFocusableElements(),s=document.activeElement;n.includes(s)||(t(),e.focusFirstElement(i))},this.events={eventDelegation:t=>{const i=document.getElementById("modal"),n=!(!document.getElementById("topLayerBackDrop")||"none"===document.getElementById("topLayerBackDrop").style.display),s=!(!document.querySelector(".iai_cookie")||document.querySelector(".iai_cookie").classList.contains("d-none"));for(const e of this.notCloseSelectors)if(t.target.closest(e))return!1;const o=document.activeElement.closest(".cop_pickup_map__wrapper"),a=document.activeElement.closest(".pickup_points_oscop__wrapper"),r=document.activeElement.closest(".product_stocks__wrapper");return(!i||i.querySelector(".modal__wrapper").contains(t.target)||n||s||"INPUT"===document.activeElement.tagName||"TEXTAREA"===document.activeElement.tagName||a||r||o)&&!t.target.closest(".modal__close")||(t.preventDefault(),e.closeModal()),!1},escClick:t=>{"Escape"===t.key&&e.closeModal()},onFocus:t=>{e.restoreModalFocus((()=>{t.preventDefault()}))},tabFocusClick:t=>{const{key:i}=t,n="Tab"===i,s="ArrowLeft"===i,o="ArrowRight"===i;if(e.enableTabIndexes&&(n||s||o)){const i=e.getFocusableElements(),n=document.activeElement;e.restoreModalFocus((()=>{t.preventDefault()}),!0),(s||o)&&i.forEach(((t,e,i)=>{if(t===n){if(s){const t=e>=1?e-1:i.length-1;i[t]?.focus?.()}if(o){const t=e<=i.length-2?e+1:0;i[t]?.focus?.()}}}))}}},this.initEvents=()=>{document.removeEventListener("click",this.events.eventDelegation,!0),document.addEventListener("click",this.events.eventDelegation,!0),document.removeEventListener("keydown",this.events.escClick),document.addEventListener("keydown",this.events.escClick),this.enableTabIndexes&&(document.removeEventListener("keyup",this.events.tabFocusClick),document.addEventListener("keyup",this.events.tabFocusClick))},this.init=()=>{const{element:t,html:e,classList:i,beforeShow:n,afterShow:s,beforeClose:o,afterClose:a,notCloseSelectors:r,changeViewport:c,enableTabIndexes:l,setFocusOnFirstElement:u,allowedElementsForTabIndex:d}=this.params;this.element=t||!1,this.html=e||!1,this.beforeShow=n||!1,this.afterShow=s||!1,this.beforeClose=o||!1,this.afterClose=a||!1,this.classList=i||!1,this.notCloseSelectors=r||[],this.changeViewportFlag=c??!0,this.enableTabIndexes=l??!0,this.setFocusOnFirstElement=u??!1,this.allowedElementsForTabIndex=d??"a, button, input, textarea",this.lastFocusedElement=document.activeElement,this.createModal()},!this.params.notInit)return this.init()},app_shop.run((function(){document.querySelectorAll("form:not(.is-validated)").forEach((t=>{t.addEventListener("submit",(t=>{t.target.classList.add("--submitting"),t.target.addEventListener("submit",(t=>(t.preventDefault(),!1)))}))}))}),"all","form"),app_shop.run((function(){document.querySelectorAll("[data-change-literal-days]").forEach((t=>{const e=+t.getAttribute("data-change-literal-days");t.textContent=app_shop.fn.changeLiteral(e,["days","day","days"],!1)}))}),"all","[data-change-literal-days]",!0),app_shop.run((function(){document.querySelectorAll("[data-change-literal-days-up-to]").forEach((t=>{const e=+t.getAttribute("data-change-literal-days-up-to");t.textContent=app_shop.fn.changeLiteral(e,["days","day","days"],!1)}))}),"all","[data-change-literal-days-up-to]",!0),app_shop.run((function(){document.addEventListener("click",(t=>{const{target:e}=t;if(e.closest(".l_welcome__element.--logout")||e.closest(".logout_link"))for(let t=0;t<sessionStorage.length;){const e=sessionStorage.key(t);e.startsWith("expchck")?sessionStorage.removeItem(e):t+=1}}))}),"all",".l_welcome__element.--logout, .logout_link"),RegionForced=function(t){this.params=t||{},this.txt={label:"Your selected country of delivery is ",labelZipcode:"Your selected delivery region is ",currency:"Prices displayed in currency: ",timeAndCosts:"Delivery times and costs displayed for the country: ",timeAndCostsZipcode:"Delivery times and costs displayed for the region: ",andRegion:" and region: ",continue:"Continue",restoreDefault:"Restore default delivery country: ",restoreDefaultZipcode:"Restore default delivery region: "},this.events={unsetRegion:t=>(t.preventDefault(),this.unsetTemporaryRegion(),!1),unsetZipcode:t=>(t.preventDefault(),this.unsetTemporaryZipcode(),!1),unsetRegionAndZipcode:t=>(t.preventDefault(),this.unsetTemporaryRegionAndZipcode(),!1),continue:t=>(t.preventDefault(),this.modifyCookie(),this.modal.closeModal(),!1)},this.queries={unsetRegion:()=>JSON.stringify({query:"mutation {\n        unsetTemporaryRegion {\n          status\n          error {\n            code\n            message\n          }\n        }\n      }"}),unsetZipcode:()=>JSON.stringify({query:"mutation {\n        unsetTemporaryZipcode {\n          status\n          error {\n            code\n            message\n          }\n        }\n      }"}),unsetRegionAndZipcode:()=>JSON.stringify({query:"mutation {\n        unsetTemporaryRegion {\n          status\n          error {\n            code\n            message\n          }\n        }\n        unsetTemporaryZipcode {\n          status\n          error {\n            code\n            message\n          }\n        }\n      }"})},this.fetchData=async(t={})=>{const{data:e,link:i,linkParameter:n=""}=t;if(!e)return!1;try{const t=await fetch(`${i||app_shop.urls.graphql||"/graphql/v1"}${n}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e});return await t.json()}catch(t){return!1}},this.unsetTemporaryRegion=async()=>{const t=document.querySelector(".modal");t&&t.classList.add("--loading");const e=await this.fetchData({data:this.queries.unsetRegion(),linkParameter:"?mutation=unsetRegion"}),{status:i}=e?.data?.unsetTemporaryRegion;t&&t.classList.add("--remove"),"success"===i&&(document.cookie="setRegion
5Forced=; path=/; Max-Age=-99999999;",window.location.reload())},this.unsetTemporaryZipcode=async()=>{const t=document.querySelector(".modal");t&&t.classList.add("--loading");const e=await this.fetchData({data:this.queries.unsetZipcode(),linkParameter:"?mutation=unsetZipcode"}),{status:i}=e?.data?.unsetTemporaryZipcode;t&&t.classList.add("--remove"),"success"===i&&(document.cookie="setZipcodeForced=; path=/; Max-Age=-99999999;",window.location.reload())},this.unsetTemporaryRegionAndZipcode=async()=>{const t=document.querySelector(".modal");t&&t.classList.add("--loading");const e=await this.fetchData({data:this.queries.unsetRegionAndZipcode(),linkParameter:"?mutation=unsetRegionAndZipcode"}),{status:i}=e?.data?.unsetTemporaryRegion;t&&t.classList.add("--remove"),"success"===i&&(document.cookie="setRegionForced=; path=/; Max-Age=-99999999;",document.cookie="setZipcodeForced=; path=/; Max-Age=-99999999;",window.location.reload())},this.getCookieByName=t=>{const e=`; ${document.cookie}`.split(`; ${t}=`);return 2===e.length&&e.pop().split(";").shift()},this.create=({currentCountry:t,defaultCountry:e,currentZipcode:i,defaultZipcode:n})=>{const s=!t&&i,o=!s&&i,a=document.createElement("div");a.classList.add("region_forced"),a.innerHTML=`<div class="region_forced__label">
5\n      <span class="region_forced__label_text">${s?this.txt.labelZipcode:this.txt.label}</span>\n      <strong class="region_forced__label_value">${s?i:t}</strong>\n    </div>\n    <div class="region_forced__body">\n      <div class="region_forced__item --currency">\n        <span classs="region_forced__item_text">${this.txt.currency}</span>\n        <strong class="region_forced__item_value">${app_shop?.vars?.currency?.id}</strong>\n      </div>\n      <div class="region_forced__item --delivery">\n        <span classs="region_forced__item_text">${s?this.txt.timeAndCostsZipcode:this.txt.timeAndCosts}</span>\n        <strong class="region_forced__item_value">${s?i:t}</strong>\n        ${o?`<span class="region_forced__and_region">${this.txt.andRegion}<strong>${i}</strong></span>`:""}\n      </div>\n    </div>\n    <div class="region_forced__buttons">\n      <button class="region_forced__continue btn --solid --large" type="button">${this.txt.continue}</button>\n      <a href="#unsetTemporaryRegion" class="region_forced__unset">${s?this.txt.restoreDefaultZipcode:this.txt.restoreDefault}<strong>${s?n:e}</strong></a>\n    </div>`,this.modal=new Modal({element:a,classList:"--region-forced"});let r="region";s&&(r="zipcode"),o&&(r="regionAndZipcode"),this.initEvents({type:r})},this.modifyCookie=()=>{const t=this.getCookieByName("setRegionForced"),e=this.getCookieByName("setZipcodeForced"),i=JSON.parse(t),n=JSON.parse(e);i&&(i.showModal=!1,document.cookie=`setRegionForced=${JSON.stringify(i)}; path=/;`),n&&(n.showModal=!1,document.cookie=`setZipcodeForced=${JSON.stringify(n)}; path=/;`)},this.initEvents=({type:t})=>{const e=document.querySelector(".region_forced__unset");e&&("region"===t&&e.addEventListener("click",this.events.unsetRegion),"zipcode"===t&&e.addEventListener("click",this.events.unsetZipcode),"regionAndZipcode"===t&&e.addEventListener("click",this.events.unsetRegionAndZipcode));const i=document.querySelector(".region_forced__continue");i&&i.addEventListener("click",this.events.continue)},this.init=()=>{const t=this.getCookieByName("setRegionForced"),e=this.getCookieByName("setZipcodeForced");if(!t&&!e)return;const i=JSON.parse(t),n=JSON.parse(e),{currentCountry:s,defaultCountry:o,showModal:a}=i||{},{currentZipcode:r,defaultZipcode:c,showModal:l}=n||{};(a||l)&&this.create({currentCountry:s,defaultCountry:o,currentZipcode:r,defaultZipcode:c})}},app_shop.fn.regionForced=new RegionForced,app_shop.run((function(){app_shop.fn.regionForced.init()}),"all","#container:not(.place-order_page):not(.prepaid_page)"),app_shop.txt||(app_shop.txt={}),app_shop.txt.errorCode||(app_shop.txt.errorCode={}),app_shop.txt.errorCode.birth_date="Enter your birth date in the YYYY-MM-DD format",app_shop.txt.errorCode.illegal_characters_client_city="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_firm="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_firstname="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_lastname="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_nip="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_phone="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_phone2="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_client_street="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_additional="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_city="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_firstname="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_lastname="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_phone="One of the characters is invalid.",app_shop.txt.errorCode.illegal_characters_delivery_street="One of the characters is invalid.",app_shop.txt.errorCode.incorect_delivery_region="Select a recipient\'s country.",app_shop.txt.errorCode.incorect_delivery_zipcode="Enter a recipient\'s postal code.",app_shop.txt.errorCode.incorect_email="Incorrectly typed e-mail address. Enter the full e-mail address, e.g. [email protected]",app_shop.txt.errorCode.incorect_invoice_phone="Enter the customer\'s phone.",app_shop.txt.errorCode.incorect_invoice_zipcode="Enter the customer\'s postal code.",app_shop.txt.errorCode.incorect_login="Incorrect login. Login must have a minimum of 3, and a maximum of 40 characters. You can use letters, numbers and symbols @ . - _.",app_shop.txt.errorCode.incorect_nip="Incorrectly typed VAT Number.",app_shop.txt.errorCode.incorect_phone="Enter your phone number.",app_shop.txt.errorCode.incorect_shops="Select a shop from the list.",app_shop.txt.errorCode.incorect_zipcode="Incorrectly typed postal code.",app_shop.txt.errorCode.incorrect_region="Incorrectly selected area.",app_shop.txt.errorCode.invalid_format="Invalid format.",app_shop.txt.errorCode.login_equals_password="Password is the same as login. Enter another password.",app_shop.txt.errorCode.login_taken="The given login is already taken.",app_shop.txt.errorCode.login_taken_login_propose="The given login is already taken.<br/><br/>Suggested login: ",app_shop.txt.errorCode.no_city="Enter the city name.",app_shop.txt.errorCode.no_delivery_city="Enter a recipient\'s city.",app_shop.txt.errorCode.no_delivery_firstname="Enter the name of a recipient.",app_shop.txt.errorCode.no_delivery_lastname="Enter the surname of a recipient.",app_shop.txt.errorCode.no_delivery_street="Enter recipient\'s street name and a property number.",app_shop.txt.errorCode.no_firmname="Incorrectly typed company name.",app_shop.txt.errorCode.no_firstname="Enter your name.",app_shop.txt.errorCode.no_invoice_city="Wpisz miasto klienta.",app_shop.txt.errorCode.no_invoice_firmname="Enter the customer\'s company name.",app_shop.txt.errorCode.no_invoice_firstname="Enter the customer\'s name.",app_shop.txt.errorCode.no_invoice_lastname="Enter the customer\'s name.",app_shop.txt.errorCode.no_invoice_street="Enter the street and house number of the customer.",app_shop.txt.errorCode.no_invoice_street_number="Enter the street and house number of the customer.",app_shop.txt.errorCode.no_login="Enter your login here.",app_shop.txt.errorCode.no_name="Enter your surname.",app_shop.txt.errorCode.no_password="Enter your password here.",app_shop.txt.errorCode.no_street="Enter street or city name.",app_shop.txt.errorCode.no_street_number="Enter the house no..",app_shop.txt.errorCode.no_street_number_u
5k="The property number is missing.",app_shop.txt.errorCode.not_equal_passwords="The passwords you entered are not the same. Please re-enter the password in both fields.",app_shop.txt.errorCode.password_to_long="The password is too long. Enter a shorter one (maximum length is.",app_shop.txt.errorCode.password_to_short="The entered password is too short. Enter a longer one (at least.",app_shop.txt.errorCode.used_login="The given login is already taken.",app_shop.txt.errorCode.incorrect_iban="Bank account number format is invalid",app_shop.txt.formValidation||(app_shop.txt.formValidation={}),app_shop.txt.formValidation.mandatoryField="Mandatory field.",app_shop.txt.formValidation.zipcodeFormat="Valid postal code formats for the indicated country are [X - numeric character, Y - alphabetic character]:",app_shop.txt.formValidation.characters="characters).",app_shop.txt.formValidation.minimalCharacters="The minimum number of characters for this field is ",app_shop.txt.formValidation.maximumCharacters="The maximum number of characters for this field is ",app_shop.txt.formValidation.noOptionSelected="Please select the option.";const omnibusDetailsTxt={"Najniższa cena produktu w okresie 30 dni przed wprowadzeniem obniżki":"Lowest price in 30 days before discount","Cena regularna":"Regular price","Cena bez kodu":"Price without code","Cena nadchodząca od":"Upcoming price from",Promocja:"Special offer",Okazja:"Bargain","Kod rabatowy":"A discount code"};function Bars(){this.calculatePosition=(t,e)=>t.reduce(((t,i,n)=>n<e?t+i.offsetHeight:t),0),this.setPosition=()=>{const t=[...document.querySelectorAll(".bars_top .bars__item[data-fixed]")];t.forEach(((e,i)=>{e.style.setProperty("--position",this.calculatePosition(t,i))}));const e=[...document.querySelectorAll(".bars_bottom .bars__item[data-fixed]")].reverse();e.forEach(((t,i)=>{t.style.setProperty("--position",this.calculatePosition(e,i))}))},this.fixed=()=>{const t=document.querySelectorAll(".bars__item[data-fixed]");let e=0,i=0;t.forEach((t=>{const n=+getComputedStyle(t).getPropertyValue("--position"),s=t.getBoundingClientRect().top-n,o=t.getBoundingClientRect().bottom+n-window.innerHeight;s<0||o>=0?(t.style.setProperty("min-height",`${t.offsetHeight}px`),t.classList.add("--fixed"),t.closest(".bars_top")?e+=t.offsetHeight:i+=t.offsetHeight):(t.classList.remove("--fixed"),t.style.removeProperty("min-height"))}
5)),document.documentElement.style.setProperty("--top-fixed-bars-height",`${e}px`),document.documentElement.style.setProperty("--bottom-fixed-bars-height",`${i}px`)},this.closeBarClick=t=>{const{target:e}=t;if(e.closest(".bars__close")){t.preventDefault();const i=e.closest(".bars__item");i.parentNode.removeChild(i),this.saveClosing(i),this.reset()}},this.removeClosedBars=()=>{(JSON.parse(localStorage.getItem("closedBars"))||[]).forEach((t=>{const e=document.getElementById(t);e&&e.parentNode.removeChild(e)})),this.checkEmptyBars()},this.checkEmptyBars=()=>{const t=document.querySelector(".bars_top");0===t?.childNodes.length&&t.parentNode.removeChild(t);const e=document.querySelector(".bars_bottom");0===e?.childNodes.length&&e.parentNode.removeChild(e)},this.saveClosing=t=>{const{id:e}=t,i=JSON.parse(localStorage.getItem("closedBars"))||[];i.push(e),localStorage.setItem("closedBars",JSON.stringify(i))},this.setBarsHeight=()=>{if(document.documentElement.classList.contains("--scroll-down"))return!1;const t=document.querySelector(".bars_top")?.offsetHeight;return document.documentElement.style.setProperty("--bars-height",`${t}px`),!0},this.clearAll=()=>{document.querySelectorAll(".bars__item[data-fixed]").forEach((t=>{t.classList.remove("--fixed"),t.style.removeProperty("--position"),t.style.removeProperty("min-height")}))},this.destroy=()=>{document.removeEventListener("scroll",this.fixed),document.removeEventListener("click",this.closeBarClick),window.removeEventListener("resize",this.setBarsHeight),this.clearAll()},this.reset=()=>{this.destroy(),this.init()},this.init=()=>{this.removeClosedBars(),document.addEventListener("click",this.closeBarClick),app_shop.vars.view<3&&(this.setBarsHeight(),window.addEventListener("resize",this.setBarsHeight)),app_shop.vars.view>2&&(this.setPosition(),this.fixed(),document.addEventListener("scroll",this.fixed))}}app_shop.fn.getOmnibusDetails=t=>{const{productData:e,sizeId:i,priceType:n=app_shop.vars.priceType}=t||{};if(!e)return!1;const s=e.sizes.find((t=>t.id===i))||e;if(!s?.price)return!1;const o={add:[],remove:["--omnibus","--omnibus-short","--omnibus-code","--omnibus-code-short","--omnibus-new-price","--omnibus-higher"]},a={},r=s.price?.omnibusPriceDetails?.unit?.[n]?.formatted||s.price.omnibusPrice[n]?.formatted;if(!r)return{classes:o};o.add.push("--omnibus"),o.remove=o.remove.filter((t=>"--omnibus"!==t));const c=e?.unit?.sellBy,l=!(!s?.price?.unit?.[n]?.formatted||!s.price.max?.[n]?.value)&&format_price(parseFloat(s.price.max?.[n]?.value)*parseFloat(c),{mask:app_shop.vars.currency_format,currency:app_shop.vars?.currency?.symbol,currency_space:app_shop.vars.currency_space,currency_before_price:app_shop.vars.currency_before_value})||s.price.max?.[n]?.formatted;l&&l!==r||(o.add.push("--omnibus-short"),o.remove=o.remove.filter((t=>"--omnibus-short"!==t))),app_shop.vars.omnibus?.rebateCodeActivate&&s.price?.rebateCodeActive&&(o.add.push("--omnibus-code"),a.rebateCodeActive=`<span class="label --code --omnibus">${omnibusDetailsTxt?.["Kod rabatowy"]}</span>`,o.remove=o.remove.filter((t=>"--omnibus-code"!==t)));const u=s.price.beforeRebateDetails?.unit?.[n]?.formatted||s.price.beforeRebate[n]?.formatted;app_shop.vars.omnibus?.rebateCodeActivate&&u===r&&s.price?.rebateCodeActive&&(o.add.push("--omnibus-code-short"),o.remove=o.remove.filter((t=>"--omnibus-code-short"!==t)));const d=s.price.omnibusPriceDetails?.newPriceEffectiveUntil?.formatted;d&&l&&(o.add.push("--omnibus-new-price"),o.remove=o.remove.filter((t=>"--omnibus-new-price"!==t)));const h=s.price.omnibusPriceDetails?.omnibusPriceIsHigherThanSellingPrice;h&&(o.add.push("--omnibus-higher"),o.remove=o.remove.filter((t=>"--omnibus-higher"!==t))),h&&!d||a?.rebateCodeActive||(a.bargain=`<span class="label --bargain --omnibus">${omnibusDetailsTxt?.Okazja}</span>`),0===Object.keys(a)?.length&&(a.bargain=`<span class="label --promo --omnibus">${omnibusDetailsTxt?.Promocja}</span>`);let p="";h?p="-":0!==s.price.omnibusPriceDetails?.youSavePercent&&(p="+");const m=`${p}${s.price.omnibusPriceDetails?.youSavePercent}%`,_={price:r,visible:!0,percent:m,html:`<span class="omnibus_price__text">${omnibusDetailsTxt["Najniższa cena produktu w okresie 30 dni przed wprowadzeniem obniżki"]}: </span><del class="omnibus_price__value">${r}</del><span class="price_percent">${m}</span>`},f=l?{max:{price:l,visible:!0,percent:`-${s.price.youSavePercent}%`,html:`<span class="omnibus_label">${omnibusDetailsTxt["Cena regularna"]}: </span>\n        <del>${l}</del><span class="price_percent">-${s.price.youSavePercent}%</span>`}}:{},g=u?{beforeRebate:{price:u,visible:!!o.add.includes("--omnibus-code"),percent:`-${s.price.beforeRebateDetails?.youSavePercent}%`,html:`<span class="omnibus_label">${omnibusDetailsTxt["Cena bez kodu"]}: </span>\n        <del>${u}</del>
5\n        <span class="price_percent">-${s.price.beforeRebateDetails?.youSavePercent}%</span>`}}:{},y=d?{newPriceEffectiveUntil:{date:d,price:l,visible:!!o.add.includes("--omnibus-new-price"),html:`<span class="omnibus_label">${omnibusDetailsTxt["Cena nadchodząca od"]} </span>\n        <span class="new_price__date">${d}: </span>\n        <span class="new_price__value">${l}</span>`}}:{};return{classes:o,omnibus:_,...f,...g,...y,...{omnibusLabel:{name:Object.keys(a)?.[0]||"",html:a[Object.keys(a)?.[0]]}}}},window.innerWidth>=1200&&window.innerWidth<=1600&&(document.documentElement.style.zoom="0.8"),app_shop.run((function(){app_shop.fn.bars=new Bars,app_shop.fn.bars.init()}),"all","html:not(.order_process)"),app_shop.run((function(){app_shop.fn.bars.reset()}),[1,2,3,4],"html:not(.order_process)"),app_shop.run((()=>{const t=document.getElementById("rabateCode");if(!t)return void document.documentElement.classList.remove("--rabateCode");if(app_shop.fn.cookie.get("rabateCode_clicked"))return t.remove(),void document.documentElement.classList.remove("--rabateCode");document.documentElement.classList.add("--rabateCode");const e=document.querySelector("#rabateCode .rabateCode__close");e&&e.addEventListener("click",(e=>{e.preventDefault(),app_shop.fn.cookie.set("rabateCode_clicked",!0,1),t.remove(),document.documentElement.classList.remove("--rabateCode")}))}),"all",".--rabateCode"),app_shop.run((function(){app_shop.fn.searchResults=new SearchResults({resultsLimit:6,inputLengthToStartSearching:2})}),"all","#menu_search");const searchTxt={categories:"Categories",cms:"Info",beforeProducer:"Producer: ",beforeSeries:"Series: ",separator:" / ",buttonAllText:"Show all",telPrice:"Call for price"};SearchResults=function(t){const e=this;return this.params=t||{},this.vars={typingTimer:"",doneTypingInterval:500,searchResultQuery:"/graphql/v1/"},this.fetchData=async()=>{const t=this.searchInput.value;if(t.length<this.inputLengthToStartSearching)return!1;if(sessionStorage.getItem(`search_${t}`))return JSON.parse(sessionStorage.getItem(`search_${t}`));const e=JSON.stringify({query:`query {\n        productsTextSearch(searchInput: {\n            text: "${t}",\n            limit: ${this.resultsLimit}\n          }) {\n            products {\n              name, link, iconSmall, iconSmallSecond,\n              price {\n                  price {\n                      gross {\n                        value\n                        formatted\n                      }\n                      net {\n                        value\n                        formatted\n                      }\n                  }\n              }\n            }\n            series {\n                name, link\n            }\n            producers {\n                name, link\n            }\n            menuNodes {\n                name, link\n            }\n            cms {\n                name, link\n            }\n            searchQueries {\n                name, link\n            }\n          }\n        }`});try{const i=await fetch(this.vars.searchResultQuery,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e}),n=(await i.json()).data.productsTextSearch;return sessionStorage.setItem(`search_${t}`,JSON.stringify(n)),n}catch(t){return!1}},this.openResults=()=>{this.searchInput.closest("form").classList.add("--open"),this.resultsWrapper.scrollTop=0,document.documentElement.classList.add("--results-open"),document.querySelector("#container.main_page")&&document.documentElement.classList.add("--results-main-open")},this.closeResults=()=>{this.searchInput.closest("form").classList.remove("--open"),document.documentElement.classList.remove("--results-open"),document.querySelector("#container.main_page")&&document.documentElement.classList.remove("--results-main-open")},this.buildResult=async()=>{this.searchInput.closest("form").classList.add("--loading");const t=await this.fetchData();if(this.searchInput.closest("form").classList.remove("--loading"),this.resultsWrapper.innerHTML="",t){if(!Object.values(t).filter((t=>t?t.length:"")).length)return this.closeResults(),!1;if(this.openResults(),t.searchQueries&&t.searchQueries.length){const e=this.searchInput.value,i=new RegExp(e,"i");this.resultsWrapper.innerHTML+=`\n          <div class="search_result__block --queries">\n          <p class="search_topic">Wyszukiwanie</p>\n  ${t.searchQueries.map((t=>`\n    <a class="search_result__item --query" href="${t.link}">\n      <img src="https://bublaki.pl/data/include/cms//lupa_search.svg?v=1727960383247" alt="Lupa" width="16" height="16" style="vertical-align: middle; margin-right: 5px;">\n      ${t.name.replace(i,"<b>$&</b>")}\n    </a>\n  `)).join("")}\n</div>\n        `}Object.keys(t).filter((t=>"searchQueries"!==t)).some((e=>t[e]?t[e].length:""))&&(this.resultsWrapper.innerHTML+='<div class="search_result__block --others"><p class="search_topic">Polecane</p></div>',t.products&&t.products.length&&(this.resultsWrapper.querySelector(".search_result__block.--others").innerHTML+=`\n            <div class="search_result__sub --products">\n              ${t.products.map((t=>`\n                <a class="search_result__item --product" href="${t.link}">
5\n                  <span class="search_result__icon">${void 0!==t.iconSmallSecond?`<picture>\n                      <source type="image/webp" srcset="${t.iconSmall}"/>\n                      <img src="${t.iconSmallSecond}" alt="${t.name}">\n                    </picture>`:`<img src="${t.iconSmall}" alt="${t.name}" />`}</span>\n                  <span class="search_result__name_wrapper">\n                    <span class="search_result__name">${t.name}</span>\n                    <span class="search_result__price">${e.netPrice?0!==t.price.price.net.value?t.price.price.net.formatted:searchTxt.telPrice:0!==t.price.price.gross.value?t.price.price.gross.formatted:searchTxt.telPrice}</span>\n                  </span>\n                </a>\n              `)).join("")}\n              <button type="submit" class="search_result__item --button-all${e.buttonAllClass}">${searchTxt.buttonAllText}</button>\n            </div>\n          `),(t.producers&&t.producers.length||t.series&&t.series.length||t.menuNodes&&t.menuNodes.length)&&(this.resultsWrapper.querySelector(".search_result__block.--others").innerHTML+=`\n            <div class="search_result__sub --categories" style="display: none;>\n              <strong class="search_result__label">${searchTxt.categories}</strong>\n              <div class="search_result__items">\n                ${t.producers?t.producers.map((t=>`\n                  <a class="search_result__item --producer" href="${t.link}">\n                    <span class="search_result__name_label">${searchTxt.beforeProducer}</span><span class="search_result__name">${t.name}</span>\n                  </a>\n                `)).join(""):""}\n\n                ${t.series?t.series.map((t=>`\n                  <a class="search_result__item --series" href="${t.link}">\n                    <span class="search_result__name_label">${searchTxt.beforeSeries}</span><span class="search_result__name">${t.name}</span>\n                  </a>\n                `)).join(""):""}\n\n                ${t.menuNodes?t.menuNodes.map((t=>`\n                  <a class="search_result__item --menu" href="${t.link}">\n                    <span class="search_result__name">${t.bc?t.bc.item.map((t=>t.title)).join(searchTxt.separator):t.name}</span>\n                  </a>\n                `)).join(""):""}\n              </div>\n            </div>\n          `),t.cms&&t.cms.length&&(this.resultsWrapper.querySelector(".search_result__block.--others").innerHTML+=`\n            <div class="search_result__sub --cms" style="display: none;">\n              <strong class="search_result__label">${searchTxt.cms}</strong>\n              <div class="search_result__items">\n                ${t.cms.map((t=>`\n                  <a class="search_result__item --cms" href="${t.link}">\n                    <span class="search_result__name">${t.name}</span>\n                  </a>\n                `)).join("")}\n              </div>\n            </div>\n          `))}else this.closeResults();return this.afterBuildResult&&this.afterBuildResult(t),!0},this.updateSearchInput=()=>{const t=e.resultsWrapper.querySelector(".search_result__item.--active .search_result__name")?e.resultsWrapper.querySelector(".search_result__item.--active .search_result__name").textContent:e.resultsWrapper.querySelector(".search_result__item.--active").textContent;e.searchInput.value=t},this.updateFocusElement=t=>{this.resultsWrapper.querySelectorAll(".search_result__item").forEach((t=>t.classList.remove("--active"))),"null"!=typeof t&&t.classList.add("--active"),"null"!=typeof t&&t.focus(),this.updateSearchInput()},this.initEvents=()=>{const t=document.getElementById("menu_search");t&&t.addEventListener("submit",(function(){const t=e.searchInput.getAttribute("data-value");t&&(e.searchInput.value=t)})),this.searchInput.addEventListener("keyup",(function(t){const i=t.
5which||t.keyCode||0;37!==i&&38!==i&&39!==i&&40!==i&&(e.searchInput.setAttribute("data-value",this.value),clearTimeout(e.vars.typingTimer),e.vars.typingTimer=setTimeout(e.buildResult,e.vars.doneTypingInterval),document.querySelector("html._mobile:not(.sidebar_open):not(.--search-open) .main_page")&&window.scrollTo(0,0))})),this.searchInput.addEventListener("keydown",(function(t){const i=t.which||t.keyCode||0;return 37===i||38===i||39===i||40===i||(e.searchInput.setAttribute("data-value",this.value),clearTimeout(e.vars.typingTimer),e.searchInput.closest("form").classList.add("--focus"),!document.querySelector(".--search-open")||13!==i)||(t.preventDefault(),this.closest("form").submit(),!1)})),this.searchInput.addEventListener("focus",(function(){window.screen.width<768&&!document.documentElement.classList.contains("--search-open")&&!document.documentElement.classList.contains("sidebar_open")&&(document.documentElement.classList.add("--search-open"),$(".main_slider").slick("slickSetOption","autoplay",!1,!0),document.documentElement.scrollIntoView()),this.closest("form").classList.add("--focus")})),document.addEventListener("scroll",(function(t){window.scrollY>0?document.documentElement.classList.add("--scroll-down"):$("html").hasClass("sidebar_open")||$("html").hasClass("filters_open")||document.documentElement.classList.remove("--scroll-down")})),document.querySelector(".search_result, .search_result__block").addEventListener("scroll",(function(){app_shop.vars.view<3&&document.activeElement.blur()})),document.addEventListener("keydown",(function(t){if(e.searchInput.closest("form.--open.--focus")){const i=t.which||t.keyCode||0;if(37===i||38===i||39===i||40===i){t.preventDefault();const n=[...e.resultsWrapper.querySelectorAll(".search_result__item"),e.resultsWrapper.querySelector(".search_result__button_all")],s=e.resultsWrapper.querySelector(".search_result__item.--query"),o=e.resultsWrapper.querySelector(".search_result__block.--others .search_result__item");switch(i){case 40:{const t=n.indexOf(e.resultsWrapper.querySelector(".search_result__item.--active"));t>-1&&n[t+1]?e.updateFocusElement(n[t+1]):e.updateFocusElement(n[0]);break}case 38:{const t=n.indexOf(e.resultsWrapper.querySelector(".search_result__item.--active"));t>-1&&n[t-1]?e.updateFocusElement(n[t-1]):e.updateFocusElement(n[n.length-1]),e.updateSearchInput();break}case 37:1!==app_shop.vars.view&&s&&o&&e.updateFocusElement(s);break;case 39:1!==app_shop.vars.view&&s&&o&&e.updateFocusElement(o);break;default:return!0}}else 13!==i&&e.searchInput.focus();return!1}})),document.addEventListener("click",(function(t){return t.target.closest(".menu_search__mobile")&&(t.preventDefault(),document.documentElement.classList.add("--search-open"),$(".main_slider").slick("slickSetOption","autoplay",!1,!0),e.searchInput.focus()),t.target.closest(".--search-open .menu_search__submit")&&(t.preventDefault(),document.documentElement.classList.remove("--search-open","--results-main-open"),$(".main_slider").slick("slickSetOption","autoplay",!0,!0)),t.target.closest("header .navbar-toggler")&&document.documentElement.classList.remove("--results-main-open"),e.searchInput.closest("form").classList.contains("--focus")&&!e.searchInput.closest("form").contains(t.target)&&e.searchInput.closest("form").classList.remove("--focus"),!1}))},this.init=()=>{const{searchInput:t,resultsWrapper:e,resultsLimit:i,inputLengthToStartSearching:n,afterBuildResult:s,buttonAllClass:o}=this.params;this.searchInput=t?document.querySelector(t):document.querySelector(".menu_search__input"),this.resultsWrapper=e?document.querySelector(e):document.querySelector(".search_result"),this.resultsLimit=i||"",this.inputLengthToStartSearching=n||4,this.netPrice="net"===app_shop.vars.priceType,this.afterBuildResult=s||!1,this.buttonAllClass=o||" btn --outline",this.initEvents()},this.init()},app_shop.run((()=>{app_shop.fn.selectPaging=new SelectToDropdown({selector:"#menu_settings  select.form-control:not(.f-dropdown)",generateDropdownCallback:t=>{t.classList.remove("form-control")}});const t=document.querySelector("#menu_settings form");if(!t)return;const e=document.querySelector("#menu_settings .open_trigger");e&&(e.addEventListener("click",(()=>{t.classList.toggle("active")})),e.addEventListener("keydown",(e=>{"Enter"===e.key&&t.classList.toggle("active")})),document.addEventListener("click",(e=>{t.classList.contains("active")&&(document.querySelector("#menu_settings").contains(e.target)||t.classList.remove("active"))})),document.addEventListener("focusin",(e=>{t.classList.contains("active")&&(e.target?.closest("#menu_settings")||t.classList.remove("active"))})))}),"all","#menu_settings");const DefaultShoppingList=function(){return this.vars={firstListName:"Lista zakupowa"},this.queries={addList:()=>JSON.stringify({query:`mutation {\n        shoppingListCreate(ShoppingListSettingsInput: {\n          name: "${this.vars.firstListName}",\n        }) {\n          status\n          id\n        }\n      }`})},this.fetchData=async t=>{try{const e=await fetch("/graphql/v1/?query=createShoppingList",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:t});await app_shop.graphql.trackingEvents(e);return await e.json()}catch(t){return!1}},this.createList=async()=>{await this.fetchData(this.queries.addList())},this.initEvents=()=>{document.addEventListener("click",(async t=>{const{target:e}=t;e.closest(".slt_link.--empty, .slt_lists__nav_link.--empty, .slm_lists__nav_link.--empty")&&(t.preventDefault(),await this.createList(
5),window.location.href=e.closest("[href]")?.href)}))},this.initEvents()};app_shop.run((function(){app_shop.fn.defaultShoppingList=new DefaultShoppingList}),"all",".slt_link.--empty, .slt_lists__nav_link.--empty, .slm_lists__nav_link.--empty");const DMBASKET_GQL={BASKET:()=>JSON.stringify({query:"query {\n      basket(BasketCostInput: {}) {\n        summaryBasket {\n          productsCount\n          worth {\n            net { formatted value }\n            gross { formatted value }\n          }\n          shipping {\n            cost { gross { value formatted } }\n          }\n          toShippingFree { value formatted }\n          shippingLimitFree { value formatted }\n        }\n        products {\n          id\n          quantity\n          worth {\n            net { formatted }\n            gross { formatted }\n          }\n          worthPoints { formatted }\n          forPoints\n          data {\n            type\n            name\n            link\n            iconSmall\n            iconSmallSecond\n            unit { singular plural fraction }\n          }\n        }\n      }\n    }"})},TBCD_CLASS_RENAME_MAP={basket__form:"tbcd__form",basket__block:"tbcd__block",basket__item:"tbcd__item",basket__quantity:"tbcd__quantity",buy:"tbcd__buy",basket__quantity_select:"tbcd__quantity_select",buy__number:"tbcd__number",buy__more:"tbcd__more",buy__more_input:"tbcd__more_input",buy__more_delete:"tbcd__more_delete",basket__prices:"tbcd__prices",basket__price:"tbcd__price",basket__unit:"tbcd__unit",basket__max_price:"tbcd__max_price",basket__sum:"tbcd__sum",basket__sum_item:"tbcd__sum_item",sum:"tbcd__sum_value",basket__remove:"tbcd__remove",basket__action:"tbcd__action",basket__name:"tbcd__name",basket__name_link:"tbcd__name_link",basket__params:"tbcd__params",basket__param:"tbcd__param",param__label:"tbcd__param_label",param__value:"tbcd__param_value",basket__associated_toggle_wrapper:"tbcd__assoc_toggle_wrap",basket__associated_toggle:"tbcd__assoc_toggle",associated_toggle__icon:"tbcd__assoc_toggle_icon",associated_toggle__label:"tbcd__assoc_toggle_label",basket__associated:"tbcd__assoc_item","block--gabaryt":"tbcd__gabaryt",block__content:"tbcd__gabaryt_content",block__title:"tbcd__gabaryt_title",block__text:"tbcd__gabaryt_text",special_offer:"tbcd__special_offer",basket__tools:"tbcd__tools",basket__recover_product:"tbcd__recover",remove_modal:"tbcd__remove_modal",basket__gift_inputs:"tbcd__gift_inputs",photo__link:"tbcd__photo_link",photo__image:"tbcd__photo_image",basket__continue_shopping:"tbcd__continue_shopping",basket__tabs:"tbcd__tabs",basket__packaging:"tbcd__packaging",basket__packaging_tabs:"tbcd__packaging_tabs",wishlist__add_all:"tbcd__wishlist_add_all",basket__empty_all:"tbcd__empty_all",basket__remove_all:"tbcd__remove_all",remove__button:"tbcd__remove_button",basket__tip:"tbcd__tip",basket__tip_content:"tbcd__tip_content"},DMBASKET_TXT={gratis:"Gratis","Wartość koszyka":"Wartość koszyka",PKT:"PKT","Zobacz również":"Zobacz również","Dodaj do koszyka":"Dodaj do koszyka","Najniższa cena z 30 dni":"Najniższa cena z 30 dni","Koszyk jest pusty":"Wygląda na to, że Twój koszyk jest jeszcze pusty. Wróć do zakupów i wybierz coś dla siebie.","Rozpocznij zakupy":"Rozpocznij zakupy","Kod rabatowy":"Kod rabatowy",Promocja:"Promocja",Okazja:"Okazja",Subskrypcja:"Subskrypcja"};app_shop.vars.dmDrawerAssociatedCache=app_shop.vars.dmDrawerAssociatedCache||{cache:{}};let dmBasketPortal=null;class DmTopBasketDrawer{constructor(t={}){this.txt={...DMBASKET_TXT},this.queries={...DMBASKET_GQL},this.basketWrapper=t?.basketWrapper||Array.from(document.querySelectorAll("#menu_basket")).find((t=>t.querySelector(".topBasket__drawer")))||document.getElementById("menu_basket"),this.basketClass=t?.basketClass||".topBasket__drawer",this.priceType=t?.priceType||app_shop?.vars?.priceType||"gross",this.dataLoaded=!1,this.loadPromise=null,this.templates={wrapper:document.getElementById("topBasket_drawer_tpl"),summary:document.getElementById("topBasket_summary_tpl")},this.handleEscape=this.handleEscape.bind(this),this.ensurePortal()}ensurePortal(){if(dmBasketPortal)return this.portalWrapper=dmBasketPortal,dmBasketPortal;if(!this.basketWrapper)return null;const t=this.basketWrapper.querySelector(".topBasket__overlay"),e=this.basketWrapper.querySelector(".topBasket__drawer"),i=this.basketWrapper.querySelector(".topBasket__associated_panel");
5if(!t&&!e&&!i)return null;const n=document.createElement("div");return n.className="topBasket topBasket__portal",document.body.appendChild(n),[t,e,i].forEach((t=>{t&&n.appendChild(t)})),dmBasketPortal=n,this.portalWrapper=n,n}toggleOpenClass(t){this.basketWrapper?.classList[t?"add":"remove"]("--open"),this.portalWrapper?.classList[t?"add":"remove"]("--open")}setSkeleton(t="add"){this.basketWrapper?.classList[t]("--skeleton")}getLangPrefix(){if(this.workingLangPrefix)return this.workingLangPrefix;const t=window.location.pathname.split("/").filter(Boolean)[0]||"";return/^[a-z]{2}(-[a-z]{2,5})?$/i.test(t)?`/${t}/`:"/"}async fetchData(t={}){const{data:e,link:i,linkParameter:n="",isForm:s=!1,method:o="POST"}=t;if(!e&&"GET"!==o)return!1;try{const t=await fetch(`${i||app_shop.urls.graphql||"/graphql/v1"}${n}`,{method:o,headers:s?void 0:{"Content-Type":"application/json",Accept:"application/json"},body:"GET"===o?void 0:e});if(!(t.headers.get("content-type")||"").includes("application/json"))return!0;const a=await t.json();return a}catch(t){return!1}}getAssociatedZone(){return app_shop.vars.associatedZone||"zone1"}getAssociatedPage(){return app_shop.vars.associatedPage||"projector"}async getAssociatedProducts(t){const e=JSON.stringify({query:`query {\n        associated: hotspots(hotspotsPanelParamsInput: { page: ${this.getAssociatedPage()}, zone: ${this.getAssociatedZone()}, products: [${t}] }) {\n          products {\n            id\n            name\n            link\n            icon\n            zones\n            sizes { id price { rebateCodeActive omnibusPriceDetails { omnibusPriceIsHigherThanSellingPrice newPriceEffectiveUntil { formatted } } } }\n            unit { sellBy }\n            price {\n              rebateCodeActive\n              price { ${this.priceType} { value formatted } }\n              omnibusPrice { ${this.priceType} { value formatted } }\n              omnibusPriceDetails {\n                unit { ${this.priceType} { value formatted } }\n                youSavePercent\n                omnibusPriceIsHigherThanSellingPrice\n                newPriceEffectiveUntil { formatted }\n              }\n              max { ${this.priceType} { value formatted } }\n              unit { ${this.priceType} { value formatted } }\n              youSavePercent\n              beforeRebate { ${this.priceType} { value formatted } }\n              beforeRebateDetails { youSavePercent unit { ${this.priceType} { value formatted } } }\n              suggested { ${this.priceType} { value formatted } }\n            }\n          }\n        }\n      }`});try{const t=await fetch(`${app_shop.urls.graphql}?hotspots`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:e}),i=await t.json();return i?.data?.associated?.products||[]}catch(t){return[]}}renderAssociatedSkeleton(t=3){return Array.from({length:t}).map((()=>'\n      <div class="associated__skeleton_card">\n        <div class="associated__skeleton_photo"></div>\n        <div class="associated__skeleton_line --w80"></div>\n        <div class="associated__skeleton_line --w40"></div>\n      </div>\n    ')).join("")}renameInjectedClasses(t){if(!t)return;const e=new Set(["basket__tip","basket__tip_content"]);[t,...t.querySelectorAll("*")].forEach((t=>{t.classList&&Array.from(t.classList).forEach((i=>{const n=TBCD_CLASS_RENAME_MAP[i];n&&(e.has(i)||t.classList.remove(i),t.classList.add(n))}))}))}bindAssociatedFavoriteButtons(t){t.querySelectorAll(".associated__favorite").forEach((t=>{t.addEventListener("click",(async e=>{if(e.preventDefault(),"function"!=typeof app_shop.fn.shoppingList?.addProductToList)return!1;app_shop.fn.shoppingList.addProductToList([[t.dataset.product,t.dataset.size]])}))}))}bindTipTooltips(t){t.querySelectorAll(".tbcd__tip").forEach((t=>{const e=t.nextElementSibling?.classList.contains("tbcd__tip_content")?t.nextElementSibling:t.parentElement?.querySelector(".tbcd__tip_content");e&&(t.addEventListener("mouseenter",(()=>e.classList.add("--visible"))),t.addEventListener("mouseleave",(()=>e.classList.remove("--visible"))),t.addEventListener("focus",(()=>e.classList.add("--visible"))),t.addEventListener("blur",(()=>e.classList.remove("--visible"))))}))}bindAssociatedAddButtons(t){t.querySelectorAll(".associated__add").forEach((t=>{t.addEventListener("click",(async e=>{if(e.preventDefault(),t.disabled)return!1;t.disabled=!0,t.classList.add("--loading");const i=new URLSearchParams({product:t.dataset.product,size:t.dataset.size,mode:"1",number:"1",change:"add"});if(!await this.fetchData({data:"noop",link:`/basketchange.php?${i.toString()}`,linkParameter:"",isForm:!0,method:"GET"}))return t.classList.remove("--loading"),t.disabled=!1,!1;t.classList.remove("--loading"),t.classList.add("--success"),await new Promise((t=>setTimeout(t,600))),await this.refreshEditableBasket()}))}))}getProductLabelHtml(t){let e="";const i=t.price;if(!i)return e;
5const n=!!i.omnibusPriceDetails,s=i.omnibusPriceDetails?.newPriceEffectiveUntil?.formatted,o=!(!app_shop.vars?.omnibus?.rebateCodeActivate||!i.rebateCodeActive),a=o?"":s,r=n&&!a,c=n||!!a;return o&&(e+=`<span class="label --code --omnibus">${this.txt?.["Kod rabatowy"]||"Kod rabatowy"}</span>`),r&&!o&&(e+=`<span class="label --promo --omnibus">${this.txt?.Promocja||"Promocja"}</span>`),c&&!o&&(e+=`<span class="label --bargain --omnibus">${this.txt?.Okazja||"Okazja"}</span>`),t.zones?.includes("subscription")&&(e+=`<span class="label --subscription">${this.txt?.Subskrypcja||"Subskrypcja"}</span>`),e}renderAssociatedCard(t){const e=t.sizes?.[0]?.id??"uniw",i=t.price?.price?.[this.priceType]?.formatted||"",n=t.price?.beforeRebate?.[this.priceType]?.formatted||t.price?.max?.[this.priceType]?.formatted||"",s=t.price?.omnibusPrice?.[this.priceType]?.formatted||"",o=n&&n!==i,a=s&&s!==i&&s!==n,r=this.getProductLabelHtml(t);return`\n      <div class="associated__card">\n        <div class="associated__photo_wrapper">\n          ${r?`<strong class="label_icons">${r}</strong>`:""}\n          <a class="associated__photo" href="${t.link}">\n            <img src="${t.icon}" alt="${t.name}" loading="lazy" />\n          </a>\n          <button type="button" class="associated__favorite" data-product="${t.id}" data-size="${e}" aria-label="${this.txt?.["Dodaj do ulubionych"]||"Dodaj do ulubionych"}">\n            <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n              <path d="M12 21C12 21 4 14.5 4 9.5C4 6.5 6.5 4 9.5 4C11 4 12 5 12 5C12 5 13 4 14.5 4C17.5 4 20 6.5 20 9.5C20 14.5 12 21 12 21Z" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>\n            </svg>\n          </button>\n        </div>\n        <div class="associated__name"><a href="${t.link}">${t.name}</a></div>\n        <div class="associated__prices">\n          <span class="associated__price_current${o?" --discounted":""}">${i}</span>\n          ${o?`<span class="associated__price_old">${n}</span>`:""}\n        </div>\n        ${a?`<div class="associated__omnibus">${this.txt?.["Najniższa cena z 30 dni"]}: ${s}</div>`:""}\n        <button type="button" class="associated__add" data-product="${t.id}" data-size="${e}">\n          <span class="associated__add_label">${this.txt?.["Dodaj do koszyka"]}</span>\n          <span class="associated__add_spinner"></span>
5\n          <svg class="associated__add_check" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n            <path d="M4 12L9 17L20 6" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>\n          </svg>\n        </button>\n      </div>\n    `}async loadAssociatedPanel(t){const e=this.portalWrapper?.querySelector(".topBasket__associated_panel"),i=this.portalWrapper?.querySelector(".topBasket__associated_panel_list");if(!e||!i)return!1;const n=Array.from(t.querySelectorAll(".tbcd__block.--product[data-product-id]")),s=new Set(n.map((t=>t.getAttribute("data-product-id"))));if(!n.length)return e.classList.add("--hide"),!1;i.children.length>0?i.classList.add("--updating"):(e.classList.remove("--hide"),i.innerHTML=this.renderAssociatedSkeleton(4));const o=await Promise.all(n.map((t=>{const e=t.getAttribute("data-product-id");return app_shop.vars.dmDrawerAssociatedCache.cache[e]?Promise.resolve(app_shop.vars.dmDrawerAssociatedCache.cache[e]):this.getAssociatedProducts(e).then((t=>(app_shop.vars.dmDrawerAssociatedCache.cache[e]=t,t)))}))),a=new Set,r=[];if(o.flat().forEach((t=>{t?.id&&(a.has(t.id)||s.has(String(t.id))||(a.add(t.id),r.push(t)))})),i.classList.remove("--updating"),!r.length)return i.innerHTML="",e.classList.add("--hide"),!1;e.classList.remove("--hide"),i.innerHTML=r.map((t=>this.renderAssociatedCard(t))).join(""),this.bindAssociatedAddButtons(i),this.bindAssociatedFavoriteButtons(i)}renderEmptyBasket(){const t=this.portalWrapper?.querySelector(".topBasket__products"),e=this.portalWrapper?.querySelector(".topBasket__summary"),i=app_shop?.urls?.home||"/";t&&(t.innerHTML=`\n        <div class="topBasket__empty">\n          <p class="topBasket__empty_text">${this.txt?.["Koszyk jest pusty"]}</p>\n        </div>\n      `),e&&(e.innerHTML=`\n        <a class="topBasket__checkout" href="${i}">${this.txt?.["Rozpocznij zakupy"]}</a>\n      `)}setWorth(t){const e=this.basketWrapper?.querySelector(".topBasket__price"),i=this.basketWrapper?.querySelector(".badge");return!(!e||!t)&&(e.innerHTML="",e.insertAdjacentHTML("afterbegin",t),!!i&&(i.innerHTML="",void i.insertAdjacentHTML("afterbegin",this?.productsCount??"")))}getLeftWorthToShippingFreePercent(t){return 100*this.worthValue/t+"%"}setShippingLimit(t){const e=t.querySelector(".topBasket__summary_shipping_free"),i=e?.querySelector(".topBasket__summary_value"),n=e?.querySelector(".progress_bar__value"),s=this.basketData?.summaryBasket?.shippingLimitFree?.value||"",o=this.basketData?.summaryBasket?.toShippingFree?.formatted||"";if(!s||0===this?.shippingCost)return e?.classList?.add("--hide"),!1;const a=this.getLeftWorthToShippingFreePercent(s);if(i?.insertAdjacentHTML("beforeend",o),s>70)return e?.querySelector(".progress_bar")?.classList?.add?.("--hide"),!1;n&&(n.style.width=a)}getBasketSummary(){const t=this.templates.summary?.content.cloneNode(!0);if(!t)return document.createElement("div");const e=t?.querySelector(".topBasket__summary_item.--worth"),i=e?.querySelector(".topBasket__summary_value");this.worth=this.basketData?.summaryBasket?.worth?.[this.priceType]?.formatted,this.worthValue=this.basketData?.summaryBasket?.worth?.[this.priceType]?.value,this.worth||e?.classList.add("--hide"),i?.insertAdjacentHTML("afterbegin",this.worth||""),this.setWorth(this.worth);const n=t?.querySelector(".topBasket__summary_item.--shipping"),s=n?.querySelector(".topBasket__summary_value");this.shippingCost=this.basketData?.summaryBasket?.shipping?.cost?.gross?.value,this.shippingCostFormatted=this.basketData?.summaryBasket?.shipping?.cost?.gross?.formatted;const o=0===this.shippingCost?`${this?.txt?.gratis}!`:`+ ${this.shippingCostFormatted}`;s?.insertAdjacentHTML("beforeend",o||""),0===this.shippingCost&&n?.classList.add("--free"),this.setShippingLimit(t);const a=t?.querySelector(".topBasket__checkout");return a?.setAttribute("href",`${this.getLangPrefix()}place-order.html`),t}getDrawerWrapper(){const t=this.templates.wrapper?.content.cloneNode(!0);if(!t)return document.createElement("div");const e=t?.querySelector(".topBasket__count");e&&e.insertAdjacentHTML("afterbegin",this.productsCount);const i=this.getBasketSummary(),n=t.querySelector(".topBasket__summary");return i&&n&&n?.appendChild(i),t}setHtml(){const t=this.getDrawerWrapper(),e=this.portalWrapper?.querySelector(this.basketClass);if(!t||!e||!this.portalWrapper)return!1;this.portalWrapper.replaceChild(t,e)}syncQuantityDisplay(t){t.querySelectorAll(".tbcd__buy.tbcd__quantity_select").forEach((t=>{const e=t.querySelector(".tbcd__number"),i=e?.options[e.selectedIndex];t.classList.toggle("--more",!!i?.hasAttribute("data-more"))}))}async loadDrawerContent(){try{const[t,e]=await Promise.all([this.fetchData({data:this.queries.BASKET(),linkParameter:"?query=basket"}),this.fetchBasketFormHtml()]);if(this.basketData=t?.data?.basket,this.productsCount=this.basketData?.summaryBasket?.productsCount||0,this.setSkeleton("remove"),this.setHtml(),this.productsCount){const t=this.portalWrapper?.querySelector(".topBasket__products");t&&e&&(t.appendChild(e),this.bindBasketFormEvents(e))}else this.renderEmptyBasket();requestAnimationFrame((()=>{this.portalWrapper?.querySelector(this.basketClass)?.classList.add("--loaded")}))}catch(t){this.setSkeleton("remove")}}async fetchBasketFormHtml(){const t=this.getLangPrefix(),e="/"===t?["/"]:[t,"/"];"/"===t&&e.push("/pl/");for(const t of e)try{const e=await fetch(`${t}basketedit.html?mode=1&t=${Date.now()}`,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(!e.ok)continue;const i=await e.text(),n=new DOMParser,s=n.parseFromString(i,"text/html").querySelector(".basket__form");if(s)return this.workingLangPrefix=t,this.renameInjectedClasses(s),s}catch(t){}return null}bindBasketFormEvents(t){if(!t)return!1;this.syncQuantityDisplay(t),t.addEventListener("submit",(t=>t.preventDefault())),t.querySelectorAll(".tbcd__number").forEach((e=>{e.addEventListener("change",(()=>{const i=e.closest(".tbcd__buy.tbcd__quantity_select"),n=i?.querySelector(".tbcd__more_input"),s=e.options[e.selectedIndex];if(s?.hasAttribute("data-more"))return i?.classList.add("--more"),void(n&&(n.value="",n.focus()));i?.classList.remove("--more"),n&&(n.value=e.value,n.setAttribute("data-prev",e.value)),this.submitBasketForm(t)}))}
5)),t.querySelectorAll(".tbcd__more_input").forEach((e=>{e.addEventListener("keydown",(t=>{"Enter"===t.key&&(t.preventDefault(),e.blur())})),e.addEventListener("change",(()=>{""!==e.value&&e.value!==e.getAttribute("data-prev")&&(e.setAttribute("data-prev",e.value),this.submitBasketForm(t))}))})),t.querySelectorAll(".tbcd__remove").forEach((t=>{t.addEventListener("click",(async e=>{e.preventDefault();const i=t.getAttribute("data-href");if(!i)return!1;this.portalWrapper?.querySelector(this.basketClass)?.classList.add("--busy"),this.portalWrapper?.querySelector(".topBasket__products")?.classList.add("--updating"),await this.fetchData({data:"noop",link:i,linkParameter:"",isForm:!0,method:"GET"}),await this.refreshEditableBasket(),this.portalWrapper?.querySelector(this.basketClass)?.classList.remove("--busy")}))})),this.loadAssociatedPanel(t),this.bindTipTooltips(t)}async submitBasketForm(t){this.portalWrapper?.querySelector(this.basketClass)?.classList.add("--busy"),this.portalWrapper?.querySelector(".topBasket__products")?.classList.add("--updating");const e=new FormData(t);await this.fetchData({data:e,link:t.getAttribute("action"),linkParameter:"",isForm:!0}),await this.refreshEditableBasket(),this.portalWrapper?.querySelector(this.basketClass)?.classList.remove("--busy")}async refreshSummaryOnly(){this.basketData=await this.fetchData({data:this.queries.BASKET(),linkParameter:"?query=basket"}),this.basketData=this.basketData?.data?.basket,this.productsCount=this.basketData?.summaryBasket?.productsCount||0,this.setWorth(this.basketData?.summaryBasket?.worth?.[this.priceType]?.formatted);const t=this.portalWrapper?.querySelector(".topBasket__count");if(t&&(t.innerHTML="",t.insertAdjacentHTML("afterbegin",this.productsCount)),!this.productsCount)return void this.renderEmptyBasket();const e=this.portalWrapper?.querySelector(".topBasket__summary");e&&(e.innerHTML="",e.appendChild(this.getBasketSummary()))}async refreshEditableBasket(){const[t]=await Promise.all([this.fetchBasketFormHtml(),this.refreshSummaryOnly()]);if(!this.productsCount)return;const e=this.portalWrapper?.querySelector(".topBasket__products");e&&t&&(e.innerHTML="",e.appendChild(t),this.bindBasketFormEvents(t)),e?.classList.remove("--updating")}lockScroll(t=!0){document.documentElement.classList.toggle("--basket-drawer-open",t),document.body.classList.toggle("--basket-drawer-open",t)}handleEscape(t){"Escape"===t.key&&this.closeDrawer()}ensureDrawerLoaded(){return this.loadPromise||(this.loadPromise=this.loadDrawerContent().finally((()=>{this.loadPromise=null}))),this.loadPromise}async openDrawer(){this.toggleOpenClass(!0),this.basketWrapper?.querySelector(".topBasket__sub")?.setAttribute("aria-expanded","true"),this.lockScroll(!0),document.addEventListener("keydown",this.handleEscape);const t=this.portalWrapper?.querySelector(".topBasket__products"),e=t?.querySelector(".tbcd__form");this.dataLoaded&&e?this.portalWrapper?.querySelector(this.basketClass)?.classList.add("--loaded"):(this.setSkeleton("add"),await this.ensureDrawerLoaded(),this.dataLoaded=!0)}closeDrawer(){this.toggleOpenClass(!1),this.basketWrapper?.querySelector(".topBasket__sub")?.setAttribute("aria-expanded","false"),this.lockScroll(!1),document.removeEventListener("keydown",this.handleEscape)}toggleDrawer(){this.basketWrapper?.classList.contains("--open")?this.closeDrawer():this.openDrawer()}async warmDrawer(){this.dataLoaded||this.basketWrapper?.classList.contains("--open")||(await this.ensureDrawerLoaded(),this.dataLoaded=!0)}}app_shop.fn.menu_basket_cache=function(){const t=document.getElementById("menu_basket");t&&(iaiGet?.data?.Basket&&iaiGet.reInit?iaiGet.reInit(["Basket"]):iaiGet.basket((e=>{t.classList.remove("--skeleton");const{Basket:{response:{basket:i}={}}={}}=e||{};if(!i)return;app_shop.vars.basket=i;const{products:n=[],user:s={}}=i;app_shop.vars.user=s,t.classList.toggle("--hide",!n.length);const o=t.querySelector(".topBasket__price");if(o){const{worth_net_formatted:t,worth_formatted:e}=i;o.innerHTML="net"===app_shop.vars.priceType?t:e}const a=t.querySelector(".badge");if(a){const{productsCounter:t=0}=i;a.innerHTML=t>0?t:""}const r=t.querySelector("#shipppingCost");if(r){const{shippingCost_net_formatted:t,shippingCost_formatted:e}=i;r.innerHTML="net"===app_shop.vars.priceType?t:e}const c=document.getElementById("freeShipping");if(c){const{toShippingFree:t}=i;c.classList.toggle("--active",0===+t)}if(app_shop.fn.topBasketDrawer){const t=app_shop.fn.topBasketDrawer,e=i.productsCounter??0;t.lastKnownCount!==e&&(t.lastKnownCount=e,t.dataLoaded=!1,t.warmDrawer())}"function"==typeof app_shop.fn.afterBasketCallback&&app_shop.fn.afterBasketCallback(i)})))};const menu_basket_cache=app_shop.fn.menu_basket_cache;app_shop.run((()=>{app_shop.fn.menu_basket_cache(),app_shop.fn.topBasketDrawer=new DmTopBasketDrawer;const t=app_shop.fn.topBasketDrawer.basketWrapper,e=t?.querySelector(".topBasket__sub");e?.addEventListener("click",(t=>{/\/basketedit\.html/i.test(window.location.pathname)||(t.preventDefault(),app_shop.fn.topBasketDrawer.toggleDrawer())})),e?.addEventListener("mouseenter",(()=>{app_shop.fn.topBasketDrawer.warmDrawer()})),document.addEventListener("click",(t=>{t.target.closest(".topBasket__overlay")&&app_shop.fn.topBasketDrawer.closeDrawer(),t.target.closest(".topBasket__drawer_close")&&app_shop.fn.topBasketDrawer.closeDrawer()})),document.addEventListener("touchmove",(t=>{t.target.closest(".topBasket__overlay")&&t.preventDefault()}),{passive:!1});const i=()=>app_shop.fn.topBasketDrawer.warmDrawer();"requestIdleCallback"in window?requestIdleCallback(i,{timeout:3e3}):setTimeout(i,1500)}),"all","#menu_basket",!0);var submenuWidth="200",dlmenu_showmore="1",dlmenu_shownumber="10",dlmenu_columnHeight="320",dlmenu_columnConcat="1",dlmenu_padding="30",dlmenu_columns="5",dlmenu_wide="true";function moveMenuToSearchBlock(){const t=document.getElementById("menu_categories"),e=d
5ocument.querySelector(".menu_search__block");window.innerWidth<756&&t&&e&&!e.contains(t)?e.appendChild(t):window.innerWidth>=756&&t&&e&&e.contains(t)}let resizeTimeout;app_shop.fn.isTouchEnabled=()=>!window.matchMedia("(pointer:fine)").matches,document.documentElement.classList.toggle("no-touch",!app_shop.fn.isTouchEnabled()),document.documentElement.classList.toggle("touch",app_shop.fn.isTouchEnabled()),app_shop.fn.checkOverflow=()=>{if(document.querySelectorAll(".nvabar-nav .--overflow").forEach((t=>t.classList.remove("--overflow"))),app_shop.vars.view<3)return;const t=document.documentElement.clientWidth;document.querySelectorAll(".navbar-nav > .nav-item").forEach((e=>{const i=t-e.getBoundingClientRect().left+window.scrollX;if(i<parseInt(submenuWidth,10)&&e.classList.add("--overflow"),i<2*parseInt(submenuWidth,10)){const t=e.querySelector(".navbar-subnav");if(!t)return;t.classList.add("--overflow")}}))},app_shop.fn.desktopTouchMenu=t=>{const{target:e}=t,i=e.closest(".nav-link");if(!i)return;const n=i.nextElementSibling;if(!n)return;document.querySelectorAll(".nav-item ul").forEach((t=>{t!==n&&t.classList.remove("active")}));document.querySelector("#menu_categories.wide")&&!n.classList.contains("navbar-subnav")||n.classList.contains("active")||(dlmenu_wide&&(app_shop.fn.concatColumns(n),app_shop.fn.setPositionMenu(n)),n.classList.add("active"),t.preventDefault())},app_shop.fn.mobileMenuNav=t=>{const{target:e}=t;if(app_shop.vars.view>
52&&e.closest(".noevent"))return;const i=e.closest(".nav-link");if(!i)return;if(!i.nextElementSibling)return;const n=i.closest(".nav-item");n&&(t.preventDefault(),n.classList.toggle("nav-open"))},app_shop.fn.mobileMenuBack=t=>{t.preventDefault();const{target:e}=t,i=e.closest(".nav-open");i&&i.classList.remove("nav-open")},app_shop.fn.moveSearchToAsideMenu=()=>{const t=document.getElementById("menu_search");if(!t)return;const e=document.querySelector('aside .setMobileGrid[data-item="#menu_navbar"]');if(!e)return;if(document.documentElement.classList.contains("sidebar_open")){const i=document.createElement("del");return i.classList.add("handler"),i.dataset.item="#menu_search",i.style.display="none",t.before(i),void e.before(t)}const i=document.querySelector('header .handler[data-item="#menu_search"]');i&&(i.before(t),i.remove())},app_shop.fn.showHideAsideMenu=()=>{document.documentElement.classList.contains("filters_open")||document.documentElement.classList.toggle("sidebar_open"),document.documentElement.classList.remove("filters_open"),app_shop.fn.setMobileCategories?.(),app_shop.fn.moveSearchToAsideMenu(),document.querySelectorAll(".nav-open").forEach((t=>t.classList.remove("nav-open")))},app_shop.fn.extendNavItems=t=>{t.preventDefault();const{target:e}=t,i=e.closest(".nav-link");if(!i)return;const n=i.textContent;i.textContent=i.getAttribute("txt_alt"),i.setAttribute("txt_alt",n);const s=i.closest("ul");s?.classList.toggle("show");const o=i.closest(".navbar-subnav");o?.classList.add("active")},app_shop.fn.concatColumns=t=>{if(!dlmenu_columnConcat)return;const e=()=>{t.querySelectorAll(".nav-merge").forEach((t=>{Array.from(t.children).forEach((e=>t.parentNode.insertBefore(e,t))),t.remove()}));let e=document.createElement("li");e.classList.add("nav-item","nav-merge");let i=parseInt(dlmenu_columnHeight,10);t.querySelectorAll("& > .nav-item:not(.nav-merge)").forEach((t=>{const{nextElementSibling:n}=t,s=t.offsetHeight,o=n?.offsetHeight||0;if(t.classList.contains("--all")&&(i=0),s<i&&o+s<i)return t.after(e),e.append(t),void(i-=s);s<i&&(t.after(e),e.append(t),i=parseInt(dlmenu_columnHeight,10),e=document.createElement("li"),e.classList.add("nav-item","nav-merge"))}))},i=t.querySelectorAll("img");if(0===i.length)return void requestAnimationFrame(e);const n=Array.from(i).map((t=>t.complete?Promise.resolve():new Promise((e=>{t.addEventListener("load",e,{once:!0}),t.addEventListener("error",e,{once:!0})}))));Promise.all(n).then((()=>{requestAnimationFrame(e)}))},app_shop.fn.setPositionMenu=t=>{const e=document.querySelector("#menu_categories");if(!e)return;const i=e.offsetWidth-dlmenu_padding,n=t.querySelectorAll("& > .nav-item:not(.--all)").length;if(t.classList.add(`--cols${n}`),n<dlmenu_columns&&window.screen.width>=1200||n<dlmenu_columns-1&&window.screen.width<1200){const e=t.offsetWidth,{offsetLeft:n}=t.parentElement,s=n<0?0:n,o=i-(e+s);let a=s- -1*o;a=o>0?s:a,t.style.setProperty("left",`${a}px`)}},app_shop.fn.initNavbarNameHover=()=>{const t=document.querySelector("#menu_navbar .navbar-name"),e=document.querySelector("#menu_navbar .navbar-nav"),i=t?.querySelector(".arrow");if(document.body.classList.contains("homepage")||document.body.classList.contains("main_page"))return;if(!t||!e)return;let n;const s=()=>{clearTimeout(n),e.style.opacity="1",e.style.visibility="visible",e.style.transform="translateY(0) scaleY(1)",e.style.pointerEvents="auto",e.style.transitionDelay="0s",i&&(i.style.transform="rotate(180deg)")},o=()=>{n=setTimeout((()=>{e.style.opacity="",e.style.visibility="",e.style.transform="",e.style.pointerEvents="",e.style.transitionDelay="",i&&(i.style.transform="")}),300)};app_shop.fn.isTouchEnabled()||(t.addEventListener("mouseenter",s),t.addEventListener("mouseleave",(t=>{t.relatedTarget&&e.contains(t.relatedTarget)||o()})),e.addEventListener("mouseenter",(()=>clearTimeout(n))),e.addEventListener("mouseleave",(e=>{e.relatedTarget&&t.contains(e.relatedTarget)||o()}))),t.addEventListener("click",(t=>{t.stopPropagation();"1"===e.style.opacity?o():s()})),document.addEventListener("click",(i=>{t.contains(i.target)||e.contains(i.target)||o()}))},app_shop.run((()=>{document.addEventListener("click",(t=>{const{target:e}=t;
5e.closest(".navbar-toggler")?app_shop.fn.showHideAsideMenu():e.closest("aside .navbar-collapse .nav-link")?app_shop.fn.mobileMenuNav(t):e.closest("aside .nav-header__backLink")?app_shop.fn.mobileMenuBack(t):e.closest("#menu_categories .nav-item.--extend")?app_shop.fn.extendNavItems(t):!document.documentElement.classList.contains("sidebar_open")&&!document.documentElement.classList.contains("filters_open")||e.closest("aside")?!e.classList.contains("nav-link")&&document.querySelector("html.touch")&&document.querySelectorAll(".nav-item ul").forEach((function(t){t.classList.remove("active")})):app_shop.fn.showHideAsideMenu()}));const t=app_shop?.vars?.isIos?"touchstart":"click";document.addEventListener(t,(t=>{const{target:e}=t;e.closest(".touch header .navbar-collapse .nav-link")&&app_shop.fn.desktopTouchMenu(t)})),document.querySelectorAll(".navbar-subnav").forEach((t=>{t.addEventListener("mouseover",(()=>{document.querySelectorAll(".navbar-subnav").forEach((t=>{t.classList.remove("active")}))}))})),dlmenu_wide&&(document.querySelectorAll(".no-touch .navbar-nav > .nav-item > .nav-link").forEach((t=>{t.addEventListener("mouseover",(t=>{const{target:e}=t,{nextElementSibling:i}=e,{visited:n}=e.dataset;i&&i?.classList.contains("navbar-subnav")&&(n||(app_shop.fn.concatColumns(i),app_shop.fn.setPositionMenu(i)),e.dataset.visited=!0)}))})),app_shop.fn.initNavbarNameHover())}),"all","#menu_categories"),app_shop.run((()=>{app_shop.vars.view>2&&(document.documentElement.classList.remove("sidebar_open","filters_open"),app_shop.fn.moveSearchToAsideMenu()),dlmenu_wide||app_shop.fn.checkOverflow()}),[1,2,3,4],"#menu_categories"),app_shop.run((function(){document.querySelectorAll("#menu_categories .nav-gfx.nav-hover").forEach((t=>{t.addEventListener("mouseover",(()=>{const e=t.offsetWidth,i=t.offsetHeight;t.style.cssText=`width: ${e}px; height: ${i}px; margin-bottom: 15px;`,t.classList.add("--hover")})),t.closest(".nav-item")?.addEventListener?.("mouseleave",(()=>{t.style.cssText="",t.classList.remove("--hover")}))}))}),"all","#menu_categories .nav-gfx.nav-hover"),app_shop.run((function(){document.querySelectorAll("#menu_categories .nav-gfx.nav-hover").forEach((t=>{t.style.cssText=""}))}),[1,2,3,4],"#menu_categories .nav-gfx.nav-hover"),app_shop.run((()=>{moveMenuToSearchBlock()}),"all","#menu_categories"),window.addEventListener("resize",(()=>{clearTimeout(resizeTimeout),resizeTimeout=setTimeout(moveMenuToSearchBlock,150)})),window.addEventListener("resize",moveMenuToSearchBlock);var submenuWidth="200",dlmenu_showmore="1",dlmenu_shownumber="10",dlmenu_columnHeight="320",dlmenu_columnConcat="1",dlmenu_padding="30",dlmenu_columns="5",dlmenu_wide="true";app_shop.fn.isTouchEnabled=()=>!window.matchMedia("(pointer:fine)").matches,document.documentElement.classList.toggle("no-touch",!app_shop.fn.isTouchEnabled()),document.documentElement.classList.toggle("touch",app_shop.fn.isTouchEnabled()),app_shop.fn.checkOverflow=()=>{if(document.querySelectorAll(".nvabar-nav .--overflow").forEach((t=>t.classList.remove("--overflow"))),app_shop.vars.view<3)return;const t=document.documentElement.clientWidth;document.querySelectorAll(".navbar-nav > .nav-item").forEach((e=>{const i=t-e.getBoundingClientRect().left+window.scrollX;if(i<parseInt(submenuWidth,10)&&e.classList.add("--overflow"),i<2*parseInt(submenuWidth,10)){const t=e.querySelector(".navbar-subnav");if(!t)return;t.classList.add("--overflow")}}))},app_shop.fn.desktopTouchMenu=t=>{const{target:e}=t,i=e.closest(".nav-link");if(!i)return;const n=i.closest(".nav-item")?.querySelector(":scope > ul");if(!n)return;document.querySelectorAll(".nav-item ul").forEach((t=>{t!==n&&t.classList.remove("active")}));document.querySelector("#menu_categories3.wide")&&!n.classList.contains("navbar-subnav")||n.classList.contains("active")||(dlmenu_wide&&(app_shop.fn.concatColumns(n),app_shop.fn.setPositionMenu(n)),n.classList.add("active"),t.preventDefault())},app_shop.fn.extendNavItems=t=>{t.preventDefault();const{target:e}=t,i=e.closest(".nav-link");if(!i)return;const n=i.textContent;i.textContent=i.getAttribute("txt_alt"),i.setAttribute("txt_alt",n);
5const s=i.closest("ul");s?.classList.toggle("show");const o=i.closest(".navbar-subnav");o?.classList.add("active")},app_shop.fn.concatColumns=t=>{if(!dlmenu_columnConcat)return;let e=document.createElement("li");e.classList.add("nav-item","nav-merge");let i=parseInt(dlmenu_columnHeight,10);t.querySelectorAll("& > .nav-item").forEach((t=>{const{nextElementSibling:n}=t,s=t.offsetHeight,o=n?.offsetHeight;if(t.classList.contains("--all")&&(i=0),s<i&&o+s<i)return t.after(e),e.append(t),void(i-=s);s<i&&(t.after(e),e.append(t),i=parseInt(dlmenu_columnHeight,10),e=document.createElement("li"),e.classList.add("nav-item","nav-merge"))}))},app_shop.fn.setPositionMenu=t=>{const e=document.querySelector("#menu_categories3");if(!e)return;const i=e.offsetWidth-dlmenu_padding,n=t.querySelectorAll("& > .nav-item:not(.--all)").length;if(t.classList.add(`--cols${n}`),n<dlmenu_columns&&window.screen.width>1200||n<dlmenu_columns-1&&window.screen.width<1200){const e=t.offsetWidth,{offsetLeft:n}=t.parentElement,s=n<0?0:n,o=i-(e+s);let a=s- -1*o;a=o>0?s:a,t.style.setProperty("left",`${a}px`)}},app_shop.run((()=>{document.addEventListener("click",(t=>{const{target:e}=t;e.closest("#menu_categories3 .nav-item.--extend")&&app_shop.fn.extendNavItems(t)}));const t=app_shop?.vars?.isIos?"touchstart":"click";document.addEventListener(t,(t=>{const{target:e}=t;e.closest(".touch header .navbar-collapse .nav-link")&&app_shop.fn.desktopTouchMenu(t)})),document.querySelectorAll("#menu_categories3 .navbar-subnav").forEach((t=>{t.addEventListener("mouseover",(()=>{document.querySelectorAll("#menu_categories3 .navbar-subnav").forEach((t=>{t.classList.remove("active")}))}))})),dlmenu_wide&&document.querySelectorAll(".no-touch .navbar-nav .nav-link.--l1").forEach((t=>{t.addEventListener("mouseover",(t=>{const{target:e}=t;app_shop.fn.initWideMenu(e)}))}))}),"all","#menu_categories"),app_shop.fn.initWideMenu=t=>{if(!dlmenu_wide)return;
5const e=t.closest(".nav-item")?.querySelector(":scope > ul"),{visited:i}=t.dataset;e&&e?.classList.contains("navbar-subnav")&&(i||(app_shop.fn.concatColumns(e),app_shop.fn.setPositionMenu(e)),t.dataset.visited=!0)},app_shop.run((()=>{document.documentElement.addEventListener("click",(t=>{const{target:e}=t;e.closest(".nav-link-expand")&&(e.closest(".nav-item")?.classList.toggle("--hover"),app_shop.fn.initWideMenu(e))})),document.querySelectorAll(".nav-link, .nav-link-expand").forEach((t=>{t.addEventListener("focus",(t=>{const{target:e}=t;e.closest("ul")?.querySelectorAll(":scope > .nav-item.--hover")?.forEach((t=>t.classList.remove("--hover")))})),t.addEventListener("mouseover",(()=>{document.querySelectorAll(".nav-item.--hover").forEach((t=>t.classList.remove("--hover")))}))}))}),"all",".nav-link-expand"),app_shop.run((()=>{dlmenu_wide||app_shop.fn.checkOverflow()}),[1,2,3,4],"#menu_categories3"),app_shop.run((function(){document.querySelectorAll("#menu_categories3 .nav-gfx.nav-hover").forEach((t=>{t.addEventListener("mouseover",(e=>{const i=`${t.offsetHeight}px`;t.style.width=`${t.offsetWidth}px`,t.style.height=i,t.classList.add("--hover")})),t.closest(".nav-item")?.addEventListener?.("mouseleave",(()=>{t.style.width="",t.style.height="",t.classList.remove("--hover")}))}))}),"all","#menu_categories3 .nav-gfx.nav-hover"),app_shop.run((function(){document.querySelectorAll("#menu_categories3 .nav-gfx.nav-hover").forEach((t=>{t.style.width="",t.style.height=""}))}),[1,2,3,4],"#menu_categories3 .nav-gfx.nav-hover"),document.querySelectorAll("header #menu_categories3 .nav-link.--l1").forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.cssText="position:absolute;inset:-2px;width:calc(100% + 4px);height:calc(100% + 4px);pointer-events:none;overflow:visible;";const i=document.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("x","2"),i.setAttribute("y","2"),i.setAttribute("rx","10"),i.setAttribute("ry","10"),i.style.cssText="fill:none;stroke:#222;stroke-width:2;stroke-linecap:round;",e.appendChild(i),t.style.position="relative",t.appendChild(e),t.addEventListener("mouseenter",(()=>{const n=i.getTotalLength(),s=.22*n;i.style.strokeDasharray=`${s} ${n-s}`,i.style.strokeDashoffset="0",i.style.transition="none";let o=null;const a=e=>{o||(o=e);const s=(e-o)/1200;i.style.strokeDashoffset=-s*n,t._animFrame=requestAnimationFrame(a)};cancelAnimationFrame(t._animFrame),t._animFrame=requestAnimationFrame(a),e.style.opacity="1"})),t.addEventListener("mouseleave",(()=>{cancelAnimationFrame(t._animFrame),e.style.opacity="0"})),e.style.opacity="0",e.style.transition="opacity 0.3s"})),app_shop.run((()=>{const t=document.querySelector(".slm_lists");if(!t)return;document.querySelectorAll(".slm_lists__label").forEach((e=>{e.addEventListener("click",(()=>{t.classList.toggle("--active")}))}))}),"all",".slm_lists__label");const excludeFromMove=["#menu_contact"];function simple_tooltip(t,e,i){return this.tipHandle="",this.pushSelectors=()=>{app_shop.vars.simpleTooltipOptions.push({targetItems:t,tooltipId:e,onLeft:i})},this.getTooltipOptions=t=>app_shop.vars.simpleTooltipOptions.find((e=>t.closest(e.targetItems))),this.getTooltipContent=(t,e)=>{if(!t.closest(e))return!1;const i=t.closest(e);if(i.nextElementSibling?.classList.contains("tooltipContent"))return i.nextElementSibling.innerHTML.trim();if(i.title){const{title:t}=i;return i.dataset.title=t,i.removeAttribute("title"),t.trim()}return!!i.dataset.title&&i.dataset.title.trim()},this.createTooltip=(t,e)=>{document.getElementById(t)&&document.getElementById(t).remove();const i=document.createElement("div");return i.style.display="block",i.className=t,i.id=t,i.innerHTML=`<p>${e}</p>`,i.addEventListener("mouseenter",(()=>clearTimeout(this.tipHandle))),i.addEventListener("mouseleave",(()=>i.remove())),document.body.appendChild(i),i},this.setTooltipPosition=(t,e)=>{const n=window.scrollY,s=window.innerWidth,o=15;let a=0,r=0;i||!1?(a=t.pageX-e.offsetWidth-o<=0?t.pageX+o:t.pageX-o-e.offsetWidth,r=n+30>=t.pageY-e.offsetHeight?n+o:t.pageY-e.offsetHeight-o):(a=s-30>=e.offsetWidth+t.pageX?t.pageX+o:s-e.offsetWidth-o,r=n+30>=t.pageY-e.offsetHeight?n+o:t.pageY-e.offsetHeight-o),e.style.left=`${a}px`,e.style.top=`${r}px`},this.onMouseMove=t=>{const{target:e}=t,i=this.getTooltipOptions(e);if(!i)return;const n=this.getTooltipContent(e,i.targetItems);if(!n)return;const s=this.createTooltip(i.tooltipId,n);this.setTooltipPosition(t,s)},this.onMouseOut=t=>{const{target:e}=t,i=this.getTooltipOptions(e);if(!i)return;const n=document.getElementById(i.tooltipId);n&&(this.tipHandle=setTimeout((()=>{n.remove()}),500))},this.onTouchStart=t=>{const{target:e}=t;this.getTooltipOptions(e)||app_shop.vars.simpleTooltipOptions.forEach((t=>{const i=document.getElementById(t.tooltipId);i&&(e.closest(`#${t.tooltipId}`)||i.remove())}
5))},this.initEvents=()=>{document.documentElement.classList.contains("--tooltip-initiated")||(document.documentElement.classList.add("--tooltip-initiated"),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseout",this.onMouseOut),document.addEventListener("touchstart",this.onTouchStart))},this.init=()=>{this.pushSelectors(),this.initEvents()},this.init()}function calculate_instalments(params){let{minPrice:minPrice,maxPrice:maxPrice,totalPrice:totalPrice,link:link,instalmentName:instalmentName,priceType:priceType}=params;"object"!=typeof params&&null!==params&&([minPrice,maxPrice,totalPrice,,link,,instalmentName,,priceType]=arguments),minPrice=parseFloat(minPrice,10)||!1;const minPriceFormat=!!minPrice&&`${format_price(minPrice,{mask:app_shop.vars.currency_format,currency:instalmentData.currency,currency_space:app_shop.vars.currency_space,currency_before_price:app_shop.vars.currency_before_value})}${priceType&&"net"===priceType?app_shop.txt.instalmentNet:""}`;maxPrice=parseFloat(maxPrice,10)||!1;const maxPriceFormat=!!maxPrice&&`${format_price(maxPrice,{mask:app_shop.vars.currency_format,currency:instalmentData.currency,currency_space:app_shop.vars.currency_space,currency_before_price:app_shop.vars.currency_before_value})}${priceType&&"net"===priceType?app_shop.txt.instalmentNet:""}`;totalPrice=parseFloat(totalPrice,10)||!1,link=link||!1,instalmentName=instalmentName||!1,priceType=priceType||!1;let productsPrice="";productsPrice=priceType&&"net"===priceType?document.getElementById("projector_number")?instalmentData.priceNet*document.getElementById("projector_number").value:instalmentData.priceNet:document.getElementById("projector_number")?instalmentData.price*document.getElementById("projector_number").value:instalmentData.price;const productsPriceFormat=`${format_price(productsPrice,{mask:app_shop.vars.currency_format,currency:instalmentData.currency,currency_space:app_shop.vars.currency_space,currency_before_price:app_shop.vars.currency_before_value})}${priceType&&"net"===priceType?app_shop.txt.instalmentNet:""}`;if(link&&-1!==link.indexOf("{calculate_price}")&&(link=link.replace("{calculate_price}","XXX")),0===productsPrice)return eval(link),!1;if(0===instalmentData.basketCount&&(!minPrice&&!maxPrice||minPrice&&productsPrice>=minPrice&&maxPrice&&productsPrice<=maxPrice))return eval(link.replace("XXX",productsPrice)),!1;let infoHTML="";minPrice&&productsPrice<minPrice?infoHTML=`\n      <div class='menu_messages_message'>\n        <div class='menu_messages_message_sub'>\n          <p>${app_shop.txt.instalmentLabelMin}${instalmentName}${app_shop.txt.instalmentLabelTo}${minPriceFormat}</p>\n        </div>\n      </div>\n    `:maxPrice&&productsPrice>maxPrice&&(infoHTML=`\n      <div class='menu_messages_message'>\n        <div class='menu_messages_message_sub'>\n          <p>${app_shop.txt.instalmentLabelMax}${instalmentName}${app_shop.txt.instalmentLabelTo}${maxPriceFormat}</p>\n        </div>\n      </div>\n    `);let sumPrice=0;sumPrice=totalPrice?(totalPrice+productsPrice).toFixed(2):((priceType&&"net"===priceType?instalmentData.basketCostNet:instalmentData.basketCost)+productsPrice).toFixed(2);const sumPriceFormat=`${format_price(sumPrice,{mask:app_shop.vars.currency_format,currency:instalmentData.currency,currency_space:app_shop.vars.currency_space,currency_before_price:app_shop.vars.currency_before_value})}${priceType&&"net"===priceType?app_shop.txt.instalmentNet:""}`;let buttonHTML="";if(document.querySelector("#container.projector_page")&&(buttonHTML=`\n      <button class="instalment_calculator__button ${minPrice&&productsPrice<minPrice||maxPrice&&productsPrice>maxPrice?app_shop.txt.instalmentButtonDisableClassDialog:app_shop.txt.instalmentButtonClassDialog}"${minPrice&&productsPrice<minPrice||maxPrice&&productsPrice>maxPrice?"":` onclick="${link.replace("XXX",productsPrice)}"`}>\n        <span class="instalment_calculator__button_txt">${app_shop.txt.instalmentSingleProduct}</span>\n        <span class="instalment_calculator__button_price">${productsPriceFormat}</span>\n        ${minPrice&&productsPrice<minPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMin}</span>`:""}\n        ${maxPrice&&productsPrice>maxPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMax}</span>`:""}\n      </button>\n    `,0!==instalmentData.basketCount&&(buttonHTML+=`\n        <button class="instalment_calculator__button ${minPrice&&sumPrice<minPrice||maxPrice&&sumPrice>maxPrice?app_shop.txt.instalmentButtonDisableClassDialog:app_shop.txt.instalmentButtonClassDialog}"${minPrice&&sumPrice<minPrice||maxPrice&&sumPrice>maxPrice?"":` onclick="${link.replace("XXX",sumPrice)}"`}>
5\n          <span class="instalment_calculator__button_txt">${app_shop.txt.instalmentBasketProduct}</span>\n          <span class="instalment_calculator__button_price">${sumPriceFormat}</span>\n          ${minPrice&&sumPrice<minPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMinBasket}</span>`:""}\n          ${maxPrice&&sumPrice>maxPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMaxBasket}</span>`:""}\n        </button>\n      `)),document.querySelector("#container.basketedit_page")){if(minPrice&&productsPrice>=minPrice&&maxPrice&&productsPrice<=maxPrice)return eval(link.replace("XXX",productsPrice)),!1;buttonHTML=`\n      <button class="instalment_calculator__button ${minPrice&&productsPrice<minPrice||maxPrice&&productsPrice>maxPrice?app_shop.txt.instalmentButtonDisableClassDialog:app_shop.txt.instalmentButtonClassDialog}"${minPrice&&productsPrice<minPrice||maxPrice&&productsPrice>maxPrice?"":` onclick="${link.replace("XXX",productsPrice)}"`}>\n        <span class="instalment_calculator__button_txt">${app_shop.txt.instalmentMultiProduct}</span>\n        <span class="instalment_calculator__button_price">${productsPriceFormat}</span>\n        ${minPrice&&productsPrice<minPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMinB}</span>`:""}\n        ${maxPrice&&productsPrice>maxPrice?`<span class="instalment_calculator__button_info">${app_shop.txt.instalmentTextMaxB}</span>`:""}\n      </button>\n    `}Modal({html:infoHTML+buttonHTML,classList:"instalment_calculator"})}function initFaq(){document.querySelectorAll(".faq-question").forEach((function(t){t.addEventListener("click",(function(){this.parentElement.classList.toggle("active")}))}))}function waitForFaq(){document.querySelector(".faq-question")?initFaq():setTimeout(waitForFaq,3e5)}app_shop.fn.setGrid=()=>{switch(app_shop.vars.view){case 4:case 3:document.querySelectorAll(".domHandler").forEach((t=>{const e=t.dataset.item,i=document.querySelector(e);i&&(excludeFromMove.includes(e)?i.classList.contains("--clone")&&i.remove():t.after(i),t.remove())}));break;case 2:case 1:if(document.querySelector(".domHandler"))return;document.querySelectorAll(".setMobileGrid").forEach((t=>{const e=t.dataset.item,i=document.querySelector(e);if(!i||t.querySelectorAll(e).length>0)return;const n=document.createElement("del");if(n.classList.add("domHandler"),n.dataset.item=e,n.style.display="none",i.before(n),excludeFromMove.includes(e)){const e=i.cloneNode(!0);e.classList.add("--clone"),t.append(e)}else t.append(i)}))}},app_shop.fn.setMobileCategories=function(){const t=document.querySelector("#mobileCategories");t&&(t.classList.contains("--inited")||(t.classList.add("--inited"),(()=>{const t=document.querySelector("#mobileCategories");document.querySelector("aside")?.prepend(t),t.addEventListener("click",(t=>{const{target:e}=t;e.closest(".mobileCategories__link")&&(t.preventDefault(),(()=>{const t=document.querySelector("aside");document.querySelectorAll(".mobileCategories__link").forEach((e=>{e.classList.remove("--active"),t?.querySelectorAll(e.dataset.ids.split(",")).forEach((t=>{t.style.display="none",t.classList.remove("--active")}))}))})(),(t=>{const e=document.querySelector("aside");t.classList.add("--active"),e?.querySelectorAll(t.dataset.ids.split(",")).forEach((t=>{t.style.display="",t.classList.add("--active")}))})(e.closest(".mobileCategories__link")))}))})()),t.querySelector(".mobileCategories__link")?.click())},app_shop.run((()=>{document.querySelectorAll('.footer_links_sub a[data-gfx-enabled="true"]').forEach((t=>{t.addEventListener("mouseover",(t=>{const e=t.target.closest('a[data-gfx-enabled="true"]').querySelector("img");if(!e)return;const{onmouseover:i}=e.dataset;i&&(e.dataset.tmp=e.src,e.src=i)})),t.addEventListener("mouseout",(t=>{const e=t.target.closest('a[data-gfx-enabled="true"]').querySelector("img");if(!e)return;const{tmp:i}=e.dataset;i&&(e.src=i,delete e.dataset.tmp)}))}))}),"all",'.footer_links_sub a[data-gfx-enabled="true"]'),app_shop.run((()=>{document.querySelectorAll(".footer_tab__header").forEach((t=>{t.addEventListener("click",(e=>{if("true"===t.getAttribute("data-hide-arrow"))return;const i=t.getAttribute("aria-controls"),n=document.getElementById(i),s="true"===t.getAttribute("aria-expanded");app_shop.vars.view<2&&(e.preventDefault(),t.setAttribute("aria-expanded",!s),t.setAttribute("data-previous-state",!s),n.setAttribute("aria-hidden",s))}))}))}),"all",".footer_tab__header, .footer_links_sub"),app_shop.run((()=>{document.querySelectorAll("#footer_links [aria-hidden]").forEach((t=>{if(1===app_shop.vars.view&&!t.hasAttribute("data-previous-state")){const e=t.getAttribute("aria-hidden");t.setAttribute("data-previous-state",e)}const e=t.getAttribute("data-previous-state");t.setAttribute("aria-hidden",e??!0)}))}),[1,2,3,4],".footer_tab__header, .footer_links_sub"),app_shop.run((()=>{const t=document.querySelector("#manageCookies");t?.addEventListener("click",(()=>{"function"==typeof prepareCookiesConfiguration&&prepareCookiesConfiguration()}))}),"all","#manageCookies"),document.addEventListener("DOMContentLoaded",(function(){const t=window.location.pathname.match(/^\/(pl|cs|en|de|sk)-/),e={pl:"pl-PL",cs:"cs-CS",en:"en-EN",de:"de-DE",sk:"sk-SK"}[t?t[1]:"pl"]||"pl-PL",i={68:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/zakupy-hurtowe-w-sklepie-dmtrade-pl-68","cs-CS":"https://www.dmtrade.pl/cs-CS/about/velkoobchodni-nakupy-v-obchode-dmtrade-pl-68","en-EN":"https://www.dmtrade.pl/e
5n-EN/about/wholesale-shopping-at-dmtrade-pl-store-68","de-DE":"https://www.dmtrade.pl/de-DE/about/grosshandelseinkauf-im-dmtrade-pl-shop-68","sk-SK":"https://www.dmtrade.pl/sk-SK/about/velkoobchodne-nakupy-v-obchode-dmtrade-pl-68"},66:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/zautomatyzuj-rozwoj-swojego-sklepu-dzieki-plikom-xml-json-csv-i-xls-66","cs-CS":"https://www.dmtrade.pl/cs-CS/about/zautomatizujte-rozvoj-sveho-obchodu-diky-souborum-xml-json-csv-a-xls-66","en-EN":"https://www.dmtrade.pl/en-EN/about/automate-your-stores-development-with-xml-json-csv-and-xls-files-66","de-DE":"https://www.dmtrade.pl/de-DE/about/automatisieren-sie-die-entwicklung-ihres-shops-mit-xml-json-csv-und-xls-dateien-66","sk-SK":"https://www.dmtrade.pl/sk-SK/about/zautomatizujte-rozvoj-svojho-obchodu-vdaka-suborom-xml-json-csv-a-xls-66"},65:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/produkty-oem-twoja-marka-na-globalnym-rynku-65","cs-CS":"https://www.dmtrade.pl/cs-CS/about/oem-produkty-vase-znacka-na-globalnim-trhu-65","en-EN":"https://www.dmtrade.pl/en-EN/about/oem-products-your-brand-on-the-global-market-65","de-DE":"https://www.dmtrade.pl/de-DE/about/oem-produkte-ihre-marke-auf-dem-globalen-markt-65","sk-SK":"https://www.dmtrade.pl/sk-SK/about/oem-produkty-vasa-znacka-na-globalnom-trhu-65"},67:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/wprowadz-swoje-produkty-na-polski-rynek-z-naszym-zespolem-67","cs-CS":"https://www.dmtrade.pl/cs-CS/about/uvedte-sve-produkty-na-polsky-trh-s-nasim-tymem-67","en-EN":"https://www.dmtrade.pl/en-EN/about/introduce-your-products-to-the-polish-market-with-our-team-67","de-DE":"https://www.dmtrade.pl/de-DE/about/fuhren-sie-ihre-produkte-mit-unserem-team-auf-dem-polnischen-markt-ein-67","sk-SK":"https://www.dmtrade.pl/sk-SK/about/uvedte-svoje-produkty-na-polsky-trh-s-nasim-timom-67"},69:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/sklad-celny-w-polsce-wieksza-kontrola-nizsze-koszty-latwiejszy-start-w-ue-69","cs-CS":"https://www.dmtrade.pl/cs-CS/about/celni-sklad-v-polsku-vetsi-kontrola-nizsi-naklady-snadnejsi-start-v-eu-69","en-EN":"https://www.dmtrade.pl/en-EN/about/customs-warehouse-in-poland-greater-control-lower-costs-easier-start-in-the-eu-69","de-DE":"https://www.dmtrade.pl/de-DE/about/zolllager-in-polen-mehr-kontrolle-geringere-kosten-einfacherer-start-in-der-eu-69","sk-SK":"https://www.dmtrade.pl/sk-SK/about/colny-sklad-v-polsku-vacsia-kontrola-nizsie-naklady-jednoduchsi-start-v-eu-69"},70:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/fulfillment-70","cs-CS":"https://www.dmtrade.pl/cs-CS/about/fulfillment-70","en-EN":"https://www.dmtrade.pl/en-EN/about/fulfillment-70","de-DE":"https://www.dmtrade.pl/de-DE/about/fulfillment-70","sk-SK":"https://www.dmtrade.pl/sk-SK/about/fulfillment-70"},62:{"pl-PL":"https://www.dmtrade.pl/pl-PL/about/o-nas-62","cs-CS":"https://www.dmtrade.pl/cs-PL/about/o-nas-62","en-EN":"https://www.dmtrade.pl/en-PL/about/about-us-62","de-DE":"https://www.dmtrade.pl/de-PL/about/uber-uns-62","sk-SK":"https://www.dmtrade.pl/sk-PL/about/o-nas-62"}};function n(t){document.querySelectorAll(t+" a[href]").forEach((function(t){const n=t.getAttribute("href").match(/-(\d+)(?:\.html)?$/);if(!n)return;const s=parseInt(n[1],10);i[s]&&i[s][e]&&t.setAttribute("href",i[s][e])}))}n("#menu_account"),n("#menu_regulations")})),document.addEventListener("click",(function(t){var e=t.target.closest(".shop-switch__btn");if(e){var i=e.closest(".shop-switch");if(i){var n=e.getAttribute("data-target");if(n){var s=e.classList.contains("shop-switch__btn--b2c")?"b2c":"b2b";if(i.getAttribute("data-active")!==s){i.setAttribute("data-active",s);var o=i.querySelector(".shop-switch__thumb"),a=!1,r=function(){a||(a=!0,window.location.href=n)};o&&o.addEventListener("transitionend",r,{once:!0}),setTimeout(r,400)}else window.location.href=n}}}})),app_shop.run((()=>{simple_tooltip(".showTip","n59581_tooltip_dictionary"),simple_tooltip("#contentcolumn_order1 .showTip_order1","n59581_tooltip"),simple_tooltip("#basketedit_gifts .showTip_gift","n59581_tooltip"),simple_tooltip("#basketedit_productslist .showTip_basket","n59581_tooltip"),simple_tooltip("span.btn_note","n59581_instalment_note")}),"all","body"),app_shop.vars.simpleTooltipOptions=[],app_shop.txt.instalmentLabel="",app_shop.txt.instalmentSingleProduct="Calculate instalments only for this product",app_shop.txt.instalmentMultiProduct="Calculate instalments for selected products",app_shop.txt.instalmentBasketProduct="Calculate instalments including the amount from the cart",app_shop.txt.instalmentNoTall="Not all of the products in the cart are allowed to be paid with this instalment system. Go to the details of every product to find out if it can be purchased this way. If you decide to pay by instalments, the payment for unallowed products will have to be made with other payment methods.",app_shop.txt.instalmentTooMany="There are too many products in the cart to pay for this order by instalments. Decrease the products quantity to ",app_shop.txt.instalmentTooMany2=" to be able to use the instalment system. The units of a single product are not limited.",app_shop.txt.instalmentLabelTo=" is ",app_shop.txt.instalmentLabelMinBasket="You cannot run the instalments simulation for a cart content, because the minimum sum that allows for purchase made by ",app_shop.txt.instalmentTextMin="Increase the product quantity to run the instalments calculator.",app_shop.txt.instalmentTextMinBasket="Increase the product quantity or place additional products in a cart.",app_shop.txt.instalmentTextMinB="Increase the product quantity in a cart, to run the instalments calculator.",app_shop.txt.instalmentLabelMax="You cannot run the instalments simulation, because the maximum sum that allows for purchase made by ",app_shop.txt.instalmentLabelMaxBasket="You cannot run the instalments simulation for a cart content, because the maximum sum that allows for purchase made by ",app_shop.txt.instalmentTextMax="Decrease the product quantity to run the instalments calculator.",app_shop.txt.instalmentTextMaxBasket="Decrease the product quantity or remove some products from a cart.",app_shop.txt.instalmentTextMaxB="Decrease the product quantity in a cart, to run the instalments calculator.",app_shop.txt.instalmentLabelMin="You cannot run the instalments simulation for this product, because the minimum sum that allows for purchase made by ",app_shop.txt.instalmentButtonClassDialog="btn --solid --medium",app_shop.txt.instalmentButtonDisableClassDialog="btn --solid --secondary --medium --disabled",app_shop.txt.instalmentNet=" net",app_shop.run((function(){Modal({element:document.getElementById("menu_notice")})}),"all","#menu_notice"),app_shop.run((()=>{iaiGet.snippets((t=>{const{Snippets:{response:{items:e={}}={}}={}}=t||{};e&&Object.values(e).forEach((t=>{const{region:e,content:i}=t||{};if(!e||!i)return;const n=document.createElement("div");n.innerHTML=i;const s=[...n.childNodes];switch(e){case"head":s.forEach((t=>{if("SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,document.head.append(e)}else document.head.append(t)}));break;
5case"body_top":s.forEach((t=>{if("SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,document.body?.prepend(e)}else document.body?.prepend(t)}));break;default:s.forEach((t=>{if("SCRIPT"===t.tagName){const e=document.createElement("script");e.text=t.innerHTML,document.body?.append(e)}else document.body?.append(t)}))}}))}),{mobile:1===app_shop.vars.view,tablet:2===app_shop.vars.view,pc:app_shop.vars.view>2,request_uri:app_shop.vars.requestUri,additional_ajax:app_shop.vars.additionalAjax}),iaiGet.toplayersAndWidgets((t=>{const{ToplayersAndWidgets:{response:{items:e={}}={}}={}}=t||{};e&&Object.entries(e).forEach((([t,e])=>{if("script"===t){const t=document.createElement("script");return t.text=e,void document.body?.append(t)}const{content:i}=e||{};if(!i)return;const n=document.createElement("div");n.innerHTML=i;const s=[...n.getElementsByTagName("script")];s.forEach((t=>t.remove())),document.body?.append(...n.childNodes),s.forEach((t=>{const e=document.createElement("script");t.src?e.src=t.src:e.textContent=t.textContent,document.body?.append(e)}))}))}),{mobile:1===app_shop.vars.view,tablet:2===app_shop.vars.view,pc:app_shop.vars.view>2,request_uri:app_shop.vars.requestUri,additional_ajax:app_shop.vars.additionalAjax})}),"all","body"),appModules.installModule("Slider","/gfx/eng/menu_slider_core.js.gzip?r=1791375757"),app_shop.vars.sliderConfig={debugSlider:app_shop?.vars?.customSliderConfig?.debugSlider??!1,sliderList:[]},app_shop.vars.utils={debugFlag:app_shop.vars.sliderConfig.debugSlider,debug(t,e,...i){if(!app_shop.vars.utils.debugFlag)return;const[,,n,s,...o]=(new Error)?.stack?.match(/(:[\d]+)/gim)??[];if(!n||!s)return;n.replace(":",""),s.replace(":","")}},appModules.installModule("SwiperCore","/gfx/eng/menu_slider_modules_1.js.gzip?r=1791375757"),appModules.installModule("SwiperControlls","/gfx/eng/menu_slider_modules_2.js.gzip?r=1791375757"),appModules.installModule("SwiperEffects","/gfx/eng/menu_slider_modules_3.js.gzip?r=1791375757"),appModules.installModule("SwiperNavigation","/gfx/eng/menu_slider_modules_4.js.gzip?r=1791375757"),appModules.installModule("SwiperUtils","/gfx/eng/menu_slider_modules_5.js.gzip?r=1791375757"),app_shop.run((()=>{const t=document.querySelector("header");if(!t)return;const e=document.querySelector(".breadcrumbs");t.append(e)}),[3,4],".breadcrumbs"),app_shop.run((()=>{const t=document.getElementById("layout");if(!t)return;const e=document.querySelector(".breadcrumbs");t.prepend(e)}),[1,2],".breadcrumbs"),app_shop.run((()=>{document.querySelector(".breadcrumbs #back_button").addEventListener("click",(t=>{t.preventDefault(),window.history.back()}))}),"all",".breadcrumbs #back_button"),app_shop.run((function(){simple_tooltip(".order_process_security.show_tip","n59581_tooltip")}),"all",".order_process_security.show_tip"),$(".progress_bar_1.active").size()?$("div.progress_bar_keeper").addClass("progress_bar_1_active"):$(".progress_bar_2.active").size()?$("div.progress_bar_keeper").addClass("progress_bar_2_active"):$(".progress_bar_3.active").size()?$("div.progress_bar_keeper").addClass("progress_bar_3_active"):$(".progress_bar_4.active").size()&&$("div.progress_bar_keeper").addClass("progress_bar_4_active"),app_shop.run((()=>{new FormValidation({formSelector:".newsletter__form"}).init()}),"all","#menu_newsletter"),document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector(".basket__tools"),e=document.querySelector(".summary_wrapper");t&&e&&e.parentNode&&e.parentNode.insertBefore(t,e.nextSibling)})),waitForFaq(),function t(e){e>120||(window.BLOG_AUTHORS&&"loading"!==document.readyState?function(){const t=window.BLOG_AUTHORS||{},e=document.querySelector(".blog-item_sub");if(!e)return;const i=e.innerHTML,n=i.match(/\{author=(\d+)\}/i);if(!n)return;const s=t[parseInt(n[1])];if(!s)return;e.innerHTML=i.replace(n[0],"");const o=document.createElement("div");o.className="blog-author-card",o.innerHTML=`\n      ${s.photo?`<img class="blog-author-card__photo" src="${s.photo}" alt="${s.name}">`:""}\n      <div class="blog-author-card__info">\n        <strong class="blog-author-card__name">${s.name}</strong>\n        ${s.title?`<span class="blog-author-card__title">${s.title}</span>`:""}\n        ${s.bio?`<p class="blog-author-card__bio">${s.bio}</p>`:""}\n      </div>\n    `;const a=document.querySelector(".blog_date");a?a.insertAdjacentElement("afterend",o):e.parentNode.insertBefore(o,e)}():setTimeout((function(){t(e+1)}),50))}(0),function(){const t={pl:"Spis treści",de:"Inhaltsverzeichnis",en:"Table of contents",cs:"Obsah",sk:"Obsah",fr:"Table des matières",it:"Indice",hu:"Tartalomjegyzék",ro:"Cuprins",lt:"Turinys"};function e(){const e=document.querySelector(".blog-item_sub");if(!e)return;const i=e.querySelectorAll("h2");if(i.length<2)return;const n=t[function(){const e=window.location.pathname.match(/^\/([a-z]{2})\//);if(e&&t[e[1]])return e[1];const i=(document.documentElement.lang||"pl").slice(0,2).toLowerCase();return t[i]?i:"pl"}()],s=[];
5i.forEach((function(t,e){const i="toc-section-"+e;t.id=i,s.push({id:i,text:t.textContent.trim()})}));const o=document.createElement("div");o.className="blog-toc",o.innerHTML=`\n      <div class="blog-toc__title">${n}</div>\n      <ul class="blog-toc__list">\n        ${s.map(((t,e)=>`\n          <li class="blog-toc__item">\n            <a class="blog-toc__link" href="#${t.id}">\n              <span class="blog-toc__num">${e+1}.</span>\n              ${t.text}\n            </a>\n          </li>\n        `)).join("")}\n      </ul>\n    `,o.querySelectorAll(".blog-toc__link").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();const e=document.getElementById(this.getAttribute("href").slice(1));e&&e.scrollIntoView({behavior:"smooth",block:"start"})}))}));const a=e.querySelector("h2");a&&a.parentNode.insertBefore(o,a)}!function t(i){i>60||("loading"!==document.readyState?(e(),function(){try{const t=document.querySelector("#kat8-video"),e=document.querySelector(".kat8_play");if(t){t.muted=!0,t.defaultMuted=!0,t.setAttribute("muted",""),t.autoplay=!0,t.playsInline=!0,t.setAttribute("playsinline","");let i=0,n=8,s=!1;const o=()=>{if(s)return;const a=t.play();a&&"function"==typeof a.then&&a.then((()=>{s=!0,e&&(e.hidden=!0)})).catch((()=>{++i<n?setTimeout(o,400):e&&(e.hidden=!1)}))};if(o(),"IntersectionObserver"in window){const e=new IntersectionObserver((t=>{t[0]?.isIntersecting&&(o(),e.disconnect())}),{threshold:.1});e.observe(t)}["click","scroll","touchstart"].forEach((e=>{const i=()=>{t.paused&&o(),window.removeEventListener(e,i)};window.addEventListener(e,i,{passive:!0})})),e&&e.addEventListener("click",(()=>{t.muted=!1,t.setAttribute("controls","controls"),t.play().catch((()=>{})),e.remove()}))}}catch(t){}}()):setTimeout((function(){t(i+1)}),50))}(0)}(),window.addEventListener("load",(function(){if(window.location.href.includes("client-new.html?register")){const e=document.getElementById("content"),i=document.getElementById("client_new_social"),n=document.getElementById("client_new_form");function t(){const t=window.innerWidth;e&&(e.style.display="grid",e.style.gap="28px",t<=1e3?(e.style.gridTemplateColumns="1fr",e.style.justifyItems="center"):(e.style.gridTemplateColumns="1fr 1fr",e.style.justifyContent="space-between"),i&&(i.style.width="100%"),n&&(n.style.width="100%"))}t(),window.addEventListener("resize",t)}}));var client_new_social_info_js_txt_1="Sign in using one of the login methods listed below to finish registration.";app_shop.run((function(){$("#button_alert div").html(client_new_social_info_js_txt_1),$("#submit_register").removeAttr("onclick").click((function(){return $("#button_alert").show(),!1})),$("#submit_register").hover((function(){}),(function(){$("#button_alert").hide()})),$("#client_new_social li strong").on("click",(function(){$("#client_new_social form").not($("#social_networking_"+$(this).attr("data-service"))).hide(),$("#social_networking_"+$(this).attr("data-service")).toggle()})),$("#client_new_social form").on("submit",(function(){return window.location="/"+$(this).attr("action")+"?"+$(this).serialize(),!1}))}),"all","#client_new_social"),app_shop.run((()=>{app_shop.vars.topSpacer=70}),1,".client-new_page"),app_shop.run((()=>{app_shop.vars.topSpacer=90}),2,".client-new_page"),app_shop.run((()=>{app_shop.vars.topSpacer=10}),[3,4],".client-new_page");const clientFormTxt={txt00:"This email address is already registered: ",txt01:"I remember my login and password and I can provide them.",txt02:"Create new account using this address (not recommended).",txt03:"Send e-mail which will allow for automatic login",txt06:"Send a message to the address",txt07:"with details necessary to sign in .",txt08:"<br/>Earlier-created account has been merged with the account",txt13:"We suggest using this account what will allow you to benefit from the privileges available only to our regular customers. To sign in to an earlier-created account just click on a link which we can send to you.",txt14:"Valid postal code formats for the indicated country are [X - numeric character, Y - alphabetic character]:",txt15:"characters).",txt16:"Mandatory field.",txt16a:'<i class="icon-visibility"></i> Show password',txt16b:'<i class="icon-novisibility"></i> Hide password',txt17:"Enter street or city name.",txt18:"Invalid format."};var clientNewErrorCode=[];clientNewErrorCode.no_login="Enter your login here.",clientNewErrorCode.incorect_login="Incorrect login. Login must have a minimum of 3, and a maximum of 40 characters. You can use letters, numbers and symbols @ . - _.",clientNewErrorCode.no_password="Enter your password here.",clientNewErrorCode.password_to_short="The entered password is too short. Enter a longer one (at least 6 characters).",clientNewErrorCode.password_to_long="The password is too long. Enter a shorter one 
5(maximum length is 15 characters).",clientNewErrorCode.login_equals_password="Password is the same as login. Enter another password.",clientNewErrorCode.not_equal_passwords="The passwords you entered are not the same. Please re-enter the password in both fields.",clientNewErrorCode.no_firstname="Enter your name.",clientNewErrorCode.no_name="Enter your surname.",clientNewErrorCode.incorect_email="Incorrectly typed e-mail address. Enter the full e-mail address, e.g. [email protected]",clientNewErrorCode.incorect_shops="Select a shop from the list.",clientNewErrorCode.incorect_nip="Incorrectly typed VAT Number.",clientNewErrorCode.no_firmname="Incorrectly typed company name.",clientNewErrorCode.incorrect_region="Incorrectly selected area.",clientNewErrorCode.no_city="Enter the city name.",clientNewErrorCode.birth_date="Enter your birth date in the YYYY-MM-DD format",clientNewErrorCode.no_street="Enter street or city name.",clientNewErrorCode.no_street_number="Enter street or city name.",clientNewErrorCode.incorect_phone="Enter your phone number.",clientNewErrorCode.incorect_zipcode="Incorrectly typed postal code.",clientNewErrorCode.no_delivery_firstname="Enter the name of a recipient.",clientNewErrorCode.no_delivery_lastname="Enter the surname of a recipient.",clientNewErrorCode.no_delivery_city="Enter a recipient\'s city.",clientNewErrorCode.no_delivery_street="Enter recipient\'s street name and a property number.",clientNewErrorCode.incorect_delivery_region="Select a recipient\'s country.",clientNewErrorCode.incorect_delivery_zipcode="Enter a recipient\'s postal code.",clientNewErrorCode.login_taken="The given login is already taken",clientNewErrorCode.used_login="The given login is already taken",clientNewErrorCode.login_taken_login_propose="The given login is already taken.<br/><br/>Suggested login: ",clientNewErrorCode.illegal_characters_client_firstname="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_lastname="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_street="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_city="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_phone="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_phone2="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_firm="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_firstname="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_lastname="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_city="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_additional="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_street="One of the characters is invalid.",clientNewErrorCode.illegal_characters_delivery_phone="One of the characters is invalid.",clientNewErrorCode.illegal_characters_client_nip="One of the characters is invalid.",clientNewErrorCode.password_to_short="The entered password is too short. Enter a longer one (at least",clientNewErrorCode.password_to_long="The password is too long. Enter a shorter one (maximum length is",clientNewErrorCode.no_invoice_firstname="Wpisz imię klienta.",clientNewErrorCode.no_invoice_lastname="Wpisz nazwisko klienta.",clientNewErrorCode.no_invoice_firmname="Wpisz nazwę firmy klienta.",clientNewErrorCode.incorect_invoice_phone="Wpisz telefon klienta.",clientNewErrorCode.no_invoice_city="Wpisz miasto klienta.",clientNewErrorCode.no_invoice_street="Wpisz ulicę i numer domu klienta.",clientNewErrorCode.no_invoice_street_number="Wpisz ulicę i numer domu klienta.",clientNewErrorCode.incorect_invoice_zipcode="Wpisz kod pocztowy klienta.",clientNewErrorCode.invalid_format="Invalid format.",clientNewErrorCode.no_street_number_uk="The property number is missing.",clientNewErrorCode.no_street_number="Enter the house no..",clientFormOptions={streetnumber:'"1"'},document.addEventListener("DOMContentLoaded",(function(){if(window.location.href.includes("client-new.html")){const t=document.getElementById("content");t&&(t.style.display="grid",t.style.gridTemplateColumns="1fr 1fr")}})),function(){function t(t){return new Promise((function(e,i){var n=document.createElement("textarea");n.value=t,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px",n.style.top="0",document.body.appendChild(n),n.select(),n.setSelectionRange(0,t.length);try{document.execCommand("copy")?e():i()}catch(t){i(t)}document.body.removeChild(n)}))}function e(){var t=document.querySelector(".contact-copy-toast");t&&(t.classList.add("is-visible"),window.clearTimeout(window.contactCopyToastTimer),window.contactCopyToastTimer=window.setTimeout((function(){t.classList.remove("is-visible")}),1800))}document.addEventListener("click",(function(i){var n=i.target.closest(".
5js-copy-account");if(n){var s=n.getAttribute("data-copy");s&&function(e){return navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).catch((function(){return t(e)})):t(e)}(s).then(e).catch((function(){}))}}))}(),window.addEventListener("load",(()=>{setTimeout((()=>{const t=document.getElementById("catalogFrame");t.src=t.src}),800)})),document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("catalogFrame");t&&(t.setAttribute("allowfullscreen",""),t.setAttribute("allow","fullscreen"))})),window.customNavigationBlocks=window.customNavigationBlocks||{},void 0===window.customBlocksAdded&&(window.customBlocksAdded=!1),window.addCustomNavigationBlocks=function(){if(window.customBlocksAdded)return;const t=document.querySelector(".navigation_items");if(!t)return;const e=t.querySelectorAll(".navigation_item--custom");e.length>0&&e.forEach((function(t){t.remove()}));const i=window.customNavigationBlocks;if(!i||0===Object.keys(i).length)return;let n=null;const s=window.location.pathname.match(/kategoria[_-](\d+)/);if(s&&(n=s[1]),!n){const t=document.querySelector(".navigation_item[data-ni]");t&&(n=t.getAttribute("data-ni"))}if(!n){const t=document.querySelector('meta[name="category-ni"]');t&&(n=t.getAttribute("content"))}if(!n){const t=document.body.className.match(/category[_-](\d+)/);t&&(n=t[1])}if(!n||!i[n])return;i[n].forEach((function(e){if(!(e.image&&e.title&&e.link&&e.position))return;const i=document.createElement("div");i.className="navigation_item navigation_item--custom",i.innerHTML='<a class="navigation_link" href="'+e.link+'" title="'+e.title+'"><div class="navigation_img d-flex justify-content-start align-items-left"><img src="'+e.image+'" alt="'+e.title+'" title="'+e.title+'"></div><span class="name">'+e.title+"</span></a>";const n=t.querySelectorAll(".navigation_item:not(.navigation_item--custom)"),s=e.position-1;s>=n.length?t.appendChild(i):t.insertBefore(i,n[s])})),window.customBlocksAdded=!0},function(){function t(t,e){return t?t.querySelector(e):null}function e(t,e){return t?t.querySelectorAll(e):[]}const i=new WeakSet;function n(){const n=document.getElementById("kat_scope");if(n){try{e(n,".kat_slider").forEach((n=>{if(!n)return;if(i.has(n)||"1"===n.dataset.katInited)return;i.add(n),n.dataset.katInited="1";const s=t(n,".slides");if(!s)return;const o=Array.from(s.children||[]);if(!o.length)return;let a=t(n,".dots");a?e(a,"button").forEach((t=>t.remove())):(a=document.createElement("div"),a.className="dots",n.appendChild(a));let r=0,c=null;const l=parseInt(n.dataset.autoplay||"0",10)||0;function u(){s.style.transform=`translateX(${100*-r}%)`,e(a,"button").forEach(((t,e)=>t.classList.toggle("active",e===r)))}function d(t,e=!1){r=(t+o.length)%o.length,u(),e&&l&&(p(),h())}function h(){l&&(p(),c=setInterval((()=>{n.matches(":hover")||d(r+1)}),l))}function p(){c&&(clearInterval(c),c=null)}o.forEach(((t,e)=>{const i=document.createElement("button");i.type="button",i.setAttribute("aria-label",`Slajd ${e+1}`),i.addEventListener("click",(()=>d(e,!0))),a.appendChild(i)})),n.hasAttribute("tabindex")||(n.tabIndex=0),n.addEventListener("keydown",(t=>{"ArrowRight"===t.key?(t.preventDefault(),d(r+1,!0)):"ArrowLeft"===t.key&&(t.preventDefault(),d(r-1,!0))}));let m=null;n.addEventListener("pointerdown",(t=>{m=t.clientX}),{passive:!0}),n.addEventListener("pointerup",(t=>{if(null==m)return;const e=t.clientX-m;Math.abs(e)>40&&d(r+(e<0?1:-1),!0),m=null})),u(),h(),document.addEventListener("visibilitychange",(()=>{document.hidden||(p(),h())}))}))}catch(a){}try{let r=!1;function s(e){if(!e||r)return;r=!0;const i=t(n,".kat8_play")||document.querySelector(".kat8_play");e.muted=!0,e.autoplay=!0,e.playsInline=!0,e.setAttribute("playsinline",""),e.loop=!0,e.preload||(e.preload="auto");let s=0;const o=()=>{const t=e.play();t&&"function"==typeof t.then&&t.then((()=>{i&&(i.hidden=!0)})).catch((()=>{++s<10?setTimeout(o,400):i&&(i.hidden=!1)}))};if(o(),"IntersectionObserver"in window){new IntersectionObserver((t=>{t[0]?.isIntersecting&&e.paused&&o()}),{threshold:.1}).observe(e)}["click","scroll","touchstart"].forEach((t=>{const i=()=>{e.paused&&o(),window.removeEventListener(t,i)};window.addEventListener(t,i,{passive:!0})}
5)),i&&i.addEventListener("click",(()=>{e.muted=!1,e.setAttribute("controls","controls"),e.play().catch((()=>{})),i.remove()}))}const c=t(n,"#kat8-video")||document.getElementById("kat8-video");if(c)s(c);else{let l=0;const u=setInterval((()=>{const t=document.getElementById("kat8-video");if(t)return clearInterval(u),void s(t);l+=300,l>2e4&&clearInterval(u)}),300),d=new MutationObserver((()=>{const t=document.getElementById("kat8-video");t&&(s(t),d.disconnect(),clearInterval(u))}));d.observe(document.body,{childList:!0,subtree:!0})}}catch(h){}try{const p=t(n,".kat7_scroller");if(p){const m=t(p,".kat7_grid"),_=t(p,".kat7_track")||m;if(_){const f=t(p,".kat7_arrow.prev"),g=t(p,".kat7_arrow.next"),y=e(m||_,".kat7_item");if(y.length>7){p.classList.add("is-carousel"),f&&(f.hidden=!1),g&&(g.hidden=!1);const v=()=>{const t=_.clientWidth||0,e=y[0]?.getBoundingClientRect?.().width||250;return Math.max(.9*t,e)},b=()=>{const t=_.scrollLeft||0,e=(_.scrollWidth||0)-(_.clientWidth||0);f&&(f.disabled=t<=2),g&&(g.disabled=t>=e-2)};f&&f.addEventListener("click",(()=>_.scrollBy({left:-v(),behavior:"smooth"}))),g&&g.addEventListener("click",(()=>_.scrollBy({left:v(),behavior:"smooth"}))),_.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",b),b()}}}}catch(w){}try{function o(t,e){if(!(t instanceof HTMLVideoElement))return;if(e=e||0,t.muted=!0,t.autoplay=!0,t.loop=!0,t.playsInline=!0,t.setAttribute("playsinline",""),t.preload||(t.preload="auto"),!function(t){if(!t||!t.isConnected)return!1;const e=t.getBoundingClientRect();if(e.width<=0||e.height<=0)return!1;const i=getComputedStyle(t);return"none"!==i.display&&"hidden"!==i.visibility}(t))return void(e<20&&setTimeout((()=>o(t,e+1)),300));const i=()=>{const i=t.play();i&&"function"==typeof i.then&&i.catch((()=>{if(e<8)setTimeout((()=>o(t,e+1)),400);else{const e=()=>{t.play().catch((()=>{})),t.removeEventListener("canplay",e)};t.addEventListener("canplay",e,{once:!0})}}))};if(t.readyState>=2)i();else{const e=()=>{i(),t.removeEventListener("loadeddata",e),t.removeEventListener("canplay",e)};t.addEventListener("loadeddata",e,{once:!0}),t.addEventListener("canplay",e,{once:!0}),i()}}e(n,"video").forEach((t=>o(t)));new MutationObserver((t=>{t.forEach((t=>{if("childList"===t.type&&t.addedNodes&&t.addedNodes.forEach((t=>{1===t.nodeType&&n.contains(t)&&("VIDEO"===t.tagName?o(t):t.querySelectorAll?.("video")?.forEach((t=>o(t))))})),"attributes"===t.type){const e=t.target;if(!e||!n.contains(e))return;"VIDEO"===e.tagName?o(e):e.querySelectorAll&&e.querySelectorAll("video").forEach((t=>o(t)))}}))})).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style"]}),document.addEventListener("visibilitychange",(()=>{document.hidden||e(n,"video").forEach((t=>{t.paused&&o(t)}))}))}catch(x){}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()}(),app_shop.run((function(){if(0!==$(".news_page .pagination").length){let t=$(".news_page .pagination").clone();$("#news_first").after(t)}}),[1,2,3,4],"#news_first",!0),document.addEventListener("DOMContentLoaded",(async function(){var t=window.location.href.split("-").pop().split(".html")[0],e=document.querySelector("#article-description");if(e)try{const a=await fetch("https://spacetronik.store/pl/news.html"),r=await a.text();var i=(new DOMParser).parseFromString(r,"text/html"),n='a[href*="'+t+'"]',s=i.querySelector(n);if(s){var o=s.closest(".article__item").querySelector("#quickdesc");o&&(e.innerHTML=o.innerHTML)}}catch(t){}})),document.addEventListener("click",(function(t){t.target.classList.contains("faq-question")&&t.target.parentElement.classList.toggle("active")}));class SetPrefixOnPhoneInput{constructor(t={}){this.phonePrefix=t?.phonePrefix||null,this.ariaLabelTxt=t?.ariaLabelTxt||""}setPrefix(){const t=document.querySelector(`${this.prefixName}__select`),e=document.querySelector(`${this.prefixName}__input`);if(!e||!t)return!1;const i={typingTimer:""},n=t=>{const i=t.querySelector(".f-dropdown-item");e.value=i.getAttribute("data-value"),e.setAttribute("data-prev",e.value)},s=t=>{const i=t.querySelector(".f-dropdown-item.--selected");e.value=i.getAttribute("data-value"),e.setAttribute("data-prev",e.value),t.querySelector(".f-dropdown-toggle").setAttribute("aria-describedby",this.ariaLabelTxt),this.tabindex&&t.querySelector(".f-dropdown-toggle").setAttribute("tabindex","-1")},o=t=>!!document.querySelector(`.f-dropdown-item[data-value="${t}"]`);t&&(this?.phonePrefix?t.value=this.phonePrefix:this.phonePrefix=t.value),this.prefixSelect=new SelectToDropdown({disableMobileView:!1,selector:`${this.prefixName}__select`,generateDropdownCallback:s||!1,afterClickDropdownCallback:n||!1}),e&&(e.addEventListener("focus",(function(){this.value=""})),e.addEventListener("keyup",(function(){clearTimeout(i.typingTimer),i.typingTimer=setTimeout((()=>{""!==this.value&&o(this.value)&&this.setAttribute("data-prev",this.value)}),500)})),e.addEventListener("blur",(function(){this.value=this.value.replaceAll(" ",""),""===this.value&&(this.value=this.getAttribute("data-prev")),o(this.value)||(this.value=this.getAttribute("data-prev"))})))}checkPrefixExist(t){const e=document.querySelector(`${this.prefixName}__wrapper`).querySelectorAll(`${this.prefixName}__wrapper select option`);return Array.prototype.slice.call(e).reduce(((e,i)=>(-1!==t.indexOf(i.innerText)&&(e=i.innerText),e)),!1)}removePrefix(t){const e=document.querySelector(this.phoneInput);if(!e)return!1;const i=this.checkPrefixExist(e.value);if(i)return e.value=e.value.replace(i,"").trimStart(),this.phonePrefix=i,document.querySelector(this.prefixSelect.params.selector).querySelectorAll(".f-dropdown-li").forEach((t=>{t.querySelector("a").getAttribute("data-value")===i&&t.querySelector("a").click()})),!0;const n=document.querySelector(`${this.prefixName}__input`);return!(n&&e.value&&t)||(n.value="",!1)}initEvents(){document.addEventListener("input",(t=>{const{target:e}=t;e.closest(this.phoneInput)&&this.removePrefix()})),document.addEventListener("change",(t=>{const{target:e}=t;e.closest(this.phoneInput)&&this.removePrefix()}))}init(t={}){this.prefixName=t?.prefixName||".client_prefix",this.phoneInput=t?.phoneInput||"#client_phone",this.tabindex=t?.tabindex||!1,this.prefixSelect||(this.setPrefix(),this.initEvents()),this.removePrefix(!0)}}const MfaConfigTXT={"adres e-mail":"email address","Aktywacja MFA":"Activation of MFA",Aktywuj:"Activate","Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego lub":"Activate at least one multi-factor authentication option or","Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego lub przejdź na":"Activate at least one multi-factor authentication option or go to","Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego, aby zalogować się na swoje konto":"Enable at least one multi-factor authentication option to sign in to your account.","Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego, aby dokończyć zamówienie.":"Activate at least one multi-factor authentication option to complete the order.",Anuluj:"Cancel",Aplikacja:"App","Co najmniej jedna metoda weryfikacji musi być ustawiona jako domyślna":"At least one verification method must be set as default",cyfr
5:"digits","Dezaktywacja MFA":"Deactivation of MFA",Dezaktywuj:"Deactivate","Domyślna metoda MFA została zmieniona.":"The default MFA method has been changed.","Domyślny":"Default","e-mail":"email",Email:"Email","Kliknij tutaj, aby dokończyć zamówienie":"Click here to complete the order","Kliknij tutaj, aby kontynuować logowanie":"Click here to continue logging in","Kod poprawny - za chwilę nastąpi przekierowanie.":"Correct code - you will be redirected shortly.","Kod składa się z":"Code consists of","Kod wysłany":"Code sent","Limit kodów został wyczerpany. Spróbuj ponownie za 30 minut.":"The code limit has been exhausted. Try again in 30 minutes.","numer telefonu":"phone number","Odczytaj odebraną wiadomość":"Read the received message.","Po włączeniu MFA podczas logowania podasz kod przekazany w wiadomości %s":"After enabling MFA, during login you will enter the code provided in the %s message.","Podano błędny kod":"The entered code is incorrect","Przełącznik opcji: ustaw tą metodę weryfikacji jako domyślną":"Option switch: set this verification method as default","Skanuj ten kod QR, aby skonfigurować uwierzytelnianie dwuskładnikowe w aplikacji Authenticator":"Scan this QR code to configure two-factor authentication in the Authenticator app",SMS:"SMS","stronę główną":"home page","Sześciocyfrowy kod weryfikacyjny":"6‑digit verification code","Ustaw jako domyślny":"Set as default","Uwierzytelnianie wieloskładnikowe aktywne":"Multi‑factor authentication active.","Weryfikacja MFA":"MFA verification","Włącz 2FA":"Enable 2FA","Wpisz poniżej kod 6-cyfrowy podany w wiadomości":"Enter the 6‑digit code provided in the message below.","Wprowadź pełny kod":"Enter full code","Wyłącz 2FA":"Disable 2FA","Wysłaliśmy kod potwierdzający na Twój adres e-mail.":"We have sent a confirmation code to your email address.","Wysłaliśmy kod potwierdzający na Twój numer telefonu.":"We have sent a confirmation code to your phone number.","Wyślij kod ponownie":"Resend code","Wystąpił błąd podczas wysyłki kodu weryfikacyjnego. Spróbuj ponownie później.":"An error occurred while sending the verification code. Please try again later.","Wystąpił błąd. Spróbuj ponownie później.":"Error occurred. Please try again later.","Zaloguj się":"Log in","Zmień metodę weryfikacji":"Change verification method","Zwiększ bezpieczeństwo konta, włączając uwierzytelnianie MFA":"Increase the security of your account by enabling MFA authentication.","Zeskanuj kod QR w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"Scan the QR code in the Google Authenticator or Microsoft Authenticator app to enable additional login security using multi-factor authentication (MFA).","Na podany numer telefonu wysłaliśmy kod pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"We have sent a code to the provided phone number to enable additional login security using multi-factor authentication (MFA).","Na podany adres e-mail wysłaliśmy kod pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"We have sent a code to the provided e-mail address to enable additional login security using multi-factor authentication (MFA).","Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany w aplikacji Google Authenticator lub Microsoft Authenticator, aby potwierdzić swoją tożsamość.":"After enabling multi-factor authentication (MFA), during login you will enter the code received in the Google Authenticator or Microsoft Authenticator app to confirm your identity.","Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany SMS-em, aby potwierdzić swoją tożsamość.":"After enabling multi-factor authentication (MFA), during login you will enter the code received via SMS to confirm your identity.","Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany na adres e-mail, aby potwierdzić swoją tożsamość.":"After enabling multi-factor authentication (MFA), during login you will enter the code received at your e-mail address to confirm your identity.","Na podany adres e-mail wysłaliśmy kod pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"We have sent a code to the provided e-mail address to disable additional login security using multi-factor authentication (MFA).","Na podany numer telefonu wysłaliśmy kod pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"We have sent a code to the provided phone number to disable additional login security using multi-factor authentication (MFA).","Wygeneruj kod w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na zalogowanie w sklepie.":"Generate a code in the Google Authenticator or Microsoft Authenticator app to log in to the store.","Wygeneruj kod w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA).":"Generate a code in the Google Authenticator or Microsoft Authenticator app to disable additional login security using multi-factor authentication (MFA).","Na podany adres e-mail wysłaliśmy kod pozwalający na zalogowanie w sklepie":"We have sent a code to the provided e-mail address to log in to the store","Na podany numer telefonu wysłaliśmy kod pozwalający na zalogowanie w sklepie.":"We have sent a code to the provided phone number to log in to the store.","Wygeneruj kod w aplikacji.":"Generate a code in the app.","Wpisz poniżej 6-cyfrowy kod z aplikacji.":"Enter the 6-digit code from the app below.","Ten składnik uwierzytelniania wieloskładnikowego nie został 
5jeszcze skonfigurowany":"This multi-factor authentication component has not yet been configured.","Ten składnik uwierzytelniania wieloskładnikowego został już skonfigurowany":"This multi-factor authentication component has already been configured","Limit wysyłki kodów uwierzytelniających został wyczerpany. Spróbuj ponownie za 30 minut.":"The limit for sending authentication codes has been reached. Try again in 30 minutes.","Nie znaleziono wybranej metody uwierzytelniania wieloskładnikowego (adres e-mail) na Twoim koncie":"The selected multi-factor authentication method (e-mail address) was not found on your account","Nie znaleziono wybranej metody uwierzytelniania wieloskładnikowego (numer telefonu) na Twoim koncie":"The selected multi-factor authentication method (phone number) was not found on your account","Wybrano błędny składnik uwierzytelniania wieloskładnikowego (invalid_mfa_mode)":"An incorrect multi-factor authentication component was selected (invalid_mfa_mode)","Wybrano błędny składnik uwierzytelniania wieloskładnikowego (invalid_change_mode)":"An incorrect multi-factor authentication component was selected (invalid_change_mode)","Wystąpił błąd podczas pobierania danych":"An error occurred while retrieving data","Brak dostępu":"Access denied","Podano błędny numer telefonu":"An incorrect phone number was entered","Podano błędny adres e-mail":"An incorrect e-mail address was entered","Wystąpił nieoczekiwany błąd":"An unexpected error occurred"};class MfaConfig{constructor(){this.prefix="mfa",this.modalSelector="--mfa",this.mfaElement=void 0,this.mfaStatus=void 0,this.mfaRequiredStatus=void 0,this.mfaAction={action:"verify",mode:void 0,setAsDefault:!1,verificationType:void 0},this.pendingAction="login",this.verifyCodeLength=6,this.invokeSource=void 0,this.reloadPageAfterSuccess=!1,this.queries={addMfa:(t,e=!1)=>JSON.stringify({query:`mutation {\n          addMfa(mode: ${t}, default: ${e}) {\n            qrCodeBase64\n          }\n        }`}),removeMfa:t=>JSON.stringify({query:`mutation {\n          removeMfa(mode: ${t}) {\n            success\n          }\n        }`}),setDefaultMfa:t=>JSON.stringify({query:`mutation {\n          setDefaultMfa(mode: ${t}) {\n            success\n          }\n        }`}),updateVerificationMfa:(t,e,i)=>JSON.stringify({query:`mutation {\n          updateVerificationMfa(\n            changeValue: "${t}"\n            changeMode: ${e}\n            mfaMode: ${i}\n          ) {\n            success\n          }\n        }`}),triggerMfa:t=>JSON.stringify({query:`mutation {\n          triggerMfa(mode: ${t}) {\n            success\n          }\n        }`}),verifyMfa:(t,e=!0)=>JSON.stringify({query:`mutation {\n          verifyMfa(code: "${t.toString()}", rememberDevice: ${e}) {\n            isPinValid\n          }\n        }`}),getMfaSettings:()=>JSON.stringify({query:"query {\n          mfaSettings {\n            shopMfaSettings {\n              mfaRequiredStatus\n              deviceRemember\n              deviceRememberDays\n              mfaFactors\n            }\n            userMfaSettings {\n              defaultMfaMode\n              configuredMfaModes\n              shouldSuggestSetMFA\n            }\n          }\n        }"}),snoozeMfaReminder:()=>JSON.stringify({query:"mutation {\n          snoozeMfaReminder {\n            success\n          }\n        }"}),getClientData:()=>JSON.stringify({query:"query {\n          client {\n            email\n            phone\n          }\n        }"})},this.factorTemplate=t=>`<div class='mfa__factor_wrapper'>\n        <div class='mfa__factor' data-mfafactor="${t}" data-status="inactive">\n          <div class='mfa__factor_name'>\n            <span class='name'>${this.getMfaName(t)}</span>\n            <span class='label'>${MfaConfigTXT["Domyślny"]}</span>\n          </div>\n          <div class='mfa__factor_status'>\n          </div>\n          <div class='mfa__factor_action'>\n            <button type="button" class="btn --solid --medium mfa__activate mfa_buttons" data-action="activate">${MfaConfigTXT.Aktywuj}</button>\n            <button type="button" class="btn --solid --medium mfa__verify mfa_buttons" data-action="verify">${MfaConfigTXT["Zaloguj się"]}</button>\n\t\t\t  \t  <span class='action__name --full'>${MfaConfigTXT["Ustaw jako domyślny"]}</span>\n\t\t\t  \t  <span class='action__name --short'>${MfaConfigTXT["Domyślny"]}</span>\n            <div class="f-group --switch --set-default mb-0">\n\t\t\t  \t\t  <input type="checkbox" class="f-control focused" checked="checked" id="mfa_${t}_default"></input>\n\t\t\t  \t\t  <label class="f-label" fpr="mfa_${t}_default" aria-label="${MfaConfigTXT["Przełącznik opcji: ustaw tą metodę weryfikacji jako domyślną"]}"></label>\n\t\t\t  \t  </div>\n          </div>\n        </div>\n        <div class='mfa__factor_deactivate'>\n          <button type="button" class='mfa__button mfa_buttons' data-action="deactivate">${MfaConfigTXT.Dezaktywuj}</button>\n        </div>\n      </div>\n    `,this.errors={MFA_NOT_SET_YET:MfaConfigTXT["Ten składnik uwierzytelniania wieloskładnikowego nie został 
5jeszcze skonfigurowany"],MFA_ALREADY_CONFIGURED:MfaConfigTXT["Ten składnik uwierzytelniania wieloskładnikowego został już skonfigurowany"],LIMIT_EXCEEDED:MfaConfigTXT["Limit wysyłki kodów uwierzytelniających został wyczerpany. Spróbuj ponownie za 30 minut."],CLIENT_EMAIL_REQUIRED:MfaConfigTXT["Nie znaleziono wybranej metody uwierzytelniania wieloskładnikowego (adres e-mail) na Twoim koncie"],CLIENT_PHONE_REQUIRED:MfaConfigTXT["Nie znaleziono wybranej metody uwierzytelniania wieloskładnikowego (numer telefonu) na Twoim koncie"],INVALID_MFA_MODE:MfaConfigTXT["Wybrano błędny składnik uwierzytelniania wieloskładnikowego (invalid_mfa_mode)"],INVALID_CHANGE_MODE:MfaConfigTXT["Wybrano błędny składnik uwierzytelniania wieloskładnikowego (invalid_change_mode)"],INTERNAL_ERROR:MfaConfigTXT["Wystąpił błąd podczas pobierania danych"],ACCESS_DENIED:MfaConfigTXT["Brak dostępu"],INVALID_PHONE_FORMAT:MfaConfigTXT["Podano błędny numer telefonu"],INVALID_MAIL_FORMAT:MfaConfigTXT["Podano błędny adres e-mail"],PIN_INVALID:MfaConfigTXT["Podano błędny kod"]}}async fetchData(t,e=""){if(t)try{const i=await fetch(`${app_shop.urls.graphql||"/graphql/v1/"}${e}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:t});return await i.json()}catch(t){return!1}}toggleLoader(t,e){if(t)return e?t.classList.add("--loading"):t.classList.remove("--loading")}toggleModalLoader(t){const e=document.querySelector(`.modal.${this.modalSelector}`);this.toggleLoader(e,t)}toggleDocumentOverlay(t){return t?document.documentElement.classList.add("--mfa_overlay"):document.documentElement.classList.remove("--mfa_overlay")}async redirect(){if("loginButton"===this.invokeSource||"buyButton"===this.invokeSource)return this.toggleDocumentOverlay(!1),document.querySelector(`.${this.prefix}__configuration`)?.remove(),void("loginButton"===this.invokeSource?await(app_shop?.fn?.copModulesLogin?.loginSuccess()):app_shop?.fn?.copModulesSummary?.orderCreate())}redirectToReferer(){if("verification"!==this.mfaStatus&&"enrollment"!==this.mfaStatus)return!1;const t=document.querySelector(`.${this.prefix}__configuration`)?.dataset?.referer||"/";return window.location=t}triggerSigninVerification(){const t=document.querySelector(`.${this.prefix}__configuration`)?.dataset?.defaultmfa;if("verification"!==this.mfaStatus||!t)return!1;this.mfaAction.action="verify",this.mfaAction.mode=t,this.initModal()}getReplacementString(){const t=this.mfaAction.mode,e=this.mfaAction.action;let i="",n="",s="";switch(t){case"email":"activate"===e&&(i=MfaConfigTXT["Na podany adres e-mail wysłaliśmy kod pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."],n=MfaConfigTXT["Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany na adres e-mail, aby potwierdzić swoją tożsamość."]),"deactivate"===e&&(i=MfaConfigTXT["Na podany adres e-mail wysłaliśmy kod pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."]),"verify"===e&&(i=MfaConfigTXT["Na podany adres e-mail wysłaliśmy kod pozwalający na zalogowanie w sklepie"]);break;case"otp":"activate"===e&&(i=MfaConfigTXT["Na podany numer telefonu wysłaliśmy kod pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."],n=MfaConfigTXT["Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany SMS-em, aby potwierdzić swoją tożsamość."]),"deactivate"===e&&(i=MfaConfigTXT["Na podany numer telefonu wysłaliśmy kod pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."]),"verify"===e&&(i=MfaConfigTXT["Na podany numer telefonu wysłaliśmy kod pozwalający na zalogowanie w sklepie."]);break;case"totp":"activate"===e&&(i=MfaConfigTXT["Zeskanuj kod QR w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na włączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."],n=MfaConfigTXT["Po włączeniu uwierzytelniania wieloskładnikowego (MFA) podczas logowania wprowadzisz kod otrzymany w aplikacji Google Authenticator lub Microsoft Authenticator, aby potwierdzić swoją tożsamość."]),"deactivate"===e&&(i=MfaConfigTXT["Wygeneruj kod w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na wyłączenie dodatkowego zabezpieczenia logowania z wykorzystaniem uwierzytelniania wieloskładnikowego (MFA)."],s=`<li>${MfaConfigTXT["Wygeneruj kod w aplikacji."]}</li><li>${MfaConfigTXT["Wpisz poniżej 6-cyfrowy kod z aplikacji."]}</li>`),"verify"===e&&(i=MfaConfigTXT["Wygeneruj kod w aplikacji Google Authenticator lub Microsoft Authenticator pozwalający na zalogowanie w sklepie."],s=`<li>${MfaConfigTXT["Wygeneruj kod w aplikacji."]}</li><li>${MfaConfigTXT["Wpisz poniżej 6-cyfrowy kod z aplikacji."]}</li>`)}return{modalInfoReplacementString:i,modalFooterReplacementString:n,modalStepsReplacementHtml:s}}getMfaName(t){if(!t)return;let e="";switch(t){case"email":e=MfaConfigTXT.Email;break;case"otp":e=MfaConfigTXT.SMS;break;case"totp":e=MfaConfigTXT.Aplikacja}return e}async getMfaSettings(){const t=await this.fetchData(this.queries.getMfaSettings(),"?query=mfaSettings");return this.cachedMfaSettings=t,this.mfaRequiredStatus=t?.data?.mfaSettings?.shopMfaSettings?.mfaRequiredStatus,t}async getCachedMfaSettings(){if(!this.cachedMfaSettings){const t=await this.getMfaSettings();if(t?.data?.mfaSettings?.errors)return!1;this.cachedMfaSettings=t}return this.cachedMfaSettings}async getMfaRequiredStatus(){if(!this.mfaRequiredStatus){const t=await this.getMfaSettings();if(t?.data?.mfaSettings?.errors)return!1;this.mfaRequiredStatus=t?.data?.mfaSettings?.shopMfaSettings?.mfaRequiredStatus}return"disabled"!==this.mfaRequiredStatus&&this.mfaRequiredStatus}async shouldSuggestSetMFA(){const t=await this.getMfaSettings();return t?.data?.mfaSettings?.userMfaSettings?.shouldSuggestSetMFA}setMfaStatusAndElement(){this.mfaElement=document.querySelector(`.${this.prefix}__configuration`),this.mfaStatus=this.mfaElement?.dataset?.status||"enrollment"}async triggerMfa(){return this.pendingAction="login",await this.fetchData(this.queries.triggerMfa(this.mfaAction.mode),"?query=triggerMfa")}async addMfa(){return this.pendingAction="addMfa",await this.fetchData(this.queries.addMfa(this.mfaAction.mode,this.mfaAction.setAs
5Default),"?query=addMfa")}async removeMfa(){return this.pendingAction="removeMfa",await this.fetchData(this.queries.removeMfa(this.mfaAction.mode),"?query=removeMfa")}async updateVerificationMfa(t,e,i){this.pendingAction="updateVerificationMfa";const n=await this.fetchData(this.queries.updateVerificationMfa(t,e,i),"?query=updateVerificationMfa"),s=n?.data?.updateVerificationMfa?.success;return{response:n,isSuccess:s}}async setDefaultMfa(t){const e=await this.fetchData(this.queries.setDefaultMfa(t),"?query=setDefaultMfa"),i=e?.data?.setDefaultMfa?.success;return{response:e,isSuccess:i}}async verifyMfa(t){const e=await this.fetchData(this.queries.verifyMfa(t),"?query=verifyMfa"),i=e?.data?.verifyMfa?.isPinValid;return{response:e,isCodeValid:i}}async snoozeMfaReminder(){const t=await this.fetchData(this.queries.snoozeMfaReminder(),"?query=snoozeMfaReminder");return{response:t,isSuccess:t.data.snoozeMfaReminder.success}}getErrorMessage(t){if(!1===t?.data?.verifyMfa?.isPinValid)return this.errors.PIN_INVALID;const e=t?.errors?.[0]?.message;return e?this.errors[e.toUpperCase()]:MfaConfigTXT["Wystąpił nieoczekiwany błąd"]}async getCancelButtonTextContent(){if("verify"!==this.mfaAction.action)return MfaConfigTXT.Anuluj;const t=await this.getCachedMfaSettings(),e=t?.data?.mfaSettings?.userMfaSettings?.configuredMfaModes?.length;return 1!==e?MfaConfigTXT["Zmień metodę weryfikacji"]:MfaConfigTXT.Anuluj}async setMfaAction(){let t;if("verify"===this.mfaAction.action)t=await this.triggerMfa();else if("activate"===this.mfaAction.action)t=await this.addMfa(),"totp"===this.mfaAction.mode&&this.insertQr(t?.data?.addMfa?.qrCodeBase64);else{if("deactivate"!==this.mfaAction.action)return;t=await this.removeMfa()}if(t?.errors){const e=t.errors[0].message;if("client_phone_required"===e||"client_email_required"===e)this.modal.closeModal(),this.mfaAction.action="update",this.mfaAction.mode="client_phone_required"===e?"otp":"email",this.mfaAction.error=e,this.initUpdateDataModal({},!0);else{const e=this.getErrorMessage(t);Alertek.Error(e)}}return t}async fillFactorsList(t,e){const i=t||await this.getMfaSettings(),n=e?i?.data?.mfaSettings.userMfaSettings?.configuredMfaModes:i?.data?.mfaSettings?.shopMfaSettings?.mfaFactors,s=document.querySelector(`.${this.prefix}__factor_list`);n&&s&&(s.innerHTML="",n.forEach((t=>{s.insertAdjacentHTML("beforeend",this.factorTemplate(t))})))}async prepareMfaConfigurationTemplate(t="cop_mfa_configuration_template",e){const i=document.getElementById(`${t}`)?.content.cloneNode(!0);if(!i||!i.firstChild)return;this.invokeSource=e,this.initPreventUnload();const n=await this.getMfaSettings();if(!n?.data?.mfaSettings||n?.errors||"disabled"===n?.data?.mfaSettings?.shopMfaSettings?.mfaRequiredStatus)return!1;const s=n.data.mfaSettings.userMfaSettings.configuredMfaModes.length>0;return i.querySelector(".mfa__configuration").dataset.status=s?"verification":"enrollment",document.querySelector(`.${this.prefix}__configuration`)?.remove(),this.toggleDocumentOverlay(!0),document.querySelector("#content")?.appendChild(i),this.toggleLoader(document.querySelector(`${this.prefix}__configuration`),!0),await this.fillFactorsList(n,s),await this.updateAndSortFactors(n),this.prepareContinueOrderMessage(),this.toggleLoader(document.querySelector(`${this.prefix}__configuration`),!1),this.init(),!0}insertQr(t){if(!t)return;const e=document.querySelector(`.modal.${this.modalSelector}`).querySelector(`.${this.prefix}__modal_qr`),i=`<img id="mfaqrcode" src="${t}" alt="${MfaConfigTXT["Skanuj ten kod QR, aby skonfigurować uwierzytelnianie dwuskładnikowe w aplikacji Authenticator"]}" />`;document.querySelector("#mfaqrcode")?.remove(),e.insertAdjacentHTML("afterbegin",i)}async prepareContinueOrderMessage(t){const e=document.querySelector(`.${this.prefix}__message`);if(!e)return!1;const i=`\n      <span>${MfaConfigTXT["Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego lub"]}
5 </span>\n      <button type="button" class="mfa__button mfa_buttons --lowercase" data-action="order">${MfaConfigTXT["Kliknij tutaj, aby dokończyć zamówienie"]}</button>\n    `,n=`\n      <span>${MfaConfigTXT["Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego, aby dokończyć zamówienie."]}</span>\n    `,s=`\n      <span>${MfaConfigTXT["Uwierzytelnianie wieloskładnikowe aktywne"]}</span>\n      <a href="/" target="_self">${MfaConfigTXT["Kliknij tutaj, aby kontynuować logowanie"]}</a>\n    `,o=`\n      <span>${MfaConfigTXT["Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego, aby zalogować się na swoje konto"]}</span>\n    `,a=`\n      <span>${MfaConfigTXT["Aktywuj co najmniej jedną opcję uwierzytelniania wieloskładnikowego lub przejdź na"]}</span>\n      <a href="/" target="_self">${MfaConfigTXT["stronę główną"]}</a>.\n    `;if(("buyButton"===this.invokeSource||"loginButton"===this.invokeSource)&&"required"===await this.getMfaRequiredStatus()&&"enrollment"===this.mfaStatus)return e.innerHTML=n;if(("buyButton"===this.invokeSource||"loginButton"===this.invokeSource)&&"optional"===await this.getMfaRequiredStatus())return e.innerHTML=i;if("removeMfa"===this.pendingAction&&t){const t=await this.getMfaSettings(),i=t?.data?.mfaSettings?.userMfaSettings?.configuredMfaModes?.length;return e.innerHTML=i?s:o}return"addMfa"===this.pendingAction&&t?e.innerHTML=s:"required"===await this.getMfaRequiredStatus()?e.innerHTML=o:"optional"===await this.getMfaRequiredStatus()?e.innerHTML=a:e.innerHTML=o}async updateFactorsStatus(t){const e=(t||await this.getMfaSettings()).data.mfaSettings.userMfaSettings;document.querySelector(`.${this.prefix}__factor_list`).querySelectorAll(`.${this.prefix}__factor`).forEach((t=>{if(t.querySelector(`.${this.prefix}__factor_action input[type="checkbox"]`).checked=!1,t.dataset.mfafactor===e.defaultMfaMode)return t.dataset.status="default",void(t.querySelector(`.${this.prefix}__factor_action input[type="checkbox"]`).checked=!0);e.configuredMfaModes.some((e=>e===t.dataset.mfafactor))&&t.dataset.mfafactor!==e.defaultMfaMode?t.dataset.status="active":t.dataset.status="inactive"}))}sortFactors(){const t=document.querySelector(`.${this.prefix}__factor_list`);if(!t)return;const e=Array.from(t.querySelectorAll(`.${this.prefix}__factor_wrapper`)),i={default:0,active:1,inactive:2};e.sort(((t,e)=>{const n=t.querySelector(`.${this.prefix}__factor`),s=e.querySelector(`.${this.prefix}__factor`);return(i[n.dataset.status]??3)-(i[s.dataset.status]??3)})),t.innerHTML="",e.forEach((e=>t.appendChild(e)))}async updateAndSortFactors(t){await this.updateFactorsStatus(t),this.sortFactors()}initPreventUnloadEvents(t){t.querySelector("#preventUnloadClose").addEventListener("click",(t=>{t.preventDefault(),this.preventUnloadModal.closeModal()}));t.querySelector("#preventUnloadGoBack").addEventListener("click",(()=>{this.toggleModalLoader(!0),window.history.go(-1)}))}initPreventUnload(){if("buyButton"!==this.invokeSource)return!1;const t=document.getElementById(`${this.prefix}_preventunload_modal_template`)?.content.cloneNode(!0);t&&t.firstChild&&(history.pushState({stage:"mfa_required"},""),window.addEventListener("popstate",(e=>{e.preventDefault(),this.preventUnloadModal=new Modal({element:t,classList:`${this.modalSelector} --extrasmall`,setFocusOnFirstElement:!0,afterShow:t=>{this.initPreventUnloadEvents(t)}})}),{once:!0}))}initModalEvents(t){t.querySelector("#mfaCode").addEventListener("keydown",(e=>{if("Enter"===e.key){e.preventDefault();const i=this.pendingAction;return"addMfa"===i?t.querySelector('button[data-action="activate"]').click():"removeMfa"===i?t.querySelector('button[data-action="deactivate"]').click():t.querySelector('button[data-action="verify"]').click()}})),t.addEventListener("click",(async t=>{const{target:e}=t;if(e.closest(".--mfa_cancel")&&(t.preventDefault(),this.modal?.closeModal()),e.closest(".--mfa_activate")||e.closest(".--mfa_deactivate")||e.closest(".--mfa_verify")){t.preventDefault();const i=document.getElementById("mfaCode").value;if(i.length!==this.verifyCodeLength)return Alertek.Start(`${MfaConfigTXT["Wprowadź pełny kod"]}`);this.toggleLoader(e,!0);const n=await this.verifyMfa(i);if(n.isCodeValid)return this.modal.closeModal(),"loginButton"===this.invokeSource||"buyButton"===this.invokeSource?await this.redirect():"login"===this.pendingAction||"addMfa"===this.pendingAction&&"edit"!==this.mfaStatus?(Alertek.Success(MfaConfigTXT["Kod poprawny - za chwilę nastąpi przekierowanie."]),this.redirectToReferer()):this.reloadPageAfterSuccess?window.location.reload():(this.toggleLoader(document.querySelector(`${this.prefix}__configuration`),!0),await this.updateAndSortFactors(),this.prepareContinueOrderMessage(!0),void this.toggleLoader(document.querySelector(`${this.prefix}__configuration`),!1));const s=this.getErrorMessage(n.response);s&&Alertek.Error(s),this.toggleLoader(e,!1)}if(e.closest(".--mfa_resend")){t.preventDefault(),this.toggleLoader(e,!0);(await this.setMfaAction()).errors||Alertek.Start(MfaConfigTXT["Kod wysłany"]),this.toggleLoader(e,!1)}}))}async initModal(){const t=document.getElementById(`${this.prefix}_modal_template`)?.content.cloneNode(!0);if(!t||!t.firstChild)return;const{modalInfoReplacementString:e,modalFooterReplacementString:i,modalStepsReplacementHtml:n}=this.getReplacementString();t.querySelectorAll(`.${this.prefix}__modal_info [data-replace]`).forEach((t=>{t.textContent=e})),t.querySelector(`.${this.prefix}__modal_footer [data-replace]`).textContent=i,t.querySelector(`.${this.prefix}__modal_steps`).innerHTML=n,t.querySelector(".--mfa_cancel").textContent=await this.getCancelButtonTextContent(),this.modal=new Modal({element:t,classList:`${this.modalSelector} --${this.mfaAction.action} --${this.mfaAction.mode}`,setFocusOnFirstElement:!0,enableArrowsFocus:!1,setFocusTrap:!0,afterShow:async t=>{document.querySelector(`.modal.${this.modalSelector} .modal__close`)?.remove(),this.initModalEvents(t),this.toggleModalLoader(!0),await this.setMfaAction(),this.toggleModalLoader(!1)}})}validateUpdateDataModalInput(){return"otp"===this.mfaAction.mode?this.formValidation.validatePhoneGQL({input:document.querySelector("#mfaUpdateDataInputPhone")}):this.formValidation.validateEmailGQL({input:document.querySelector("#mfaUpdateDataInputEmail")})}changeUpdateDataModalStep(t){document.querySelector(`.modal.${this.modalSelector} .${this.prefix}__modal_update_data`).dataset.step=t?"1":"2"}initUpdateDataModalEvents(t,e,i){e.querySelector("#mfaCode").addEventListener("keydown",(t=>{if("Enter"===t.key)return t.preventDefault(),e.querySelector("button.--mfa_verify").click()})),e.addEventListener("click",(async n=>{const{target:s}=n;if(s.closest(".--mfa_cancel")&&(n.preventDefault(),this.copDataBeforeChange&&this.copDataBeforeChange[i.inputId]&&(document.getElementById(i.inputId).value=this.copDataBeforeChange[i.inputId]),this.updateDataModal?.closeModal()),s.closest(".--mfa_update")||s.closest(".--mfa_resend")){n.preventDefault();const t=await this.validateUpdateDataModalInput();if(t)return Alertek.Error(t);const i="otp"===this.mfaAction.mode?`${document.querySelector("#mfa__client_phone_prefix").value}${document.querySelector("#mfaUpdateDataInputPhone").value}`:`${document.querySelector("#mfaUpdateDataInputEmail").value}`;s.dataset.mfafactor&&(this.mfaAction.verificationType=s.dataset.mfafactor),e.classList.add(`--verification-${this.mfaAction.verificationType}`),this.toggleLoader(s,!0);const o=await this.updateVerificationMfa(i,this.mfaAction.mode,this.mfaAction.verificationType);if(o.isSuccess)this.changeUpdateDataModalStep(),e.querySelector("#mfaCode").focus();else{const t=this.getErrorMessage(o.response);Alertek.Error(t)}this.toggleLoader(s,!1)}if(s.closest(".--mfa_verify")){n.preventDefault();const e=document.getElementById("mfaCode").value;if(e.length!==this.verifyCodeLength)return Alertek.Start(`${MfaConfigTXT["Wprowadź pełny kod"]}`);this.toggleLoader(s,!0);const i=await this.verifyMfa(e);if(i.isCodeValid)return t?(this.mfaAction.action="activate",void this.initModal()):(this.updateDataModal.closeModal(),"client-new"===app_shop?.fn?.copModules?.type?app_shop?.fn?.copModulesSummaryClient?.onClickSubmitButton():Alertek.Success("Dane zaktualizowano pomyślnie."));const o=this.getErrorMessage(i.response);o&&Alertek.Error(o),this.toggleLoader(s,!1)}}))}initUpdateDataModal(t,e=!1){const i=document.getElementById(`${this.prefix}_update_data_modal_template`)?.content.cloneNode(!0);if(!i||!i.firstChild)return;const{inputId:n,inputValue:s}=t||{};
5this.updateDataModal=new Modal({element:i,classList:`${this.modalSelector} --${this.mfaAction.action} --${this.mfaAction.mode}`,setFocusOnFirstElement:!0,enableArrowsFocus:!1,setFocusTrap:!0,afterShow:async i=>{document.querySelector(`.modal.${this.modalSelector} .modal__close`)?.remove(),"otp"===this.mfaAction.mode&&(this.setPrefixOnPhoneInput=new SetPrefixOnPhoneInput,this.setPrefixOnPhoneInput.init({prefixName:".mfa__client_prefix",phoneInput:"#mfaUpdateDataInput"}),n&&"client_phone_prefix"===n&&s&&(i.querySelector("#mfa__client_phone_prefix").value=s),n&&"client_phone"===n&&s&&(i.querySelector("#mfaUpdateDataInputPhone").value=s)),n&&"client_email"===n&&s&&(i.querySelector("#mfaUpdateDataInputEmail").value=s),"otp"===this.mfaAction.mode?i.querySelector("#mfaUpdateDataInputPhone").focus():i.querySelector("#mfaUpdateDataInputEmail").focus(),this.formValidation||(this.formValidation=new FormValidation),this.initUpdateDataModalEvents(e,i,t)},afterClose:()=>{this.blockNextRedirect=!1}})}copContactChangeEvent(t,e){const i=t.getAttribute("id");if(this.blockNextRedirect=!0,"Enter"===e?.key&&t.value!==this.copDataBeforeChange[i]&&e.preventDefault(),t.value===this.copDataBeforeChange[i])return this.blockNextRedirect=!1,!1;setTimeout((()=>{this.reloadPageAfterSuccess=!0,this.mfaAction.action="update",this.mfaAction.mode="client_phone"===i||"client_phone_prefix"===i?"otp":"email",this.initUpdateDataModal({inputId:i,inputValue:t.value})}),500)}initCopContactEvents(){const t=document.querySelector(".cop_contact");if(!t)return!1;this.copDataBeforeChange={client_email:document.querySelector("#client_email").value,client_phone_prefix:document.querySelector("#client_phone_prefix").value,client_phone:document.querySelector("#client_phone").value};const e=t.querySelectorAll(".--block-edit input");e?.forEach((t=>{t.addEventListener("focus",(()=>{this.copDataBeforeChange[t.name]=t.value})),t.addEventListener("blur",(e=>{e.preventDefault(),app_shop.vars.logged&&this.copContactChangeEvent(t)})),t.addEventListener("keydown",(e=>{"Enter"===e.key&&this.copContactChangeEvent(t,e)}))}));const i=t.querySelector(".client_prefix__wrapper");i?.querySelectorAll(".f-dropdown-li").forEach((e=>{e.addEventListener("click",(()=>{t.querySelector("#client_phone_prefix").dispatchEvent(new Event("blur"))}))}))}initEvents(){this.mfaElement.addEventListener("click",(async t=>{const{target:e}=t;if(e.closest('button[data-action]:not([data-action="order"])')&&(t.preventDefault(),this.mfaAction.action=e.dataset.action,this.mfaAction.mode=e.closest(`.${this.prefix}__factor_wrapper`).querySelector(`.${this.prefix}__factor`).dataset.mfafactor,this.initModal()),e.closest('button[data-action="order"]')&&await this.redirect(),e.closest("div.--set-default")){t.preventDefault();const i=e.closest("div.--set-default");if(i.querySelector('input[type="checkbox"]').checked)return void Alertek.Start(MfaConfigTXT["Co najmniej jedna metoda weryfikacji musi być ustawiona jako domyślna"]);const n=i.closest(`.${this.prefix}__factor`).dataset.mfafactor,s=await this.setDefaultMfa(n);if(s.isSuccess)return this.updateAndSortFactors(),void Alertek.Success(MfaConfigTXT["Domyślna metoda MFA została zmieniona."]);const o=this.getErrorMessage(s.response);o&&Alertek.Error(o)}else;}))}init(){this.setMfaStatusAndElement(),this.mfaElement&&(this.initEvents(),this.triggerSigninVerification())}}document.addEventListener("click",(function(t){if(t.target.matches(".close-payments-btn")){const e=t.target.closest(".prefix_payments__details");e&&e.classList.remove("--show-all")}})),app_shop.run((function(){app_shop.fn.oscopProductsOptional=new ProductsOSCOP;const t=app_shop.fn.oscop.afterInit;app_shop.fn.oscop.afterInit=()=>{t?.(),app_shop.fn.oscopProductsOptional.init({moveSelector:".oscop_summary__block",moveType:"before",divisionOff:!0,basket:app_shop.fn.oscop.vars.basket,shipping:app_shop.fn.oscop.vars.shipping})}}),"all","#oscop_products_template"),app_shop.run((function(){app_shop.fn.mfaConfig=new MfaConfig,app_shop.fn.mfaConfig.init()}),"all",".mfa__configuration"),app_shop.fn.switchSigninView=function(t){$("#signin-form_box_left .signin-form_box_sub").hide(),$("#"+t.attr("value")).show()},app_shop.run((function(){$("a.password_reminder_signin, a.password_back_signin").on("click",(function(){return app_shop.fn.switchSigninView($($(this).attr("href"))),!1})),$(".cookie_login_social_more_social").on("click",(function(){return $("#cookie_login_social_more").show(),$(this).remove(),!1}))}),"all","#signin-form");

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.