"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[835],{42338:function(t,e,n){n.d(e,{q:function(){return b}});var i=n(15215),o=n(85351),a=n(99525),r=n(80554),s=n(83966),u=n(63861),c=n(14811),l=n(80833),h=n(14582),p=n(7243),f=n(52276),d=n(23385),y=n(28534),m=n(92340),w=n(1325),_=(n(48398),n(41669));function b(t){var e=a.A.getState(),n=e.buyTokensRel,b=e.pageNumber,v=e.isBuyTokensInPopup;m.A.isAllowedEvent(s.A.BUY_TOKENS_RUSSIAN_CARDS_POPUP)&&document.dispatchEvent(new CustomEvent(r.R.OPEN_TOKENS_PAGE));var g=(0,c.Z)((0,u.ip)("@member_buy_tokens")),A=t.url||"",k=n||"buy_tokens";if(t.isBuyVip?k="buy_vip":t.isBuyInvisibility&&(k="buy_invisibility"),A||(t.isBuyTokens?A=g||(0,u.ip)("@member_buy_tokens"):t.isBuyVip?A=(0,u.ip)("@member_buy_vip"):t.isBuyInvisibility&&(A=(0,u.ip)("@member_buy_invisibility"))),void 0!==window.chat&&chat.userData&&chat.userData.chathost&&(A=(0,w.K)(A,"performer",chat.userData.chathost)),t.isBuyTokens){var S=(0,w.Zy)("ntpop");!S||(0,w.Zy)("ntpop",A)||t.forStatusPopups||(A=(0,w.K)(A,"ntpop",S))}var C=b||null;C&&t.isBuyTokens&&!(0,w.Zy)("page",A)&&(A=(0,w.K)(A,"page",String(C)));var B,P=null,N=function(t){void 0===t&&(t=!0)},O=function(){N=function(e){void 0===e&&(e=!0);var n=a.A.getState().loyaltyDiscountEnabled;(0,o.e9)(),window.removeEventListener("message",t,!1),clearTimeout(B),"function"==typeof P&&setTimeout(function(){P(A,"buy_tokens_frame",{loyaltyDiscountEnabled:n,userClose:e})},1e3)};var t=function(t){t.data.closeBuyTokens&&(B=window.setTimeout(function(){return N(!1)},100))};window.addEventListener("message",t,!1)};t.isBuyTokens&&t.showNoLoyaltyDiscountPopup&&(P=function(t,e,n){var i=a.A.getState().loyaltyDiscountEnabled;n.loyaltyDiscountEnabled&&d.X.instance&&i&&(O(),(0,y.y)(f.L.LOYALTY_DISCOUNT,{customData:{height:"".concat(window.innerHeight-100,"px"),href:(0,w.K)(t,"loyalty","1"),width:"1000px",isIframe:!0,onClose:N},force:!0}))}),t.isBuyTokens&&(A=(0,w.K)(A,"btip",v?"1":"0")),t.customAmount&&A&&(A=(0,w.K)(A,"price",t.customAmount.toString())),v&&t.isBuyTokens&&!t.isChatPopup?(O(),(0,y.y)(f.L.BUY_TOKENS_FRAME,{customData:{height:"".concat(_(window).height()-100,"px"),href:A,options:{onClose:N},width:"".concat(l.J,"px"),isIframe:!0},force:!0})):(A=(0,w.K)(A,"popup","1"),(0,p.z)(A,(0,i.Cl)((0,i.Cl)({},(0,h.T)()),{windowName:k,onClose:P})))}},2518:function(t,e,n){n.r(e),n.d(e,{bindOpenWindowInit:function(){return A}});var i=n(15215),o=n(85351),a=n(99525),r=n(42338),s=n(16915),u=n(63861),c=n(7243),l=n(41669),h=function(t,e,n){var i=e.params||e,o=e.config||{},a=e.delegated||null,r=function(t){var e;if(t.preventDefault(),l(this).attr("name")&&(i.windowName=l(this).attr("name")),i.href)e=i.href;else{if(!l(this).attr("href"))return;e=l(this).attr("href")}var a=(0,c.z)(e,i,o);n&&n(a)};return a?l(document).on("click",t.selector,r):t.each(function(){l(this).on("click",r)}),l},p=n(14582),f=n(1887),d=n(52276),y=n(28534),m=n(2e3),w=n(51310),_=n(8556),b=n(1325),v=n(41669),g=function(){return Promise.all([n.e(795),n.e(867)]).then(n.bind(n,47043))};function A(){v("[rel=take_a_tour]").each(function(){h(v(this),{height:700,left:(v(window).width()-950)/2,top:(v(window).height()-700)/2,width:950,windowName:v(this).attr("name")||"take_a_tour"})}),v("body").on("click","[rel=buy_tokens], [rel=buy_vip], [rel=buy_invisibility]",function(t){return(0,i.sH)(this,void 0,void 0,function(){function e(t){return void 0===t}var n,a,s,u,c,l,h,p,f,d;return(0,i.YH)(this,function(i){switch(i.label){case 0:return m.x.instance.navigateRequest(window.location.href),n=v(this),[n.attr("href"),n.attr("data-href")].every(e)?[2,!1]:(t.preventDefault(),a=n.attr("href")||n.attr("data-href"),s="buy_tokens"===n.attr("rel"),u="buy_vip"===n.attr("rel"),c="buy_invisibility"===n.attr("rel"),l=n.hasClass("js-no_loyalty"),h=(0,_.isTokenInBodyClassList)("chatPopupBody"),p=!1,(0,o.pE)()&&(0,o.e9)(),s?(f=(0,b.Zy)("ntpop"),[4,g().then(function(t){return t.default.getMembershipPagePopups()})]):[3,2]);case 1:d=i.sent(),p=0!==n.closest(".js-header_control").length&&d.includes(f),i.label=2;case 2:return(0,r.q)({forStatusPopups:p,showNoLoyaltyDiscountPopup:!l,url:a,isBuyInvisibility:c,isBuyTokens:s,isBuyVip:u,isChatPopup:h}),[2]}})})}),v("body").on("click",".js-open_status_page",function(){return(0,f.o)((0,u.ip)("@member_account_membership"))}).on("click",".js-open_vip_page",function(){return(0,f.o)((0,u.ip)("@member_account_vip_overview"))}),v("body").on("click","[rel=webcamsupport]",function(t){var e=v(this).attr("href");if(!e)return!1;t.preventDefault();var n=(0,u.Go)(e,{popup:1},e.includes("?"));(0,c.z)(n,(0,i.Cl)((0,i.Cl)({},(0,p.T)()),{windowName:"webcamsupport"}))}),v("body").on("click","a.profile, a.display_name, [rel=profile]",function(t){var e=v(t.target).closest(".js-wl_join").length>0&&v(t.target).closest(".js-wl_join");if(e){var n=a.A.getState(),i=n.skinName,o=n.isAuthenticated;if(i===s.A._18PLUSCAMS&&!o){var r=e.attr("href");return(0,y.y)(d.L.JOIN_POPUP,{customData:{redirectUrl:r},force:!0}),!1}}return!!v(this).attr("href")&&((0,f.o)(v(this).attr("href")),t.preventDefault(),t.stopPropagation(),!1)}),v(document).on("click","a.js-contest_link",function(){return(0,c.z)(v(this).attr("href"),{height:930,left:(window.screen.availWidth-1315)/2,top:(window.screen.availHeight-930)/2,width:1315,windowName:"contests"}),!1}),v("body").on("click","a.chat_popup",function(t){var e=v(t.target).closest(".js-wl_join").length>0&&v(t.target).closest(".js-wl_join");if(e){var n=a.A.getState(),i=n.skinName,o=n.isAuthenticated;if(i===s.A._18PLUSCAMS&&!o){var r=(0,w.Hk)("sip"),u=e.attr("href");return(0,y.y)(d.L.JOIN_POPUP,{customData:{redirectChatUrl:r?null:e.data("chat_url"),redirectUrl:u},force:!0}),!1}}(0,c.z)(v(this).attr("href"),{height:660,left:(v(window).width()-1180)/2,top:(v(window).height()-660)/2,width:1180,windowName:v(this).attr("target")},{})})}},14811:function(t,e,n){n.d(e,{Z:function(){return a}});var i=n(63861),o=n(99525),a=function(t){return o.A.getState().isEmbed?(0,i.ip)("@hit_url?url=".concat(encodeURIComponent(t))):t}},80833:function(t,e,n){n.d(e,{J:function(){return i},b:function(){return o}});var i=1e3,o=100},14582:function(t,e,n){n.d(e,{T:function(){return o}});var i=n(80833),o=function(){return{height:screen.height-i.b,left:window.screenX+(window.innerWidth-i.J)/2,top:0,width:i.J}}},16915:function(t,e,n){var i=n(15215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.C6)(e,t),e.BONGACAMS="bongacams",e.BONGACAMS_ZERKALO="bongacams_zerkalo",e.BONGACAMS_INFO="bongacams_info",e.BONGACAMSLAB="bongacamslab",e.BONGOCAMS_SU="bongacamslab",e._18PLUSCAMS="18pluscams",e.LUSTFIRE="lustfire",e.SEXSHOWS="Sexshows",e.RUSCAMS="Ruscams",e.PORNCAM="Porncam",e.CAMVOLT="CamVolt",e.BIMBOLIVE="Bimbolive",e.CAMFUZE="Camfuze",e.ROYALCAMS="Royalcams",e.RUNETKI_RF="runetki_rf",e}(n(53767).A);e.A=o}}]);