var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); (self.webpackChunkvk=self.webpackChunkvk||[]).push([[4839],{17999:function(t,e,n){"use strict";n.d(e,{rand:function(){return r},replaceEntities:function(){return m},isArray:function(){return s},isEmpty:function(){return f},isFunction:function(){return a},isFormData:function(){return i},isHttpHref:function(){return b},isObject:function(){return c},isString:function(){return u},isUndefined:function(){return o},irand:function(){return S},escapeAttr:function(){return g},escapeRE:function(){return l},escapeStr:function(){return p},each:function(){return E},htsc:function(){return d},copy:function(){return T},vkNow:function(){return k},unescapeAttr:function(){return v},utf2win:function(){return y},srand:function(){return w},stripTags:function(){return h},intval:function(){return _},vkImage:function(){return D},isElement:function(){return L}});var r=function(t,e){return Math.random()*(e-t+1)+t},o=function(t){return void 0===t},a=function(t){return t&&"[object Function]"===Object.prototype.toString.call(t)},i=function(t){return t&&"[object FormData]"===Object.prototype.toString.call(t)},u=function(t){return"string"==typeof t},s=function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t){return"[object Object]"===Object.prototype.toString.call(t)},f=function(t){if(!c(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},l=function(t){return t?t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1"):""},d=function(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'").replace(/%/g,"%")},g=function(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'")},v=function(t){return t.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")},m=function(t){return ce("textarea",{innerHTML:(t||"").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}).value},p=function(t){return t.replace(/\'/g,"\\'")},h=function(t){return t.replace(/<[^>]+>/g,"")},w=function(){return Math.random().toString(36).substr(2)},S=function(t,e){return Math.floor(r(t,e))},y=function(t){return unescape(encodeURIComponent(t))};function b(t){var e=(t+"").split(":"),n=e[1]&&e[0]?e[0]+":":location.protocol;return"http:"===n||"https:"===n}var k=function(){return+new Date};function _(t){return!0===t?1:parseInt(t)||0}function E(t,e){if(!t)return t;if(c(t)||void 0===t.length){for(var n in t)if(t.hasOwnProperty(n)&&!1===e.call(t[n],n,t[n]))break}else for(var r=0,o=t.length;r<o;r++){var a=t[r];if(!1===e.call(a,r,a))break}return t}function T(t){return s(t)?t.concat([]):c(t)?extend({},t):t}var D=function(){return window.Image?new Image:ce("img")},L=function(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName}},27813:function(t,e,n){"use strict";n.d(e,{getCookie:function(){return a},setCookie:function(){return i}});var r=n(86353),o=n(86900);function a(t){return function(){window._cookies={};for(var t=document.cookie.split(";"),e=/^[\s]*([^\s]+?)$/i,n=0,r=t.length;n<r;n++){var o=t[n].split("=");2===o.length&&(_cookies[o[0].match(e)[1]]=unescape(o[1].match(e)?o[1].match(e)[1]:""))}}(),"https:"!==location.protocol&&(0,o.statlogsValueEvent)("read_unsecure_cookie",t,location.href),_cookies[t]}function i(t,e,n,o,a,i,u){void 0===a&&(a="None"),void 0===i&&(i=window.locDomain),void 0===u&&(u={});var s=t+"="+escape(e),c=u.withoutSubdomains?".":"",f="; path=/"+(i?"; domain="+c+i:""),l="https:"===location.protocol,d=!!o;(0,r.partConfigEnabled)("cookie_secure_default_true")&&(d=!1!==o);var g=l&&d?"; secure":"",v=d&&browser.chrome&&parseInt(browser.version)>=71&&(0,r.partConfigEnabled)("cookie_class_samesite")?"; SameSite="+a:"",m="";if(n){var p=new Date;p.setTime(p.getTime()+24*n*60*60*1e3),m="; expires="+p.toGMTString()}document.cookie=s+m+f+v+g}},51988:function(t,e,n){"use strict";var r=n(90302);function o(t){try{r.vkLocalStorage.removeItem(t)}catch(t){}}e.default={checkVersion:function(){try{return void 0!==window.localStorage&&null!==window.localStorage&&void 0!==window.JSON}catch(t){return!1}},remove:o,get:function(t){try{return JSON.parse(r.vkLocalStorage.getItem(t))}catch(t){return!1}},set:function(t,e){o(t);try{return r.vkLocalStorage.setItem(t,JSON.stringify(e))}catch(t){return!1}}}},86900:function(t,e,n){"use strict";n.d(e,{statlogsValueEvent:function(){return c}});var r,o,a=n(27813),i=n(36557),u=n(17999),s=n(51988);function c(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var s;void 0!==t&&void 0!==e&&f((function(){try{s=(s=JSON.parse((0,a.getCookie)(o))).data}catch(t){s=[]}s.push([Math.round(Date.now()/1e3),t,e].concat(r)),s=s.slice(s.length-100);var n=Math.round((0,u.rand)(0,1e9));(0,a.setCookie)(o,JSON.stringify({data:s,uniqueId:n}),.01)}))}function f(t,e){if(s.default.checkVersion()){if(!0!==s.default.get(r)){s.default.set(r,!0);try{t()}catch(t){}return void s.default.set(r,!1)}e||setTimeout((function(){return f(t,!0)}),100)}else t()}(0,i.isMvk)()?(r="lock_m_stats_cookie_lock",o="remixmsts"):(r="lockkk_stats_cookie_lock",o="remixsts")},86353:function(t,e,n){"use strict";n.d(e,{randEnabled:function(){return o},partConfigEnabled:function(){return a},calculateTimeOffsets:function(){return i}});var r=n(27813);function o(t){return Math.random()<t}function a(t){var e=(window.vk||{}).pe;return!!(void 0===e?{}:e)[t]}function i(){var t=window.vk.ts;if(t&&!window.browser.opera_mobile){var e=new Date,n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds())/1e3-t;n-=10800,n=(n/=60).toFixed(0),(n*=60)<-55800?n+=86400:n>37800&&(n-=86400);var o=0,a=Math.abs(n);[-12,-11,-10,-9.5,-9,-8,-7,-6,-5,-4.5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,5.75,6,6.5,7,8,8.75,9,9.5,10,10.5,11,12,12.75,13,14].forEach((function(t){var e=Math.round(3600*(t-3)),r=Math.abs(n-e);r<a&&(a=r,o=e)}));var i=(0,r.getCookie)("remixdt");return void 0!==i&&intval(i)===o||(0,r.setCookie)("remixdt",o,365),o}return 0}},89722:function(t,e,n){"use strict";n.d(e,{logError:function(){return a},logEvalError:function(){return i}});var r=n(98609),o=n(85124);function a(t,e){if(void 0===e&&(e={}),null===window||void 0===window?void 0:window.Raven){var n=e.breadcrumb,a=e.environment;n&&window.Raven.captureBreadcrumb({message:n.message,category:o.customBreadcrumbCategory,data:n.data}),a?window.Raven.captureException(t,{environment:a}):window.Raven.captureException(t),(0,r.logError)(t,e)}}function i(t,e){window.Raven&&(e&&e.length>2e3&&(e=e.slice(0,1e3)+"..."+e.slice(-1e3)),t.message+=": "+e,a(t))}},2013:function(t,e,n){"use strict";n.d(e,{isStuckError:function(){return m},pruneRequestFromStuckErrors:function(){return p}});var r,o,a=n(97316),i=n(86353),u=n(36726),s=n(42604),c="mvk"===(null===(o=null===(r=window.vk)||void 0===r?void 0:r.statsMeta)||void 0===o?void 0:o.platform)&&(0,i.partConfigEnabled)("mute_mvk_err_peaks"),f=n(61686),l=10,d=c&&f(l),g=c&&f(l,5e3),v=function(t){var e=t.value,n=t.stacktrace,r=t.file,o=t.page;return[e,n.join(""),r,o].join("_")},m=function(t){if(!c||!g||!d)return!1;var e=v(t),n=(0,a.__read)([d.get(e)||0,g.get(e)||0],2),r=n[0],o=n[1];return d.set(e,++r),g.set(e,++o),o>=l||r>=50},p=c?function(t){var e,n,r=Date.now(),o="jsErrorLogs",i=(0,u.getWebStatsStringValue)(o,t);if(((null===(e=i.match(new RegExp("},{","g")))||void 0===e?void 0:e.length)||0)<l)return t;try{n=JSON.parse(i)}catch(t){(0,s.logProcessingTime)(1,"dedupe-fail")}if(!n)return t;var c=Object.values(n.reduce((function(t,e){var n,r=v(e),o=t[r]||[];return(0,a.__assign)((0,a.__assign)({},t),((n={})[r]=o.length<l?o.concat(e):o,n))}),{})),f=t.replace('"jsErrorLogs":'+i,'"jsErrorLogs":'+JSON.stringify([].concat.apply([],c))),d=Date.now()-r;return d>16&&(0,s.logProcessingTime)(d,"dedupe"),f}:function(t){return t}},11386:function(t,e,n){"use strict";n.d(e,{prepareError:function(){return r.prepareError},getRavenXhrTransport:function(){return o.getRavenXhrTransport},logError:function(){return a.logError},logEvalError:function(){return a.logEvalError}});var r=n(20066),o=n(1479),a=n(89722)},20066:function(t,e,n){"use strict";function r(t,e){var n=t.exception&&t.exception.values[0]||{type:"Message",value:t.message+o(t),stacktrace:t.stacktrace||{frames:[]}};"Error"===n.type&&n.value.startsWith("Non-Error exception captured with keys:")&&(n.value+=o(t)),!n.value&&t.message&&(n.value=t.message);var r=n.type,u=n.value,s=n.stacktrace,c=window.location,f=c.origin,l=c.protocol,d=c.hostname,g=c.port,v=c.href;g=g?":"+g:"",f=f||l+"//"+d+g;var m=t.environment,p=t.transaction,h=t.breadcrumbs;return{id:t.event_id,module:m||e(p,s,u),type:r,value:u,file:p,breadcrumbs:a(h),stacktrace:i(s,f),page:v,release:window.vk.rv,time:window.vk.ts+Math.floor(((new Date).getTime()-window.vk.started)/1e3)}}function o(t){return t.extra&&t.extra.__serialized__?"\n"+JSON.stringify(t.extra.__serialized__).slice(0,500):""}function a(t){if(!t||!t.values||0===t.values.length)return"";var e=t.values[0],n=e.data,r=e.category,o=e.message;return"xhr"===r?n.method+":"+n.status_code+":"+n.url:"custom"===r?o+":"+JSON.stringify(n):""}function i(t,e){var n=[];return t.frames.forEach((function(t,r){0===r&&(t.filename.includes("raven_logger.js")||t.filename.includes("raven.js"))||n.push(t.filename.replace(e,"")+":"+t.lineno+":"+t.colno+":"+t.function)})),n}n.d(e,{prepareError:function(){return r}})},1479:function(t,e,n){"use strict";n.d(e,{getRavenXhrTransport:function(){return a}});var r=n(24961),o=n(2013),a=function(t){return function(e){var n=e.data,a=e.onSuccess,i=t(n);!(0,o.isStuckError)(i)&&(0,r.saveJsErrorLogs)(i),a()}}},85124:function(t,e,n){"use strict";n.d(e,{CustomSentryErrorTypes:function(){return r},moduleDetectionConfig:function(){return a},commonIgnoreErrors:function(){return i},PROTECTED_MODULE_NAME_TAG:function(){return u},customBreadcrumbCategory:function(){return s},anonymousName:function(){return c},nativeCode:function(){return f},extensionPrefixes:function(){return l},Error:function(){return d},TypeError:function(){return g},SyntaxError:function(){return v}});var r,o=n(95132);!function(t){t.ERROR_OF_EXTENSION="ErrorOfExtension",t.KNOWN_ISSUE="KnownIssue"}(r||(r={}));var a={some:{videoplayer:function(t){return null==t?void 0:t.some((function(t){return"dist/videoplayer_v2"===t.module}))}},includes:{im:"web/imn",messenger:"bundles/fastchat_reforged",audioplayer:"bundles/audioplayer",videoplayer:"dist/videoplayer",stories:"web/stories",notifier:"web/notifier",articles:"web/article",market:"web/market",calls:"web/calls"}},i=[/^AbortError:/],u="__protectedModuleName",s="custom",c=(0,o.getFunctionName)(void 0),f="[native code]",l=["chrome","moz","safari","safari-web"].map((function(t){return t+"-extension://"})),d="Error",g="TypeError",v="SyntaxError"},98609:function(t,e,n){"use strict";n.d(e,{logError:function(){return a}});var r=n(69732),o=n(85124);function a(t,e){var n=void 0===e?{}:e,a=n.breadcrumb,i=n.environment,u=n.hasDummyStacktrace,s=(0,r.getGlobalObject)();if(null==s?void 0:s.Sentry)return u&&"object"==typeof t&&(null==t?void 0:t.stack)&&delete t.stack,s.Sentry.captureException(t,(function(t){var e,n,r=i||(null===(n=s.cur)||void 0===n?void 0:n.module);return r&&t.setTags(((e={module:r})[o.PROTECTED_MODULE_NAME_TAG]=!0,e)),a&&t.addBreadcrumb({message:a.message,category:o.customBreadcrumbCategory,data:a.data}),t}))}},36557:function(t,e,n){"use strict";n.d(e,{isMvk:function(){return o},getVideoDuration:function(){return a},getMediaBlob:function(){return i},getBlobType:function(){return u},noop:function(){return s},getAverageRGB:function(){return c},loadVideo:function(){return f},getPhotoFromVideo:function(){return l},loadImage:function(){return d},loadImages:function(){return g},loadFontFacePromise:function(){return m},getCroppedImage:function(){return p}});var r=n(97316);function o(){return!!window.isMVK}function a(t){return void 0===t&&(t=""),new Promise((function(e,n){var r=document.createElement("video");r.addEventListener("loadedmetadata",(function(){return e(r.duration)}),{once:!0}),r.addEventListener("error",n,{once:!0}),r.crossOrigin="anonymous",r.preload="metadata",r.src=t}))}function i(t){return new Promise((function(e,n){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="blob",r.onload=function(){if(404===r.response.status)return n();e(r.response)},r.onerror=n,r.send()}))}function u(t){try{return t.type.split("/").splice(-1)[0]}catch(t){return null}}var s=function(){};function c(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=0);var a,i={r:0,g:0,b:0};r=r||t.canvas.width,o=o||t.canvas.height;try{a=t.getImageData(e,n,r,o)}catch(t){return i}for(var u=-4,s=0;(u+=20)<a.data.length;)++s,i.r+=a.data[u],i.g+=a.data[u+1],i.b+=a.data[u+2];return i.r=~~(i.r/s),i.g=~~(i.g/s),i.b=~~(i.b/s),i}function f(t){return new Promise((function(e,n){var r=document.createElement("video");r.muted=!0,r.autoplay=!0,r.addEventListener("canplay",(function(){r.pause(),e(r)}),{once:!0}),r.addEventListener("error",n,{once:!0}),r.crossOrigin="anonymous",r.src=t}))}function l(t,e){void 0===e&&(e=[0]);var n=[];return new Promise((function(r,o){var a=document.createElement("canvas"),i=a.getContext("2d"),u=t.videoWidth,s=t.videoHeight;a.width=u,a.height=s,function c(f){var l=t.currentTime;t.addEventListener("seeked",(function(){null==i||i.drawImage(t,0,0,u,s,0,0,u,s),t.currentTime=l,d(a.toDataURL("image/jpeg",1)).then((function(o){n.push(o),f>=e.length-1?(t.src="",r(n)):c(f+1)})).catch(o)}),{once:!0}),t.currentTime=-1===e[f]?t.duration:e[f]}(0)}))}function d(t){return new Promise((function(e,n){var r=new Image;r.crossOrigin=t.startsWith("data:")?null:"Anonymous",r.onerror=function(){return n(new Error("Failed to load image's URL: "+t))},r.onload=function(){return e(r)},r.src=t}))}var g=function(t){return new Promise((function(e){var n=t.map((function(t){return d(t)}));Promise.all(n).then((function(t){return e(t)})).catch((function(){}))}))};function v(t,e){var n,r,o,a,i,u,s,c,f={normal:"400",500:"500",600:"600",bold:"700"},l={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal"},d={display:"block","font-size":"48px","line-height":"normal","font-variant":"normal","white-space":"nowrap",position:"absolute",visibility:"hidden",top:"-9999px",left:"-9999px",width:"auto",height:"auto",margin:"0",padding:"0"};function g(t){var e=[];return each(t,(function(t,n){e.push(t+":"+n)})),e.join(";")}function v(t,e,n){return Math.abs(t.width-e.offsetWidth)>n||Math.abs(t.height-e.offsetHeight)>n}function m(){a||(utilsNode.appendChild(i),a=!0,o={sansSerif:{width:s.offsetWidth,height:s.offsetHeight},serif:{width:u.offsetWidth,height:u.offsetHeight}},browser.opera&&!browser.chrome?(s.style.fontFamily='"'+t+'", sans-serif',u.style.fontFamily='"'+t+'", serif'):(setStyle(s,"font-family",'"'+t+'", sans-serif'),setStyle(u,"font-family",'"'+t+'", serif'))),a&&o&&(v(o.sansSerif,s,e.tolerance)||v(o.serif,u,e.tolerance))?(re(i),e.success()):(new Date).getTime()-r.getTime()>e.timeout?(re(i),e.error()):!a&&"requestAnimationFrame"in window?window.requestAnimationFrame(m):window.setTimeout(m,e.delay)}for(var p in l)e.hasOwnProperty(p)||(e[p]=l[p]);d["font-weight"]=e.weight,d["font-style"]=e.style,!e.glyphs&&"fonts"in document?(e.timeout&&(n=setTimeout((function(){e.error()}),e.timeout)),function(n){each(null===document||void 0===document?void 0:document.fonts,(function(r){r.family.toLowerCase()===t.toLowerCase()&&(f[r.weight]||r.weight)===""+e.weight&&r.style===e.style&&r.load().then((function(){e.success(),clearTimeout(n)}))}))}(n)):(c="AxmTYklsjo190QW"+e.glyphs,r=new Date,i=ce("div"),s=ce("div",{innerHTML:c}),u=ce("div",{innerHTML:c}),s.setAttribute("style",g(extend({"font-family":"sans-serif"},d))),u.setAttribute("style",g(extend({"font-family":"serif"},d))),i.appendChild(s),i.appendChild(u),m())}function m(t,e){return new Promise((function(n,o){v(t,(0,r.__assign)((0,r.__assign)({},e),{glyphs:"",success:function(){var t=function(){n(),(null==e?void 0:e.success)&&e.success()};browser.safari?setTimeout(t,150):t()},error:function(){o(),(null==e?void 0:e.error)&&e.error()}}))}))}function p(t,e,n,r,o,a){return void 0===a&&(a=0),new Promise((function(i,u){("string"==typeof t?d(t):Promise.resolve(t)).then((function(t){var s=document.createElement("canvas");s.width=90===a||270===a?t.naturalHeight:t.naturalWidth,s.height=90===a||270===a?t.naturalWidth:t.naturalHeight;var c=s.getContext("2d");if(c){c.fillStyle="#fff",c.fillRect(0,0,c.canvas.width,c.canvas.height),a?(c.translate(s.width/2,s.height/2),c.rotate(a*Math.PI/180),c.drawImage(t,-t.naturalWidth/2,-t.naturalHeight/2)):c.drawImage(t,0,0);var f=c.getImageData(e,n,r,o),l=document.createElement("canvas");l.width=r,l.height=o;var g=l.getContext("2d");if(g)return g.putImageData(f,0,0),d(l.toDataURL("image/jpeg",1)).then(i).catch(u);i(t)}else i(t)})).catch(u)}))}},90302:function(t,e,n){"use strict";n.d(e,{vkLocalStorage:function(){return f},vkSessionStorage:function(){return d}});var r,o=function(){function t(){var t=this;this.data={},this.getItem=function(e){return t.data.hasOwnProperty(e)?t.data[e]:null},this.keys=function(){return Object.keys(t.data)}}return t.prototype.setItem=function(t,e){this.data[t]=String(e)},t.prototype.removeItem=function(t){delete this.data[t]},t.prototype.clear=function(){this.data={}},Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.data).length},enumerable:!1,configurable:!0}),t.prototype.key=function(t){return Object.keys(this.data)[t]},t}(),a="vk-ls-dummy",i=Math.random().toString();function u(t){var e=!1;try{var n=window[t];n.setItem(a,i),e=i===n.getItem(a),n.removeItem(a)}catch(t){return!1}return e}function s(){return r||(r=u("localStorage")?window.localStorage:new o)}var c,f={setItem:function(t,e){return s().setItem(t,e)},getItem:function(t){return s().getItem(t)},removeItem:function(t){return s().removeItem(t)},clear:function(){return s().clear()},length:function(){return s().length},key:function(t){return s().key(t)},keys:function(){var t=s();return t instanceof o?t.keys():Object.keys(t)},getPrefixedKeys:function(t){return f.keys().filter((function(e){return e.startsWith(t)}))}};function l(){return c||(c=u("sessionStorage")?window.sessionStorage:new o)}var d={setItem:function(t,e){return l().setItem(t,e)},getItem:function(t){return l().getItem(t)},removeItem:function(t){return l().removeItem(t)},clear:function(){return l().clear()},length:function(){return l().length},key:function(t){return l().key(t)},keys:function(){var t=l();return t instanceof o?t.keys():Object.keys(t)},getPrefixedKeys:function(t){return d.keys().filter((function(e){return e.startsWith(t)}))}}},27067:function(t,e,n){"use strict";n.d(e,{saveStats:function(){return h}});var r,o=n(97316),a=n(36726),i=n(37607),u=n(42604),s=n(14561),c=n(2013),f=n(35004),l=1e4,d=0,g=function(){return d*l},v=function(){return!(Date.now()-(0,a.getLastSendTime)()>45e3+g())},m=function(){return r=void 0},p=function(){!0!==r&&(clearTimeout(r),r=window.setTimeout((function(){var t=(0,a.getWebStatDataLs)();m(),t.length>a.emptyStatsDataLs.length&&h(t)}),Math.max(l,(0,a.getLastSendTime)()+45e3-Date.now()+g())))};function h(t,e){var n=t.length>=u.MAX_BODY_SIZE,g=(null==e?void 0:e.force)||n;return!g&&(r||v()||t.length<=a.emptyStatsDataLs.length)?((0,i.logWebStatsEvent)("WebStats delayed.",r),p()):(r=!0,function(t,e){var n=function(e){return setTimeout((function(){return t()}),e)};return(null==e?void 0:e.force)?n(0):window.requestIdleCallback((function(){return n(l)}),{timeout:5e3})}((function(){var t=(0,a.getWebStatDataLs)();if(g||!0===r&&!v()&&t.length>a.emptyStatsDataLs.length)return(0,a.setLastSendTime)(),function(t){var e=window.vk.wsTransport+"/web-stats/"+(window.vk.statsMeta.st?"s":"p"),n=t.length>u.MAX_BODY_SIZE,r=n?(0,f.getMaximumWebStats)(t):t,o=!1;if(!r)return m(),(0,a.clearLsData)();var i=new XMLHttpRequest;i.withCredentials=e.includes("tau.vk.com"),i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE){var e=Date.now();i.status<500&&(n&&200===i.status?Object.keys((0,a.getEmptyStatsData)()).forEach((function(t){return(0,s.pullFromWebStats)(t,r)})):(0,a.clearLsData)(),d=0,o=!0),(n||400===i.status)&&(0,u.logProcessingTime)(Date.now()-e,(n?"prune":"clean")+(400===i.status?"-fail":""),(t.length>>>20)+"M "+(r.length>>>20)+"M"),m(),p()}},i.onerror=function(){return!o&&(0,a.clearLsData)()},i.open("POST",e,!0),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.send((0,c.pruneRequestFromStuckErrors)((0,u.appendStatsMeta)(++d,r)))}(t);clearTimeout(Number(r)),m(),p()}),(0,o.__assign)((0,o.__assign)({},e),{force:g})))}},35004:function(t,e,n){"use strict";n.d(e,{getMaximumWebStats:function(){return i}});var r=n(97316),o=n(36726),a=n(42604),i=function(t){var e=Date.now(),n=function(t){return"{"+(null==t?void 0:t.map((function(t){var e=(0,r.__read)(t,2);return'"'+e[0]+'":'+e[1]})).join(","))+"}"},i=(0,r.__read)(Object.keys((0,o.getEmptyStatsData)()).reduce((function(e,n){var a=(0,o.getWebStatsStringValue)(n,t);return"[]"===a?e:(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(e)),[[n,a]])}),[]).sort((function(t,e){var n=(0,r.__read)(t,2)[1];return(0,r.__read)(e,2)[1].length-n.length})).reduce((function(t,e){var o=(0,r.__read)(t,2),i=o[0],u=o[1],s=(0,r.__read)(e,2),c=s[0],f=s[1],l=[[c,f]];return f.length+n(i).length<a.MAX_BODY_SIZE?[i.concat(l),u]:[i,u.concat(l)]}),[[],[]]),2),u=i[0],s=i[1],c=n(u);if((0,a.logProcessingTime)(Date.now()-e,"chunk"),Date.now()-e<500&&s[0]&&c.length<.1*a.MAX_BODY_SIZE){var f=Date.now();try{var l=function(t,e){var n=(0,r.__read)(e,2),o=n[0],i=n[1],u='{"'+o+'":['+JSON.parse(i).reduce((function(e,n,r){return e.length<a.MAX_BODY_SIZE-t.length?e+(0===r?"":",")+JSON.stringify(n):e}),"")+"]}";return"{}"===t?u:(0,a.concatJSONS)(t,u)||t}(c,s.reverse()[0]);return(0,a.logProcessingTime)(Date.now()-f,"batch"),l}catch(t){return(0,a.logProcessingTime)(Date.now()-f,"batch-fail"),""}}return c}},24961:function(t,e,n){"use strict";n.d(e,{saveJsErrorLogs:function(){return r.saveJsErrorLogs},saveStatlogEvents:function(){return r.saveStatlogEvents},saveNetworkStats:function(){return r.saveNetworkStats},saveProductionStats:function(){return r.saveProductionStats}});var r=n(14561)},42604:function(t,e,n){"use strict";n.d(e,{MAX_BODY_SIZE:function(){return i},concatJSONS:function(){return s},appendStatsMeta:function(){return c},makeWebStatsRequest:function(){return f},logProcessingTime:function(){return l}});var r=n(97316),o=n(86900),a=n(2013),i=1.8*Math.pow(10,6),u=function(t){return t.startsWith("{")&&t.endsWith("}")},s=function(t,e){return[t,e].every(u)?t.slice(0,-1)+","+e.substring(1):"{}"},c=function(t,e){var n=window.vk,o=n.id,a=n.statsMeta,i=a.st,c=a.platform,f=(0,r.__rest)(a,["st","platform"]);return s(JSON.stringify({id:o,st:i,platform:c,attempt:t,signTime:f.time,sign:f.hash}),u(e)?e:"{}")},f=function(t,e){return t=t||window.vk.wsTransport+"/web-stats/"+(window.vk.statsMeta.st?"s":"p"),new Promise((function(n,r){var o=new XMLHttpRequest;o.open("POST",t),t.includes("tau.vk.com")&&(o.withCredentials=!0),o.onload=function(){return this.status>=200&&this.status<300?n(o.response):r({status:this.status,statusText:o.statusText})},o.onerror=function(){return r({status:this.status,statusText:o.statusText})},o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.send((0,a.pruneRequestFromStuckErrors)("string"==typeof e?e:JSON.stringify(e)))}))};function l(t,e,n){(0,o.statlogsValueEvent)("web_stats_batching_time",t,window.vk.statsMeta.platform,e,n)}},14561:function(t,e,n){"use strict";n.d(e,{pullFromWebStats:function(){return f},saveJsErrorLogs:function(){return d},saveStatlogEvents:function(){return g},saveProductionStats:function(){return v},saveNetworkStats:function(){return m},saveStoryViewBaseStats:function(){return p},saveStoryViewStats:function(){return h},saveWebPerfStats:function(){return w}});var r=n(97316),o=n(36726),a=n(72135),i=n(37607),u=n(86353),s=n(27067),c=n(90302),f=function(t,e){var n=(0,o.getWebStatsStringValue)(t,e);if("[]"!==n){var r=(0,o.getWebStatDataLs)().replace(n.slice(1,-1),"").replace(/\[\,/,"[");(0,o.writeLocked)((function(){return c.vkLocalStorage.setItem(o.lsDataKey,r)}))}},l=function(t,e,n,r){if((0,u.partConfigEnabled)("batchify_web_stats")){var f=function(t,e){var n=(0,o.getWebStatsStringValue)(t);return(0,o.getWebStatDataLs)().replace('"'+t+'":'+n,'"'+t+'":'+n.replace(/]$/,("[]"===n?"":",")+JSON.stringify(e)+"]"))}(e,n);(0,o.writeLocked)((function(){return c.vkLocalStorage.setItem(o.lsDataKey,f)})),(0,s.saveStats)(f,r)}else(0,o.writeLocked)((function(){var t=(0,o.fetchDataFromLs)().webStatsData;t[e].push(n),(0,a.saveStats)(t)}));(0,i.logWebStatsEvent)(t,n)},d=function(t){return l("saveJsErrorLogs","jsErrorLogs",t)},g=function(t){var e=t.name,n=t.value,o=t.keys,a=(0,r.__spreadArray)([Math.round(Number(Date.now())/1e3),e,n],(0,r.__read)(o));return(0,u.partConfigEnabled)("web_stats_transport_debugger")&&console.log("Data was transformed!"),l("saveStatlogEvents","statlogEvents",a)},v=function(t,e){return l("saveProductionStats","productionStats",t,e)},m=function(t){return l("saveNetworkStats","networkStats",t)},p=function(t){return l("saveStoryViewStats","storyViewStats",t)},h=function(t){return p(t)},w=function(t){return l("saveWebPerfStats","webPerfStats",t)}},37607:function(t,e,n){"use strict";n.d(e,{logWebStatsEvent:function(){return o}});var r=n(86353);function o(t,e){(0,r.partConfigEnabled)("web_stats_transport_debugger")&&console.log("[new transport debug] "+t,e)}},36726:function(t,e,n){"use strict";n.d(e,{lsDataKey:function(){return i},getEmptyStatsData:function(){return c},emptyStatsDataLs:function(){return f},writeLocked:function(){return l},getWebStatDataLs:function(){return d},serializeDataToLs:function(){return g},getWebStatsStringValue:function(){return v},fetchDataFromLs:function(){return m},clearLsData:function(){return p},setLastSendTime:function(){return h},getLastSendTime:function(){return w},getWebStatsItemsCount:function(){return S}});var r=n(90302),o=n(37607),a=(0,n(36557).isMvk)()?"mvk":"web",i="XHR_STATS_TRANSPORT_DATA_"+a,u="XHR_STATS_TRANSPORT_META_"+a,s="XHR_STATS_TRANSPORT_DATA_LOCK_"+a,c=function(){return{jsErrorLogs:[],statlogEvents:[],productionStats:[],storyViewStats:[],networkStats:[],customStats:[],webPerfStats:[]}},f=JSON.stringify(c());function l(t){if("locked"!==r.vkSessionStorage.getItem(s)){(0,o.logWebStatsEvent)("writeLocked","lock"),r.vkSessionStorage.setItem(s,"locked");try{t()}catch(t){}return(0,o.logWebStatsEvent)("writeLocked","free"),void r.vkSessionStorage.setItem(s,"free")}setTimeout((function(){return l(t)}),100)}var d=function(){return r.vkLocalStorage.getItem(i)||f},g=function(t){return r.vkLocalStorage.setItem(i,JSON.stringify(t))},v=function(t,e){var n;void 0===e&&(e=d());var r,o=Object.keys(c()).filter((function(e){return e!==t})).join("|"),a=(null===(n=null==e?void 0:e.match(new RegExp('"'+t+'":(\\[.*?\\])(?:,"('+o+')":\\[|}$)')))||void 0===n?void 0:n[1])||"";return(r=a).startsWith("[")&&r.endsWith("]")?a:"[]"};function m(){var t,e=!0;try{var n=d();if(!n)throw new Error("empty data");t=c();var r=JSON.parse(n);Object.keys(t).forEach((function(n){Array.isArray(r[n])&&(e=!1,t[n]=r[n])}))}catch(e){t=c()}return{webStatsData:t,isEmpty:e}}function p(t){t&&(0,o.logWebStatsEvent)("WebStats cleared. "+(t?"Reason: LS is broken.":""),t),l((function(){return r.vkLocalStorage.setItem(i,"")}))}function h(t){void 0===t&&(t=Number(new Date)),r.vkSessionStorage.setItem(u,t.toString())}function w(){return parseInt(""+(r.vkSessionStorage.getItem(u)||0))}function S(t){return Object.values(t).reduce((function(t,e){return t+=e.length}),0)}},72135:function(t,e,n){"use strict";n.d(e,{saveStats:function(){return g}});var r,o=n(97316),a=n(36726),i=n(37607),u=n(86353),s=n(42604),c=6e4,f=12e4,l=1;function d(t){return!!(0,u.partConfigEnabled)("web_stats_send_on_events_limit")&&(1===l&&(0,a.getWebStatsItemsCount)(t)>300)}function g(t){var e=+new Date,n=(0,a.getLastSendTime)();0===n&&(n=e,(0,a.setLastSendTime)(n));var o,s=e-n,l=s/1e3,g=d(t);(0,i.logWebStatsEvent)("saveStats",{nowMs:e,lastTransferTimeMs:n,timePassed:l+"s",statsData:t}),(0,u.partConfigEnabled)("web_stats_debounce")?((0,a.serializeDataToLs)(t),o=function(t,e){return e?0:0===t||t>c?3e3:f}(s,g),window.clearTimeout(r),r=window.setTimeout((function(){return(0,a.writeLocked)((function(){var t=(0,a.fetchDataFromLs)().webStatsData,e=+new Date;m(t),(0,a.clearLsData)(),(0,a.setLastSendTime)(e)}))}),o)):s>c||g?(m(t),(0,a.clearLsData)(),(0,a.setLastSendTime)(e)):((0,a.serializeDataToLs)(t),window.setTimeout(v,f))}function v(){(0,a.writeLocked)((function(){var t=(0,a.fetchDataFromLs)(),e=t.webStatsData;t.isEmpty||g(e)}))}function m(t){(0,i.logWebStatsEvent)("send",t);var e=window.vk,n=e.id,r=e.wsTransport,u=e.statsMeta,c=r+(window.vk&&window.vk.statsMeta&&window.vk.statsMeta.st?"/web-stats/s":"/web-stats/p"),f=(0,o.__assign)((0,o.__assign)({},t),{id:n,st:u.st,platform:u.platform,signTime:u.time,sign:u.hash,attempt:l});(0,s.makeWebStatsRequest)(c,f).then((function(t){(0,i.logWebStatsEvent)("sendStats success",t),l=1})).catch((function(e){return l++,(0,a.writeLocked)((function(){(0,i.logWebStatsEvent)("sendStats try",l),g(t)})),(0,i.logWebStatsEvent)("sendStats error",e),!0})),(0,a.setLastSendTime)(+new Date)}}}]); } /* FILE ARCHIVED ON 03:06:52 Oct 15, 2021 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 05:51:16 Nov 19, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.692 exclusion.robots: 0.036 exclusion.robots.policy: 0.02 esindex: 0.013 cdx.remote: 21.119 LoadShardBlock: 57.121 (3) PetaboxLoader3.datanode: 86.281 (5) load_resource: 126.149 (2) PetaboxLoader3.resolve: 86.653 (2) */