/*! For license information please see commons-0e0fbf3d5c5da763af47.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[351],{7757:(e,t,n)=>{e.exports=n(5666)},9484:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(6600),o=r(n(6309)),s=r(n(7174));function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=void 0,f=function(e){var t={en:"en",ar:"ar",de:"de",ru:"ru",es:"es",fr:"fr",it:"it",pl:"pl",tr:"tr",zh:"zh",cn:"zh",ch:"zh",pt:"pt",br:"pt","pt-br":"pt",cs:"cs",cz:"cs",uk:"uk",ua:"uk",nl:"nl",hu:"hu",sv:"sv",se:"sv"};return Object.keys(t).some((function(t){return t===e.toLowerCase()}))?t[e]:"en"},d=function(e){return{en:"USD",ar:"USD",ru:"USD",uk:"USD",de:"EUR",es:"EUR",fr:"EUR",it:"EUR",nl:"EUR",cs:"EUR",pl:"PLN",tr:"TRY",zh:"CNY",pt:"BRL",hu:"HUF",sv:"SEK"}[e]},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.Validator.defaultAutoTrim(!0),i.Validator.registerDefaultRules(o);var n={currencyIncorrect:"Currency code is not valid!"},r=new i.Validator({price:["required","decimal"],locale:["string"],currencyRate:["decimal"],currency:["string",{length_equal:3}],currencyDisplay:["string",{one_of:["symbol","code","name"]}],useGrouping:["boolean"],minimumIntegerDigits:["positive_integer",{number_between:[1,21]}],minimumFractionDigits:["integer",{number_between:[0,20]}],maximumFractionDigits:["integer",{number_between:[0,20]}]});r.validate(c({price:e},t));var a=r.getErrors();if(a)return a;if(t.currency&&!s.isValid(t.currency))return n.currencyIncorrect;var u=e*(t.currencyRate||1),h=f(t.locale||"en"),p=h;switch(p){case"ar":p="en";break;case"uk":p="ru"}return Intl.NumberFormat.call(l,p,{style:"currency",currency:t.currency||d(h),currencyDisplay:t.currencyDisplay||"symbol",useGrouping:"undefined"===t.useGrouping||t.useGrouping,minimumIntegerDigits:t.minimumIntegerDigits||1,minimumFractionDigits:t.minimumFractionDigits||0,maximumFractionDigits:t.maximumFractionDigits||t.minimumFractionDigits||0}).format(u)};t.backPriceConversion=function(e){var t=new i.Validator({price:["required","decimal"],rate:["required","decimal"],roundingType:["string",{one_of:["floor","ceil","round"]}]});t.validate(c({},e));var n=t.getErrors();if(n)return n;var r=e.price/e.rate;switch(e.roundingType){case"floor":return Math.floor(r);case"ceil":return Math.ceil(r);default:return Math.round(r)}},t.currencyFormatter=h,t.default=h,t.getCurrencyByLang=d,t.getTmLocale=f,t.priceConversion=function(e){var t=new i.Validator({price:["required","decimal"],rate:["required","decimal"],roundingType:["string",{one_of:["floor","ceil","round"]}]});t.validate(c({},e));var n=t.getErrors();if(n)return n;var r=e.price*e.rate;switch(e.roundingType){case"floor":return Math.floor(r);case"ceil":return Math.ceil(r);default:return Math.round(r)}}},0:(e,t)=>{"use strict";t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{domain:t="",values:n={}}=e;if(t&&Object.keys(n).length){const{body:e}=document,r=document.createElement("img"),i=Object.entries(n).reduce(((e,t)=>{let[n,r]=t;return e.length?"".concat(e,"&").concat(n,"=").concat(r):"".concat(n,"=").concat(r)}),"");let o=!1,s=0;const a=5,u=1e3;r.src="".concat(t,"sf-api/cookies?").concat(i),r.style.display="none",r.onload=()=>{o=!0},e.appendChild(r);const c=new Promise((e=>{const t=setInterval((()=>{s+=1,o?(clearInterval(t),e(!0)):s>=a&&(clearInterval(t),e(!1))}),u)}));return await c}return Promise.resolve(!1)}},6943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(2982),i=n(4942),o=n(4234);const s=[];function a(e,t=o.ZTd){let n;const r=new Set;function i(t){if((0,o.N8)(e,t)&&(e=t,n)){const t=!s.length;for(const t of r)t[1](),s.push(t,e);if(t){for(let e=0;e<s.length;e+=2)s[e][0](s[e+1]);s.length=0}}}return{set:i,update:function(t){i(t(e))},subscribe:function(s,a=o.ZTd){const u=[s,a];return r.add(u),1===r.size&&(n=t(i)||o.ZTd),s(e),()=>{r.delete(u),0===r.size&&(n(),n=null)}}}}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(){var e=a({token:null,user:{},cart:{id:null,status:null,items:[],total:{}},cartModal:{id:null,status:null,isSubscribeCentrifuge:!1,items:[],total:{amount:0},currency:"",handlingFee:[]},isCartModalOpen:!1,isSingleCartModalOpen:!1,isProductDataUpdating:!1,favorites:[],serviceReviewsVotes:{votesList:[],activeVotes:[]},isMediaPlaying:!1,articles:{reviews:{items:[],sorting:"-helpful,-created_at",page:1},comments:{items:[],newAddedComments:[],sorting:"-helpful,-created_at",page:1},authorProducts:{items:[],sorting:"newest",page:0,pageCount:0,type:""}},productCart:{license:null,services:[],supports:[],productId:null},infoCartModal:{licenses:[],products:[],services:[],supports:[],recommendedServices:{},recommendedSupports:[]}}),t=e.subscribe,n=e.update;return{subscribe:t,update:n,setToken:function(e){return n((function(t){return c(c({},t),{},{token:e})}))},setUser:function(e){return n((function(t){return c(c({},t),{},{user:e})}))},setCartData:function(e){return n((function(t){return c(c({},t),{},{cart:c(c({},t.cart),e)})}))},setCartModalData:function(e){return n((function(t){return c(c({},t),{},{cartModal:c(c({},t.cartModal),e)})}))},setModalProducts:function(e){return n((function(t){return c(c({},t),{},{infoCartModal:c(c({},t.infoCartModal),{},{products:[].concat((0,r.Z)(t.infoCartModal.products),(0,r.Z)(e))})})}))},setModalServices:function(e){return n((function(t){return c(c({},t),{},{infoCartModal:c(c({},t.infoCartModal),{},{services:[].concat((0,r.Z)(t.infoCartModal.services),(0,r.Z)(e))})})}))},setModalSupports:function(e){return n((function(t){return c(c({},t),{},{infoCartModal:c(c({},t.infoCartModal),{},{supports:[].concat((0,r.Z)(t.infoCartModal.supports),(0,r.Z)(e))})})}))},setModalLicenses:function(e){return n((function(t){return c(c({},t),{},{infoCartModal:c(c({},t.infoCartModal),{},{licenses:[].concat((0,r.Z)(t.infoCartModal.licenses),(0,r.Z)(e))})})}))},setModalRecommendedServices:function(e,t){return n((function(n){return c(c({},n),{},{infoCartModal:c(c({},n.infoCartModal),{},{recommendedServices:c(c({},n.infoCartModal.recommendedServices),{},(0,i.Z)({},t,(0,r.Z)(e)))})})}))},setModalRecommendedSupports:function(e){return n((function(t){return c(c({},t),{},{infoCartModal:c(c({},t.infoCartModal),{},{recommendedSupports:(0,r.Z)(e)})})}))},setIsSingleCartModalOpen:function(e){return n((function(t){return c(c({},t),{},{isSingleCartModalOpen:e})}))},setIsCartModalOpen:function(e){return n((function(t){return c(c({},t),{},{isCartModalOpen:e})}))},setIsProductDataUpdating:function(e){return n((function(t){return c(c({},t),{},{isProductDataUpdating:e})}))},setIsMediaPlaying:function(e){return n((function(t){return c(c({},t),{},{isMediaPlaying:e})}))},setFavorites:function(e){return n((function(t){return c(c({},t),{},{favorites:(0,r.Z)(e)})}))},addToFavorites:function(e){return n((function(t){return c(c({},t),{},{favorites:[].concat((0,r.Z)(t.favorites),[e])})}))},setServiceReviewsVotes:function(e){return n((function(t){return c(c({},t),{},{serviceReviewsVotes:c(c({},t.serviceReviewsVotes),{},{votesList:e})})}))},setServiceReviewsActiveVotes:function(e){return n((function(t){return c(c({},t),{},{serviceReviewsVotes:c(c({},t.serviceReviewsVotes),{},{activeVotes:(0,r.Z)(e)})})}))},removeFromFavorites:function(e){return n((function(t){return c(c({},t),{},{favorites:t.favorites.filter((function(t){return t.item_name!==e.item_name}))})}))},setArticlesSorting:function(e,t){return n((function(n){return c(c({},n),{},{articles:c(c({},n.articles),{},(0,i.Z)({},e,c(c({},n.articles[e]),{},{sorting:t})))})}))},setArticlesPage:function(e,t){return n((function(n){return c(c({},n),{},{articles:c(c({},n.articles),{},(0,i.Z)({},e,c(c({},n.articles[e]),{},{page:t})))})}))},setArticlesPageCount:function(e,t){return n((function(n){return c(c({},n),{},{articles:c(c({},n.articles),{},(0,i.Z)({},e,c(c({},n.articles[e]),{},{pageCount:t})))})}))},setArticlesItems:function(e,t,o){return n((function(n){return c(c({},n),{},{articles:c(c({},n.articles),{},(0,i.Z)({},e,c(c({},n.articles[e]),{},{items:o?[].concat((0,r.Z)(n.articles[e].items),(0,r.Z)(t)):t})))})}))},addComment:function(e){return n((function(t){var n=0===Number(e.parentId)?[e].concat((0,r.Z)(t.articles.comments.newAddedComments)):[].concat((0,r.Z)(t.articles.comments.newAddedComments),[e]);return c(c({},t),{},{articles:c(c({},t.articles),{},{comments:c(c({},t.articles.comments),{},{newAddedComments:n})})})}))},setArticlesProductsType:function(e,t){return n((function(n){return c(c({},n),{},{articles:c(c({},n.articles),{},(0,i.Z)({},e,c(c({},n.articles[e]),{},{type:t})))})}))},setProductCartLicense:function(e){return n((function(t){return c(c({},t),{},{productCart:c(c({},t.productCart),{},{license:e})})}))},setProductCartServices:function(e){return n((function(t){return c(c({},t),{},{productCart:c(c({},t.productCart),{},{services:(0,r.Z)(e)})})}))},setProductCartSupports:function(e){return n((function(t){return c(c({},t),{},{productCart:c(c({},t.productCart),{},{supports:(0,r.Z)(e)})})}))},setProductCartProductId:function(e){return n((function(t){return c(c({},t),{},{productCart:c(c({},t.productCart),{},{productId:e})})}))}}}()},5980:(e,t,n)=>{"use strict";function r(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)}n.d(t,{y:()=>r})},5191:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(4942),i=n(1922);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case"impressionSent":var n=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.price,s=void 0===o?"":o,a=e.brand,u=void 0===a?"":a,c=e.category,l=void 0===c?"":c,f=e.variant,d=void 0===f?"":f,h=e.list,p=void 0===h?"":h,m=e.position;return{id:n,name:i,price:s,brand:u,category:l,variant:d,list:p,position:void 0===m?"":m}}(t);return{event:"impressionSent",ecommerce:{impressions:[n]}};case"productClick":var r=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.price,s=void 0===o?"":o,a=e.brand,u=void 0===a?"":a,c=e.category,l=void 0===c?"":c,f=e.variant,d=void 0===f?"":f,h=e.position;return{id:n,name:i,price:s,brand:u,category:l,variant:d,position:void 0===h?1:h}}(t),o=t.list,a=void 0===o?"":o;return{event:"productClick",ecommerce:{click:{actionField:{list:a},products:[r]}}};case"useFilter":var u=t.filterName,c=t.filterValue;return{event:"useFilter",eventCategory:"Filters",eventAction:u,eventLabel:c};case"addToCart":var l=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.price,s=void 0===o?"":o,a=e.brand,u=void 0===a?"":a,c=e.category,l=void 0===c?"":c,f=e.variant,d=void 0===f?"":f,h=e.licenseId,p=void 0===h?"":h,m=e.quantity,v=void 0===m?1:m;return{id:n,name:i,price:s,brand:u,category:l,variant:p?"".concat(d," + ").concat(p):"".concat(d),quantity:v}}(t);return{event:"addToCart",ecommerce:{add:{products:[l]}}};case"impressionSentOffer":return{event:"impressionSent",ecommerce:{impressions:t}};case"addtoCollection":var f=t.eventAction,d=void 0===f?"":f,h=t.eventLabel,p=void 0===h?"":h;return{event:"addtoCollection",eventCategory:"Add_to_collection",eventAction:d,eventLabel:p};case"motoTrial":var m=t.eventLabel,v=void 0===m?"Submit":m;return{event:"Moto Trial",eventCategory:"Moto Trial",eventAction:"Get trial",eventLabel:v};case"formSent":var _=t.eventAction,b=t.eventLabel,y=void 0===b?"Submit":b;return{event:"Forms_send",eventCategory:"Forms",eventAction:_,eventLabel:y};case"menu":var g=t.eventAction,S=void 0===g?"Main button - header":g,R=t.eventLabel,w=void 0===R?"Open menu":R;return{event:"newmenu",eventCategory:"New menu",eventAction:S,eventLabel:w};case"promotionView":var O=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.creative,s=void 0===o?"":o,a=e.position;return{id:n,name:i,creative:s,position:void 0===a?1:a}}(t);return{event:"promotionView",ecommerce:{promoView:{promotions:[O]}}};case"promotionClick":var T=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.creative,s=void 0===o?"":o,a=e.position;return{id:n,name:i,creative:s,position:void 0===a?1:a}}(t);return{event:"promotionClick",ecommerce:{promoClick:{promotions:[T]}}};case"chatuser":var C=t.name,E=void 0===C?"":C,k=t.chatroom,A=void 0===k?"assistance":k,P=t.email,M=void 0===P?"":P;return{event:"chatuser",userdata:[{chatname:E,chatroom:A,chatemail:M}]};case"sorting":var x=t.currentSorting,N=void 0===x?"":x,L=t.newSorting,I=void 0===L?"":L;return{event:"sorting",eventCategory:"Use sorting",eventAction:"New - ".concat(I),eventLabel:"Old - ".concat(N)};case"trackEvent":var D=t.eventCategory,j=void 0===D?"Cart pop-up":D,F=t.eventAction,B=void 0===F?"":F,U=t.eventLabel,V=void 0===U?"":U;return{event:"trackEvent",eventCategory:j,eventAction:B,eventLabel:V};case"stripePay":var z=t.paymentType,G=void 0===z?"Other":z,Z=t.paymentStep,H=void 0===Z?1:Z,q=t.isViewEvent,W=void 0!==q&&q;return{event:"apple_google_pay",eventCategory:"New payment type",eventAction:"".concat(G," Pay"),eventLabel:W?"view":H};case"removeProductFromCart":var $=t.product,J=$.templateId,K=$.typeName,X=$.typeShortName,Y=$.categoryName,Q=$.propertyValues,ee=t.quantity,te=t.licenseId,ne=t.cartItem,re=ne.price,ie=ne.final_price,oe=(0,i.UV)(re,Q),se={name:K,id:J,price:(ie||re)/100,brand:X?X.trim():"",category:(0,i.JB)(Q,Y),variant:"".concat(oe?"free":"regular + ".concat(te))};return ee&&(se=s(s({},se),{},{quantity:ee})),{event:"removeFromCart",ecommerce:{remove:{products:[se]}}};case"removeOfferFromCart":var ae=t.id,ue=void 0===ae?0:ae,ce=t.price,le=void 0===ce?0:ce,fe=t.brand,de=void 0===fe?"":fe,he=t.category,pe=void 0===he?"":he;return{event:"removeFromCart",ecommerce:{remove:{products:[{name:"Offer",id:ue,brand:de,category:pe,price:le/100,variant:Number(le)<=0?"free":"premium",quantity:1}]}}};case"addSupportToCart":var me=t.id,ve=void 0===me?0:me,_e=t.price,be=void 0===_e?0:_e;return{event:"addToCart",ecommerce:{add:{products:[{name:"Offer",id:ve,price:be/100,brand:"TM",category:"paid support",variant:Number(be)<=0?"free":"premium",quantity:1,type:"support"}]}}};case"productRecommendedOfferClick":var ye=t.product,ge=ye.propertyValues,Se=ye.price,Re=t.listName,we=t.services,Oe=t.channel,Te=void 0===Oe?"":Oe,Ce=(0,i.UV)(Se,ge);return{event:"productClick",ecommerce:{click:{actionField:{list:Re},products:we.map((function(e){var t=e.serviceId,n=e.brand,r=e.internalName;return{name:"Offer",id:t,price:e.price/100,brand:n,category:r,variant:Ce?"free":"premium",channel:Te}}))}}};case"addRecommendedOfferToCart":var Ee=t.product,ke=Ee.propertyValues,Ae=Ee.price,Pe=t.services,Me=t.channel,xe=void 0===Me?"":Me,Ne=(0,i.UV)(Ae,ke);return{event:"addToCart",ecommerce:{add:{products:Pe.map((function(e){var t=e.serviceId,n=e.brand,r=e.internalName;return{name:"Offer",id:t,price:e.price/100,brand:n,category:r,variant:Ne?"free":"premium",channel:xe}}))}}};case"impressionSentServices":var Le=function(e){var t=e.id,n=void 0===t?"":t,r=e.name,i=void 0===r?"":r,o=e.price,s=void 0===o?"":o,a=e.brand,u=void 0===a?"":a,c=e.category,l=void 0===c?"":c,f=e.variant,d=void 0===f?"":f,h=e.list,p=void 0===h?"":h,m=e.position;return{id:n,name:i,price:s,brand:u,category:l,variant:d,list:p,position:void 0===m?"":m}}(t);return{event:"impressionSent",ecommerce:{impressions:[Le]}};case"openCartPopup":var Ie=t.label,De=void 0===Ie?"Add to cart":Ie;return{event:"cart_popup",eventCategory:"New cart",eventAction:"View",eventLabel:De};case"abOffer":return{event:"ab.offer"};default:console.warn("Broken event name ".concat(e))}}},1078:(e,t,n)=>{"use strict";n.d(t,{PV:()=>c,_B:()=>f});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(9484),u=n(6943);function c(){return l.apply(this,arguments)}function l(){return(l=(0,r.Z)(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__app__.js.currency,n={code:t.code||"USD",rate:t.rate||1},u.Z.setCartModalData({currency:n}),e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){var t,n,r,i,o,c,l;return u.Z.subscribe((function(e){l=e})),(0,a.currencyFormatter)(e,{currency:(null===(t=l)||void 0===t||null===(n=t.cartModal)||void 0===n||null===(r=n.currency)||void 0===r?void 0:r.code)||"USD",currencyRate:(null===(i=l)||void 0===i||null===(o=i.cartModal)||void 0===o||null===(c=o.currency)||void 0===c?void 0:c.rate)||1,locale:s.Z.apiLocale||"en"})}},7044:(e,t,n)=>{"use strict";n.d(t,{NV:()=>h,k$:()=>p,rF:()=>f});var r=n(5861),i=n(7757),o=n.n(i),s=n(7501),a=n.n(s),u=n(7458),c=n.n(u),l=(n(4522),n(6943));function f(){return d.apply(this,arguments)}function d(){return(d=(0,r.Z)(o().mark((function e(){var t,n,r,i,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.__app__.js.api.consul,e.next=3,fetch("".concat(t,"/module-settings/storefront/handling-fee"));case 3:if((n=e.sent).ok){e.next=6;break}return e.abrupt("return",[]);case 6:return e.next=8,n.json();case 8:return r=e.sent,i=h(r[0].Value),s=JSON.parse(i),l.Z.setCartModalData({handlingFee:s}),e.abrupt("return",s);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){try{return c().decode(a().decode(e))}catch(e){return!1}}var p=function(e,t){var n={fee:0,text:"",tooltip:{}};if(!e||!t.length)return n;var r=t.find((function(t){return e>=t.from&&e<=t.to}));return r||n}},1432:(e,t,n)=>{"use strict";n.d(t,{Np:()=>f,dk:()=>d,oc:()=>c});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(6943),u=n(1922);function c(e){return l.apply(this,arguments)}function l(){return(l=(0,r.Z)(o().mark((function e(t){var n,r,i,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.ids,r=void 0===n?[]:n,i=t.locale,u=void 0===i?s.Z.apiLocale:i,e.next=3,fetch("".concat(s.Z.apiUrls.licenses,"/v1/licenses/").concat(r.join(","),"?locale=").concat(u)).then((function(e){if(!e.ok)throw new Error;return e.json()})).then((function(e){return a.Z.setModalLicenses(e),e})).catch((function(e){return console.log(e)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){var t,n=e.license,r=e.price;if(!n)return{priceProduct:0,priceService:0};var i=0,o=+n.modifier.value;if(n.items&&"virtual"===n.type&&n.items.forEach((function(e){i+=e.price})),"amount"===n.modifier.type)switch(n.modifier.operation){case"division":t=o?r/o:r;break;case"multiplication":t=r*o;break;case"addition":t=r+o;break;default:t=r-o}else if("addition"===n.modifier.operation)t=r+r*o/100;else t=r-r*o/100;return{priceProduct:t<0?0:t||r,priceService:i}}function d(e){var t=e.product,n=e.licensePrice,r=e.cartItem,i=["regular","virtual"].includes(r.licenseData&&r.licenseData.type);if(r.discounts&&r.discounts.length>0||!i){var o=t&&t.discounts&&(0,u.f)({price:t&&t.price,discounts:t&&t.discounts,fullInfo:!0}),s=!i&&o?o||{}:r.discounts[0]||{},a=0;return"percent"===s.discount_type?(a=n-n*s.discount_value/100)<0?0:a:(a=n-(r.price-r.final_price))<0?0:a}return n}},712:(e,t,n)=>{"use strict";n.d(t,{$:()=>u});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(3081);function u(e){return c.apply(this,arguments)}function c(){return(c=(0,r.Z)(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.status,r=(0,a.ej)("access_token"),e.next=4,fetch("".concat(s.Z.apiUrls.orders,"/v2/orders?status=").concat(n),{method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded","Access-Control-Allow-Origin":"*",Accept:"application/json",Authorization:r||void 0}});case 4:return i=e.sent,e.next=7,i.json();case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},1922:(e,t,n)=>{"use strict";n.d(t,{JB:()=>h,UV:()=>d,cn:()=>f,du:()=>u,f:()=>l});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(6943);function u(e){return c.apply(this,arguments)}function c(){return(c=(0,r.Z)(o().mark((function e(t){var n,r,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.Z.apiLocale,e.next=3,fetch("".concat(s.Z.apiUrls.products,"/v2/products/").concat(n,"?ids=").concat(t,"&language=").concat(n,"&expand=licenses,propertyValues"));case 3:if((r=e.sent).ok){e.next=6;break}return e.abrupt("return",[]);case 6:return e.next=8,r.json();case 8:return i=e.sent,a.Z.setModalProducts(i),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){var t=e.price,n=e.discounts,r=e.fullInfo,i=void 0!==r&&r,o=t,s=n&&n[0];return n&&n.forEach((function(e){if("active"===e.status){var n;if(n="percent"===e.discount_type?Math.round(+t*(100-+e.discount_value)/100*100)/100:+t-+e.discount_value,i)s=n<o?e:s;o=Math.min(o,n),t-o<=.5&&(o=t)}})),i?s:o}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&e.types&&e.types[0]||{}}var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return 0==+e||t&&t.isFree&&("template"===t.isFree[0].value||"sample"===t.isFree[0].value)},h=function(e,t){return e&&e.topic&&e.topic.length>0?e.topic[0].value.toLowerCase():t?t.toLowerCase():""}},5058:(e,t,n)=>{"use strict";n.d(t,{Qz:()=>d,m3:()=>u,w0:()=>l});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(6943);function u(e){return c.apply(this,arguments)}function c(){return(c=(0,r.Z)(o().mark((function e(t){var n,r,i,u,c,l,f;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.ids,r=void 0===n?[]:n,i=t.locale,u=void 0===i?s.Z.locale:i,c="ids[]="+r.join("&ids[]=")+"&locale=".concat(u),e.next=4,fetch("".concat(s.Z.apiUrls.services,"/v1/services?").concat(c));case 4:return l=e.sent,e.next=7,l.json();case 7:return f=e.sent,a.Z.setModalServices(f),e.abrupt("return",f);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e){return f.apply(this,arguments)}function f(){return(f=(0,r.Z)(o().mark((function e(t){var n,r,i,u,c,l,f,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.product,r=void 0===n?{}:n,i=t.locale,u=void 0===i?s.Z.apiLocale:i,c=t.sort,l={channel:"tm2-cart",onCart:0,sort:void 0===c?"-sort":c,locale:u,"per-page":30,items:[r]},e.next=4,fetch("".concat(s.Z.apiUrls.services,"/v1/services"),{method:"SEARCH",headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*",Accept:"application/json"},body:JSON.stringify(l)});case 4:return f=e.sent,e.next=7,f.json();case 7:return d=e.sent,a.Z.setModalRecommendedServices(d,r.templateId),e.abrupt("return",d);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){var t,n,r=e.servicePresentations,i=void 0===r?[]:r,o=e.locale,s=void 0===o?"en":o,a=e.channel,u=void 0===a?"tm2-cart":a,c=null===(t=i[s])||void 0===t?void 0:t.find((function(e){return e.channel===u}));return c||(i[s]?i[s][0]:null!==(n=i.en)&&void 0!==n&&n.find((function(e){return e.channel===u}))||i.en?i.en[0]:{})}},7856:(e,t,n)=>{"use strict";n.d(t,{E:()=>d,n:()=>l});var r=n(5861),i=n(7757),o=n.n(i),s=n(4522),a=n(3081),u=n(1078),c=n(6943);function l(e){return f.apply(this,arguments)}function f(){return(f=(0,r.Z)(o().mark((function e(t){var n,r,i,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.templateIds,r=t.supportIds,i={locale:s.Z.apiLocale,"per-page":50},n&&(i.productIds=n),r&&(i.ids=r),e.next=6,fetch("".concat(s.Z.apiUrls.support,"/v1/support/search?").concat((0,a.fo)(i)));case 6:return u=e.sent,e.next=9,u.json();case 9:return l=e.sent,null!=n&&n.length?c.Z.setModalRecommendedSupports(l):c.Z.setModalSupports(l),e.abrupt("return",l);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){var t=e.support,n=void 0===t?{}:t,r=e.onCart,i=void 0!==r&&r,o=n.regularPrice,s=n.discountPrice,a=n.buyWithTitle,c=n.buyAdditionalTitle,l=n.title;if(!o)return l||"";var f=o-s;return 0===f?l:(i?c:a).replace(/%AMOUNT%/gi,(0,u._B)(f))}},4522:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={apiUrls:window.__app__.js.api,pageType:window.__app__.analytics.pageType,locale:window.__app__.language,apiLocale:window.__app__.apiLocale,domain:window.__app__.js.domain,liveDemoDomain:window.__app__.js.liveDemoDomain,liveDemoCookieDomain:window.__app__.js.liveDemoCookieDomain,cookieDomain:window.__app__.js.cookieDomain,fontPreviewDomain:window.__app__.js.fontPreviewDomain,reviveConfig:window.__app__.js.revive,centrifuge:window.__app__.js.centrifuge,stripe:window.__app__.js.stripe,consulUrl:window.__app__.js.consulUrl,abExperimentId:window.__app__.js.abExperimentId,abExperimentInit:window.__app__.js.abExperimentInit}},6009:(e,t,n)=>{"use strict";var r=n(7090),i=n.n(r);n(4895);i().cfg.lazyClass="_ls",i().cfg.preloadClass="_ls-preload",i().cfg.srcAttr="data-src",i().cfg.loadMode=1,document.addEventListener("lazybeforeunveil",(function(e){var t=e.target.getAttribute("data-bg"),n=e.target.getAttribute("data-poster");t&&(e.target.style.backgroundImage="url("+t+")"),n&&e.target.setAttribute("poster",n)}))},3048:(e,t,n)=>{"use strict";var r=n(5980),i=n(5191);(0,n(3081).Fi)((function(){Object.defineProperty(window,"LiveChatWidget",{configurable:!0,get:function(){return this._LiveChatWidget},set:function(e){this._LiveChatWidget=e,window.LiveChatWidget.on("form_submitted",(function(e){if("prechat"===e.type){var t=window.LiveChatWidget.get("customer_data");(0,r.y)((0,i.c)("chatuser",t))}}))}})}))},4895:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e=n.hmd(e),function(t,i){if(t){var o=function e(){i(t.lazySizes),t.removeEventListener("lazyunveilread",e,!0)};i=i.bind(null,t,t.document),"object"==r(e)&&e.exports?i(n(7090)):"function"==typeof define&&n.amdO?define(["lazysizes"],i):t.lazySizes?o():t.addEventListener("lazyunveilread",o,!0)}}("undefined"!=typeof window?window:0,(function(e,t,n){addEventListener("lazybeforeunveil",(function r(){var i,o,s,a,u,c,l,f=n.cfg,d={"data-bgset":1,"data-include":1,"data-poster":1,"data-bg":1,"data-script":1},h="(\\s|^)("+f.loadedClass,p=t.documentElement,m=function(e){n.rAF((function(){n.rC(e,f.loadedClass),f.unloadedClass&&n.rC(e,f.unloadedClass),n.aC(e,f.lazyClass),("none"==e.style.display||e.parentNode&&"none"==e.parentNode.style.display)&&setTimeout((function(){n.loader.unveil(e)}),0)}))},v=function(e){var t,n,r,i;for(t=0,n=e.length;t<n;t++)(i=(r=e[t]).target).getAttribute(r.attributeName)&&("source"==i.localName&&i.parentNode&&(i=i.parentNode.querySelector("img")),i&&h.test(i.className)&&m(i))};f.unloadedClass&&(h+="|"+f.unloadedClass),h+="|"+f.loadingClass+")(\\s|$)",h=new RegExp(h),d[f.srcAttr]=1,d[f.srcsetAttr]=1,e.MutationObserver?(s=new MutationObserver(v),i=function(){a||(a=!0,s.observe(p,{subtree:!0,attributes:!0,attributeFilter:Object.keys(d)}))},o=function(){a&&(a=!1,s.disconnect())}):(p.addEventListener("DOMAttrModified",(c=[],l=function(){v(c),c=[],u=!1},function(e){a&&d[e.attrName]&&e.newValue&&(c.push({target:e.target,attributeName:e.attrName}),u||(setTimeout(l),u=!0))}),!0),i=function(){a=!0},o=function(){a=!1}),addEventListener("lazybeforeunveil",o,!0),addEventListener("lazybeforeunveil",i),addEventListener("lazybeforesizes",o,!0),addEventListener("lazybeforesizes",i),i(),removeEventListener("lazybeforeunveil",r)}))}))},7320:(e,t,n)=>{"use strict";var r=n(3081);(0,r.Fi)((function(){document.querySelectorAll("[data-toggle-ref]").forEach((function(e){var t=JSON.parse(e.getAttribute("data-toggle-ref")),n="".concat(t.ref).concat("_active"),i=document.querySelector(".".concat(t.ref));function o(e){e.target.closest(".".concat(t.ref))||(i.classList.remove(n),t.overlay&&(0,r.Fx)(),document.removeEventListener("click",o))}i&&e.addEventListener("click",(function(){i.classList.contains(n)?(i.classList.remove(n),(0,r.Fx)(),document.removeEventListener("click",o)):(i.classList.add(n),t.overlay&&(0,r.G0)(!0),setTimeout((function(){document.addEventListener("click",o)})))}))}))}))},7501:function(e,t,n){var r;e=n.nmd(e),function(i){var o=t,s=(e&&e.exports,"object"==typeof n.g&&n.g);s.global!==s&&s.window;var a=function(e){this.message=e};(a.prototype=new Error).name="InvalidCharacterError";var u=function(e){throw new a(e)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,f={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&u("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,s="",a=-1,l=e.length-o;++a<l;)t=e.charCodeAt(a)<<16,n=e.charCodeAt(++a)<<8,r=e.charCodeAt(++a),s+=c.charAt((i=t+n+r)>>18&63)+c.charAt(i>>12&63)+c.charAt(i>>6&63)+c.charAt(63&i);return 2==o?(t=e.charCodeAt(a)<<8,n=e.charCodeAt(++a),s+=c.charAt((i=t+n)>>10)+c.charAt(i>>4&63)+c.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(a),s+=c.charAt(i>>2)+c.charAt(i<<4&63)+"=="),s},decode:function(e){var t=(e=String(e).replace(l,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&u("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",s=-1;++s<t;)r=c.indexOf(e.charAt(s)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}()},9973:e=>{e.exports={}},504:(e,t,n)=>{"use strict";var r=n(9973),i=!1;function o(e,t,n){if(Array.isArray(t))for(var r=0,i=t.length;r<i;++r){var s=t[r];o(e+("object"==typeof s?"["+r+"]":"[]"),s,n)}else if(t&&"object"==typeof t)for(var a in t)o(e+"["+a+"]",t[a],n);else n(e,t)}if(r.param)throw new Error("You can't have two versions of can-param, check your dependencies");e.exports=r.param=function(e){var t=[],n=function(e,n){n=i&&null==n?"":n,t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))};for(var r in e)i&&void 0===e[r]||o(r,e[r],n);return t.join("&").replace(/%20/g,"+")},r.param.setStandardsMode=function(e){i=!!e}},6574:function(e){var t;t=function(){return function(){"use strict";var e={382:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Centrifuge=void 0;var r=a(n(187)),i=a(n(471)),o=n(147),s=n(853);function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var p="timeout",m="connection closed",v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(h,e);var t,r,a,d=f(h);function h(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(n=d.call(this))._url=e,n._websocket=null,n._sockjs=null,n._isSockjs=!1,n._xmlhttprequest=null,n._binary=!1,n._methodType=null,n._pushType=null,n._encoder=null,n._decoder=null,n._status="disconnected",n._reconnect=!0,n._reconnecting=!1,n._transport=null,n._transportName=null,n._transportClosed=!0,n._messageId=0,n._clientID=null,n._refreshRequired=!1,n._subs={},n._serverSubs={},n._lastSeq={},n._lastGen={},n._lastOffset={},n._lastEpoch={},n._messages=[],n._isBatching=!1,n._isSubscribeBatching=!1,n._privateChannels={},n._numRefreshFailed=0,n._refreshTimeout=null,n._pingTimeout=null,n._pongTimeout=null,n._subRefreshTimeouts={},n._retries=0,n._callbacks={},n._latency=null,n._latencyStart=null,n._connectData=null,n._token=null,n._xhrID=0,n._xhrs={},n._dispatchPromise=Promise.resolve(),n._protocol="",n._config={protocol:"",debug:!1,name:"js",version:"",websocket:null,sockjs:null,xmlhttprequest:null,minRetry:1e3,maxRetry:2e4,timeout:5e3,ping:!0,pingInterval:25e3,pongWaitTimeout:5e3,privateChannelPrefix:"$",onTransportClose:null,sockjsServer:null,sockjsTimeout:null,sockjsTransports:["websocket","xdr-streaming","xhr-streaming","eventsource","iframe-eventsource","iframe-htmlfile","xdr-polling","xhr-polling","iframe-xhr-polling","jsonp-polling"],refreshEndpoint:"/centrifuge/refresh",refreshHeaders:{},refreshParams:{},refreshData:{},refreshAttempts:null,refreshInterval:1e3,onRefreshFailed:null,onRefresh:null,subscribeEndpoint:"/centrifuge/subscribe",subscribeHeaders:{},subscribeParams:{},subRefreshInterval:1e3,onPrivateSubscribe:null,disableWithCredentials:!1},n._configure(t),n}return t=h,r=[{key:"setToken",value:function(e){this._token=e}},{key:"setConnectData",value:function(e){this._connectData=e}},{key:"setRefreshHeaders",value:function(e){this._config.refreshHeaders=e}},{key:"setRefreshParams",value:function(e){this._config.refreshParams=e}},{key:"setRefreshData",value:function(e){this._config.refreshData=e}},{key:"setSubscribeHeaders",value:function(e){this._config.subscribeHeaders=e}},{key:"setSubscribeParams",value:function(e){this._config.subscribeParams=e}},{key:"_ajax",value:function(e,t,r,i,o){var s,a=this,u="";for(var c in this._debug("sending AJAX request to",e,"with data",JSON.stringify(i)),s=null!==this._xmlhttprequest?new this._xmlhttprequest:n.g.XMLHttpRequest?new n.g.XMLHttpRequest:new n.g.ActiveXObject("Microsoft.XMLHTTP"),t)t.hasOwnProperty(c)&&(u.length>0&&(u+="&"),u+=encodeURIComponent(c)+"="+encodeURIComponent(t[c]));for(var l in u.length>0&&(u="?"+u),s.open("POST",e+u,!0),"withCredentials"in s&&(s.withCredentials=!this._config.disableWithCredentials),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.setRequestHeader("Content-Type","application/json"),r)r.hasOwnProperty(l)&&s.setRequestHeader(l,r[l]);return s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status){var e,t=!1;try{e=JSON.parse(s.responseText),t=!0}catch(e){o({error:"Invalid JSON. Data was: "+s.responseText,status:200,data:null})}t&&o({data:e,status:200})}else a._log("wrong status code in AJAX response",s.status),o({status:s.status,data:null})},setTimeout((function(){return s.send(JSON.stringify(i))}),20),s}},{key:"_log",value:function(){(0,s.log)("info",arguments)}},{key:"_debug",value:function(){!0===this._config.debug&&(0,s.log)("debug",arguments)}},{key:"_websocketSupported",value:function(){return null!==this._config.websocket||!("function"!=typeof WebSocket&&"object"!==("undefined"==typeof WebSocket?"undefined":u(WebSocket)))}},{key:"_setFormat",value:function(e){if(!this._formatOverride(e)){if("protobuf"===e)throw new Error("not implemented by JSON only Centrifuge client – use client with Protobuf");this._binary=!1,this._methodType=o.JsonMethodType,this._pushType=o.JsonPushType,this._encoder=new o.JsonEncoder,this._decoder=new o.JsonDecoder}}},{key:"_formatOverride",value:function(e){return!1}},{key:"_configure",value:function(e){if(!("Promise"in n.g))throw new Error("Promise polyfill required");if((0,s.extend)(this._config,e||{}),this._debug("centrifuge config",this._config),!this._url)throw new Error("url required");if((0,s.startsWith)(this._url,"ws")&&this._url.indexOf("format=protobuf")>-1||"protobuf"===this._config.protocol)this._setFormat("protobuf"),this._protocol="protobuf";else{if(""!==this._config.protocol&&"json"!==this._config.protocol)throw new Error("unsupported protocol "+this._config.protocol);this._setFormat("json")}if((0,s.startsWith)(this._url,"http"))if(this._debug("client will try to connect to SockJS endpoint"),null!==this._config.sockjs)this._debug("SockJS explicitly provided in options"),this._sockjs=this._config.sockjs;else{if(void 0===n.g.SockJS)throw new Error("SockJS not found, use ws:// in url or include SockJS");this._debug("use globally defined SockJS"),this._sockjs=n.g.SockJS}else this._debug("client will connect to websocket endpoint");this._xmlhttprequest=this._config.xmlhttprequest}},{key:"_setStatus",value:function(e){this._status!==e&&(this._debug("Status",this._status,"->",e),this._status=e)}},{key:"_isDisconnected",value:function(){return"disconnected"===this._status}},{key:"_isConnecting",value:function(){return"connecting"===this._status}},{key:"_isConnected",value:function(){return"connected"===this._status}},{key:"_nextMessageId",value:function(){return++this._messageId}},{key:"_resetRetry",value:function(){this._debug("reset retries count to 0"),this._retries=0}},{key:"_getRetryInterval",value:function(){var e=(0,s.backoff)(this._retries,this._config.minRetry,this._config.maxRetry);return this._retries+=1,e}},{key:"_abortInflightXHRs",value:function(){for(var e in this._xhrs){try{this._xhrs[e].abort()}catch(e){this._debug("error aborting xhr",e)}delete this._xhrs[e]}}},{key:"_clearConnectedState",value:function(e){for(var t in this._clientID=null,this._stopPing(),this._callbacks)if(this._callbacks.hasOwnProperty(t)){var n=this._callbacks[t];clearTimeout(n.timeout);var r=n.errback;if(!r)continue;r({error:this._createErrorObject("disconnected")})}for(var i in this._callbacks={},this._subs)if(this._subs.hasOwnProperty(i)){var o=this._subs[i];e?(o._isSuccess()&&(o._triggerUnsubscribe(),o._recover=!0),o._shouldResubscribe()&&o._setSubscribing()):o._setUnsubscribed()}for(var s in this._abortInflightXHRs(),null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._subRefreshTimeouts)this._subRefreshTimeouts.hasOwnProperty(s)&&this._subRefreshTimeouts[s]&&this._clearSubRefreshTimeout(s);this._subRefreshTimeouts={},this._reconnect||(this._subs={})}},{key:"_isTransportOpen",value:function(){return this._isSockjs?this._transport&&this._transport.transport&&this._transport.transport.readyState===this._transport.transport.OPEN:this._transport&&this._transport.readyState===this._transport.OPEN}},{key:"_transportSend",value:function(e){if(!e.length)return!0;if(!this._isTransportOpen()){for(var t in e){var n=t.id;if(n in this._callbacks){var r=this._callbacks[n];clearTimeout(this._callbacks[n].timeout),delete this._callbacks[n],(0,r.errback)({error:this._createErrorObject(m,0)})}}return!1}return this._transport.send(this._encoder.encodeCommands(e)),!0}},{key:"_getSubProtocol",value:function(){return this._protocol?"centrifuge-"+this._protocol:""}},{key:"_setupTransport",value:function(){var e=this;if(this._isSockjs=!1,null!==this._sockjs){var t={transports:this._config.sockjsTransports};null!==this._config.sockjsServer&&(t.server=this._config.sockjsServer),null!==this._config.sockjsTimeout&&(t.timeout=this._config.sockjsTimeout),this._isSockjs=!0,this._transport=new this._sockjs(this._url,null,t)}else{if(!this._websocketSupported())throw this._debug("No Websocket support and no SockJS configured, can not connect"),new Error("No Websocket support and no SockJS configured, can not connect");null!==this._config.websocket?this._websocket=this._config.websocket:this._websocket=WebSocket;var n=this._getSubProtocol();this._transport=""!==n?new this._websocket(this._url,n):new this._websocket(this._url),!0===this._binary&&(this._transport.binaryType="arraybuffer")}this._transport.onopen=function(){e._transportClosed=!1,e._isSockjs?(e._transportName="sockjs-"+e._transport.transport,e._transport.onheartbeat=function(){return e._restartPing()}):e._transportName="websocket";var t={};(e._token||e._connectData||e._config.name||e._config.version)&&(t.params={}),e._token&&(t.params.token=e._token),e._connectData&&(t.params.data=e._connectData),e._config.name&&(t.params.name=e._config.name),e._config.version&&(t.params.version=e._config.version);var n={},r=!1;for(var i in e._serverSubs)if(e._serverSubs.hasOwnProperty(i)&&e._serverSubs[i].recoverable){r=!0;var o={recover:!0};e._serverSubs[i].seq||e._serverSubs[i].gen?(e._serverSubs[i].seq&&(o.seq=e._serverSubs[i].seq),e._serverSubs[i].gen&&(o.gen=e._serverSubs[i].gen)):e._serverSubs[i].offset&&(o.offset=e._serverSubs[i].offset),e._serverSubs[i].epoch&&(o.epoch=e._serverSubs[i].epoch),n[i]=o}r&&(t.params||(t.params={}),t.params.subs=n),e._latencyStart=new Date,e._call(t).then((function(t){e._connectResponse(e._decoder.decodeCommandResult(e._methodType.CONNECT,t.result),r),t.next&&t.next()}),(function(t){109===t.error.code&&(e._refreshRequired=!0),e._disconnect("connect error",!0),t.next&&t.next()}))},this._transport.onerror=function(t){e._debug("transport level error",t)},this._transport.onclose=function(t){e._transportClosed=!0;var n=m,r=!0;if(t&&"reason"in t&&t.reason)try{var i=JSON.parse(t.reason);e._debug("reason is an advice object",i),n=i.reason,r=i.reconnect}catch(r){n=t.reason,e._debug("reason is a plain string",n)}if(null!==e._config.onTransportClose&&e._config.onTransportClose({event:t,reason:n,reconnect:r}),e._disconnect(n,r),!0===e._reconnect){e._reconnecting=!0;var o=e._getRetryInterval();e._debug("reconnect after "+o+" milliseconds"),setTimeout((function(){!0===e._reconnect&&(e._refreshRequired?e._refresh():e._connect())}),o)}},this._transport.onmessage=function(t){e._dataReceived(t.data)}}},{key:"rpc",value:function(e){return this._rpc("",e)}},{key:"namedRPC",value:function(e,t){return this._rpc(e,t)}},{key:"_rpc",value:function(e,t){var n={data:t};""!==e&&(n.method=e);var r={method:this._methodType.RPC,params:n};return this._methodCall(r,(function(e){return e}))}},{key:"send",value:function(e){var t={method:this._methodType.SEND,params:{data:e}};return this.isConnected()&&this._transportSend([t])?Promise.resolve({}):Promise.reject(this._createErrorObject(m,0))}},{key:"_getHistoryParams",value:function(e,t){var n={channel:e};return void 0!==t&&(t.since&&(n.since={offset:t.since.offset},t.since.epoch&&(n.since.epoch=t.since.epoch)),void 0!==t.limit&&(n.limit=t.limit),!0===t.reverse&&(n.reverse=!0)),n}},{key:"_methodCall",value:function(e,t){var n=this;return this.isConnected()?new Promise((function(r,i){n._call(e).then((function(i){r(t(n._decoder.decodeCommandResult(e.method,i.result))),i.next&&i.next()}),(function(e){i(e.error),e.next&&e.next()}))})):Promise.reject(this._createErrorObject(m,0))}},{key:"publish",value:function(e,t){var n={method:this._methodType.PUBLISH,params:{channel:e,data:t}};return this._methodCall(n,(function(){return{}}))}},{key:"history",value:function(e,t){var n=this._getHistoryParams(e,t),r={method:this._methodType.HISTORY,params:n};return this._methodCall(r,(function(e){return{publications:e.publications,epoch:e.epoch||"",offset:e.offset||0}}))}},{key:"presence",value:function(e){var t={method:this._methodType.PRESENCE,params:{channel:e}};return this._methodCall(t,(function(e){return{presence:e.presence}}))}},{key:"presenceStats",value:function(e){var t={method:this._methodType.PRESENCE_STATS,params:{channel:e}};return this._methodCall(t,(function(e){return{num_users:e.num_users,num_clients:e.num_clients}}))}},{key:"_dataReceived",value:function(e){var t=this,n=this._decoder.decodeReplies(e);this._dispatchPromise=this._dispatchPromise.then((function(){var e;t._dispatchPromise=new Promise((function(t){e=t})),t._dispatchSynchronized(n,e)})),this._restartPing()}},{key:"_dispatchSynchronized",value:function(e,t){var n=this,r=Promise.resolve(),i=function(t){e.hasOwnProperty(t)&&(r=r.then((function(){return n._dispatchReply(e[t])})))};for(var o in e)i(o);r=r.then((function(){t()}))}},{key:"_dispatchReply",value:function(e){var t,n=new Promise((function(e){t=e}));if(null==e)return this._debug("dispatch: got undefined or null reply"),t(),n;var r=e.id;return r&&r>0?this._handleReply(e,t):this._handlePush(e.result,t),n}},{key:"_call",value:function(e){var t=this;return new Promise((function(n,r){var i=t._addMessage(e);t._registerCall(i,n,r)}))}},{key:"_connect",value:function(){this.isConnected()?this._debug("connect called when already connected"):"connecting"!==this._status&&(this._debug("start connecting"),this._setStatus("connecting"),this._clientID=null,this._reconnect=!0,this._setupTransport())}},{key:"_disconnect",value:function(e,t){var n=t||!1;if(!1===n&&(this._reconnect=!1),this._isDisconnected())n||this._clearConnectedState(n);else{if(this._clearConnectedState(n),this._debug("disconnected:",e,t),this._setStatus("disconnected"),this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),!1===this._reconnecting){for(var r in this._serverSubs)this._serverSubs.hasOwnProperty(r)&&this.emit("unsubscribe",{channel:r});this.emit("disconnect",{reason:e,reconnect:n})}!1===n&&(this._subs={},this._serverSubs={}),this._transportClosed||this._transport.close()}}},{key:"_refreshFailed",value:function(){this._numRefreshFailed=0,this._isDisconnected()||this._disconnect("refresh failed",!1),null!==this._config.onRefreshFailed&&this._config.onRefreshFailed()}},{key:"_refresh",value:function(){var e=this;if(this._debug("refresh token"),0===this._config.refreshAttempts)return this._debug("refresh attempts set to 0, do not send refresh request at all"),void this._refreshFailed();null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null);var t=this._clientID,n=this._newXHRID(),r=function(r){if(n in e._xhrs&&delete e._xhrs[n],e._clientID===t)if(r.error||200!==r.status){if(r.error?e._debug("error refreshing connection token",r.error):e._debug("error refreshing connection token: wrong status code",r.status),e._numRefreshFailed++,null!==e._refreshTimeout&&(clearTimeout(e._refreshTimeout),e._refreshTimeout=null),null!==e._config.refreshAttempts&&e._numRefreshFailed>=e._config.refreshAttempts)return void e._refreshFailed();var i=Math.round(1e3*Math.random()*Math.max(e._numRefreshFailed,20)),o=e._config.refreshInterval+i;e._refreshTimeout=setTimeout((function(){return e._refresh()}),o)}else if(e._numRefreshFailed=0,e._token=r.data.token,e._token)if(e._isDisconnected()&&e._reconnect)e._debug("token refreshed, connect from scratch"),e._connect();else{e._debug("send refreshed token");var s={method:e._methodType.REFRESH,params:{token:e._token}};e._call(s).then((function(t){e._refreshResponse(e._decoder.decodeCommandResult(e._methodType.REFRESH,t.result)),t.next&&t.next()}),(function(t){e._refreshError(t.error),t.next&&t.next()}))}else e._refreshFailed()};if(null!==this._config.onRefresh)this._config.onRefresh({},r);else{var i=this._ajax(this._config.refreshEndpoint,this._config.refreshParams,this._config.refreshHeaders,this._config.refreshData,r);this._xhrs[n]=i}}},{key:"_refreshError",value:function(e){var t=this;this._debug("refresh error",e),this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null);var n=this._config.refreshInterval+Math.round(1e3*Math.random());this._refreshTimeout=setTimeout((function(){return t._refresh()}),n)}},{key:"_refreshResponse",value:function(e){var t=this;this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),e.expires&&(this._clientID=e.client,this._refreshTimeout=setTimeout((function(){return t._refresh()}),this._getTTLMilliseconds(e.ttl)))}},{key:"_newXHRID",value:function(){return this._xhrID++,this._xhrID}},{key:"_subRefresh",value:function(e){var t=this;if(this._debug("refresh subscription token for channel",e),void 0!==this._subRefreshTimeouts[e]){this._clearSubRefreshTimeout(e);var n=this._clientID,r=this._newXHRID(),i=function(i){if(r in t._xhrs&&delete t._xhrs[r],!i.error&&200===i.status&&t._clientID===n){var o={};if(i.data.channels)for(var s in i.data.channels){var a=i.data.channels[s];a.channel&&(o[a.channel]=a.token)}var u=o[e];if(u){var c={method:t._methodType.SUB_REFRESH,params:{channel:e,token:u}};null!==t._getSub(e)&&t._call(c).then((function(n){t._subRefreshResponse(e,t._decoder.decodeCommandResult(t._methodType.SUB_REFRESH,n.result)),n.next&&n.next()}),(function(n){t._subRefreshError(e,n.error),n.next&&n.next()}))}}},o={client:this._clientID,channels:[e]};if(null!==this._config.onPrivateSubscribe)this._config.onPrivateSubscribe({data:o},i);else{var s=this._ajax(this._config.subscribeEndpoint,this._config.subscribeParams,this._config.subscribeHeaders,o,i);this._xhrs[r]=s}}}},{key:"_clearSubRefreshTimeout",value:function(e){void 0!==this._subRefreshTimeouts[e]&&(clearTimeout(this._subRefreshTimeouts[e]),delete this._subRefreshTimeouts[e])}},{key:"_subRefreshError",value:function(e,t){var n=this;if(this._debug("subscription refresh error",e,t),this._clearSubRefreshTimeout(e),null!==this._getSub(e)){var r=Math.round(1e3*Math.random()),i=setTimeout((function(){return n._subRefresh(e)}),this._config.subRefreshInterval+r);this._subRefreshTimeouts[e]=i}}},{key:"_subRefreshResponse",value:function(e,t){var n=this;if(this._debug("subscription refresh success",e),this._clearSubRefreshTimeout(e),null!==this._getSub(e)&&!0===t.expires){var r=setTimeout((function(){return n._subRefresh(e)}),this._getTTLMilliseconds(t.ttl));this._subRefreshTimeouts[e]=r}}},{key:"_subscribe",value:function(e,t){var n=this;this._debug("subscribing on",e.channel);var r=e.channel;if(r in this._subs||(this._subs[r]=e),this.isConnected()){e._setSubscribing(t);var i={method:this._methodType.SUBSCRIBE,params:{channel:r}};if(e._subscribeData&&(i.params.data=e._subscribeData),(0,s.startsWith)(r,this._config.privateChannelPrefix))this._isSubscribeBatching?this._privateChannels[r]=!0:(this.startSubscribeBatching(),this._subscribe(e),this.stopSubscribeBatching());else{var o=e._needRecover();if(!0===o){i.params.recover=!0;var a=this._getLastSeq(r),u=this._getLastGen(r);if(a||u)a&&(i.params.seq=a),u&&(i.params.gen=u);else{var c=this._getLastOffset(r);c&&(i.params.offset=c)}var l=this._getLastEpoch(r);l&&(i.params.epoch=l)}this._call(i).then((function(e){n._subscribeResponse(r,o,n._decoder.decodeCommandResult(n._methodType.SUBSCRIBE,e.result)),e.next&&e.next()}),(function(e){n._subscribeError(r,e.error),e.next&&e.next()}))}}else e._setNew()}},{key:"_unsubscribe",value:function(e){delete this._subs[e.channel],delete this._lastOffset[e.channel],delete this._lastSeq[e.channel],delete this._lastGen[e.channel],this.isConnected()&&this._addMessage({method:this._methodType.UNSUBSCRIBE,params:{channel:e.channel}})}},{key:"_getTTLMilliseconds",value:function(e){return Math.min(1e3*e,2147483647)}},{key:"getSub",value:function(e){return this._getSub(e)}},{key:"_getSub",value:function(e){var t=this._subs[e];return t||null}},{key:"_isServerSub",value:function(e){return void 0!==this._serverSubs[e]}},{key:"_connectResponse",value:function(e,t){var n=this,r=this._reconnecting;if(this._reconnecting=!1,this._resetRetry(),this._refreshRequired=!1,!this.isConnected()){for(var i in null!==this._latencyStart&&(this._latency=(new Date).getTime()-this._latencyStart.getTime(),this._latencyStart=null),this._clientID=e.client,this._setStatus("connected"),this._refreshTimeout&&clearTimeout(this._refreshTimeout),e.expires&&(this._refreshTimeout=setTimeout((function(){return n._refresh()}),this._getTTLMilliseconds(e.ttl))),this.startBatching(),this.startSubscribeBatching(),this._subs)if(this._subs.hasOwnProperty(i)){var o=this._subs[i];o._shouldResubscribe()&&this._subscribe(o,r)}this.stopSubscribeBatching(),this.stopBatching(),this._startPing();var s={client:e.client,transport:this._transportName,latency:this._latency};e.data&&(s.data=e.data),this.emit("connect",s),e.subs&&this._processServerSubs(e.subs)}}},{key:"_processServerSubs",value:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t],r={channel:t,isResubscribe:void 0!==this._serverSubs[t]};r=this._expandSubscribeContext(r,n),this.emit("subscribe",r)}for(var i in e)if(e.hasOwnProperty(i)){var o=e[i];if(o.recovered){var s=o.publications;if(s&&s.length>0)for(var a in s.length>1&&(!s[0].offset||s[0].offset>s[1].offset)&&(s=s.reverse()),s)s.hasOwnProperty(a)&&this._handlePublication(i,s[a])}this._serverSubs[i]={seq:o.seq,gen:o.gen,offset:o.offset,epoch:o.epoch,recoverable:o.recoverable}}}},{key:"_stopPing",value:function(){null!==this._pongTimeout&&(clearTimeout(this._pongTimeout),this._pongTimeout=null),null!==this._pingTimeout&&(clearTimeout(this._pingTimeout),this._pingTimeout=null)}},{key:"_startPing",value:function(){var e=this;!0!==this._config.ping||this._config.pingInterval<=0||this.isConnected()&&(this._pingTimeout=setTimeout((function(){e.isConnected()?(e.ping(),e._pongTimeout=setTimeout((function(){e._disconnect("no ping",!0)}),e._config.pongWaitTimeout)):e._stopPing()}),this._config.pingInterval))}},{key:"_restartPing",value:function(){this._stopPing(),this._startPing()}},{key:"_subscribeError",value:function(e,t){var n=this._getSub(e);n&&n._isSubscribing()&&(0!==t.code||t.message!==p?n._setSubscribeError(t):this._disconnect("timeout",!0))}},{key:"_expandSubscribeContext",value:function(e,t){var n=!1;"recovered"in t&&(n=t.recovered),e.recovered=n;var r=!1;"positioned"in t&&(r=t.positioned);var i="";"epoch"in t&&(i=t.epoch);var o=0;return"offset"in t&&(o=t.offset),r&&(e.streamPosition={offset:o,epoch:i}),t.data&&(e.data=t.data),e}},{key:"_subscribeResponse",value:function(e,t,n){var r=this,i=this._getSub(e);if(i&&i._isSubscribing()){i._setSubscribeSuccess(n);var o=n.publications;if(o&&o.length>0)for(var s in o.length>=2&&!o[0].offset&&!o[1].offset&&(o=o.reverse()),o)o.hasOwnProperty(s)&&this._handlePublication(e,o[s]);if(!n.recoverable||t&&n.recovered||(this._lastSeq[e]=n.seq||0,this._lastGen[e]=n.gen||0,this._lastOffset[e]=n.offset||0),this._lastEpoch[e]=n.epoch||"",n.recoverable&&(i._recoverable=!0),!0===n.expires){var a=setTimeout((function(){return r._subRefresh(e)}),this._getTTLMilliseconds(n.ttl));this._subRefreshTimeouts[e]=a}}}},{key:"_handleReply",value:function(e,t){var n=e.id,r=e.result;if(n in this._callbacks){var i=this._callbacks[n];if(clearTimeout(this._callbacks[n].timeout),delete this._callbacks[n],(0,s.errorExists)(e)){var o=i.errback;if(!o)return void t();o({error:e.error,next:t})}else{var a=i.callback;if(!a)return;a({result:r,next:t})}}else t()}},{key:"_handleJoin",value:function(e,t){var n={info:t.info},r=this._getSub(e);r?r.emit("join",n):this._isServerSub(e)&&(n.channel=e,this.emit("join",n))}},{key:"_handleLeave",value:function(e,t){var n={info:t.info},r=this._getSub(e);r?r.emit("leave",n):this._isServerSub(e)&&(n.channel=e,this.emit("leave",n))}},{key:"_handleUnsub",value:function(e,t){var n={},r=this._getSub(e);r?(r.unsubscribe(),!0===t.resubscribe&&r.subscribe()):this._isServerSub(e)&&(delete this._serverSubs[e],n.channel=e,this.emit("unsubscribe",n))}},{key:"_handleSub",value:function(e,t){this._serverSubs[e]={seq:t.seq,gen:t.gen,offset:t.offset,epoch:t.epoch,recoverable:t.recoverable};var n={channel:e,isResubscribe:!1};n=this._expandSubscribeContext(n,t),this.emit("subscribe",n)}},{key:"_handlePublication",value:function(e,t){var n=this._getSub(e),r={data:t.data,seq:t.seq,gen:t.gen,offset:t.offset};t.info&&(r.info=t.info),n?(void 0!==t.seq&&(this._lastSeq[e]=t.seq),void 0!==t.gen&&(this._lastGen[e]=t.gen),void 0!==t.offset&&(this._lastOffset[e]=t.offset),n.emit("publish",r)):this._isServerSub(e)&&(void 0!==t.seq&&(this._serverSubs[e].seq=t.seq),void 0!==t.gen&&(this._serverSubs[e].gen=t.gen),void 0!==t.offset&&(this._serverSubs[e].offset=t.offset),r.channel=e,this.emit("publish",r))}},{key:"_handleMessage",value:function(e){this.emit("message",e.data)}},{key:"_handlePush",value:function(e,t){var n=this._decoder.decodePush(e),r=0;"type"in n&&(r=n.type);var i=n.channel;if(r===this._pushType.PUBLICATION){var o=this._decoder.decodePushData(this._pushType.PUBLICATION,n.data);this._handlePublication(i,o)}else if(r===this._pushType.MESSAGE){var s=this._decoder.decodePushData(this._pushType.MESSAGE,n.data);this._handleMessage(s)}else if(r===this._pushType.JOIN){var a=this._decoder.decodePushData(this._pushType.JOIN,n.data);this._handleJoin(i,a)}else if(r===this._pushType.LEAVE){var u=this._decoder.decodePushData(this._pushType.LEAVE,n.data);this._handleLeave(i,u)}else if(r===this._pushType.UNSUBSCRIBE){var c=this._decoder.decodePushData(this._pushType.UNSUBSCRIBE,n.data);this._handleUnsub(i,c)}else if(r===this._pushType.SUBSCRIBE){var l=this._decoder.decodePushData(this._pushType.UNSUBSCRIBE,n.data);this._handleSub(i,l)}t()}},{key:"_flush",value:function(){var e=this._messages.slice(0);this._messages=[],this._transportSend(e)}},{key:"_ping",value:function(){var e=this,t={method:this._methodType.PING};this._call(t).then((function(t){e._pingResponse(e._decoder.decodeCommandResult(e._methodType.PING,t.result)),t.next&&t.next()}),(function(t){e._debug("ping error",t.error),t.next&&t.next()}))}},{key:"_pingResponse",value:function(e){this.isConnected()&&(this._stopPing(),this._startPing())}},{key:"_getLastSeq",value:function(e){var t=this._lastSeq[e];return t||0}},{key:"_getLastOffset",value:function(e){var t=this._lastOffset[e];return t||0}},{key:"_getLastGen",value:function(e){var t=this._lastGen[e];return t||0}},{key:"_getLastEpoch",value:function(e){var t=this._lastEpoch[e];return t||""}},{key:"_createErrorObject",value:function(e,t){return{message:e,code:t||0}}},{key:"_registerCall",value:function(e,t,n){var r=this;this._callbacks[e]={callback:t,errback:n,timeout:null},this._callbacks[e].timeout=setTimeout((function(){delete r._callbacks[e],(0,s.isFunction)(n)&&n({error:r._createErrorObject(p)})}),this._config.timeout)}},{key:"_addMessage",value:function(e){var t=this._nextMessageId();return e.id=t,!0===this._isBatching?this._messages.push(e):this._transportSend([e]),t}},{key:"isConnected",value:function(){return this._isConnected()}},{key:"connect",value:function(){this._connect()}},{key:"disconnect",value:function(){this._disconnect("client",!1)}},{key:"ping",value:function(){return this._ping()}},{key:"startBatching",value:function(){this._isBatching=!0}},{key:"stopBatching",value:function(){this._isBatching=!1,this._flush()}},{key:"startSubscribeBatching",value:function(){this._isSubscribeBatching=!0}},{key:"stopSubscribeBatching",value:function(){var e=this;this._isSubscribeBatching=!1;var t=this._privateChannels;this._privateChannels={};var n=[];for(var r in t)if(t.hasOwnProperty(r)){if(!this._getSub(r))continue;n.push(r)}if(0!==n.length){var i={client:this._clientID,channels:n},o=this._clientID,s=this._newXHRID(),a=function(t){if(s in e._xhrs&&delete e._xhrs[s],e._clientID===o)if(t.error||200!==t.status){for(var r in e._debug("authorization request failed"),n)if(n.hasOwnProperty(r)){var i=n[r];e._subscribeError(i,e._createErrorObject("authorization request failed"))}}else{var a={};if(t.data.channels)for(var u in t.data.channels){var c=t.data.channels[u];c.channel&&(a[c.channel]=c.token)}var l=!1;for(var f in e._isBatching||(e.startBatching(),l=!0),n)if(n.hasOwnProperty(f)){var d=function(){var t=n[f],r=a[t];if(!r)return e._subscribeError(t,e._createErrorObject("permission denied",103)),"continue";var i={method:e._methodType.SUBSCRIBE,params:{channel:t,token:r}},o=e._getSub(t);if(null===o)return"continue";var s=o._needRecover();if(!0===s){i.params.recover=!0;var u=e._getLastSeq(t),c=e._getLastGen(t);if(u||c)u&&(i.params.seq=u),c&&(i.params.gen=c);else{var l=e._getLastOffset(t);l&&(i.params.offset=l)}var d=e._getLastEpoch(t);d&&(i.params.epoch=d)}e._call(i).then((function(n){e._subscribeResponse(t,s,e._decoder.decodeCommandResult(e._methodType.SUBSCRIBE,n.result)),n.next&&n.next()}),(function(n){e._subscribeError(t,n.error),n.next&&n.next()}))}();if("continue"===d)continue}l&&e.stopBatching()}};if(null!==this._config.onPrivateSubscribe)this._config.onPrivateSubscribe({data:i},a);else{var u=this._ajax(this._config.subscribeEndpoint,this._config.subscribeParams,this._config.subscribeHeaders,i,a);this._xhrs[s]=u}}else this._debug("no private channels found, no need to make request")}},{key:"_setSubscribeSince",value:function(e,t){this._lastOffset[e.channel]=t.offset,this._lastEpoch[e.channel]=t.epoch,e._setNeedRecover(!0)}},{key:"subscribe",value:function(e,t,n){var r=this._getSub(e);if(null!==r)return r._setEvents(t),r._isUnsubscribed()&&r.subscribe(n),r;var o=new i.default(this,e,t);return this._subs[e]=o,o.subscribe(n),o}}],r&&c(t.prototype,r),a&&c(t,a),h}(r.default);t.Centrifuge=v},579:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(382).Centrifuge;t.default=r,e.exports=t.default},147:function(e,t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPushType=t.JsonMethodType=t.JsonEncoder=t.JsonDecoder=void 0,t.JsonMethodType={CONNECT:0,SUBSCRIBE:1,UNSUBSCRIBE:2,PUBLISH:3,PRESENCE:4,PRESENCE_STATS:5,HISTORY:6,PING:7,SEND:8,RPC:9,REFRESH:10,SUB_REFRESH:11},t.JsonPushType={PUBLICATION:0,JOIN:1,LEAVE:2,UNSUBSCRIBE:3,MESSAGE:4,SUBSCRIBE:5};var o=function(){function e(){n(this,e)}return i(e,[{key:"encodeCommands",value:function(e){return e.map((function(e){return JSON.stringify(e)})).join("\n")}}]),e}();t.JsonEncoder=o;var s=function(){function e(){n(this,e)}return i(e,[{key:"decodeReplies",value:function(e){return e.split("\n").filter((function(e){return""!==e})).map((function(e){return JSON.parse(e)}))}},{key:"decodeCommandResult",value:function(e,t){return t}},{key:"decodePush",value:function(e){return e}},{key:"decodePushData",value:function(e,t){return t}}]),e}();t.JsonDecoder=s},471:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=(i=n(187))&&i.__esModule?i:{default:i},s=n(853);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(o,e);var t,n,r,i=c(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).channel=t,r._centrifuge=e,r._status=0,r._error=null,r._isResubscribe=!1,r._ready=!1,r._subscriptionPromise=null,r._noResubscribe=!1,r._recoverable=!1,r._recover=!1,r._setEvents(n),r._initializePromise(),r._promises={},r._promiseId=0,r._subscribeData=null,r.on("error",(function(e){this._centrifuge._debug("subscription error",e)})),r}return t=o,(n=[{key:"_nextPromiseId",value:function(){return++this._promiseId}},{key:"_initializePromise",value:function(){var e=this;this._ready=!1,this._subscriptionPromise=new Promise((function(t,n){e._resolve=function(n){e._ready=!0,t(n)},e._reject=function(t){e._ready=!0,n(t)}})).then((function(){}),(function(){}))}},{key:"_setNeedRecover",value:function(e){this._recoverable=e,this._recover=e}},{key:"_needRecover",value:function(){return!0===this._recoverable&&!0===this._recover}},{key:"_setEvents",value:function(e){if(e)if((0,s.isFunction)(e))this.on("publish",e);else if(Object.prototype.toString.call(e)===Object.prototype.toString.call({}))for(var t=["publish","join","leave","unsubscribe","subscribe","error"],n=0,r=t.length;n<r;n++){var i=t[n];i in e&&this.on(i,e[i])}}},{key:"_isNew",value:function(){return 0===this._status}},{key:"_isUnsubscribed",value:function(){return 4===this._status}},{key:"_isSubscribing",value:function(){return 1===this._status}},{key:"_isReady",value:function(){return 2===this._status||3===this._status}},{key:"_isSuccess",value:function(){return 2===this._status}},{key:"_isError",value:function(){return 3===this._status}},{key:"_setNew",value:function(){this._status=0}},{key:"_setSubscribing",value:function(e){this._isResubscribe=e||!1,!0===this._ready&&this._initializePromise(),this._status=1}},{key:"_setSubscribeSuccess",value:function(e){if(2!==this._status){this._status=2;var t=this._getSubscribeSuccessContext(e);for(var n in this._recover=!1,this.emit("subscribe",t),this._resolve(t),this._promises)clearTimeout(this._promises[n].timeout),this._promises[n].resolve(),delete this._promises[n]}}},{key:"_setSubscribeError",value:function(e){if(3!==this._status){this._status=3,this._error=e;var t=this._getSubscribeErrorContext();for(var n in this.emit("error",t),this._reject(t),this._promises)clearTimeout(this._promises[n].timeout),this._promises[n].reject(e),delete this._promises[n]}}},{key:"_triggerUnsubscribe",value:function(){this.emit("unsubscribe",{channel:this.channel})}},{key:"_setUnsubscribed",value:function(e){if(this._centrifuge._clearSubRefreshTimeout(this.channel),4!==this._status){var t=2===this._status;this._status=4,!0===e&&(this._recover=!1,this._noResubscribe=!0,delete this._centrifuge._lastSeq[this.channel],delete this._centrifuge._lastGen[this.channel],delete this._centrifuge._lastEpoch[this.channel]),t&&this._triggerUnsubscribe()}}},{key:"_shouldResubscribe",value:function(){return!this._noResubscribe}},{key:"_getSubscribeSuccessContext",value:function(e){var t={channel:this.channel,isResubscribe:this._isResubscribe};return e&&(t=this._centrifuge._expandSubscribeContext(t,e)),t}},{key:"_getSubscribeErrorContext",value:function(){var e=this._error;return e.channel=this.channel,e.isResubscribe=this._isResubscribe,e}},{key:"_setSubscribeData",value:function(e){this._subscribeData=e}},{key:"ready",value:function(e,t){this._ready&&(this._isSuccess()?e(this._getSubscribeSuccessContext()):t(this._getSubscribeErrorContext()))}},{key:"subscribe",value:function(e){2!==this._status&&(e&&e.since&&this._centrifuge._setSubscribeSince(this,e.since),e&&e.data&&this._setSubscribeData(e.data),this._noResubscribe=!1,this._centrifuge._subscribe(this))}},{key:"unsubscribe",value:function(){this._setUnsubscribed(!0),this._centrifuge._unsubscribe(this)}},{key:"_methodCall",value:function(){var e=this;return this._isSuccess()?Promise.resolve():this._isError()?Promise.reject(this._error):new Promise((function(t,n){var r=setTimeout((function(){n({code:0,message:"timeout"})}),e._centrifuge._config.timeout);e._promises[e._nextPromiseId()]={timeout:r,resolve:t,reject:n}}))}},{key:"publish",value:function(e){var t=this;return this._methodCall().then((function(){return t._centrifuge.publish(t.channel,e)}))}},{key:"presence",value:function(){var e=this;return this._methodCall().then((function(){return e._centrifuge.presence(e.channel)}))}},{key:"presenceStats",value:function(){var e=this;return this._methodCall().then((function(){return e._centrifuge.presenceStats(e.channel)}))}},{key:"history",value:function(e){var t=this;return this._methodCall().then((function(){return t._centrifuge.history(t.channel,e)}))}}])&&a(t.prototype,n),r&&a(t,r),o}(o.default);t.default=d,e.exports=t.default},853:function(e,t,n){function r(e){return null!=e&&"function"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.backoff=function(e,t,n){var r=.5*Math.random(),i=Math.min(n,t*Math.pow(2,e+1));return Math.floor((1-r)*i)},t.errorExists=function(e){return"error"in e&&null!==e.error},t.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.isFunction=r,t.log=function(e,t){if(n.g.console){var i=n.g.console[e];r(i)&&i.apply(n.g.console,t)}},t.startsWith=function(e,t){return 0===e.lastIndexOf(t,0)}},187:function(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,s,c;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var c=u.length,l=p(u,c);for(n=0;n<c;++n)r(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},o.prototype.listenerCount=h,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(579)}()},e.exports=t()},7174:e=>{e.exports={list:function(){return t},information:function(e){return t[e.toUpperCase()]},isValid:function(e){return null!=t[e.toUpperCase()]}};var t={AED:{num:784,places:2,name:"United Arab Emirates dirham",symbol:"د.إ",countries:["United Arab Emirates"]},AFN:{num:971,places:2,name:"Afghan afghani",symbol:"؋",countries:["Afghanistan"]},ALL:{num:8,places:2,name:"Albanian lek",symbol:"L",countries:["Albania"]},AMD:{num:51,places:2,name:"Armenian dram",symbol:"֏",countries:["Armenia"]},ANG:{num:532,places:2,name:"Netherlands Antillean guilder",symbol:"NAƒ",countries:["Curaçao (CW)","Sint Maarten (SX)"]},AOA:{num:973,places:2,name:"Angolan kwanza",symbol:"Kz",countries:["Angola"]},ARS:{num:32,places:2,name:"Argentine peso",symbol:"$",countries:["Argentina"]},AUD:{num:36,places:2,name:"Australian dollar",symbol:"A$",countries:["Australia","Christmas Island (CX)","Cocos (Keeling) Islands (CC)","Heard Island and McDonald Islands (HM)","Kiribati (KI)","Nauru (NR)","Norfolk Island (NF)","Tuvalu (TV)","Australian Antarctic Territory"]},AWG:{num:533,places:2,name:"Aruban florin",symbol:"Afl",countries:["Aruba"]},AZN:{num:944,places:2,name:"Azerbaijani manat",symbol:"₼",countries:["Azerbaijan"]},BAM:{num:977,places:2,name:"Bosnia and Herzegovina convertible mark",symbol:"KM",countries:["Bosnia and Herzegovina"]},BBD:{num:52,places:2,name:"Barbados dollar",symbol:"Bds$",countries:["Barbados"]},BDT:{num:50,places:2,name:"Bangladeshi taka",symbol:"৳",countries:["Bangladesh"]},BGN:{num:975,places:2,name:"Bulgarian lev",symbol:"лв.",countries:["Bulgaria"]},BHD:{num:48,places:3,name:"Bahraini dinar",symbol:"BD",countries:["Bahrain"]},BIF:{num:108,places:0,name:"Burundian franc",symbol:"FBu",countries:["Burundi"]},BMD:{num:60,places:2,name:"Bermudian dollar",symbol:"$",countries:["Bermuda"]},BND:{num:96,places:2,name:"Brunei dollar",symbol:"B$",countries:["Brunei","auxiliary in Singapore (SG)"]},BOB:{num:68,places:2,name:"Boliviano",symbol:"Bs",countries:["Bolivia"]},BOV:{num:984,places:2,name:"Bolivian Mvdol (funds code)",symbol:"",countries:["Bolivia"]},BRL:{num:986,places:2,name:"Brazilian real",symbol:"R$",countries:["Brazil"]},BSD:{num:44,places:2,name:"Bahamian dollar",symbol:"B$",countries:["Bahamas"]},BTN:{num:64,places:2,name:"Bhutanese ngultrum",symbol:"Nu.",countries:["Bhutan"]},BWP:{num:72,places:2,name:"Botswana *****",symbol:"P",countries:["Botswana"]},BYN:{num:933,places:2,name:"Belarusian ruble",symbol:"Br",countries:["Belarus"]},BYR:{num:974,places:0,name:"Belarusian ruble",symbol:"Br",countries:["Belarus"]},BZD:{num:84,places:2,name:"Belize dollar",symbol:"BZ$",countries:["Belize"]},CAD:{num:124,places:2,name:"Canadian dollar",symbol:"C$",countries:["Canada"]},CDF:{num:976,places:2,name:"Congolese franc",symbol:"FC",countries:["Democratic Republic of the Congo"]},CHE:{num:947,places:2,name:"WIR Euro (complementary currency)",symbol:"",countries:["Switzerland"]},CHF:{num:756,places:2,name:"Swiss franc",symbol:"Fr.",countries:["Switzerland","Liechtenstein (LI)"]},CHW:{num:948,places:2,name:"WIR Franc (complementary currency)",symbol:"",countries:["Switzerland"]},CLF:{num:990,places:4,name:"Unidad de Fomento (funds code)",symbol:"",countries:["Chile"]},CLP:{num:152,places:0,name:"Chilean peso",symbol:"$",countries:["Chile"]},CNY:{num:156,places:2,name:"Chinese yuan",symbol:"¥",countries:["China"]},COP:{num:170,places:2,name:"Colombian peso",symbol:"$",countries:["Colombia"]},COU:{num:970,places:2,name:"Unidad de Valor Real (UVR) (funds code)",symbol:"",countries:["Colombia"]},CRC:{num:188,places:2,name:"Costa Rican colon",symbol:"₡",countries:["Costa Rica"]},CUC:{num:931,places:2,name:"Cuban convertible peso",symbol:"$",countries:["Cuba"]},CUP:{num:192,places:2,name:"Cuban peso",symbol:"₱",countries:["Cuba"]},CVE:{num:132,places:0,name:"Cape Verde escudo",symbol:"$",countries:["Cape Verde"]},CZK:{num:203,places:2,name:"Czech koruna",symbol:"Kč",countries:["Czech Republic"]},DJF:{num:262,places:0,name:"Djiboutian franc",symbol:"Fdj",countries:["Djibouti"]},DKK:{num:208,places:2,name:"Danish krone",symbol:"kr.",countries:["Denmark","Faroe Islands (FO)","Greenland (GL)"]},DOP:{num:214,places:2,name:"Dominican peso",symbol:"RD$",countries:["Dominican Republic"]},DZD:{num:12,places:2,name:"Algerian dinar",symbol:"DA",countries:["Algeria"]},EGP:{num:818,places:2,name:"Egyptian pound",symbol:"E£",countries:["Egypt","auxiliary in Gaza Strip"]},ERN:{num:232,places:2,name:"Eritrean nakfa",symbol:"Nfk",countries:["Eritrea"]},ETB:{num:230,places:2,name:"Ethiopian birr",symbol:"Br",countries:["Ethiopia"]},EUR:{num:978,places:2,name:"Euro",symbol:"€",countries:["Akrotiri and Dhekelia","Andorra (AD)","Austria (AT)","Belgium (BE)","Cyprus (CY)","Estonia (EE)","Finland (FI)","France (FR)","Germany (DE)","Greece (GR)","Guadeloupe (GP)","Ireland (IE)","Italy (IT)","Kosovo","Latvia (LV)","Lithuania (LT)","Luxembourg (LU)","Malta (MT)","Martinique (MQ)","Mayotte (YT)","Monaco (MC)","Montenegro (ME)","Netherlands (NL)","Portugal (PT)","Réunion (RE)","Saint Barthélemy (BL)","Saint Pierre and Miquelon (PM)","San Marino (SM)","Slovakia (SK)","Slovenia (SI)","Spain (ES)","Vatican City (VA); see Eurozone"]},FJD:{num:242,places:2,name:"Fiji dollar",symbol:"FJ$",countries:["Fiji"]},FKP:{num:238,places:2,name:"Falkland Islands pound",symbol:"£",countries:["Falkland Islands (pegged to GBP 1:1)"]},GBP:{num:826,places:2,name:"Pound sterling",symbol:"£",countries:["United Kingdom","the Isle of Man (IM","see Manx pound)","Jersey (JE","see Jersey pound)","Guernsey (GG","see Guernsey pound)","South Georgia and the South Sandwich Islands (GS)","British Indian Ocean Territory (IO) (also uses USD)","Tristan da Cunha (SH-TA)","and British Antarctic Territory"]},GEL:{num:981,places:2,name:"Georgian lari",symbol:"₾",countries:["Georgia (except Abkhazia (GE-AB) and South Ossetia)"]},GHS:{num:936,places:2,name:"Ghanaian cedi",symbol:"GH₵",countries:["Ghana"]},GIP:{num:292,places:2,name:"Gibraltar pound",symbol:"£",countries:["Gibraltar (pegged to GBP 1:1)"]},GMD:{num:270,places:2,name:"Gambian dalasi",symbol:"D",countries:["Gambia"]},GNF:{num:324,places:0,name:"Guinean franc",symbol:"FG",countries:["Guinea"]},GTQ:{num:320,places:2,name:"Guatemalan quetzal",symbol:"Q",countries:["Guatemala"]},GYD:{num:328,places:2,name:"Guyanese dollar",symbol:"G$",countries:["Guyana"]},HKD:{num:344,places:2,name:"Hong Kong dollar",symbol:"HK$",countries:["Hong Kong","Macao (MO)"]},HNL:{num:340,places:2,name:"Honduran lempira",symbol:"L",countries:["Honduras"]},HRK:{num:191,places:2,name:"Croatian kuna",symbol:"kn",countries:["Croatia"]},HTG:{num:332,places:2,name:"Haitian gourde",symbol:"G",countries:["Haiti"]},HUF:{num:348,places:2,name:"Hungarian forint",symbol:"Ft",countries:["Hungary"]},IDR:{num:360,places:2,name:"Indonesian rupiah",symbol:"Rp",countries:["Indonesia"]},ILS:{num:376,places:2,name:"Israeli new shekel",symbol:"₪",countries:["Israel","State of Palestine (PS)"]},INR:{num:356,places:2,name:"Indian rupee",symbol:"₹",countries:["India","Bhutan","Nepal","Zimbabwe"]},IQD:{num:368,places:3,name:"Iraqi dinar",symbol:"ع.د",countries:["Iraq"]},IRR:{num:364,places:2,name:"Iranian rial",symbol:"﷼ ",countries:["Iran"]},ISK:{num:352,places:0,name:"Icelandic króna",symbol:"kr",countries:["Iceland"]},JMD:{num:388,places:2,name:"Jamaican dollar",symbol:"$",countries:["Jamaica"]},JOD:{num:400,places:3,name:"Jordanian dinar",symbol:"",countries:["Jordan","auxiliary in West Bank"]},JPY:{num:392,places:0,name:"Japanese yen",symbol:"¥",countries:["Japan"]},KES:{num:404,places:2,name:"Kenyan shilling",symbol:"KSh",countries:["Kenya"]},KGS:{num:417,places:2,name:"Kyrgyzstani som",symbol:"som",countries:["Kyrgyzstan"]},KHR:{num:116,places:2,name:"Cambodian riel",symbol:"៛",countries:["Cambodia"]},KMF:{num:174,places:0,name:"Comoro franc",symbol:"CF",countries:["Comoros"]},KPW:{num:408,places:2,name:"North Korean won",symbol:"₩",countries:["North Korea"]},KRW:{num:410,places:0,name:"South Korean won",symbol:"₩",countries:["South Korea"]},KWD:{num:414,places:3,name:"Kuwaiti dinar",symbol:"د.ك",countries:["Kuwait"]},KYD:{num:136,places:2,name:"Cayman Islands dollar",symbol:"$",countries:["Cayman Islands"]},KZT:{num:398,places:2,name:"Kazakhstani tenge",symbol:"₸",countries:["Kazakhstan"]},LAK:{num:418,places:2,name:"Lao kip",symbol:"₭",countries:["Laos"]},LBP:{num:422,places:2,name:"Lebanese pound",symbol:"ل.ل.‎",countries:["Lebanon"]},LKR:{num:144,places:2,name:"Sri Lankan rupee",symbol:"රු",countries:["Sri Lanka"]},LRD:{num:430,places:2,name:"Liberian dollar",symbol:"L$",countries:["Liberia"]},LSL:{num:426,places:2,name:"Lesotho loti",symbol:"M",countries:["Lesotho"]},LYD:{num:434,places:3,name:"Libyan dinar",symbol:"LD",countries:["Libya"]},MAD:{num:504,places:2,name:"Moroccan dirham",symbol:"MAD",countries:["Morocco"]},MDL:{num:498,places:2,name:"Moldovan leu",symbol:"lei",countries:["Moldova (except Transnistria)"]},MGA:{num:969,places:1,name:"Malagasy ariary",symbol:"Ar",countries:["Madagascar"]},MKD:{num:807,places:2,name:"Macedonian denar",symbol:"ден",countries:["Macedonia"]},MMK:{num:104,places:2,name:"Myanmar kyat",symbol:"K",countries:["Myanmar"]},MNT:{num:496,places:2,name:"Mongolian tögrög",symbol:"₮",countries:["Mongolia"]},MOP:{num:446,places:2,name:"Macanese pataca",symbol:"MOP$",countries:["Macao"]},MRO:{num:478,places:1,name:"Mauritanian ouguiya",symbol:"UM",countries:["Mauritania"]},MUR:{num:480,places:2,name:"Mauritian rupee",symbol:"₨",countries:["Mauritius"]},MVR:{num:462,places:2,name:"Maldivian rufiyaa",symbol:"Rf",countries:["Maldives"]},MWK:{num:454,places:2,name:"Malawian kwacha",symbol:"MK",countries:["Malawi"]},MXN:{num:484,places:2,name:"Mexican peso",symbol:"Mex$",countries:["Mexico"]},MXV:{num:979,places:2,name:"Mexican Unidad de Inversion (UDI) (funds code)",symbol:"",countries:["Mexico"]},MYR:{num:458,places:2,name:"Malaysian ringgit",symbol:"RM",countries:["Malaysia"]},MZN:{num:943,places:2,name:"Mozambican metical",symbol:"MT",countries:["Mozambique"]},NAD:{num:516,places:2,name:"Namibian dollar",symbol:"N$",countries:["Namibia"]},NGN:{num:566,places:2,name:"Nigerian naira",symbol:"₦",countries:["Nigeria"]},NIO:{num:558,places:2,name:"Nicaraguan córdoba",symbol:"C$",countries:["Nicaragua"]},NOK:{num:578,places:2,name:"Norwegian krone",symbol:"kr",countries:["Norway","Svalbard and Jan Mayen (SJ)","Bouvet Island (BV)","Queen Maud Land","Peter I Island"]},NPR:{num:524,places:2,name:"Nepalese rupee",symbol:"रू",countries:["Nepal"]},NZD:{num:554,places:2,name:"New Zealand dollar",symbol:"$",countries:["New Zealand","Cook Islands (CK)","Niue (NU)","Pitcairn Islands (PN; see also Pitcairn Islands dollar)","Tokelau (TK)","Ross Dependency"]},OMR:{num:512,places:3,name:"Omani rial",symbol:"ر.ع.",countries:["Oman"]},PAB:{num:590,places:2,name:"Panamanian balboa",symbol:"B/.",countries:["Panama"]},PEN:{num:604,places:2,name:"Peruvian Sol",symbol:"S/",countries:["Peru"]},PGK:{num:598,places:2,name:"Papua New Guinean kina",symbol:"K",countries:["Papua New Guinea"]},PHP:{num:608,places:2,name:"Philippine peso",symbol:"₱",countries:["Philippines"]},PKR:{num:586,places:2,name:"Pakistani rupee",symbol:"Rupees",countries:["Pakistan"]},PLN:{num:985,places:2,name:"Polish złoty",symbol:"zł",countries:["Poland"]},PYG:{num:600,places:0,name:"Paraguayan guaraní",symbol:"₲",countries:["Paraguay"]},QAR:{num:634,places:2,name:"Qatari riyal",symbol:"QR",countries:["Qatar"]},RON:{num:946,places:2,name:"Romanian leu",symbol:"lei",countries:["Romania"]},RSD:{num:941,places:2,name:"Serbian dinar",symbol:"",countries:["Serbia"]},RUB:{num:643,places:2,name:"Russian ruble",symbol:"₽",countries:["Russia","Abkhazia (GE-AB)","South Ossetia","Crimea"]},RWF:{num:646,places:0,name:"Rwandan franc",symbol:"R₣",countries:["Rwanda"]},SAR:{num:682,places:2,name:"Saudi riyal",symbol:"SR",countries:["Saudi Arabia"]},SBD:{num:90,places:2,name:"Solomon Islands dollar",symbol:"SI$",countries:["Solomon Islands"]},SCR:{num:690,places:2,name:"Seychelles rupee",symbol:"SR",countries:["Seychelles"]},SDG:{num:938,places:2,name:"Sudanese pound",symbol:"ج.س.",countries:["Sudan"]},SEK:{num:752,places:2,name:"Swedish krona/kronor",symbol:"kr",countries:["Sweden"]},SGD:{num:702,places:2,name:"Singapore dollar",symbol:"S$",countries:["Singapore","auxiliary in Brunei (BN)"]},SHP:{num:654,places:2,name:"Saint Helena pound",symbol:"£",countries:["Saint Helena (SH-SH)","Ascension Island (SH-AC) (pegged to GBP 1:1)"]},SLL:{num:694,places:2,name:"Sierra Leonean leone",symbol:"Le",countries:["Sierra Leone"]},SOS:{num:706,places:2,name:"Somali shilling",symbol:"Sh.",countries:["Somalia (except Somaliland)"]},SRD:{num:968,places:2,name:"Surinamese dollar",symbol:"$",countries:["Suriname"]},SSP:{num:728,places:2,name:"South Sudanese pound",symbol:"",countries:["South Sudan"]},STD:{num:678,places:2,name:"São Tomé and Príncipe dobra",symbol:"",countries:["São Tomé and Príncipe"]},SVC:{num:222,places:2,name:"Salvadoran colón",symbol:"₡",countries:["El Salvador"]},SYP:{num:760,places:2,name:"Syrian pound",symbol:"",countries:["Syria"]},SZL:{num:748,places:2,name:"Swazi lilangeni",symbol:"L",countries:["Swaziland"]},THB:{num:764,places:2,name:"Thai baht",symbol:"฿",countries:["Thailand","Cambodia","Myanmar","Laos"]},TJS:{num:972,places:2,name:"Tajikistani somoni",symbol:"",countries:["Tajikistan"]},TMT:{num:934,places:2,name:"Turkmenistani manat",symbol:"T",countries:["Turkmenistan"]},TND:{num:788,places:3,name:"Tunisian dinar",symbol:"DT",countries:["Tunisia"]},TOP:{num:776,places:2,name:"Tongan paʻanga",symbol:"T$",countries:["Tonga"]},TRY:{num:949,places:2,name:"Turkish lira",symbol:"₺",countries:["Turkey","Northern Cyprus"]},TTD:{num:780,places:2,name:"Trinidad and Tobago dollar",symbol:"TT$",countries:["Trinidad and Tobago"]},TWD:{num:901,places:2,name:"New Taiwan dollar",symbol:"NT$",countries:["Taiwan"]},TZS:{num:834,places:2,name:"Tanzanian shilling",symbol:"TSh",countries:["Tanzania"]},UAH:{num:980,places:2,name:"Ukrainian hryvnia",symbol:"₴",countries:["Ukraine"]},UGX:{num:800,places:0,name:"Ugandan shilling",symbol:"USh",countries:["Uganda"]},USD:{num:840,places:2,name:"United States dollar",symbol:"$",countries:["United States","American Samoa (AS)","Barbados (BB) (as well as Barbados Dollar)","Bermuda (BM) (as well as Bermudian Dollar)","British Indian Ocean Territory (IO) (also uses GBP)","British Virgin Islands (VG)","Caribbean Netherlands (BQ - Bonaire","Sint Eustatius and Saba)","Ecuador (EC)","El Salvador (SV)","Guam (GU)","Haiti (HT)","Marshall Islands (MH)","Federated States of Micronesia (FM)","Northern Mariana Islands (MP)","Palau (PW)","Panama (PA)","Puerto Rico (PR)","Timor-Leste (TL)","Turks and Caicos Islands (TC)","U.S. Virgin Islands (VI)","Zimbabwe (ZW)"]},USN:{num:997,places:2,name:"United States dollar (next day) (funds code)",symbol:"",countries:["United States"]},UYI:{num:940,places:0,name:"Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)",symbol:"",countries:["Uruguay"]},UYU:{num:858,places:2,name:"Uruguayan peso",symbol:"$U",countries:["Uruguay"]},UZS:{num:860,places:2,name:"Uzbekistan som",symbol:"som",countries:["Uzbekistan"]},VEF:{num:937,places:2,name:"Venezuelan bolívar",symbol:"Bs.F.",countries:["Venezuela"]},VND:{num:704,places:0,name:"Vietnamese dong",symbol:"₫",countries:["Vietnam"]},VUV:{num:548,places:0,name:"Vanuatu vatu",symbol:"VT",countries:["Vanuatu"]},WST:{num:882,places:2,name:"Samoan tala",symbol:"WS$",countries:["Samoa"]},XAF:{num:950,places:0,name:"CFA franc BEAC",symbol:"FCFA",countries:["Cameroon (CM)","Central African Republic (CF)","Republic of the Congo (CG)","Chad (TD)","Equatorial Guinea (GQ)","Gabon (GA)"]},XAG:{num:961,places:-1,name:"Silver (one troy ounce)",symbol:"",countries:[]},XAU:{num:959,places:-1,name:"Gold (one troy ounce)",symbol:"",countries:[]},XBA:{num:955,places:-1,name:"European Composite Unit (EURCO) (bond market unit)",symbol:"",countries:[]},XBB:{num:956,places:-1,name:"European Monetary Unit (E.M.U.-6) (bond market unit)",symbol:"",countries:[]},XBC:{num:957,places:-1,name:"European Unit of Account 9 (E.U.A.-9) (bond market unit)",symbol:"",countries:[]},XBD:{num:958,places:-1,name:"European Unit of Account 17 (E.U.A.-17) (bond market unit)",symbol:"",countries:[]},XCD:{num:951,places:2,name:"East Caribbean dollar",symbol:"$",countries:["Anguilla (AI)","Antigua and Barbuda (AG)","Dominica (DM)","Grenada (GD)","Montserrat (MS)","Saint Kitts and Nevis (KN)","Saint Lucia (LC)","Saint Vincent and the Grenadines (VC)"]},XDR:{num:960,places:-1,name:"Special drawing rights",symbol:"SDR",countries:["International Monetary Fund"]},XOF:{num:952,places:0,name:"CFA franc BCEAO",symbol:"CFA",countries:["Benin (BJ)","Burkina Faso (BF)","Côte d'Ivoire (CI)","Guinea-Bissau (GW)","Mali (ML)","Niger (NE)","Senegal (SN)","Togo (TG)"]},XPD:{num:964,places:-1,name:"Palladium (one troy ounce)",symbol:"",countries:[]},XPF:{num:953,places:0,name:"CFP franc (franc Pacifique)",symbol:"₣",countries:["French territories of the Pacific Ocean: French Polynesia (PF)","New Caledonia (NC)","Wallis and Futuna (WF)"]},XPT:{num:962,places:-1,name:"Platinum (one troy ounce)",symbol:"",countries:[]},XSU:{num:994,places:-1,name:"SUCRE",symbol:"Sucre",countries:["Unified System for Regional Compensation (SUCRE)"]},XTS:{num:963,places:-1,name:"Code reserved for testing purposes",symbol:"TEST",countries:[]},XUA:{num:965,places:-1,name:"ADB Unit of Account",symbol:"",countries:["African Development Bank"]},*****:{num:999,places:-1,name:"No currency",symbol:"none",countries:[]},YER:{num:886,places:2,name:"Yemeni rial",symbol:"﷼",countries:["Yemen"]},ZAR:{num:710,places:2,name:"South African rand",symbol:"R",countries:["South Africa"]},ZMW:{num:967,places:2,name:"Zambian kwacha",symbol:"ZK",countries:["Zambia"]},ZWL:{num:932,places:2,name:"Zimbabwean dollar A/10",symbol:"Z$",countries:["Zimbabwe"]}}},7090:e=>{!function(t,n){var r=function(e,t,n){"use strict";var r,i;if(function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(t in i=e.lazySizesConfig||e.lazysizesConfig||{},n)t in i||(i[t]=n[t])}(),!t||!t.getElementsByClassName)return{init:function(){},cfg:i,noSupport:!0};var o=t.documentElement,s=e.HTMLPictureElement,a="addEventListener",u="getAttribute",c=e[a].bind(e),l=e.setTimeout,f=e.requestAnimationFrame||l,d=e.requestIdleCallback,h=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],m={},v=Array.prototype.forEach,_=function(e,t){return m[t]||(m[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),m[t].test(e[u]("class")||"")&&m[t]},b=function(e,t){_(e,t)||e.setAttribute("class",(e[u]("class")||"").trim()+" "+t)},y=function(e,t){var n;(n=_(e,t))&&e.setAttribute("class",(e[u]("class")||"").replace(n," "))},g=function(e,t,n){var r=n?a:"removeEventListener";n&&g(e,t),p.forEach((function(n){e[r](n,t)}))},S=function(e,n,i,o,s){var a=t.createEvent("Event");return i||(i={}),i.instance=r,a.initEvent(n,!o,!s),a.detail=i,e.dispatchEvent(a),a},R=function(t,n){var r;!s&&(r=e.picturefill||i.pf)?(n&&n.src&&!t[u]("srcset")&&t.setAttribute("srcset",n.src),r({reevaluate:!0,elements:[t]})):n&&n.src&&(t.src=n.src)},w=function(e,t){return(getComputedStyle(e,null)||{})[t]},O=function(e,t,n){for(n=n||e.offsetWidth;n<i.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(be=[],ye=[],ge=be,Se=function(){var e=ge;for(ge=be.length?ye:be,ve=!0,_e=!1;e.length;)e.shift()();ve=!1},Re=function(e,n){ve&&!n?e.apply(this,arguments):(ge.push(e),_e||(_e=!0,(t.hidden?l:f)(Se)))},Re._lsFlush=Se,Re),C=function(e,t){return t?function(){T(e)}:function(){var t=this,n=arguments;T((function(){e.apply(t,n)}))}},E=function(e){var t,r=0,o=i.throttleDelay,s=i.ricTimeout,a=function(){t=!1,r=n.now(),e()},u=d&&s>49?function(){d(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:C((function(){l(a)}),!0);return function(e){var i;(e=!0===e)&&(s=33),t||(t=!0,(i=o-(n.now()-r))<0&&(i=0),e||i<9?u():l(u,i))}},k=function(e){var t,r,i=99,o=function(){t=null,e()},s=function(){var e=n.now()-r;e<i?l(s,i-e):(d||o)(o)};return function(){r=n.now(),t||(t=l(s,i))}},A=($=/^img$/i,J=/^iframe$/i,K="onscroll"in e&&!/(gle|ing)bot/.test(navigator.userAgent),X=0,Y=0,Q=0,ee=-1,te=function(e){Q--,(!e||Q<0||!e.target)&&(Q=0)},ne=function(e){return null==W&&(W="hidden"==w(t.body,"visibility")),W||!("hidden"==w(e.parentNode,"visibility")&&"hidden"==w(e,"visibility"))},re=function(e,n){var r,i=e,s=ne(e);for(G-=n,q+=n,Z-=n,H+=n;s&&(i=i.offsetParent)&&i!=t.body&&i!=o;)(s=(w(i,"opacity")||1)>0)&&"visible"!=w(i,"overflow")&&(r=i.getBoundingClientRect(),s=H>r.left&&Z<r.right&&q>r.top-1&&G<r.bottom+1);return s},ie=function(){var e,n,s,a,c,l,f,d,h,p,m,v,_=r.elements;if((B=i.loadMode)&&Q<8&&(e=_.length)){for(n=0,ee++;n<e;n++)if(_[n]&&!_[n]._lazyRace)if(!K||r.prematureUnveil&&r.prematureUnveil(_[n]))de(_[n]);else if((d=_[n][u]("data-expand"))&&(l=1*d)||(l=Y),p||(p=!i.expand||i.expand<1?o.clientHeight>500&&o.clientWidth>500?500:370:i.expand,r._defEx=p,m=p*i.expFactor,v=i.hFac,W=null,Y<m&&Q<1&&ee>2&&B>2&&!t.hidden?(Y=m,ee=0):Y=B>1&&ee>1&&Q<6?p:X),h!==l&&(V=innerWidth+l*v,z=innerHeight+l,f=-1*l,h=l),s=_[n].getBoundingClientRect(),(q=s.bottom)>=f&&(G=s.top)<=z&&(H=s.right)>=f*v&&(Z=s.left)<=V&&(q||H||Z||G)&&(i.loadHidden||ne(_[n]))&&(j&&Q<3&&!d&&(B<3||ee<4)||re(_[n],l))){if(de(_[n]),c=!0,Q>9)break}else!c&&j&&!a&&Q<4&&ee<4&&B>2&&(D[0]||i.preloadAfterLoad)&&(D[0]||!d&&(q||H||Z||G||"auto"!=_[n][u](i.sizesAttr)))&&(a=D[0]||_[n]);a&&!c&&de(a)}},oe=E(ie),se=function(e){var t=e.target;t._lazyCache?delete t._lazyCache:(te(e),b(t,i.loadedClass),y(t,i.loadingClass),g(t,ue),S(t,"lazyloaded"))},ae=C(se),ue=function(e){ae({target:e.target})},ce=function(e,t){var n=e.getAttribute("data-load-mode")||i.iframeLoadMode;0==n?e.contentWindow.location.replace(t):1==n&&(e.src=t)},le=function(e){var t,n=e[u](i.srcsetAttr);(t=i.customMedia[e[u]("data-media")||e[u]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},fe=C((function(e,t,n,r,o){var s,a,c,f,d,p;(d=S(e,"lazybeforeunveil",t)).defaultPrevented||(r&&(n?b(e,i.autosizesClass):e.setAttribute("sizes",r)),a=e[u](i.srcsetAttr),s=e[u](i.srcAttr),o&&(f=(c=e.parentNode)&&h.test(c.nodeName||"")),p=t.firesLoad||"src"in e&&(a||s||f),d={target:e},b(e,i.loadingClass),p&&(clearTimeout(F),F=l(te,2500),g(e,ue,!0)),f&&v.call(c.getElementsByTagName("source"),le),a?e.setAttribute("srcset",a):s&&!f&&(J.test(e.nodeName)?ce(e,s):e.src=s),o&&(a||f)&&R(e,{src:s})),e._lazyRace&&delete e._lazyRace,y(e,i.lazyClass),T((function(){var t=e.complete&&e.naturalWidth>1;p&&!t||(t&&b(e,i.fastLoadedClass),se(d),e._lazyCache=!0,l((function(){"_lazyCache"in e&&delete e._lazyCache}),9)),"lazy"==e.loading&&Q--}),!0)})),de=function(e){if(!e._lazyRace){var t,n=$.test(e.nodeName),r=n&&(e[u](i.sizesAttr)||e[u]("sizes")),o="auto"==r;(!o&&j||!n||!e[u]("src")&&!e.srcset||e.complete||_(e,i.errorClass)||!_(e,i.lazyClass))&&(t=S(e,"lazyunveilread").detail,o&&P.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,Q++,fe(e,t,o,r,n))}},he=k((function(){i.loadMode=3,oe()})),pe=function(){3==i.loadMode&&(i.loadMode=2),he()},me=function(){j||(n.now()-U<999?l(me,999):(j=!0,i.loadMode=3,oe(),c("scroll",pe,!0)))},{_:function(){U=n.now(),r.elements=t.getElementsByClassName(i.lazyClass),D=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass),c("scroll",oe,!0),c("resize",oe,!0),c("pageshow",(function(e){if(e.persisted){var n=t.querySelectorAll("."+i.loadingClass);n.length&&n.forEach&&f((function(){n.forEach((function(e){e.complete&&de(e)}))}))}})),e.MutationObserver?new MutationObserver(oe).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o[a]("DOMNodeInserted",oe,!0),o[a]("DOMAttrModified",oe,!0),setInterval(oe,999)),c("hashchange",oe,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach((function(e){t[a](e,oe,!0)})),/d$|^c/.test(t.readyState)?me():(c("load",me),t[a]("DOMContentLoaded",oe),l(me,2e4)),r.elements.length?(ie(),T._lsFlush()):oe()},checkElems:oe,unveil:de,_aLSL:pe}),P=(N=C((function(e,t,n,r){var i,o,s;if(e._lazysizesWidth=r,r+="px",e.setAttribute("sizes",r),h.test(t.nodeName||""))for(o=0,s=(i=t.getElementsByTagName("source")).length;o<s;o++)i[o].setAttribute("sizes",r);n.detail.dataAttr||R(e,n.detail)})),L=function(e,t,n){var r,i=e.parentNode;i&&(n=O(e,i,n),(r=S(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=r.detail.width)&&n!==e._lazysizesWidth&&N(e,i,r,n))},I=k((function(){var e,t=x.length;if(t)for(e=0;e<t;e++)L(x[e])})),{_:function(){x=t.getElementsByClassName(i.autosizesClass),c("resize",I)},checkElems:I,updateElem:L}),M=function(){!M.i&&t.getElementsByClassName&&(M.i=!0,P._(),A._())};var x,N,L,I;var D,j,F,B,U,V,z,G,Z,H,q,W,$,J,K,X,Y,Q,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,de,he,pe,me;var ve,_e,be,ye,ge,Se,Re;return l((function(){i.init&&M()})),r={cfg:i,autoSizer:P,loader:A,init:M,uP:R,aC:b,rC:y,hC:_,fire:S,gW:O,rAF:T}}(t,t.document,Date);t.lazySizes=r,e.exports&&(e.exports=r)}("undefined"!=typeof window?window:{})},6309:(e,t,n)=>{e.exports={base64:n(146),boolean:n(7346),credit_card:n(5125),ipv4:n(2368),is:n(882),iso_date:n(316),list_items_unique:n(227),list_length:n(6839),md5:n(7308),mongo_id:n(4408),required_if:n(5248),uuid:n(3932)}},146:(e,t,n)=>{const r=n(4457),i=/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/,o=/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/;e.exports=function(e){const t="relaxed"===e?o:i;return(e,n,i)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?(e+"").match(t)?void i.push(e+""):"MALFORMED_BASE64":"FORMAT_ERROR"}}},7346:(e,t,n)=>{const r=n(4457);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e)){if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";if(["1",1,"true",!0].indexOf(e)>=0)n.push(!0);else{if(!(["0",0,"false",!1].indexOf(e)>=0))return"NOT_BOOLEAN";n.push(!1)}}}}},5125:(e,t,n)=>{const r=n(4457),i=/^\d*$/;e.exports=function(){return(e,t,n)=>{if(r.isNoValue(e))return;if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";if((e+="").length>16||e.length<14)return"WRONG_CREDIT_CARD_NUMBER";if(!e.match(i))return"WRONG_CREDIT_CARD_NUMBER";let o=e.length,s=0,a=!1;for(;o--;){var u=e.charAt(o)*(1+a);s+=u-9*(u>9),a=!a}return s%10?"WRONG_CREDIT_CARD_NUMBER":void 0}}},2368:(e,t,n)=>{const r=n(4457),i=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;e.exports=function(){return e=>{if(r.isNoValue(e))return;if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";const t=(e+"").match(i);if(!t)return"NOT_IP";for(let e=1;e<4;e++)if(t[e].length>=2&&/^0/.test(t[e]))return"NOT_IP"}}},882:(e,t,n)=>{const r=n(4457);e.exports=function(e){return(t,n,i)=>r.isNoValue(t)?"REQUIRED":r.isPrimitiveValue(t)?t+""!=e+""?"NOT_ALLOWED_VALUE":void i.push(e):"FORMAT_ERROR"}},316:(e,t,n)=>{const r=n(4457),i=/^(([0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9]))(T(2[0-3]|[01][0-9]):([0-5][0-9])(:([0-5][0-9])(\.[0-9]+)?)?(Z|[\+\-](2[0-3]|[01][0-9]):([0-5][0-9])))?$/,o=/^(\d{4})-([0-1][0-9])-([0-3][0-9])$/,s=["yesterday","current","tomorrow"];function a(e,t){if(!e)return;const n=(e+"").match(i),r=s.indexOf(e);if(r>-1)date=new Date,date.setDate(date.getDate()+(r-1));else{if(!n||!u(n[1]))throw new Error('LIVR: wrong date in "'+t+'" parametr');{const n=Date.parse(e);if(!n&&0!==n)throw new Error('LIVR: wrong date in "'+t+'" parametr');date=new Date(n)}}return n&&n[5]||(n||(date.setHours(0),date.setMinutes(0),date.setSeconds(0),date.setMilliseconds(0)),"max"===t&&(date.setDate(date.getDate()+1),date.setTime(date.getTime()-1)),n||date.setTime(date.getTime()-60*date.getTimezoneOffset()*1e3)),date.getTime()}function u(e){const t=e.match(o);if(t){const n=Date.parse(e);if(!n&&0!==n)return!1;const r=new Date(n);if(r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3),r.getFullYear()==t[1]&&r.getMonth()+1==+t[2]&&r.getDate()==+t[3])return!0}return!1}e.exports=function(e){let t,n,o="date";return arguments.length>1&&(t=a(e.min,"min"),n=a(e.max,"max"),"datetime"===e.format&&(o=e.format)),(e,s,a)=>{if(r.isNoValue(e))return;if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";const c=(e+"").match(i);if(!c||!u(c[1]))return"WRONG_DATE";const l=Date.parse(e);if(!l&&0!==l)return"WRONG_DATE";if(t&&l<t)return"DATE_TOO_LOW";if(n&&l>n)return"DATE_TOO_HIGH";const f=new Date(l);"date"===o?a.push(f.toISOString().split("T")[0]):a.push(f.toISOString())}}},227:(e,t,n)=>{const r=n(4457);e.exports=function(){return e=>{if(r.isNoValue(e))return;if(!Array.isArray(e))return"FORMAT_ERROR";const t={};let n=!0;for(const i of e){if(!r.isPrimitiveValue(i))return"INCOMPARABLE_ITEMS";t[i]&&(n=!1),t[i]=!0}return n?void 0:"NOT_UNIQUE_ITEMS"}}},6839:(e,t,n)=>{const r=n(4457);e.exports=function(e,t){let n,i;if(arguments.length<=1)throw new Error("LIVR: undefined list_length");return 2===arguments.length?(n=e,i=e):arguments.length>2&&(n=e,i=t),e=>{if(!r.isNoValue(e))return Array.isArray(e)?e.length<n?"TOO_FEW_ITEMS":e.length>i?"TOO_MANY_ITEMS":void 0:"FORMAT_ERROR"}}},7308:(e,t,n)=>{const r=n(4457),i=/^[a-f0-9]{32}$/i;e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?(e+"").match(i)?void n.push(e+""):"NOT_MD5":"FORMAT_ERROR"}}},4408:(e,t,n)=>{const r=n(4457),i=/^[0-9a-fA-F]{24}$/;e.exports=function(){return e=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?(e+"").match(i)?void 0:"NOT_ID":"FORMAT_ERROR"}}},5248:(e,t,n)=>{const r=n(4457);e.exports=function(e){let t,n;if(arguments.length>1&&(t=Object.keys(e)[0],n=e[t],!n||!r.isPrimitiveValue(n)))throw new Error('LIVR: the target value of the "require_if" rule is missed or incomparable');return(e,i)=>{if(r.isNoValue(e)&&t)return r.JSONPointer(i,t)==n&&r.isNoValue(e)?"REQUIRED":void 0}}},3932:(e,t,n)=>{const r=n(4457),i={v1:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,v2:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,v3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,v4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,v5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i};e.exports=function(e){if(1==arguments.length&&(e="v4"),!["v1","v2","v3","v4","v5"].includes(e))throw new Error("LIVR: unsupported uuid version: "+e);return t=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?(t+"").match(i[e])?void 0:"NOT_UUID":"FORMAT_ERROR"}}},4457:e=>{e.exports={isPrimitiveValue:e=>"string"==typeof e||(!("number"!=typeof e||!isFinite(e))||"boolean"==typeof e),isNoValue:e=>null==e||""===e,JSONPointer(e,t){const n=t.split("/");let r=e;for(const e of n){if(!r)break;r=r[e]}return r}}},6600:(e,t,n)=>{const r=n(1937),i=n(971),o={required:n(926),not_empty:n(8442),not_empty_list:n(1673),any_object:n(1865),string:n(4272),eq:n(1200),one_of:n(8008),max_length:n(8972),min_length:n(5830),length_equal:n(3410),length_between:n(13),like:n(1319),integer:n(155),positive_integer:n(5842),decimal:n(6939),positive_decimal:n(6927),max_number:n(6386),min_number:n(19),number_between:n(862),email:n(9847),equal_to_field:n(3866),url:n(4980),iso_date:n(1178),nested_object:n(6055),variable_object:n(3314),list_of:n(5097),list_of_objects:n(8518),or:n(6635),list_of_different_objects:n(6072),default:n(9656),trim:n(5738),to_lc:n(4450),to_uc:n(8201),remove:n(1534),leave_only:n(580)};r.registerDefaultRules(o),e.exports={Validator:r,rules:o,util:i}},1937:(e,t,n)=>{"use strict";const r=n(971),i={};let o=0;class s{constructor(e,t){this.isPrepared=!1,this.livrRules=e,this.validators={},this.validatorBuilders={},this.errors=null,this.isAutoTrim=null!=t?t:o,this.registerRules(i)}static getDefaultRules(){return i}static registerAliasedDefaultRule(e){if(!e.name)throw"Alias name required";i[e.name]=this._buildAliasedRule(e.rules,e.error)}static registerDefaultRules(e){for(const t in e)i[t]=e[t]}static defaultAutoTrim(e){o=!!e}static _buildAliasedRule(e,t){if(!e)throw"Alias rules required";const n={value:e};return e=>{const r=new s(n).registerRules(e).prepare();return(e,n,i)=>{const o=r.validate({value:e});return o?void i.push(o.value):t||r.getErrors().value}}}prepare(){const e=this.livrRules;for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const r=[];for(const e of n){const t=this._parseRule(e);r.push(this._buildValidator(t.name,t.args))}this.validators[t]=r}return this.isPrepared=!0,this}validate(e){if(this.isPrepared||this.prepare(),!r.isObject(e))return void(this.errors="FORMAT_ERROR");this.isAutoTrim&&(e=this._autoTrim(e));const t={},n={};for(const r in this.validators){const i=this.validators[r];if(!i||!i.length)continue;const o=e[r];for(const s of i){const i=[],a=s(n.hasOwnProperty(r)?n[r]:o,e,i);if(a){t[r]=a;break}i.length?n[r]=i[0]:e.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(n[r]=o)}}return r.isEmptyObject(t)?(this.errors=null,n):(this.errors=t,!1)}getErrors(){return this.errors}registerRules(e){for(const t in e)this.validatorBuilders[t]=e[t];return this}registerAliasedRule(e){if(!e.name)throw"Alias name required";return this.validatorBuilders[e.name]=this.constructor._buildAliasedRule(e.rules,e.error),this}getRules(){return this.validatorBuilders}_parseRule(e){let t,n;return r.isObject(e)?(t=Object.keys(e)[0],n=e[t],Array.isArray(n)||(n=[n])):(t=e,n=[]),{name:t,args:n}}_buildValidator(e,t){if(!this.validatorBuilders[e])throw"Rule ["+e+"] not registered";const n=[];return n.push.apply(n,t),n.push(this.getRules()),this.validatorBuilders[e].apply(null,n)}_autoTrim(e){const t=typeof e;if("object"!==t&&e)return e.replace?e.replace(/^\s*/,"").replace(/\s*$/,""):e;if("object"==t&&Array.isArray(e)){const t=[];for(const n of e)t.push(this._autoTrim(n));return t}if("object"==t&&r.isObject(e)){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=this._autoTrim(e[n]));return t}return e}}e.exports=s},1865:(e,t,n)=>{const r=n(971);e.exports=function(){return e=>{if(!r.isNoValue(e))return r.isObject(e)?void 0:"FORMAT_ERROR"}}},8442:e=>{e.exports=function(){return e=>{if(null!=e&&""===e)return"CANNOT_BE_EMPTY"}}},1673:e=>{e.exports=function(){return e=>void 0===e||""===e?"CANNOT_BE_EMPTY":Array.isArray(e)?e.length<1?"CANNOT_BE_EMPTY":void 0:"FORMAT_ERROR"}},926:(e,t,n)=>{const r=n(971);e.exports=function(){return e=>{if(r.isNoValue(e))return"REQUIRED"}}},5097:(e,t,n)=>{const r=n(1937),i=n(971);e.exports=function(e,t){Array.isArray(e)||(t=(e=Array.prototype.slice.call(arguments)).pop());const n={field:e},o=new r(n).registerRules(t).prepare();return(e,t,n)=>{if(i.isNoValue(e))return;if(!Array.isArray(e))return"FORMAT_ERROR";const r=[],s=[];let a=!1;for(const t of e){const e=o.validate({field:t});e?(r.push(e.field),s.push(null)):(a=!0,s.push(o.getErrors().field),r.push(null))}return a?s:void n.push(r)}}},6072:(e,t,n)=>{const r=n(1937),i=n(971);e.exports=function(e,t,n){const o={};for(const e in t){const i=new r(t[e]).registerRules(n).prepare();o[e]=i}return(t,n,r)=>{if(i.isNoValue(t))return;if(!Array.isArray(t))return"FORMAT_ERROR";const s=[],a=[];let u=!1;for(const n of t){if("object"!=typeof n||!n[e]||!o[n[e]]){a.push("FORMAT_ERROR");continue}const t=o[n[e]],r=t.validate(n);r?(s.push(r),a.push(null)):(u=!0,a.push(t.getErrors()),s.push(null))}return u?a:void r.push(s)}}},8518:(e,t,n)=>{const r=n(1937),i=n(971);e.exports=function(e,t){const n=new r(e).registerRules(t).prepare();return(e,t,r)=>{if(i.isNoValue(e))return;if(!Array.isArray(e))return"FORMAT_ERROR";const o=[],s=[];let a=!1;for(const t of e){const e=n.validate(t);e?(o.push(e),s.push(null)):(a=!0,s.push(n.getErrors()),o.push(null))}return a?s:void r.push(o)}}},6055:(e,t,n)=>{const r=n(1937),i=n(971);e.exports=function(e,t){const n=new r(e).registerRules(t).prepare();return(e,t,r)=>{if(i.isNoValue(e))return;if(!i.isObject(e))return"FORMAT_ERROR";const o=n.validate(e);return o?void r.push(o):n.getErrors()}}},6635:(e,t,n)=>{const r=n(1937);e.exports=function(){const e=Array.prototype.slice.call(arguments),t=e.pop(),n=e.map((e=>new r({field:e}).registerRules(t).prepare()));return(e,t,r)=>{let i;for(const t of n){const n=t.validate({field:e});if(n)return void r.push(n.field);i=t.getErrors().field}return i}}},3314:(e,t,n)=>{const r=n(1937),i=n(971);e.exports=function(e,t,n){const o={};for(const e in t){const i=new r(t[e]).registerRules(n).prepare();o[e]=i}return(t,n,r)=>{if(i.isNoValue(t))return;if(!i.isObject(t)||!t[e]||!o[t[e]])return"FORMAT_ERROR";const s=o[t[e]],a=s.validate(t);return a?void r.push(a):s.getErrors()}}},9656:(e,t,n)=>{const r=n(971);e.exports=e=>(t,n,i)=>{r.isNoValue(t)&&i.push(e)}},580:(e,t,n)=>{const r=n(971);e.exports=function(e){e=r.escapeRegExp(e);const t=new RegExp("[^"+e+"]","g");return(e,n,i)=>{r.isNoValue(e)||"object"==typeof e||(e+="",i.push(e.replace(t,"")))}}},1534:(e,t,n)=>{const r=n(971);e.exports=function(e){e=r.escapeRegExp(e);const t=new RegExp("["+e+"]","g");return(e,n,i)=>{r.isNoValue(e)||"object"==typeof e||(e+="",i.push(e.replace(t,"")))}}},4450:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{r.isNoValue(e)||"object"==typeof e||(e+="",n.push(e.toLowerCase()))}}},8201:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{r.isNoValue(e)||"object"==typeof e||(e+="",n.push(e.toUpperCase()))}}},5738:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{r.isNoValue(e)||"object"==typeof e||(e+="",n.push(e.replace(/^\s*/,"").replace(/\s*$/,"")))}}},6939:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e)){if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";if(!r.looksLikeNumber(e))return"NOT_DECIMAL";if(!/^(?:\-?(?:(?:[0-9]+\.[0-9]+)|(?:[0-9]+)))$/.test(e+=""))return"NOT_DECIMAL";n.push(+e)}}}},155:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?r.looksLikeNumber(e)&&Number.isInteger(+e)?void n.push(+e):"NOT_INTEGER":"FORMAT_ERROR"}}},6386:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?r.looksLikeNumber(t)?+t>+e?"TOO_HIGH":void i.push(+t):"NOT_NUMBER":"FORMAT_ERROR"}}},19:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?r.looksLikeNumber(t)?+t<+e?"TOO_LOW":void i.push(+t):"NOT_NUMBER":"FORMAT_ERROR"}}},862:(e,t,n)=>{const r=n(971);e.exports=function(e,t){return(n,i,o)=>{if(!r.isNoValue(n))return r.isPrimitiveValue(n)?r.looksLikeNumber(n)?+n<+e?"TOO_LOW":+n>+t?"TOO_HIGH":void o.push(+n):"NOT_NUMBER":"FORMAT_ERROR"}}},6927:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?r.looksLikeNumber(e)?Number.isNaN(+e)||+e<=0?"NOT_POSITIVE_DECIMAL":void n.push(+e):"NOT_POSITIVE_DECIMAL":"FORMAT_ERROR"}}},5842:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?r.looksLikeNumber(e)?!Number.isInteger(+e)||+e<1?"NOT_POSITIVE_INTEGER":void n.push(+e):"NOT_POSITIVE_INTEGER":"FORMAT_ERROR"}}},9847:(e,t,n)=>{const r=n(971);e.exports=function(){var e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?(t+="",e.test(t)?/\@.*\@/.test(t)||/\@.*_/.test(t)?"WRONG_EMAIL":void 0:"WRONG_EMAIL"):"FORMAT_ERROR"}}},3866:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n)=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?t!=n[e]?"FIELDS_NOT_EQUAL":void 0:"FORMAT_ERROR"}}},1178:(e,t,n)=>{const r=n(971);e.exports=function(){return e=>{if(r.isNoValue(e))return;if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";const t=e.match(/^(\d{4})-([0-1][0-9])-([0-3][0-9])$/);if(t){const n=Date.parse(e);if(!n&&0!==n)return"WRONG_DATE";const r=new Date(n);if(r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3),r.getFullYear()==t[1]&&r.getMonth()+1==+t[2]&&r.getDate()==+t[3])return}return"WRONG_DATE"}}},4980:(e,t,n)=>{const r=n(971);e.exports=function(){const e=new RegExp("^(?:(?:http|https)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[0-1]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))\\.?|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?$","i");return t=>{if(!r.isNoValue(t)){if(!r.isPrimitiveValue(t))return"FORMAT_ERROR";if(!(t.length<2083&&e.test(t)))return"WRONG_URL"}}}},1200:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t)){if(!r.isPrimitiveValue(t))return"FORMAT_ERROR";if(t+""!=e+"")return"NOT_ALLOWED_VALUE";i.push(e)}}}},13:(e,t,n)=>{const r=n(971);e.exports=function(e,t){return(n,i,o)=>{if(!r.isNoValue(n))return r.isPrimitiveValue(n)?(n+="").length<e?"TOO_SHORT":n.length>t?"TOO_LONG":void o.push(n):"FORMAT_ERROR"}}},3410:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t))return r.isPrimitiveValue(t)?(t+="").length<e?"TOO_SHORT":t.length>e?"TOO_LONG":void i.push(t):"FORMAT_ERROR"}}},1319:(e,t,n)=>{const r=n(971);e.exports=function(e,t){const n=3===arguments.length&&t.match("i"),i=new RegExp(e,n?"i":"");return(e,t,n)=>{if(!r.isNoValue(e)){if(!r.isPrimitiveValue(e))return"FORMAT_ERROR";if(!(e+="").match(i))return"WRONG_FORMAT";n.push(e)}}}},8972:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t)){if(!r.isPrimitiveValue(t))return"FORMAT_ERROR";if((t+="").length>e)return"TOO_LONG";i.push(t)}}}},5830:(e,t,n)=>{const r=n(971);e.exports=function(e){return(t,n,i)=>{if(!r.isNoValue(t)){if(!r.isPrimitiveValue(t))return"FORMAT_ERROR";if((t+="").length<e)return"TOO_SHORT";i.push(t)}}}},8008:(e,t,n)=>{const r=n(971);e.exports=function(e){return Array.isArray(e)||(e=Array.prototype.slice.call(arguments)).pop(),(t,n,i)=>{if(!r.isNoValue(t)){if(!r.isPrimitiveValue(t))return"FORMAT_ERROR";for(const n of e)if(t+""==n+"")return void i.push(n);return"NOT_ALLOWED_VALUE"}}}},4272:(e,t,n)=>{const r=n(971);e.exports=function(){return(e,t,n)=>{if(!r.isNoValue(e))return r.isPrimitiveValue(e)?void n.push(e+""):"FORMAT_ERROR"}}},971:e=>{e.exports={isPrimitiveValue:e=>"string"==typeof e||(!("number"!=typeof e||!isFinite(e))||"boolean"==typeof e),looksLikeNumber:e=>!isNaN(+e),isObject:e=>Object(e)===e&&Object.getPrototypeOf(e)===Object.prototype,isEmptyObject(e){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0},escapeRegExp:e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),isNoValue:e=>null==e||""===e}},5666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),s=new k(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?p:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,s),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",m={};function v(){}function _(){}function b(){}var y={};u(y,o,(function(){return this}));var g=Object.getPrototypeOf,S=g&&g(g(A([])));S&&S!==n&&r.call(S,o)&&(y=S);var R=b.prototype=v.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(i,o,s,a){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,a)}))}a(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function A(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,s=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return s.next=s}}return{next:P}}function P(){return{value:t,done:!0}}return _.prototype=b,u(R,"constructor",b),u(b,"constructor",_),_.displayName=u(b,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,a,"GeneratorFunction")),e.prototype=Object.create(R),e},e.awrap=function(e){return{__await:e}},w(O.prototype),u(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new O(c(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(R),u(R,a,"Generator"),u(R,o,(function(){return this})),u(R,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return a.type="throw",a.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},7458:(e,t)=>{!function(e){var t,n,r,i=String.fromCharCode;function o(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function s(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function a(e,t){return i(e>>t&63|128)}function u(e){if(0==(4294967168&e))return i(e);var t="";return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(s(e),t=i(e>>12&15|224),t+=a(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=a(e,12),t+=a(e,6)),t+=i(63&e|128)}function c(){if(r>=n)throw Error("Invalid byte index");var e=255&t[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,i;if(r>n)throw Error("Invalid byte index");if(r==n)return!1;if(e=255&t[r],r++,0==(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),n=t.length,r=-1,i="";++r<n;)i+=u(t[r]);return i},e.decode=function(e){t=o(e),n=t.length,r=0;for(var s,a=[];!1!==(s=l());)a.push(s);return function(e){for(var t,n=e.length,r=-1,o="";++r<n;)(t=e[r])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(a)}}(t)},907:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},5861:(e,t,n)=>{"use strict";function r(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var s=e.apply(t,n);function a(e){r(s,i,o,a,u,"next",e)}function u(e){r(s,i,o,a,u,"throw",e)}a(void 0)}))}}n.d(t,{Z:()=>i})},4942:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},885:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(907);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},1955:(e,t,n)=>{"use strict";function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n.d(t,{Z:()=>o});var i=function e(t,n){function i(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=r({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(i,e)+s}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){i(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const o=i}}]);
 

