1var IS_CLIENT_SIDE="undefined"!=typeof window,IS_ANDROID_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.AndroidBridge),IS_IOS_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),IS_WEB=IS_CLIENT_SIDE&&!IS_ANDROID_WEBVIEW&&!IS_IOS_WEBVIEW,androidBridge=IS_CLIENT_SIDE?window.AndroidBridge:void 0,iosBridge=IS_IOS_WEBVIEW?window.webkit.messageHandlers:void 0;function _bridgeSend(e,t){androidBridge&&androidBridge[e]?androidBridge[e](JSON.stringify(t)):iosBridge&&iosBridge[e]&&"function"==typeof iosBridge[e].postMessage&&iosBridge[e].postMessage(t)}
2function _bridgeSupports(e){return IS_ANDROID_WEBVIEW?androidBridge&&"function"==typeof androidBridge[e]:!!IS_IOS_WEBVIEW&&(iosBridge&&iosBridge[e]&&"function"==typeof iosBridge[e].postMessage)}
3var IS_BRIDGE_AVAILABLE=!IS_WEB&&_bridgeSupports("VKWebAppConversionHit");function getBaseDomain(){var e="vk.com";try{var t=document.currentScript?.src;if(t)e=new URL(t).hostname.split(".").slice(-2).join(".")}
4catch(t){return console.warn("Failed to resolve script domain: ",t),e}
5return e}
6if(function(e){if(!e.fastXDM){var t={}
7,o={}
8,i=[],n={}
9;e.fastXDM={_id:0,helperUrl:`https://${getBaseDomain()}
10/js/api/xdmHelper.js`,Server:function(o,i,n){this.methods=o||{}
11,this.filter=i,this.options=n||{}
12,this.id=e.fastXDM._id++,this.key=function(){for(var e="",t=0;t<5;t++)e+=Math.ceil(15*Math.random()).toString(16);return e}
13(),this.frameName="fXD"+this.key,this.server=!0,this.methods["%init%"]=this.methods.__fxdm_i=function(){d((function(t){for(var o in this.methods)if(this.methods[o]instanceof e.fastXDM.Server){var i=this.methods[o];"p"===t.protocol&&t.send(this,t.json.stringify(["%proxy%",[o,i.key]])),this.methods[o]=function(){this.callMethod.apply(this,arguments)}
14.bind(i)}
15}
16),this),e.fastXDM.run(this.id),this.methods.onInit&&this.methods.onInit()}
17,t[this.key]=[p,this]}
18,Client:function(i,n){if(this.methods=i||{}
19,this.options=n||{}
20,this.id=e.fastXDM._id++,this.client=!0,e.fastXDM.run(this.id),0!==window.name.indexOf("fXD"))throw Error("Wrong window.name property.");this.key=window.name.substring(3,8),this.caller=window.parent,o[this.key]||(o[this.key]={}
21),this.methods["%proxy%"]=function(e,t){e&&t&&this.caller.frames["fXD"+t]&&(o[this.key][e]={key:t,frame:{contentWindow:this.caller.frames["fXD"+t]}
22}
23)}
24.bind(this),t[this.key]=[p,this],e.fastXDM.on("helper",(function(){e.fastXDM.onClientStart(this)}
25),this),d((function(e){e.send(this,e.json.stringify(["%init%"]));var t=this.methods;setTimeout((function(){t.onInit&&t.onInit()}
26),0)}
27),this)}
28,onMessage:function(e){var o=e.data;if(!o)return!1;if("string"!=typeof o&&!(o instanceof String))return!1;var i=o.substr(0,5);if(t[i]){var n=t[i][1];!n||n.filter&&!n.filter(e.origin)||t[i][0](o.substr(6),n,e.origin)}
29}
30,setJSON:function(e){n.json=e}
31,getJSON:function(e){if(!e)return n.json;d((function(t){e(t.json)}
32))}
33,getProxyToServer:function(e,t){return o[e]&&o[e][t]}
34,setEnv:function(e){for(var t in e)n[t]=e[t];l()}
35,_q:{}
36,on:function(e,t,o){this._q[e]||(this._q[e]=[]),-1==this._q[e]?t.apply(o):this._q[e].push([t,o])}
37,run:function(e){for(var t=(this._q[e]||[]).length,o=0;o<t;o++)this._q[e][o][0].apply(this._q[e][o][1]);this._q[e]=-1}
38,waitFor:r}
39,e.fastXDM.Server.prototype.start=function(t,o){if(t.contentWindow)this.caller=t.contentWindow,this.frame=t,e.fastXDM.on("helper",(function(){e.fastXDM.onServerStart(this)}
40),this);else{var i=this;(o=o||0)<50&&setTimeout((function(){i.start.apply(i,[t,o+1])}
...
</html>