!function(){var t={126:function(t){function e(t,e){t=function(t){if(!t)return t;if(-1!==t.indexOf(":"))return t;"/"!==t[0]&&(t="/"+t);return e()+t;function e(){var t=window.location.protocol,e=window.location.hostname,n=window.location.port;return n?t+"//"+e+":"+n:t+"//"+e}}(t),this.url=t+"/resources/utm/sessions",this.referer=e,this.location=window.location.toString(),this._disabled=/utm=(false|no|off)/.test(window.location.href)}function n(){}e.prototype.disable=function(){this._disabled=!0},e.prototype.init=function(t,e){"function"==typeof t&&(e=t,t=void 0),e=e||n,t?(this._setId(t),e()):this._aquireId(e)},e.prototype._setId=function(t){this.id=this.id||t},e.prototype._aquireId=function(t){var e=this,n={url:this.location,referer:this.referer};this._post(n,(function(n){n&&n.id&&e._setId(n.id),t()}))},e.prototype._post=function(t,e){var n=new XMLHttpRequest;this._disabled?e(null):(n.open("POST",this._getUrl()),n.setRequestHeader("Content-Type","application/json"),function(t,e){if(!e)return;t.onload=function(){try{e(JSON.parse(t.responseText))}catch(t){window.console&&window.console.log("Failed to set UTM: "+t.message)}}}(n,e),n.send(JSON.stringify(t)))},e.prototype._getUrl=function(){return this.id?this.url+"/"+this.id+"/add_action":this.url},e.prototype.actions={buttonAdded:"button_added",widgetOpened:"widget_opened",toCustomerAdding:"to_customer_adding",toPaymentChoice:"to_payment_choice",toInvoiceAdding:"to_invoice_adding",toPayment:"to_payment",widgetClose:"widget_closed"},e.prototype.dispatch=function(t,e,o){var c,r;o=o||n,this.id?(Array.isArray(e)||(e=[e]),c=function(t){return function(e){return{action:t,data:e}}}(t),r=e.map(c),this._post(r,o)):o()},t.exports=e},733:function(){window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var e,n=document.createElement("style"),o=document.getElementsByTagName("script")[0];n.type="text/css",n.id="matchmediajs-test",o?o.parentNode.insertBefore(n,o):document.head.appendChild(n),e="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle,t={matchMedium:function(t){var o="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=o:n.textContent=o,"1px"===e.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}())}},e={};function n(o){if(e[o])return e[o].exports;var c=e[o]={exports:{}};return t[o](c,c.exports,n),c.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";function t(t){this.message=t}t.prototype=new Error,t.prototype.name="InvalidCharacterError";var e="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var n=String(e).replace(/=+$/,"");if(n.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,c,r=0,i=0,a="";c=n.charAt(i++);~c&&(o=r%4?64*o+c:c,r++%4)?a+=String.fromCharCode(255&o>>(-2*r&6)):0)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(c);return a};function o(t){var n=t.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(e(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(n)}catch(t){return e(n)}}function c(t){this.message=t}c.prototype=new Error,c.prototype.name="InvalidTokenError";var r=function(t,e){if("string"!=typeof t)throw new c("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(o(t.split(".")[n]))}catch(t){throw new c("Invalid token specified: "+t.message)}},i=(n(733),n(126)),a=n.n(i);const d=window.ticketscloud_url?window.ticketscloud_url.replace(/\/$/,""):"https://ticketscloud.com",s=/(stage\.freetc\.net|dev\.zelenyak\.name)/.test(window.ticketscloud_url),l=s?"stage.ticketscloud.ru":"sr.ticketscloud.org",u="v1",p="tc-widget-overlay",m="inline",w="integrated";function f(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("Illegal base64 string!")}try{return function(t){return decodeURIComponent(atob(t).replace(/(.)/g,((t,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0".concat(n)),"%".concat(n)})))}(e)}catch(t){return atob(e)}}function h(t){const e=t.getAttribute("data-tc-token")||t.getAttribute("tc-token")||window.ticketscloudid;if(!e)return null;const n=e.replace(/\s/g,"");return function(t){if("string"!=typeof t)return!1;const[e,n]=t.split(".");try{const t=JSON.parse(f(e)),o=JSON.parse(f(n));if(t&&o)return!0}catch(t){return!1}return!1}(n)?n:null}const g=t=>{(console||console.log)&&(t.token||!t.event?!t.token||t.event||console.error("No Ticketscloud event id found for token: ".concat(t.token)):console.error("No Ticketscloud token found for event: ".concat(t.event)))},y=t=>{const e=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),n=new RegExp("[\\?&]".concat(e,"=([^]*)")).exec(location.search);return null===n?null:decodeURIComponent(n[1].replace(/\+/g," "))},v=(t,e)=>{const n=((t,e)=>{let n=new XMLHttpRequest;return"withCredentials"in n?n.open(t,e,!0):"undefined"!=typeof XDomainRequest?(n=new XDomainRequest,n.open(t,e)):n=null,n})("GET",t);if(!n)throw new Error("CORS not supported");n.onload=function(){if(!(n.status>=200&&n.status<400))throw new Error("Server error: ".concat(n.status));e(n.responseText)},n.send()},b=/https?:\/\/sr\.((stage|dev|local)\.)?ticketscloud\.org/,k=()=>window.self!==window.top&&b.test(window.location.toString()),_=t=>!(/tc-widget-inline-box/.test(t.className)||/tc-widget-integrated-box/.test(t.className)||/tc-widget-mobile-box/.test(t.className)),A=()=>window.innerWidth<570,S=()=>{const t=window.innerWidth;return t>780?780:t},E=t=>t.getAttribute("data-tc-event")||t.getAttribute("tc-event")||t.getAttribute("data-tc-event-inline")||t.getAttribute("tc-event-inline")||t.getAttribute("data-tc-event-integrated")||t.getAttribute("tc-event-integrated"),N=t=>{const e=E(t),n=h(t),o={lang:t.getAttribute("data-tc-lang"),...n&&{token:n},...e&&{event:e}},c=(e="")=>n=>{const c=t.getAttribute("".concat(e).concat(n));c&&(o[n]=c)};return["customData","promocode","flang"].forEach(c()),["theme","promo","partner","meta"].forEach(c("data-tc-")),o};function x(t){return t&&t.showroomWidget?l:/https:\/\/api\./.test(d)?"ticketscloud.org":d.replace(/https?:\/\//,"")}function C(){return Date.now().toFixed(0)}var T=t=>{if(window===window.parent)return;const e={action:"setHeight",fromShowroom:!0};t&&(e.height=t),window.parent.postMessage(JSON.stringify(e),"*")},I=()=>{const t=JSON.stringify({action:"tcCancelOrder"});document.getElementsByClassName("tc-widget-frame_popup")[0].contentWindow.postMessage(t,"*")},M=t=>{let e;try{e=JSON.parse(t)}catch(t){}return e};var q=t=>{t=(t=>(["utm_source","utm_medium","utm_campaign","utm_content","utm_term"].map((function(e){y(e)&&(t="".concat(t,"&").concat(e,"=").concat(y(e)))})),t))(t);const e=y("_ga");if(k()&&e)return"".concat(t,"&_ga=").concat(e);if(window.ga&&window.ga.getAll){window.ga("require","linker");const e=window.ga.getAll()[0],n=window.gaplugins?new window.gaplugins.Linker(e):null;return n?n.decorate(t):t}return t};const L=()=>{},O=/^https?:\/\/((local|dev|stage)\.)?ticketscloud\.org/.test(window.location.href),B=t=>{const{container:e,fullScreen:n}=t;if(!_(e))return;const o=A()||window.top!==window.self||n?0:20,c=window.innerHeight-2*o,r=S(),i=e.style;i.maxWidth="".concat(r,"px"),i.width="100%",i.fontSize="0",i.WebkitOverflowScrolling="touch",i.marginTop="".concat(o,"px"),i.marginBottom="".concat(o,"px"),i.marginLeft="".concat(o,"px"),i.marginRight="".concat(o,"px"),i.height="".concat(Math.min(t.height,c),"px"),i.background="white"},R=()=>{const t=document.createElement("div"),e=t.style;e.background="transparent",e.zIndex="1000000004",e.position="fixed",e.width="100vw",e.height="100vh",e.top="0",e.left="0",e.display="flex",e.justifyContent="center",e.boxSizing="border-box";const n=document.createElement("div"),o=n.style;return o.height="400px",o.maxHeight="100%",t.appendChild(n),n.appendChild((()=>{const t=document.createRange().createContextualFragment('\n
'),e=document.createElement("style");e.type="text/css";const n="\n .ticketscloud-spin__wrapper {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }\n .ticketscloud-spin {\n width: 40px;\n height: 40px;\n position: relative;\n flex-shrink: 0;\n }\n .ticketscloud-spin__child {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: #333;\n opacity: 0.6;\n position: absolute;\n top: 0;\n left: 0;\n -webkit-animation: sk-doubleBounce 2s infinite ease-in-out;\n animation: sk-doubleBounce 2s infinite ease-in-out;\n }\n .ticketscloud-spin__child:last-child {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s;\n }\n @-webkit-keyframes sk-doubleBounce {\n 0%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 50% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }\n @keyframes sk-doubleBounce {\n 0%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 50% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }";return e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n)),e.setAttribute("id","ticketscloud-loader"),document.querySelector("head").appendChild(e),t})()),B({container:n}),{wrapper:n,container:t}};function D(t){const e=t.frameType===m||t.frameType===w?"no":"auto",n=t.frameType?"tc-widget-".concat(t.frameType):"tc-widget-frame_popup";return'')}const U=(t,e)=>{let n;const o=window.ticketscloud_first_name||"",c=window.ticketscloud_last_name||"",i=window.ticketscloud_email||"",a=window.ticketscloud_phone||"",s=r(t.token),l=s.p||s.partner,p=(t=>{const e=t.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp("(?:^|; )".concat(e,"=([^;]*)")));return n?decodeURIComponent(n[1]):void 0})("roistat_visit");null!==t.lang&&"null"!==t.lang||(t.lang=""),O?t.utm="off":e&&e.id&&(t.utm=e.id);const m="true"===t.meta?"/meta?meta_event":"?event";n="".concat(d,"/").concat(u,"/widgets/common").concat(m,"=").concat(t.event);return n+="&token=".concat(t.token),n+="&partner=".concat(l),n+=o?"&first_name=".concat(encodeURIComponent(o)):"",n+=c?"&last_name=".concat(encodeURIComponent(c)):"",n+=i?"&email=".concat(encodeURIComponent(i)):"",n+=a?"&phone=".concat(encodeURIComponent(a)):"",n+=t.frameType?"&m=".concat(t.frameType):"",["lang","theme","promo","utm","customData","promocode","flang"].forEach((e=>{n+=t[e]?"&".concat(e,"=").concat(t[e]):""})),n+=p?"&roistat=".concat(p):"",n=q(n),n};function W(t,e,n){const o=N(t);if(o.event&&o.token){const c=document.createElement("div");o.frameType=e;const r=U(o,n),i=C(),a=D({src:r,eventId:o.event,iFrameId:i,frameType:e});c.className="".concat(c.className," tc-widget-").concat(e,"-box"),c.innerHTML=a,t.parentNode.replaceChild(c,t)}else g(o)}function j(t,e){document.body.appendChild(((t,e=L)=>{let n=document.getElementById(t);if(!n){n=document.createElement("div"),n.setAttribute("id",t);const o=n.style;o.position="fixed",o.top=0,o.left=0,o.height="100%",o.width="100%",o.zIndex="1000000003",o.background="rgba(0,0,0,.5)",n.addEventListener("click",(t=>{t.preventDefault(),e(t)}))}return n})(p));const{wrapper:n,container:o}=R();document.body.appendChild(o);const c=C();n.innerHTML=D({src:t,eventId:e,iFrameId:c})}function H(t){const e=document.querySelector('[data-tc-iframe-id="'.concat(t,'"]'))?document.querySelector('[data-tc-iframe-id="'.concat(t,'"]')):document.querySelector(".tc-widget-frame_popup"),n=document.getElementById(p);if(function(t){const e=t.parentNode;e&&e.parentNode&&e.parentNode.parentNode&&_(e)?e.parentNode.parentNode.removeChild(e.parentNode):t.setAttribute("src",t.getAttribute("src"))}(e),n&&n.parentNode&&n.parentNode.removeChild(n),function(){const t=document.querySelector("#ticketscloud-loader");t&&t.parentNode.removeChild(t)}(),function(){const t=document.getElementsByTagName("body")[0];t.style.overflow=t.getAttribute("data-overflow"),t.removeAttribute("data-overflow"),F(t)}(),k()){const t=window.innerHeight;T(t)}}function F(t){const e=t.querySelector(".showroom-wrapper");e&&(e.style.display="none"===e.style.display?"block":"none")}var J=t=>{const e=t+(A()?0:40);if(t>window.innerHeight&&window.VK&&window.VK.callMethod){const t=document.querySelector("body").clientWidth;window.VK.callMethod("resizeWindow",t,e)}},z=()=>{if(window.VK&&window.VK.callMethod){const t=document.querySelector("body").getBoundingClientRect().height;window.VK.callMethod("resizeWindow",t.width,t.height)}},K=t=>{t.forEach((t=>{document.createElement("img").src="".concat(window.location.protocol,"//vk.com/rtrg?r=").concat(t)}))},V=()=>{window.VK&&window.VK.callMethod&&window.VK.callMethod("scrollWindow",0)};const P=t=>{const e=(t=>t.match(/#ticketscloud:(.+)/)[1].split("&").reduce(((t,e)=>(t[e.split("=")[0]]=e.split("=")[1],t)),{}))(t.getAttribute("href"));(e.showroom||e.event||e.meta_event)&&e.token&&(t.setAttribute("data-tc-token",e.token),e.event&&t.setAttribute("data-tc-event",e.event),e.promocode&&t.setAttribute("promocode",e.promocode),e.showroom&&t.setAttribute("data-tc-showroom",!0),e.lang&&t.setAttribute("data-tc-lang",e.lang),e.meta_event&&(t.setAttribute("data-tc-event",e.meta_event),t.setAttribute("data-tc-meta",!0)))};var X=()=>{if(!Boolean(document.querySelector("[data-tilda-project-id]")))return;const t=document.querySelectorAll('a[href^="#ticketscloud:"]');Array.prototype.forEach.call(t,P)};function $(t){const e=N(t),n=r(e.token);e.partner=n.partner||n.p;const o=Y(["widget"],e.partner);v(o,function(t){return function(e){const n=G(),o="widget.css";e.replace(/href="\/static\//g,'href="'.concat(n,"/static/")),e.replace(/src="\/media\//g,'src="'.concat(n,"/media/"));const c="".concat(n,"/static/").concat(o);t.createShadowRoot?v(c,(n=>{t.createShadowRoot().innerHTML="").concat(e)})):((()=>{const t=document.createElement("link"),e=x({showroomWidget:!0});t.type="text/css",t.rel="stylesheet",t.href="".concat(window.location.protocol,"//").concat(e,"/static/").concat("widget.css"),document.querySelector("head").appendChild(t)})(),t.innerHTML=e)}}(t))}function Y(t,e){const n=G(),o=t.join("&");return s?n+(o?"?".concat(o):""):q("".concat(n,"?partner_id=").concat(e).concat(o?"&".concat(o):""))}function G(){const t=x({showroomWidget:!0});return"https://".concat(t)}function Q(t){return Y(["embedded","popup=true"],t)}function Z(t){return null!==t.getAttribute("data-tc-showroom")}!function(){const t=/tcordersuccess=\d+/.test(window.location.search);let e,n,o,c,i=!1;function s(){i=!0}let p=function(){document.querySelector("body")&&("ontouchend"in window?(document.addEventListener("touchend",q),document.addEventListener("touchmove",s)):document.addEventListener("click",q),p=()=>{})};function f(t){const e=document.getElementsByTagName("body")[0],n=t.event||t.partner,c='[data-tc-event-id="'.concat(n,'"]'),r=document.querySelector(c);let i;t.lang=t.lang||"ru",r&&_(r.parentNode)||(i=t.partner?Q(t.partner):U(t,o),j(i,t.event||t.partner),e.addEventListener("keyup",b),function(){const t=document.getElementsByTagName("body")[0];t.setAttribute("data-overflow",t.style.overflow),t.style.overflow="hidden",F(t)}(),k()&&(V(),T()))}function v(e){const n=d.split(":").slice(1,2).join().replace("//","");if(new RegExp("(".concat(n,"|").concat(l,")")).test(e.origin)){const n=M(e.data);if(n&&n.action)switch(n.action){case"closeBooking":if(t)!function(){const t=window.location.href.replace(/&tc_event=\w+/,"").replace(/&tc_partner=\w+/,"");/tc_order_success=\w+&/.test(window.location.search)?window.location.replace(t.replace(/tc_order_success=\w+&/,"")):/&tc_order_success=\w+/.test(window.location.search)?window.location.replace(t.replace(/&tc_order_success=\w+/,"")):window.location.replace(t.replace(/\?tc_order_success=\w+\/?/,""))}();else{const t=document.querySelector("body");H(n.iFrameId,T()),t.removeEventListener("keyup",b)}break;case"changeFrameId":!function(t){t.to&&document.querySelector('[data-tc-event-id="'.concat(t.from,'"]')).setAttribute("data-tc-event-id",t.to)}(n);break;case"setHeight":!function(t){const e=document.querySelectorAll('[data-tc-iframe-id="'.concat(t.iFrameId,'"]'));Array.prototype.forEach.call(e,(e=>{J(t.height);const n=!_(e.parentNode);t.goTop&&function(t){const e=t.getBoundingClientRect().top;"IFRAME"===t.tagName&&(t=t.parentNode);t.scrollTop=0,!_(t)&&e<0&&window.scrollBy(0,e)}(e);const o=e.parentNode;n?e.setAttribute("height","".concat(t.height,"px")):B({container:o,height:t.height,fullScreen:t.fullScreen,topDomain:c});t.height&&n&&e.parentNode&&e.parentNode.parentNode&&e.parentNode.parentNode.clientHeight{n[t].length&&Array.prototype.forEach.call(n[t],(e=>{const n=document.createElement("button"),o=e.getAttribute("data-tc-lang"),c=e.getAttribute("data-tc-token")||e.getAttribute("tc-token"),r="inlines"===t?"inline":t,i=e.getAttribute("data-tc-event-".concat(r))||e.getAttribute("tc-event-".concat(r)),a=e.getAttribute("data-tc-meta")||e.getAttribute("tc-meta"),d=e.getAttribute("data-promocode")||e.getAttribute("promocode"),s=e.getAttribute("customData");o&&n.setAttribute("data-tc-lang",o),n.setAttribute("data-tc-event",i),n.setAttribute("data-tc-token",c),a&&n.setAttribute("data-tc-meta",a),s&&n.setAttribute("customData",s),d&&n.setAttribute("promocode",d),n.textContent="en"===o?"Buy ticket":"Купить билет",n.type="button",e.parentNode&&(e.parentNode.style.textAlign="center"),e.parentNode.replaceChild(n,e)}))})),n=A(),window.tcBuyTicketClickCallbackBinded||(p(),window.tcBuyTicketClickCallbackBinded=!0),!t&&function(t){return t&&(0!==t.links.length||0!==t.inlines.length||0!==t.integrated.length)}(n)){if(window.ticketscloudUTM)return;o=new(a())("".concat(d,"/").concat(u),document.referrer),window.ticketscloudUTM=!0,o.init((()=>function(t){const e=Array.from(t).map((t=>{const e=t.getAttribute("data-tc-event"),n=h(t);return e&&n?{event:e,token:n}:null})).filter((t=>null!==t)),n=e.map((t=>t.event)).reduce(((t,e,n,o)=>(o.indexOf(e)===n&&t.push(n),t)),[]),c=e.filter(((t,e)=>n.indexOf(e)>-1));0!==e.length&&o.dispatch(o.actions.buttonAdded,c)}(n.links))),z()}e=(()=>{const t=document.createElement("link");return t.setAttribute("href","".concat(d,"/static/css/").concat("tc-widget-button.css")),t.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(t),t})(),function(t){Array.prototype.forEach.call(t.inlines,(t=>{W(t,x()?"mobile":m,o)})),Array.prototype.forEach.call(t.integrated,(t=>{W(t,w,o)}))}(n),function(t){Array.prototype.forEach.call(t,$)}(n.showroomInline),t&&function(){const t=y("tc_order_success"),e=y("tc_event"),n=y("tc_partner");let o="".concat(d,"/").concat(u,"/widgets/common_success?");o+="order=".concat(t),o+=e?"event=".concat(e):"",o+=n?"partner=".concat(n):"",j(o,t)}(),window.self!==window.top&&window.top.postMessage(JSON.stringify({action:"getDomain"}),"*")}"complete"===document.readyState||"interactive"===document.readyState?D():document.addEventListener("readystatechange",(()=>{"complete"!==document.readyState&&"interactive"!==document.readyState||D()})),window.addEventListener("resize",R),window.addEventListener("message",v),window.addEventListener("orientationchange",L),window.matchMedia("(orientation: portrait)").addListener&&window.matchMedia("(orientation: portrait)").addListener(L),window.ticketsCloudWidget={destroy(){document.getElementsByTagName("head")[0].removeChild(e),document.removeEventListener("DOMContentLoaded",D),window.removeEventListener("resize",R),window.removeEventListener("message",v),window.removeEventListener("orientationchange",L),window.matchMedia("(orientation: portrait)").addListener&&window.matchMedia("(orientation: portrait)").removeListener(L),document.removeEventListener("click",q),document.removeEventListener("touchend",q),document.removeEventListener("touchmove",s)},init:D}}()}()}();