HTML Online Editor & Compiler

Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML. You can also specify the stylesheet information in styles.css tab and scripts information in scripts.js tab and start coding.

About HTML

HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.

Syntax help

Fundamentals

  • Any HTML document must start with document declaration <!DOCTYPE html>
  • HTML documents begin with <html> and ends with </html>
  • Headings are defined with <h1> to <h6> where <h1> is the highest important heading and <h6> is the least important sub-heading.
  • Paragrahs are defined in <p>..</p> tag.
  • Links are defined in <a> tag.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    
  • Images are defined in <img> tag, where src attribute consists of image name.
  • Buttons are defined in <button>..</button> tag
  • Lists are defined in <ul> for unordered/bullet list and <ol> for ordered/number list, and the list items are defined in <li>.

HTML Elements and Attributes

  • HTML element is everything present from start tag to end tag.
  • The text present between start and end tag is called HTML element content.
  • Anything can be a tagname but it's preferred to put the meaningful title to the content present as tag name.
  • Do not forget the end tag.
  • Elements with no content are called empty elements.
  • Elements can have attributes which provides additional information about the element.
  • In the below example, href is an attribute and a is the tag name.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    

CSS

CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.

Example:

Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.

body{
  padding: 25px;
}
.title {
	color: #228B22;
	font-family: Candara;
}

HTML Tables

  • HTML Tables are defined in <table> tag.
  • Table row should be defined in <tr> tag
  • Table header should be defined in <th> tag
  • Table data should be defined in <td> tag
  • Table caption should be defined in <caption> tag

HTML-Javascript

  • Javascript is used in HTML pages to make them more interactive.
  • <script> is the tag used to write scripts in HTML
  • You can either reference a external script or write script code in this tag.

Example

<script src="script.js"></script>