!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.vidoomy=e():(t.vidoomy=t.vidoomy||{},t.vidoomy.main=t.vidoomy.main||{},t.vidoomy.main.VidoomyPlayer=e())}(self,(function(){return(()=>{var t,e,n={610:(t,e,n)=>{"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:()=>r})},991:(t,e,n)=>{"use strict";function r(t,e){for(var n=0;no})},757:(t,e,n)=>{t.exports=n(666)},123:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2?r-2:0),s=2;si});var a=function t(e,n){Array.isArray(n)?n.forEach((function(n){return t(e,n)})):e.appendChild(n.nodeType?n:document.createTextNode(n))}},922:(t,e,n)=>{"use strict";function r(t,e,n,r){var o=null,i={INTERSECTIONOBSERVER:1,GEOMETRY:2,IFRAME:3,UNMEASURABLE:4};function a(t){if(t){var e=document.createElement("img");e.width="1px",e.height="1px",e.src=t,document.body.appendChild(e)}}return function(){if("IntersectionObserver"in window)o=i.INTERSECTIONOBSERVER,a(n);else if(window!==top)try{top.document,o=i.GEOMETRY,a(n)}catch(t){}else a(n),o=i.GEOMETRY;o?o===i.INTERSECTIONOBSERVER&&t?function(t){var n;new IntersectionObserver((function(t,o){t.forEach((function(t){t.isIntersecting?(n=setTimeout((function(){a(e),r()}),2e3),document.addEventListener("visibilitychange",(function(){document.hidden&&window.clearTimeout(n)}))):window.clearTimeout(n)}))}),{root:null,rootMargin:"0px",threshold:.5}).observe(t)}(t):o===i.IFRAME&&t||o===i.GEOMETRY&&t&&function(t){var n=0,o=-1,i=setInterval((function(){var s=function(t){var e=top.innerHeight,n=t.getBoundingClientRect().top,r=t.getBoundingClientRect().bottom,o=r-n;return n>e?{value:0,state:"EL_IS_BELOW_VIEW"}:r<=0?{value:0,state:"EL_IS_ABOVE_VIEW"}:n>=0&&r<=e?{value:1,state:"EL_IS_WITHIN_VERTICAL_VIEW"}:n<0&&r>e?{value:e/o,state:"EL_BOTTOM_AND_TOP_TRUNCATED"}:n<0&&r<=e?{value:r/o,state:"EL_TOP_TRUNCATED"}:n>=0&&r>e?{value:(e-n)/o,state:"EL_BOTTOM_TRUNCATED"}:{value:0,state:"EL_IS_NOT_WITHIN_VIEW"}}(t).value*function(t){var e=top.innerWidth,n=t.getBoundingClientRect().left,r=t.getBoundingClientRect().right,o=r-n;return n>e?{value:0,state:"EL_IS_TOO_RIGHT"}:r<=0?{value:0,state:"EL_IS_TOO_LEFT"}:n>=0&&r<=e?{value:1,state:"EL_IS_WITHIN_HORIZONTAL_VIEW"}:n<0&&r>e?{value:e/o,state:"EL_LEFT_AND_RIGHT_TRUNCATED"}:n<0&&r<=e?{value:r/o,state:"EL_LEFT_TRUNCATED"}:n>=0&&r>e?{value:(e-n)/o,state:"EL_RIGHT_TRUNCATED"}:{value:0,state:"EL_IS_NOT_WITHIN_VIEW"}}(t).value;s>.5&&(-1===o||o>.5)?(n+=100)>2e3&&(window.clearInterval(i),a(e),r()):n=0,o=s}),100)}(t):o=i.UNMEASURABLE}(),Object.keys(i).find((function(t){return i[t]===o}))}n.d(e,{Z:()=>r})},753:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(645),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,'.vidowrapper div.slider-ads-vidoomy{z-index:2147483647;border-top-left-radius:5px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border:1px solid #ccc;box-sizing:content-box;padding:4px;overflow:visible;background-color:#eee;position:fixed;bottom:25px}.vidowrapper div.slider-ads-vidoomy.left{left:-10000px;transition:left .5s ease 0s}.vidowrapper div.slider-ads-vidoomy.left.appear{left:25px;transition:left .5s ease 0s}.vidowrapper div.slider-ads-vidoomy.right{right:-10000px;transition:right .5s ease 0s}.vidowrapper div.slider-ads-vidoomy.right.appear{right:25px;transition:right .5s ease 0s}.vidowrapper div.slider-ads-vidoomy .closer{top:-22px;right:-1px;height:auto;line-height:20px;padding:5px;padding-top:0px;padding-bottom:2px;position:absolute;background-color:#eee;border-top-left-radius:5px;border-top-right-radius:5px;border:1px solid #ccc;border-bottom:none;z-index:59999;font-family:"Trebuchet MS",Helvetica,Verdana,Arial;font-size:12px;font-weight:600;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vidowrapper div.slider-ads-vidoomy #ad-wrapper{position:absolute;width:calc(100% - 8px);height:calc(100% - 8px);background-color:#000;overflow:hidden}.vidowrapper div.slider-ads-vidoomy #ad-wrapper video{width:100%;height:100%;position:absolute}',""]);const i=o},859:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(645),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,"",""]);const i=o},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i{t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t,e){var n={enabled:!0,jsTimer:null},r=function(t){if("number"==typeof t)return t;if(!Array.isArray)throw new Error("Failed expanding timings: Value not a number or array: ".concat(t));var e=[];return t.forEach((function(t){if("number"!=typeof t){var n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(t.split(/x/i)),r=n[0],o=n[1];if(!r||r<=0||!/^\d+$/.test(o))throw new Error("Failed expanding timings: Expected (count)x(delay), got: ".concat(r,"x").concat(o));for(var i=0;i1?r.shift():r[0];n.jsTimer=setTimeout((function(){try{t()}catch(t){console.error(t)}e()}),o)}}(),n}function o(t){t.enabled=!1,clearTimeout(t.jsTimer)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(t,e,n){var r;try{r=t.document.cookie.split(";")}catch(t){return n}var o=!0,a=!1,s=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value;try{var d=i(l.split("=").map((function(t){return t.trim()})),2),f=d[0],p=d[1];if(f===e)return void 0===p?"":p}catch(t){}}}catch(t){a=!0,s=t}finally{try{o||null==c.return||c.return()}finally{if(a)throw s}}return n}function s(t){return"string"==typeof t&&/^1[YN-]{3}$/i.test(t)}function u(t){return!!s(t)&&"1---"!==t}function c(t){if(!s(t))return!1;var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),3!==n.length);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(t.split(""))[2];return e&&"y"===e.toLowerCase()||!1}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e);var d=[0,"4x25","4x50","5x100","2x200","3x300","10x500","10x750",1e3];function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,e=a(t,"_sp_enable_dfp_personalized_ads");return e&&/^(true|false)$/i.test(e)?/^true$/i.test(e):null}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return a(t,"us_privacy",null)}function h(t,e){return t.hasOwnProperty(e)||Object.keys(t).indexOf(e)>=0}function g(t){return"object"===l(t)&&null!==t&&!(!h(t,"consentData")||!h(t,"gdprApplies"))}function v(t){return!(!t||!t.googlePersonalizationData||"object"!==l(t.googlePersonalizationData))}function m(t){return!(!t||"object"!==l(t.purposeConsents)||"object"!==l(t.vendorConsents))}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(t._cmpWaitPromise)return t._cmpWaitPromise;var e=t.top;return t._cmpWaitPromise=new Promise((function(n){var i=function(){o(a),t.removeEventListener("message",s,!1)},a=r((function(){"function"==typeof t.__cmp&&(i(),n("obj")),e.postMessage(JSON.stringify({__cmp:{command:"ping",parameter:null}}),"*")}),d),s=function(t){var e=t.data;try{e="string"==typeof e?JSON.parse(e):e}catch(t){}e&&"object"===l(e)&&e.__cmpReturn&&(i(),n("msg"))};t.addEventListener("message",s,!1)})),t._cmpWaitPromise}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.cmpCmd,n=void 0===e?"getConsentData":e,r=t.cmpParam,o=void 0===r?null:r,i=t.validate,a=void 0===i?g:i,s=t.win,u=void 0===s?window:s,c=u.top||u;if("getGooglePersonalization"===n){var l=f(u);if(null!==l)return Promise.resolve({googlePersonalizationData:{consentValue:l?1:0,created:null,lastUpdated:null}})}return y(u).then((function(t){return new Promise((function(e,r){if("obj"===t){var i=!1===o?[n]:[n,o];u.__cmp.apply(u,i.concat([function(t,n){if(!1===n||!a(t)){var o=new Error("Invalid consent payload from CMP");return o.name="InvalidConsentError",r(o)}e(t)}]))}else"msg"===t?(c.addEventListener("message",(function t(n){var r=n.data;try{r="string"==typeof r?JSON.parse(r):r}catch(t){}try{var o=r.__cmpReturn;o&&o.success&&a(o.returnValue)&&(c.removeEventListener("message",t,!1),e(o.returnValue))}catch(t){}}),!1),c.postMessage(JSON.stringify({__cmp:{command:n,parameter:o}}),"*")):r(new Error("Unknown CMP access method: ".concat(t)))}))}))}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if(t._uspapiWaitPromise)return t._uspapiWaitPromise;var e=t.top,n="uspAPITest:".concat(Math.floor(9e6*Math.random()));return t._uspapiWaitPromise=new Promise((function(i){var a=function(){o(s),t.removeEventListener("message",u,!1)},s=r((function(){return"string"==typeof t.__uspStrOvr?(a(),i("ovr")):"function"==typeof t.__uspapi?(a(),i("obj")):void e.postMessage(JSON.stringify({__uspapiCall:{command:"getuspdata",version:1,callId:n}}),"*")}),d),u=function(t){var e=t.data;try{e="string"==typeof e?JSON.parse(e):e}catch(t){}e&&"object"===l(e)&&e.__uspapiReturn&&(a(),i("msg"))};t.addEventListener("message",u,!1)})),t._uspapiWaitPromise}function E(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.win,n=void 0===e?window:e,r=n.top||n,o=p(n);return o&&s(o)?Promise.resolve(o):w(n).then((function(t){return new Promise((function(e,o){if("obj"===t)n.__uspapi("getuspdata",1,(function(t,n){if(!1===n||t&&!s(t.uspString)){var r=new Error("Invalid USP payload from USP API");return r.name="InvalidConsentError",o(r)}e(t.uspString)}));else if("msg"===t){var i="uspAPI:".concat(Math.floor(9e6*Math.random()));r.addEventListener("message",(function t(n){var a=n.data;try{a="string"==typeof a?JSON.parse(a):a}catch(c){}try{var u=a.__uspapiReturn;if(u.callId===i){if(!(u&&u.success&&s(u.returnValue))){var c=new Error("Invalid USP payload response from USP API postMessage listener");return c.name="InvalidConsentError",o(c)}r.removeEventListener("message",t,!1),e(u.returnValue)}}catch(c){}}),!1),r.postMessage(JSON.stringify({__uspapiCall:{command:"getuspdata",version:1,callId:i}}),"*")}else{if("ovr"===t){var a=n.__uspStrOvr;if(s(a))return e(a);var u=new Error("Invalid USP payload response from USP override property: ".concat(a));return u.name="InvalidConsentError",o(u)}o(new Error("Unknown USP API access method: ".concat(t)))}}))}))}function T(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Timed-out waiting for result";return new Promise((function(r,o){t.then((function(t){clearTimeout(i),r(t)})).catch((function(t){clearTimeout(i),o(t)}));var i=setTimeout((function(){var t=new Error(n);t.name="TimeoutError",o(t)}),e)}))}function S(){return[]}function C(t,e){return t.length===e.length&&t.every((function(t,n){return e[n]===t}))}function O(t,e,n,r){var o=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(function(t,e,n,r){if(t._){var o=t._(e,n,r);if(o)return[!0,o.c]}for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=e.mem,r=void 0===n?[]:n,o=e.noConsent,i=void 0===o?"reject":o,a=e.timeout,s=void 0===a?null:a,u=e.type,c=void 0===u?"":u,l=e.win,d=void 0===l?window:l;return t="google"===c?O(r,b,[{cmpCmd:"getGooglePersonalization",cmpParam:!1,validate:v,win:d}],["getGooglePersonalization",d]):"vendor"===c||"vendors"===c?O(r,b,[{cmpCmd:"getVendorConsents",validate:m,win:d}],["getVendorConsents",d]):"usp"===c?O(r,E,[{win:d}],["getUSP",d]):O(r,b,[{win:d}],[d]),"number"==typeof s&&s>0&&(t=T(t,s,"Timed-out waiting for consent data")),t.catch((function(t){if(x.indexOf(t.name)>=0&&"resolve"===i)return null;throw t}))}function R(t){return _(Object.assign({},t,{type:""})).then((function(t){return t?t.consentData:t}))}function I(t){return _(Object.assign({},t,{type:"google"})).then((function(t){return t&&t.googlePersonalizationData?t.googlePersonalizationData.consentValue:t}))}function A(t){return _(Object.assign({},t,{noConsent:"resolve",type:"usp"}))}function M(t){return _(Object.assign({},t,{type:"vendor"}))}function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.mem,r=void 0===n?[]:n,o=e.type,i=void 0===o?"":o,a=e.win,s=void 0===a?window:a,u=!0;return _({mem:r,type:i,win:s}).then((function(e){u&&t(null,e)})).catch((function(e){u&&t(e,null)})),function(){u=!1}}function N(t,e){return k((function(e,n){e?t(e,null):t(null,n.consentData)}),e)}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k((function(e,n){e?t(e,null):t(null,n.googlePersonalizationData.consentValue)}),Object.assign({},e,{type:"google"}))}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.mem,r=void 0===n?[]:n,o=e.win,i=void 0===o?window:o,a=!0;return _({mem:r,type:"usp",win:i}).then((function(e){a&&t(null,e)})).catch((function(e){a&&t(e,null)})),function(){a=!1}}function P(t,e){return k((function(e,n){e?t(e,null):t(null,n)}),Object.assign({},e,{type:"vendor"}))}n.d(e,"getConsentData",(function(){return _})),n.d(e,"getConsentString",(function(){return R})),n.d(e,"getGoogleConsent",(function(){return I})),n.d(e,"getUSPString",(function(){return A})),n.d(e,"getVendorConsentData",(function(){return M})),n.d(e,"onConsentData",(function(){return k})),n.d(e,"onConsentString",(function(){return N})),n.d(e,"onGoogleConsent",(function(){return j})),n.d(e,"onUSPString",(function(){return L})),n.d(e,"onVendorConsent",(function(){return P})),n.d(e,"createMem",(function(){return S})),n.d(e,"uspApplies",(function(){return u})),n.d(e,"uspOptsOut",(function(){return c}))}])},666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),a=new R(r||[]);return i._invoke=function(t,e,n){var r=d;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=O(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?h:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",g={};function v(){}function m(){}function y(){}var b={};b[i]=function(){return this};var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var T=y.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function I(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),_(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},379:(t,e,n)=>{"use strict";var r,o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),i=[];function a(t){for(var e=-1,n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>({233:"imasdk",431:"molsdk"}[t]+".js"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="vidoomy.main.[name]:",o.l=(n,r,i,a)=>{if(t[n])t[n].push(r);else{var s,u;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l{s.onerror=s.onload=null,clearTimeout(p);var o=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(r))),e)return e(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),u&&document.head.appendChild(s)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={759:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var a=o.p+o.u(e),s=new Error;o.l(a,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,r[1](s)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[a,s,u]=n,c=0;for(r in s)o.o(s,r)&&(o.m[r]=s[r]);for(u&&u(o),e&&e(n);c{"use strict";function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,u,"next",t)}function u(t){e(a,o,i,s,u,"throw",t)}s(void 0)}))}}o.d(i,{default:()=>w});var r=o(610),a=o(991),s=o(757),u=o.n(s),c=o(379),l=o.n(c),d=o(753);l()(d.Z,{insert:"head",singleton:!1}),d.Z.locals;var f=o(123).default;var p;function h(){return void 0===p&&(p=/Mobi/i.test(window.navigator.userAgent)),p}var g=o(123).default;const v=function(){function t(e,n){(0,r.Z)(this,t),this.onClose=n,this.app=null,this.htmlConfig=e,this.addDOMContent()}return(0,a.Z)(t,[{key:"getAdWrapperEl",value:function(){if(this.app)return this.app.querySelector("#ad-wrapper")}},{key:"getAdDisplayContainerEl",value:function(){if(this.app)return this.app.querySelector("#ad-display-container")}},{key:"getVideoEl",value:function(){if(this.app)return this.app.querySelector("#ad-video")}},{key:"getAdContainerEl",value:function(){if(this.app)return this.app.querySelector("#ad-container")}},{key:"addDOMContent",value:function(){var t=this.htmlConfig.width,e=this.htmlConfig.height;if(h()&&(t=this.htmlConfig.widthMbl?this.htmlConfig.widthMbl:this.htmlConfig.width,e=this.htmlConfig.heightMbl?this.htmlConfig.heightMbl:this.htmlConfig.height),"vpaid"===this.htmlConfig.type){var n=this.htmlConfig.slot;this.app=g("div",{style:"z-index: 10000000; position: absolute; top: 0; left: 0; width: 100%; height: 100%;"},g("div",{id:"ad-container",style:"width: 100%; height: 100%; position: absolute; top: 0; left: 0;"},g("div",{id:"ad-wrapper",style:"width: 100%; height: 100%; position: absolute; top: 0; left: 0;"},g("video",{autoplay:!0,muted:!0,playsinline:!0,id:"ad-video",style:"object-fit: cover; width: 100%; height: 100%; position: absolute; top: 0; left: 0;"}),g("div",{id:"ad-display-container",style:"width: 100%; height: 100%; position: absolute; top: 0; left: 0;"})))),n.appendChild(this.app)}else{var r=this.htmlConfig.appearAt;h()&&(r=this.htmlConfig.appearAtMbl?this.htmlConfig.appearAtMbl:this.htmlConfig.appearAt),this.app=g("div",{class:"vidowrapper"},g("div",null,function(t,e,n,r){return f("div",{style:"width: ".concat(t,"px; height: ").concat(e,"px"),class:"slider-ads-vidoomy ".concat(n||"right"),id:"ad-container"},f("div",{class:"closer",onclick:r},"CLOSE AD"),f("div",{style:"width: ".concat(t,"px; height: ").concat(e,"px"),id:"ad-wrapper"},f("video",{autoplay:!0,muted:!0,playsinline:!0,id:"ad-video"}),f("div",{id:"ad-display-container"})))}(t,e,r,this.onClose))),top.document.body.appendChild(this.app)}}}]),t}();var m=o(298),y=o(859);l()(y.Z,{insert:"head",singleton:!1}),y.Z.locals;var b=o(922);const w=function(){function e(t){var n=this;(0,r.Z)(this,e);var i={htmlConfig:{type:"slider",width:640,height:360,widthMbl:400,heightMbl:225,closeMbl:!0,appearAt:"right"},dataConfig:{type:"round",beginCallFiveSecondsToEnd:!0,schainc:"schainc",schain:"schain",geolocation:"es",siteId:"123321",maxServerCalls:2,zoneIdMbl:1230,zoneId:1230,logTime:5e3,adGetUrl:"https://a.vidoomy.com/api/adserver/ad/get?country={{GEOLOCATION}}&domain={{CONTENT_DOMAIN}}&format={{FORMAT}}&unique={{UNIQUE}}&zoneId={{ZONEID}}&loop={{LOOP_FROM_ZERO}}&player={{player}}&callType={{callType}}",allowedEvents:[]},player:"imasdk",volume:0};if(this.config={},this.config=Object.assign({},i,t),this.config.htmlConfig=Object.assign({},i.htmlConfig,t.htmlConfig),this.config.dataConfig=Object.assign({},i.dataConfig,t.dataConfig),this.cookiesEnabled=this.checkCookiesEnabled(),this.cookieFirstImpressionSetted=!1,this.cStringStatus="not-yet-obtained","imasdk"===this.config.player&&o.e(233).then(o.bind(o,833)).then((function(t){var e=t.AdsManager;n.adsManagerType=e})),"molsdk"===this.config.player&&o.e(431).then(o.bind(o,829)).then((function(t){var e=t.AdsManager;n.adsManagerType=e})),this.accumulatorTagRequest={},this.timeoutTagRequestRef=-1,this.xvdc="",this.endFlag=!1,this.urlOurServer=this.config.dataConfig.adGetUrl,this.cString="",this.viewabilityMethod=(0,b.Z)(),(0,m.getConsentString)({timeout:this.config.dataConfig.consentStringTimeout||1e3}).then((function(t){n.cString=t,n.cStringStatus="obtained"})).catch((function(){n.cString="",n.cStringStatus="not-found"})),this.isMobile=h(),this.requestRandomGuid=this.generateGuid(),this.requestToOurServerNumber=0,this.domManager=new v(this.config.htmlConfig,this.onClose.bind(this)),this.containerEl=this.domManager.getAdContainerEl(),"vpaid"===this.config.htmlConfig.type){var a={id:1,url:this.config.dataConfig.adGetUrl,timesToCall:1};this.ads=[a],this.allowedEvents=this.config.dataConfig.allowedEvents;var s=this.manageTags(this.ads);(function t(){var e=this;this.adsManagerType?this.begin(s,this.allowedEvents):setTimeout((function(){t.bind(e)()}),50)}).bind(this)()}else this.callOurServer()}var i,s;return(0,a.Z)(e,[{key:"checkCookiesEnabled",value:function(){return"cookie"in document&&(document.cookie.length>0||(document.cookie="test").indexOf.call(document.cookie,"test")>-1)}},{key:"onClose",value:function(){var t=this;this.containerEl.classList.remove("appear"),this.endFlag=!0,this.adsManager&&this.adsManager.destroyMe&&setTimeout((function(){t.adsManager.destroyMe()}),500)}},{key:"callOurServer",value:function(){var t=this;if("vpaid"!==this.config.htmlConfig.type)if(this.requestToOurServerNumber>=this.config.dataConfig.maxServerCalls||this.endFlag)this.containerEl.classList.remove("appear");else{this.requestToOurServerNumber++;var e=new XMLHttpRequest;e.open("GET",this.macroReplacer(this.urlOurServer)),e.setRequestHeader("Accept-Cookie",this.cookiesEnabled),e.onload=function(){var n=e.getResponseHeader("X-Vd-C");t.xvdc="n/a",n&&(t.xvdc=n);var r=JSON.parse(e.responseText);t.ads=r.principalTags,t.trackingUrl=r.trackingUrl;var o=t.manageTags(t.ads);r.allowedEvents.indexOf("AdTagRequest")>-1&&t.setupTagRequest(),t.begin(o,r.allowedEvents)},e.send()}}},{key:"processTag",value:(s=n(u().mark((function t(e){var n=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){function o(t){var e=(new DOMParser).parseFromString(t.xml,"application/xml");return t.isVpaid=Array.from(e.querySelectorAll("MediaFile")).some((function(t){return"vpaid"===t.getAttribute("apiFramework").toLowerCase()})),t}e.status="ready-to-request",e.size=-1,e.timesToCall--,e.loop?e.loop++:e.loop=1,e.parsedUrl=n.macroReplacer(e.url);var i=new XMLHttpRequest;i.open("GET",e.parsedUrl),i.withCredentials=!0,i.onload=function(){e.status="success-with-credentials",e.size=i.responseText.length,e.xml=i.responseText,e=o(e),t(e)},i.onerror=function(){e.status="error-with-credentials";var n=new XMLHttpRequest;n.open("GET",e.parsedUrl),n.withCredentials=!1,n.onload=function(){e.status="success-without-credentials",e.size=n.responseText.length,e.xml=n.responseText,e=o(e),t(e)},n.onerror=function(){e.status="error-without-credentials",t(e)},n.send()},i.send()})));case 1:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"createCookie",value:function(t){if(!this.cookieFirstImpressionSetted){this.cookieFirstImpressionSetted=!0;var e=new Date;e.setTime(e.getTime+864e5),document.cookie="vido_first_impression="+t+"; expires="+e.toUTCString()+"; path=/"}}},{key:"getNextBatch",value:(i=n(u().mark((function t(e){var n,r,o,i,a,s,c,l,d;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n="",r="vido_first_impression=",o=document.cookie.split(";"),i=0;i0})).map(this.processTag.bind(this)));case 8:s=t.sent,n&&1===this.requestToOurServerNumber&&s.sort((function(t,e){return t.id==n?-1:e.id==n?1:0}));case 10:if("sequential"!==this.config.dataConfig.type){t.next=19;break}if(n&&1===this.requestToOurServerNumber&&(l=e.find((function(t){return t.id==n})))?(d=e.findIndex((function(t){return t.id==n})),c=l,e.splice(d,1)):c=e.shift(),!c||!(c.timesToCall>0||e.some((function(t){return t.timesToCall>0})))){t.next=19;break}for(;c.timesToCall<=0;)e.push(c),c=e.shift();return t.next=16,this.processTag.bind(this)(c);case 16:c=t.sent,e.push(Object.assign({},c)),s.push(c);case 19:return t.abrupt("return",s);case 20:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"manageTags",value:function(t){var e=[];return function(){var r=n(u().mark((function n(r){return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.length){n.next=9;break}if(!r){n.next=5;break}this.callOurServer(),n.next=9;break;case 5:return n.next=7,this.getNextBatch(t);case 7:(e=n.sent).length||this.containerEl.classList.remove("appear");case 9:if(!e.length){n.next=11;break}return n.abrupt("return",e.shift());case 11:case"end":return n.stop()}}),n,this)})));return function(t){return r.apply(this,arguments)}}().bind(this)}},{key:"begin",value:function(t,e,n){var r=this;this.endFlag||t(n).then((function(o){o&&(r.accumulatorTagRequest[o.id]||(r.accumulatorTagRequest[o.id]=0),r.accumulatorTagRequest[o.id]++,e.indexOf("AdReceivedVastResponse")>-1&&!o.isVpaid&&r.eventsHandler("AdReceivedVastResponse",o)(),e.indexOf("AdReceivedVpaidResponse")>-1&&o.isVpaid&&r.eventsHandler("AdReceivedVpaidResponse",o)(),r.adsManager=new r.adsManagerType(o,e,r.eventsHandler.bind(r),(function(o){r.begin(t,e,n||o)}),r.domManager.getAdWrapperEl(),r.domManager.getVideoEl(),r.domManager.getAdDisplayContainerEl(),r.domManager.getAdContainerEl(),r.macroReplacer.bind(r),r.createCookie.bind(r)))}))}},{key:"setupTagRequest",value:function(){top.onbeforeunload=function(){this.sendTagRequest(!1)}.bind(this),top.onblur=function(){this.sendTagRequest(!0)}.bind(this),this.setupTimeoutTagRequest()}},{key:"setupTimeoutTagRequest",value:function(){var t,e,n=this;this.timeoutTagRequestRef=setTimeout((function(){n.sendTagRequest(!0)}),(null===(t=this.config)||void 0===t||null===(e=t.dataConfig)||void 0===e?void 0:e.logTime)||5e3)}},{key:"sendTagRequest",value:function(t){-1!==this.timeoutTagRequestRef&&window.clearTimeout(this.timeoutTagRequestRef);for(var e=JSON.stringify(this.accumulatorTagRequest),n=!1,r=0;r0&&(n=!0),this.accumulatorTagRequest[o]=0}if(this.setupTimeoutTagRequest(),n){var i=new XMLHttpRequest;i.open("POST",this.macroReplacer(this.trackingUrl).replace("{{EVENT}}","AdTagRequest").replace("[event]","AdTagRequest"),t),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("Accept-Cookie",this.cookiesEnabled),i.send(e)}}},{key:"eventsHandler",value:function(t,e){return function(n){var r=this.macroReplacer(this.trackingUrl.replace("{{EVENT}}",t).replace("[event]",t).replace("{{ID}}",e.id).replace("[id]",e.id).replace("{{EXECUTION}}",e.loop.toString()).replace("[execution]",e.loop.toString())).replace("{{DURATION}}",e.possibleDuration).replace("[duration]",e.possibleDuration).replace("{{REQUEST_STATUS}}",e.status).replace("[requestStatus]",e.status).replace("{{REQUEST_SIZE}}",e.size).replace("[requestSize]",e.size),o=new XMLHttpRequest;o.open("POST",r),o.setRequestHeader("Accept-Cookie",this.cookiesEnabled),o.send()}.bind(this)}},{key:"getDomainWithoutSubdomain",value:function(t){var e=document.createElement("iframe");document.body.appendChild(e);var n=new e.contentWindow.URL(t).hostname.split(".");return e.remove(),n.slice(0).slice(-(4===n.length?3:2)).join(".")}},{key:"macroReplacer",value:function(e){var n,r,o,i=top.location.href;i=encodeURIComponent(i);var a=top.location.hostname.replace("www.","");"local.vidoomy.com"===a&&(a="vidoomy.com");var s=this.getDomainWithoutSubdomain(top.location.href),u=Math.floor(1e6*Math.random()),c=this.config.htmlConfig.width,l=this.config.htmlConfig.height;this.isMobile&&(c=this.config.htmlConfig.widthMbl||this.config.htmlConfig.width,l=this.config.htmlConfig.heightMbl||this.config.htmlConfig.height);for(var d=(t(o={VOLUME:this.config.volume.toString(),PAGEURL:i,WIDTH:c.toString(),HEIGHT:l.toString(),CACHEBUSTER:u.toString(),CB:u.toString(),ENCODED_URL:encodeURI(i),GDPR:this.cString?"1":"0",GDPR_CONSENT:this.cString||"",LOOP:this.requestToOurServerNumber.toString(),LOOP_FROM_ZERO:(this.requestToOurServerNumber-1).toString(),UNIQUE:this.requestRandomGuid,ZONEID:this.isMobile?this.config.dataConfig.zoneIdMbl.toString():this.config.dataConfig.zoneId.toString(),CONTENT_DOMAIN:s,FULL_CONTENT_DOMAIN:a,FORMAT:this.isMobile?"2":"1",USERAGENT:encodeURIComponent(navigator.userAgent),SCHAIN:this.config.dataConfig.schain,SCHAINC:this.config.dataConfig.schainc,SITEID:this.config.dataConfig.siteId,GEOLOCATION:this.config.dataConfig.geolocation,volume:this.config.volume.toString(),pageUrl:i,width:c.toString(),height:l.toString(),cachebuster:u.toString(),cb:u.toString(),encodedUrl:encodeURI(i),gdpr:this.cString?"1":"0",gdprConsent:this.cString||"",gdprcs:this.cString||"",loop:this.requestToOurServerNumber.toString(),loopFromZero:(this.requestToOurServerNumber-1).toString(),unique:this.requestRandomGuid,zoneId:this.isMobile?this.config.dataConfig.zoneIdMbl.toString():this.config.dataConfig.zoneId.toString(),contentDomain:s,fullContentDomain:a,format:this.isMobile?"2":"1",userAgent:encodeURIComponent(navigator.userAgent),schain:this.config.dataConfig.schain,schainc:this.config.dataConfig.schainc,siteId:this.config.dataConfig.siteId,geo:this.config.dataConfig.geolocation,country:this.config.dataConfig.geolocation,xvdc:this.xvdc,player:this.config.player,callType:(null===(n=this.config)||void 0===n||null===(r=n.dataConfig)||void 0===r?void 0:r.type)||"",cStringStatus:this.cStringStatus},"cachebuster",u.toString()),t(o,"domain",s),t(o,"fullDomain",a),t(o,"geocountry",this.config.dataConfig.geolocation),t(o,"pageurl",encodeURI(i)),t(o,"useragent",encodeURIComponent(navigator.userAgent)),t(o,"widthxheight",c.toString()+"x"+l.toString()),t(o,"viewabilityMethod",this.viewabilityMethod),o),f=0;f-1;)e=encodedUrl.replace("$$"+g+"$$",d[g]);for(;e.indexOf("{{"+g+"}}")>-1;)e=e.replace("{{"+g+"}}",d[g]);for(;e.indexOf("["+g+"]")>-1;)e=e.replace("["+g+"]",d[g])}for(var v=Math.floor(1e4*Math.random()).toString();e.indexOf("[RN]")>-1||e.indexOf("{{RN}}")>-1;)e=e.replace("[RN]",v).replace("{{RN}}",v);return e}},{key:"generateGuid",value:function(t){return t?(0|16*Math.random()).toString(16):"10000000-1000-4000-8000-100000000000".replace(/1|0/g,this.generateGuid)}}]),e}()})(),i.default})()}));