diff --git a/dist/rmp-vast.min.js b/dist/rmp-vast.min.js index 3e72431..fdb0bf8 100644 --- a/dist/rmp-vast.min.js +++ b/dist/rmp-vast.min.js @@ -1,2 +1,10 @@ +/** + * @license Copyright (c) 2015-present Radiant Media Player | https://www.radiantmediaplayer.com + * rmp-vast + * GitHub: https://github.com/radiantmediaplayer/rmp-vast + * MIT License: https://github.com/radiantmediaplayer/rmp-vast/blob/master/LICENSE + */ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ +/*! core-js -- Copyright (c) 2014-present Denis Pushkarev -- license (MIT): https://github.com/zloirock/core-js/blob/master/LICENSE */ !function(){var t={382:function(t,e,n){"use strict";var r=n(1354),i=n.n(r),a=n(6314),s=n.n(a)()(i());s.push([t.id,'@charset "UTF-8";\n.rmp-container {\n position: relative;\n text-align: center;\n outline: none;\n background: #000000;\n padding: 0;\n border: none;\n display: block;\n font-size: 14px;\n max-width: none;\n max-height: none;\n overflow: hidden;\n line-height: 1;\n box-sizing: border-box;\n font-family: Arial, Helvetica, sans-serif;\n}\n.rmp-container * {\n box-sizing: border-box;\n}\n.rmp-video,\n.rmp-content {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n outline: none;\n display: block;\n}\n.rmp-ad-container {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n outline: none;\n display: block;\n text-align: initial;\n}\n.rmp-fullscreen-on {\n position: fixed !important;\n width: 100% !important;\n height: 100% !important;\n background: #000000 !important;\n overflow: hidden !important;\n z-index: 9999 !important;\n top: 0;\n left: 0;\n}\n.rmp-vpaid-container {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n outline: none;\n display: block;\n text-align: initial;\n}\n.rmp-ad-vast-video-player {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n outline: none;\n display: block;\n cursor: pointer;\n}\n.rmp-ad-container-icons {\n position: absolute;\n display: block;\n cursor: pointer;\n}\n.rmp-ad-container-skip {\n position: absolute;\n right: 0;\n bottom: 44px;\n width: 160px;\n height: 40px;\n line-height: 38px;\n text-align: center;\n cursor: pointer;\n background-color: #333;\n border: 1px solid #333;\n transition-property: border-color;\n transition-duration: 0.4s;\n transition-timing-function: ease-in;\n}\n.rmp-ad-container-skip:hover {\n border-color: #000000;\n}\n.rmp-ad-container-skip-waiting {\n width: 100%;\n position: absolute;\n padding: 0 2px;\n color: #cfcfcf;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.rmp-ad-container-skip-message {\n width: 65%;\n position: absolute;\n left: 5%;\n color: #ffffff;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.rmp-ad-container-skip-icon {\n position: absolute;\n left: 75%;\n width: 20%;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpi/P//PwMUNADxXyBuZsAPcoA4CIjfA/EuIJ4JFgUZBMU3/kNAMZIYNnz8PwIcgokzIdl0A0r3AHEbHhf9RGJ/hjGQDWJFYlcC8SQgZibgzf/YDEIHuUC8CIi58ahhJMYgEIgC4mVALIFNMzIgZBAI+AHxRiCWRfcOqQaBgBkQrwRiMSB+iE0BCwPxwBKIDwLxH0pcBAMPkKOcXIPmALEnED+lxKDJQJwKZUuQa1AVEOch8f+SE9hZQDydGCcjG/QPif0H6pUF+LIFriwCy1dvgTgChyEMaPmPBZuLVKA2RALxbjy+IGjQCiD+RcAQEFgF9fpHIN4GEwQIMACnXWgupdnzwwAAAABJRU5ErkJggg==");\n height: 100%;\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.7;\n transition-property: opacity;\n transition-duration: 0.4s;\n transition-timing-function: ease-in;\n}\n.rmp-ad-container-skip:hover .rmp-ad-container-skip-icon {\n opacity: 1;\n}\n.rmp-ad-non-linear-container {\n position: absolute;\n text-align: center;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 0);\n}\n.rmp-ad-non-linear-anchor:link,\n.rmp-ad-non-linear-anchor:visited,\n.rmp-ad-non-linear-anchor:hover,\n.rmp-ad-non-linear-anchor:active {\n text-decoration: none;\n}\n.rmp-ad-non-linear-creative {\n position: relative;\n cursor: pointer;\n text-align: center;\n width: 100%;\n height: 100%;\n bottom: 0;\n}\n.rmp-ad-non-linear-close {\n right: 0;\n top: 0;\n position: absolute;\n cursor: pointer;\n width: 20px;\n height: 20px;\n background-color: #000000;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHdJREFUeNqUk9EKwCAIRaX9/9MgEAZ9amsPsWVXdxV8Ec+B1Ep/o40UMuuEpK/RMvAUnEZysfAIlYRkg5/6tyGSQNgKPIkLIwGSuLAn8CSKeovgOMiaMKtKPQENjB5i1Pi7xkoMzD0kBg5PmYVnqv1MGXiT3AIMACNQPFnn5xfHAAAAAElFTkSuQmCC");\n background-size: cover;\n border: 4px solid #000000;\n}\n.rmp-ad-click-ui-mobile {\n border: 2px solid #ffffff;\n background: rgba(0, 0, 0, 0.4);\n color: #ffffff;\n display: block;\n position: absolute;\n right: 8px;\n top: 8px;\n font-size: 18px;\n width: 112px;\n height: 34px;\n text-decoration: none;\n text-align: center;\n line-height: 30px;\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);\n}\n.rmp-ad-click-ui-mobile:visited,\n.rmp-ad-click-ui-mobile:hover,\n.rmp-ad-click-ui-mobile:active {\n color: #ffffff;\n text-decoration: none;\n}\n.rmp-linear-simid-creative {\n position: absolute;\n top: 0;\n border-width: 0;\n width: 100%;\n height: 100%;\n}\n',"",{version:3,sources:["webpack://./src/less/rmp-vast.less"],names:[],mappings:"AAAA,gBAAS;AA0BT;EACE,kBAAA;EACA,kBAAA;EACA,aAAA;EACA,mBAAA;EACA,UAAA;EACA,YAAA;EACA,cAAA;EACA,eAAA;EACA,eAAA;EACA,gBAAA;EACA,gBAAA;EACA,cAAA;EACA,sBAAA;EACA,yCAAA;AAxBF;AA2BA;EACE,sBAAA;AAzBF;AA4BA;;EAEE,WAAA;EACA,YAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,UAAA;EACA,aAAA;EACA,cAAA;AA1BF;AA6BA;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,mBAAA;AA3BF;AA8BA;EACE,0BAAA;EACA,sBAAA;EACA,uBAAA;EACA,8BAAA;EACA,2BAAA;EACA,wBAAA;EACA,MAAA;EACA,OAAA;AA5BF;AAgCA;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,cAAA;EACA,mBAAA;AA9BF;AAiCA;EACE,WAAA;EACA,YAAA;EACA,kBAAA;EACA,OAAA;EACA,MAAA;EACA,SAAA;EACA,UAAA;EACA,aAAA;EACA,cAAA;EACA,eAAA;AA/BF;AAkCA;EACE,kBAAA;EACA,cAAA;EACA,eAAA;AAhCF;AAmCA;EACE,kBAAA;EACA,QAAA;EACA,YAAA;EACA,YAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA,eAAA;EACA,sBAAA;EACA,sBAAA;EAjHA,iCAAA;EACA,yBAAA;EACA,mCAAA;AAiFF;AAkCA;EACE,qBAAA;AAhCF;AAmCA;EACE,WAAA;EACA,kBAAA;EACA,cAAA;EACA,cAAA;EAvHA,mBAAA;EACA,gBAAA;EACA,uBAAA;AAuFF;AAkCA;EACE,UAAA;EACA,kBAAA;EACA,QAAA;EACA,cAAA;EA/HA,mBAAA;EACA,gBAAA;EACA,uBAAA;AAgGF;AAiCA;EACE,kBAAA;EACA,SAAA;EACA,UAAA;EACA,ugBAAA;EACA,YAAA;EACA,4BAAA;EACA,2BAAA;EACA,YAAA;EAjJA,4BAAA;EACA,yBAAA;EACA,mCAAA;AAmHF;AAgCA;EACE,UAAA;AA9BF;AAiCA;EACE,kBAAA;EACA,kBAAA;EACA,SAAA;EACA,SAAA;EACA,6BAAA;AA/BF;AAkCA;;;;EAIE,qBAAA;AAhCF;AAmCA;EACE,kBAAA;EACA,eAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,SAAA;AAjCF;AAoCA;EACE,QAAA;EACA,MAAA;EACA,kBAAA;EACA,eAAA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,2UAAA;EACA,sBAAA;EACA,yBAAA;AAlCF;AAqCA;EACE,yBAAA;EACA,8BAAA;EACA,cAAA;EACA,cAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,eAAA;EACA,YAAA;EACA,YAAA;EACA,qBAAA;EACA,kBAAA;EACA,iBAAA;EACA,sCAAA;AAnCF;AAsCA;;;EAGE,cAAA;EACA,qBAAA;AApCF;AAuCA;EACE,kBAAA;EACA,MAAA;EACA,eAAA;EACA,WAAA;EACA,YAAA;AArCF",sourcesContent:['@charset "UTF-8";\n\n// colors\n@black: rgba(0, 0, 0, 1);\n@grey: #333;\n@light-grey: #cfcfcf;\n@white: rgba(255, 255, 255, 1);\n@shadow-1: rgba(0, 0, 0, 0.8);\n@shadow-2: rgba(0, 0, 0, 0.6);\n@shadow-3: rgba(0, 0, 0, 0.5);\n@shadow-4: rgba(0, 0, 0, 0.4);\n\n// mixins\n.transition(@property: background; @duration: 0.4s; @timing: ease-in) {\n transition-property: @property;\n transition-duration: @duration;\n transition-timing-function: @timing;\n}\n\n.text-ellipsis() {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n// shared CSS with RMP\n.rmp-container {\n position: relative;\n text-align: center;\n outline: none;\n background: @black;\n padding: 0;\n border: none;\n display: block;\n font-size: 14px;\n max-width: none;\n max-height: none;\n overflow: hidden;\n line-height: 1;\n box-sizing: border-box;\n font-family: Arial, Helvetica, sans-serif;\n}\n\n.rmp-container * {\n box-sizing: border-box;\n}\n\n.rmp-video,\n.rmp-content {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n outline: none;\n display: block;\n}\n\n.rmp-ad-container {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n outline: none;\n display: block;\n text-align: initial;\n}\n\n.rmp-fullscreen-on {\n position: fixed !important;\n width: 100% !important;\n height: 100% !important;\n background: @black !important;\n overflow: hidden !important;\n z-index: 9999 !important;\n top: 0;\n left: 0;\n}\n\n// specific CSS to rmp-vast\n.rmp-vpaid-container {\n position: absolute;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n outline: none;\n display: block;\n text-align: initial;\n}\n\n.rmp-ad-vast-video-player {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n margin: 0;\n padding: 0;\n outline: none;\n display: block;\n cursor: pointer;\n}\n\n.rmp-ad-container-icons {\n position: absolute;\n display: block;\n cursor: pointer;\n}\n\n.rmp-ad-container-skip {\n position: absolute;\n right: 0;\n bottom: 44px;\n width: 160px;\n height: 40px;\n line-height: 38px;\n text-align: center;\n cursor: pointer;\n background-color: @grey;\n border: 1px solid @grey;\n .transition(border-color, 0.4s);\n}\n\n.rmp-ad-container-skip:hover {\n border-color: @black;\n}\n\n.rmp-ad-container-skip-waiting {\n width: 100%;\n position: absolute;\n padding: 0 2px;\n color: @light-grey;\n .text-ellipsis();\n}\n\n.rmp-ad-container-skip-message {\n width: 65%;\n position: absolute;\n left: 5%;\n color: @white;\n .text-ellipsis();\n}\n\n.rmp-ad-container-skip-icon {\n position: absolute;\n left: 75%;\n width: 20%;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpi/P//PwMUNADxXyBuZsAPcoA4CIjfA/EuIJ4JFgUZBMU3/kNAMZIYNnz8PwIcgokzIdl0A0r3AHEbHhf9RGJ/hjGQDWJFYlcC8SQgZibgzf/YDEIHuUC8CIi58ahhJMYgEIgC4mVALIFNMzIgZBAI+AHxRiCWRfcOqQaBgBkQrwRiMSB+iE0BCwPxwBKIDwLxH0pcBAMPkKOcXIPmALEnED+lxKDJQJwKZUuQa1AVEOch8f+SE9hZQDydGCcjG/QPif0H6pUF+LIFriwCy1dvgTgChyEMaPmPBZuLVKA2RALxbjy+IGjQCiD+RcAQEFgF9fpHIN4GEwQIMACnXWgupdnzwwAAAABJRU5ErkJggg==");\n height: 100%;\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.7;\n .transition(opacity, 0.4s);\n}\n\n.rmp-ad-container-skip:hover .rmp-ad-container-skip-icon {\n opacity: 1;\n}\n\n.rmp-ad-non-linear-container {\n position: absolute;\n text-align: center;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 0);\n}\n\n.rmp-ad-non-linear-anchor:link,\n.rmp-ad-non-linear-anchor:visited,\n.rmp-ad-non-linear-anchor:hover,\n.rmp-ad-non-linear-anchor:active {\n text-decoration: none;\n}\n\n.rmp-ad-non-linear-creative {\n position: relative;\n cursor: pointer;\n text-align: center;\n width: 100%;\n height: 100%;\n bottom: 0;\n}\n\n.rmp-ad-non-linear-close {\n right: 0;\n top: 0;\n position: absolute;\n cursor: pointer;\n width: 20px;\n height: 20px;\n background-color: @black;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHdJREFUeNqUk9EKwCAIRaX9/9MgEAZ9amsPsWVXdxV8Ec+B1Ep/o40UMuuEpK/RMvAUnEZysfAIlYRkg5/6tyGSQNgKPIkLIwGSuLAn8CSKeovgOMiaMKtKPQENjB5i1Pi7xkoMzD0kBg5PmYVnqv1MGXiT3AIMACNQPFnn5xfHAAAAAElFTkSuQmCC");\n background-size: cover;\n border: 4px solid @black;\n}\n\n.rmp-ad-click-ui-mobile {\n border: 2px solid @white;\n background: @shadow-4;\n color: @white;\n display: block;\n position: absolute;\n right: 8px;\n top: 8px;\n font-size: 18px;\n width: 112px;\n height: 34px;\n text-decoration: none;\n text-align: center;\n line-height: 30px;\n box-shadow: 0 0 2px @shadow-2;\n}\n\n.rmp-ad-click-ui-mobile:visited,\n.rmp-ad-click-ui-mobile:hover,\n.rmp-ad-click-ui-mobile:active {\n color: @white;\n text-decoration: none;\n}\n\n.rmp-linear-simid-creative {\n position: absolute;\n top: 0;\n border-width: 0;\n width: 100%;\n height: 100%;\n}\n'],sourceRoot:""}]),e.A=s},6314:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,a){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(r)for(var o=0;o0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},1354:function(t){"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(i," */");return[e].concat([a]).join("\n")}return[e].join("\n")}},5072:function(t){"use strict";var e=[];function n(t){for(var n=-1,r=0;r0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},1113:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},9763:function(t,e,n){t.exports=n(6450)},1393:function(t,e,n){t.exports=n(530)},6319:function(t,e,n){t.exports=n(2616)},1426:function(t,e,n){t.exports=n(9617)},8628:function(t,e,n){t.exports=n(6343)},4007:function(t,e,n){t.exports=n(7852)},5413:function(t,e,n){t.exports=n(1618)},6712:function(t,e,n){t.exports=n(4166)},8079:function(t,e,n){t.exports=n(8894)},4929:function(t,e,n){t.exports=n(3264)},3363:function(t,e,n){t.exports=n(9528)},8979:function(t,e,n){t.exports=n(6686)},129:function(t,e,n){t.exports=n(1086)},385:function(t,e,n){t.exports=n(26)},165:function(t,e,n){t.exports=n(2268)},1265:function(t,e,n){t.exports=n(4598)},5569:function(t,e,n){t.exports=n(6660)},4707:function(t,e,n){t.exports=n(75)},9544:function(t,e,n){t.exports=n(975)},9493:function(t,e,n){t.exports=n(2102)},697:function(t,e,n){t.exports=n(6490)},7119:function(t,e,n){t.exports=n(5980)},3981:function(t,e,n){t.exports=n(6462)},6586:function(t,e,n){t.exports=n(1921)},1240:function(t,e,n){t.exports=n(5204)},7985:function(t,e,n){"use strict";var r=n(6450);t.exports=r},7725:function(t,e,n){"use strict";var r=n(8402);t.exports=r},8690:function(t,e,n){"use strict";var r=n(3067);t.exports=r},3700:function(t,e,n){"use strict";var r=n(9709);t.exports=r},2544:function(t,e,n){"use strict";var r=n(4525);t.exports=r},5779:function(t,e,n){"use strict";var r=n(3266);t.exports=r},9433:function(t,e,n){"use strict";var r=n(4106);t.exports=r},6221:function(t,e,n){"use strict";var r=n(6686);t.exports=r},6975:function(t,e,n){"use strict";var r=n(3658);t.exports=r},6040:function(t,e,n){"use strict";var r=n(8251);t.exports=r},1168:function(t,e,n){"use strict";var r=n(9261);t.exports=r},4972:function(t,e,n){"use strict";var r=n(7777);t.exports=r},9645:function(t,e,n){"use strict";var r=n(5204);n(3568),t.exports=r},4176:function(t,e,n){"use strict";var r=n(5177);t.exports=r},7264:function(t,e,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),t.exports=r},9692:function(t,e,n){"use strict";var r=n(7045);t.exports=r},5663:function(t,e,n){"use strict";var r=n(70);t.exports=r},3607:function(t,e,n){"use strict";n(7057),n(7277);var r=n(2046);t.exports=r.Array.from},3531:function(t,e,n){"use strict";n(2425);var r=n(2046);t.exports=r.Array.isArray},6275:function(t,e,n){"use strict";n(8545);var r=n(1747);t.exports=r("Array","concat")},6177:function(t,e,n){"use strict";n(9295);var r=n(1747);t.exports=r("Array","filter")},4668:function(t,e,n){"use strict";n(6290);var r=n(1747);t.exports=r("Array","find")},2092:function(t,e,n){"use strict";n(5650);var r=n(1747);t.exports=r("Array","forEach")},1362:function(t,e,n){"use strict";n(9748);var r=n(1747);t.exports=r("Array","includes")},3309:function(t,e,n){"use strict";n(6391);var r=n(1747);t.exports=r("Array","indexOf")},6535:function(t,e,n){"use strict";n(9363),n(3643);var r=n(1747);t.exports=r("Array","keys")},2342:function(t,e,n){"use strict";n(328);var r=n(1747);t.exports=r("Array","lastIndexOf")},8253:function(t,e,n){"use strict";n(6687);var r=n(1747);t.exports=r("Array","map")},1127:function(t,e,n){"use strict";n(5745);var r=n(1747);t.exports=r("Array","push")},6693:function(t,e,n){"use strict";n(6339);var r=n(1747);t.exports=r("Array","reduce")},6429:function(t,e,n){"use strict";n(8559);var r=n(1747);t.exports=r("Array","reverse")},5265:function(t,e,n){"use strict";n(2099);var r=n(1747);t.exports=r("Array","slice")},1263:function(t,e,n){"use strict";n(6737);var r=n(1747);t.exports=r("Array","sort")},4923:function(t,e,n){"use strict";n(5953);var r=n(1747);t.exports=r("Array","splice")},2567:function(t,e,n){"use strict";n(9307);var r=n(1747);t.exports=r("Function","bind")},4712:function(t,e,n){"use strict";n(9363),n(7057);var r=n(3448);t.exports=r},3034:function(t,e,n){"use strict";var r=n(8280),i=n(2567),a=Function.prototype;t.exports=function(t){var e=t.bind;return t===a||r(a,t)&&e===a.bind?i:e}},8218:function(t,e,n){"use strict";var r=n(8280),i=n(6275),a=Array.prototype;t.exports=function(t){var e=t.concat;return t===a||r(a,t)&&e===a.concat?i:e}},3155:function(t,e,n){"use strict";var r=n(8280),i=n(6177),a=Array.prototype;t.exports=function(t){var e=t.filter;return t===a||r(a,t)&&e===a.filter?i:e}},3246:function(t,e,n){"use strict";var r=n(8280),i=n(4668),a=Array.prototype;t.exports=function(t){var e=t.find;return t===a||r(a,t)&&e===a.find?i:e}},6880:function(t,e,n){"use strict";var r=n(8280),i=n(1362),a=n(4378),s=Array.prototype,o=String.prototype;t.exports=function(t){var e=t.includes;return t===s||r(s,t)&&e===s.includes?i:"string"==typeof t||t===o||r(o,t)&&e===o.includes?a:e}},4507:function(t,e,n){"use strict";var r=n(8280),i=n(3309),a=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===a||r(a,t)&&e===a.indexOf?i:e}},2860:function(t,e,n){"use strict";var r=n(8280),i=n(2342),a=Array.prototype;t.exports=function(t){var e=t.lastIndexOf;return t===a||r(a,t)&&e===a.lastIndexOf?i:e}},9299:function(t,e,n){"use strict";var r=n(8280),i=n(8253),a=Array.prototype;t.exports=function(t){var e=t.map;return t===a||r(a,t)&&e===a.map?i:e}},3629:function(t,e,n){"use strict";var r=n(8280),i=n(3727),a=String.prototype;t.exports=function(t){var e=t.padStart;return"string"==typeof t||t===a||r(a,t)&&e===a.padStart?i:e}},8685:function(t,e,n){"use strict";var r=n(8280),i=n(1127),a=Array.prototype;t.exports=function(t){var e=t.push;return t===a||r(a,t)&&e===a.push?i:e}},8823:function(t,e,n){"use strict";var r=n(8280),i=n(6693),a=Array.prototype;t.exports=function(t){var e=t.reduce;return t===a||r(a,t)&&e===a.reduce?i:e}},8059:function(t,e,n){"use strict";var r=n(8280),i=n(6429),a=Array.prototype;t.exports=function(t){var e=t.reverse;return t===a||r(a,t)&&e===a.reverse?i:e}},303:function(t,e,n){"use strict";var r=n(8280),i=n(5265),a=Array.prototype;t.exports=function(t){var e=t.slice;return t===a||r(a,t)&&e===a.slice?i:e}},2757:function(t,e,n){"use strict";var r=n(8280),i=n(1263),a=Array.prototype;t.exports=function(t){var e=t.sort;return t===a||r(a,t)&&e===a.sort?i:e}},5029:function(t,e,n){"use strict";var r=n(8280),i=n(4923),a=Array.prototype;t.exports=function(t){var e=t.splice;return t===a||r(a,t)&&e===a.splice?i:e}},7961:function(t,e,n){"use strict";var r=n(8280),i=n(4491),a=String.prototype;t.exports=function(t){var e=t.startsWith;return"string"==typeof t||t===a||r(a,t)&&e===a.startsWith?i:e}},3423:function(t,e,n){"use strict";var r=n(8280),i=n(7511),a=String.prototype;t.exports=function(t){var e=t.trim;return"string"==typeof t||t===a||r(a,t)&&e===a.trim?i:e}},317:function(t,e,n){"use strict";n(6648),n(9721);var r=n(2046),i=n(6024);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return i(r.JSON.stringify,null,arguments)}},9968:function(t,e,n){"use strict";n(9363),n(4676),n(6835),n(3643),n(7057);var r=n(2046);t.exports=r.Map},7367:function(t,e,n){"use strict";n(1340);var r=n(2046);t.exports=r.Object.assign},149:function(t,e,n){"use strict";n(5837);var r=n(2046).Object;t.exports=function(t,e){return r.create(t,e)}},1926:function(t,e,n){"use strict";n(6750);var r=n(2046).Object,i=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(i.sham=!0)},4137:function(t,e,n){"use strict";n(8833);var r=n(2046).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},6286:function(t,e,n){"use strict";n(8966);var r=n(2046);t.exports=r.Object.getPrototypeOf},9661:function(t,e,n){"use strict";n(3589);var r=n(2046);t.exports=r.Object.keys},1418:function(t,e,n){"use strict";n(1906);var r=n(2046);t.exports=r.Object.setPrototypeOf},8699:function(t,e,n){"use strict";n(5395);var r=n(2046);t.exports=r.Object.values},9929:function(t,e,n){"use strict";n(9502);var r=n(2046);t.exports=r.parseFloat},4326:function(t,e,n){"use strict";n(2193);var r=n(2046);t.exports=r.parseInt},7027:function(t,e,n){"use strict";n(4502),n(9363),n(3643),n(5931),n(7450),n(6415),n(5823),n(7714),n(7057);var r=n(2046);t.exports=r.Promise},6098:function(t,e,n){"use strict";n(1220);var r=n(2046);t.exports=r.Reflect.construct},4378:function(t,e,n){"use strict";n(9770);var r=n(1747);t.exports=r("String","includes")},3727:function(t,e,n){"use strict";n(3356);var r=n(1747);t.exports=r("String","padStart")},4491:function(t,e,n){"use strict";n(2395);var r=n(1747);t.exports=r("String","startsWith")},7511:function(t,e,n){"use strict";n(727);var r=n(1747);t.exports=r("String","trim")},3842:function(t,e,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);t.exports=r.Symbol},1730:function(t,e,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);t.exports=r.f("iterator")},1661:function(t,e,n){"use strict";n(8537),n(3669);var r=n(560);t.exports=r.f("toPrimitive")},8980:function(t,e,n){"use strict";var r=n(7985);t.exports=r},1564:function(t,e,n){"use strict";var r=n(7725);t.exports=r},9029:function(t,e,n){"use strict";var r=n(8690);t.exports=r},3375:function(t,e,n){"use strict";var r=n(3700);t.exports=r},8959:function(t,e,n){"use strict";var r=n(2544);t.exports=r},3520:function(t,e,n){"use strict";var r=n(5779);t.exports=r},288:function(t,e,n){"use strict";var r=n(9433);t.exports=r},4908:function(t,e,n){"use strict";var r=n(6221);t.exports=r},7764:function(t,e,n){"use strict";var r=n(6975);t.exports=r},4997:function(t,e,n){"use strict";var r=n(6040);t.exports=r},7415:function(t,e,n){"use strict";var r=n(1168);t.exports=r},5363:function(t,e,n){"use strict";var r=n(4972);t.exports=r},7166:function(t,e,n){"use strict";var r=n(9645);n(1599),n(7939),n(7637),n(4362),t.exports=r},1204:function(t,e,n){"use strict";var r=n(4176);t.exports=r},2321:function(t,e,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),t.exports=r},2231:function(t,e,n){"use strict";var r=n(9692);t.exports=r},9280:function(t,e,n){"use strict";var r=n(5663);t.exports=r},2159:function(t,e,n){"use strict";var r=n(2250),i=n(4640),a=TypeError;t.exports=function(t){if(r(t))return t;throw new a(i(t)+" is not a function")}},2235:function(t,e,n){"use strict";var r=n(5468),i=n(4640),a=TypeError;t.exports=function(t){if(r(t))return t;throw new a(i(t)+" is not a constructor")}},43:function(t,e,n){"use strict";var r=n(4018),i=String,a=TypeError;t.exports=function(t){if(r(t))return t;throw new a("Can't set "+i(t)+" as a prototype")}},2156:function(t){"use strict";t.exports=function(){}},9596:function(t,e,n){"use strict";var r=n(8280),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new i("Incorrect invocation")}},6624:function(t,e,n){"use strict";var r=n(6285),i=String,a=TypeError;t.exports=function(t){if(r(t))return t;throw new a(i(t)+" is not an object")}},6375:function(t,e,n){"use strict";var r=n(8828);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},2914:function(t,e,n){"use strict";var r=n(726).forEach,i=n(7623)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1229:function(t,e,n){"use strict";var r=n(8311),i=n(3930),a=n(9298),s=n(6818),o=n(7812),c=n(5468),u=n(575),l=n(5543),d=n(300),p=n(3448),h=Array;t.exports=function(t){var e=a(t),n=c(this),f=arguments.length,v=f>1?arguments[1]:void 0,m=void 0!==v;m&&(v=r(v,f>2?arguments[2]:void 0));var g,A,y,_,E,b,k=p(e),C=0;if(!k||this===h&&o(k))for(g=u(e),A=n?new this(g):h(g);g>C;C++)b=m?v(e[C],C):e[C],l(A,C,b);else for(A=n?new this:[],E=(_=d(e,k)).next;!(y=i(E,_)).done;C++)b=m?s(_,v,[y.value,C],!0):y.value,l(A,C,b);return A.length=C,A}},4436:function(t,e,n){"use strict";var r=n(7374),i=n(4849),a=n(575),s=function(t){return function(e,n,s){var o=r(e),c=a(o);if(0===c)return!t&&-1;var u,l=i(s,c);if(t&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((t||l in o)&&o[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},726:function(t,e,n){"use strict";var r=n(8311),i=n(1907),a=n(6946),s=n(9298),o=n(575),c=n(6968),u=i([].push),l=function(t){var e=1===t,n=2===t,i=3===t,l=4===t,d=6===t,p=7===t,h=5===t||d;return function(f,v,m,g){for(var A,y,_=s(f),E=a(_),b=o(E),k=r(v,m),C=0,T=g||c,V=e?T(f,b):n||p?T(f,0):void 0;b>C;C++)if((h||C in E)&&(y=k(A=E[C],C,_),t))if(e)V[C]=y;else if(y)switch(t){case 3:return!0;case 5:return A;case 6:return C;case 2:u(V,A)}else switch(t){case 4:return!1;case 7:u(V,A)}return d?-1:i||l?l:V}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7144:function(t,e,n){"use strict";var r=n(6024),i=n(7374),a=n(5482),s=n(575),o=n(7623),c=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,d=o("lastIndexOf"),p=l||!d;t.exports=p?function(t){if(l)return r(u,this,arguments)||0;var e=i(this),n=s(e);if(0===n)return-1;var o=n-1;for(arguments.length>1&&(o=c(o,a(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},7171:function(t,e,n){"use strict";var r=n(8828),i=n(6264),a=n(5683),s=i("species");t.exports=function(t){return a>=51||!r((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},7623:function(t,e,n){"use strict";var r=n(8828);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){return 1},1)}))}},5043:function(t,e,n){"use strict";var r=n(2159),i=n(9298),a=n(6946),s=n(575),o=TypeError,c="Reduce of empty array with no initial value",u=function(t){return function(e,n,u,l){var d=i(e),p=a(d),h=s(d);if(r(n),0===h&&u<2)throw new o(c);var f=t?h-1:0,v=t?-1:1;if(u<2)for(;;){if(f in p){l=p[f],f+=v;break}if(f+=v,t?f<0:h<=f)throw new o(c)}for(;t?f>=0:h>f;f+=v)f in p&&(l=n(l,p[f],f,d));return l}};t.exports={left:u(!1),right:u(!0)}},3130:function(t,e,n){"use strict";var r=n(9447),i=n(1793),a=TypeError,s=Object.getOwnPropertyDescriptor,o=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=o?function(t,e){if(i(t)&&!s(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},3427:function(t,e,n){"use strict";var r=n(1907);t.exports=r([].slice)},4321:function(t,e,n){"use strict";var r=n(3427),i=Math.floor,a=function(t,e){var n=t.length;if(n<8)for(var s,o,c=1;c0;)t[o]=t[--o];o!==c++&&(t[o]=s)}else for(var u=i(n/2),l=a(r(t,0,u),e),d=a(r(t,u),e),p=l.length,h=d.length,f=0,v=0;f1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),a(p,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return A(this,0===t?0:t,e)}}:{add:function(t){return A(this,t=0===t?0:t,t)}}),h&&i(p,"size",{configurable:!0,get:function(){return v(this).size}}),d},setStrong:function(t,e,n){var r=e+" Iterator",i=g(e),a=g(r);l(t,e,(function(t,e){m(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?d("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=void 0,d(void 0,!0))}),n?"entries":"values",!n,!0),p(e)}}},7081:function(t,e,n){"use strict";var r=n(1091),i=n(1010),a=n(1548),s=n(8828),o=n(1626),c=n(4823),u=n(9596),l=n(2250),d=n(6285),p=n(7136),h=n(4840),f=n(4284).f,v=n(726).forEach,m=n(9447),g=n(4932),A=g.set,y=g.getterFor;t.exports=function(t,e,n){var g,_=-1!==t.indexOf("Map"),E=-1!==t.indexOf("Weak"),b=_?"set":"add",k=i[t],C=k&&k.prototype,T={};if(m&&l(k)&&(E||C.forEach&&!s((function(){(new k).entries().next()})))){var V=(g=e((function(e,n){A(u(e,V),{type:t,collection:new k}),p(n)||c(n,e[b],{that:e,AS_ENTRIES:_})}))).prototype,w=y(t);v(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in C)||E&&"clear"===t||o(V,t,(function(n,r){var i=w(this).collection;if(!e&&E&&!d(n))return"get"===t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),E||f(V,"size",{configurable:!0,get:function(){return w(this).collection.size}})}else g=n.getConstructor(e,t,_,b),a.enable();return h(g,t,!1,!0),T[t]=g,r({global:!0,forced:!0},T),E||n.setStrong(g,t,_),g}},9595:function(t,e,n){"use strict";var r=n(9724),i=n(1042),a=n(3846),s=n(4284);t.exports=function(t,e,n){for(var o=i(e),c=s.f,u=a.f,l=0;l9999?"+":"";return r+a(c(e),r?6:4,0)+"-"+a(g(t)+1,2,0)+"-"+a(p(t),2,0)+"T"+a(f(t),2,0)+":"+a(m(t),2,0)+":"+a(A(t),2,0)+"."+a(n,3,0)+"Z"}:l},9251:function(t,e,n){"use strict";var r=n(4284);t.exports=function(t,e,n){return r.f(t,e,n)}},8055:function(t,e,n){"use strict";var r=n(1626);t.exports=function(t,e,n,i){return i&&i.enumerable?t[e]=n:r(t,e,n),t}},2802:function(t,e,n){"use strict";var r=n(8055);t.exports=function(t,e,n){for(var i in e)n&&n.unsafe&&t[i]?t[i]=e[i]:r(t,i,e[i],n);return t}},2532:function(t,e,n){"use strict";var r=n(1010),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},4535:function(t,e,n){"use strict";var r=n(4640),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw new i("Cannot delete property "+r(e)+" of "+r(t))}},9447:function(t,e,n){"use strict";var r=n(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(t,e,n){"use strict";var r=n(1010),i=n(6285),a=r.document,s=i(a)&&i(a.createElement);t.exports=function(t){return s?a.createElement(t):{}}},8024:function(t){"use strict";var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},9287:function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},5737:function(t,e,n){"use strict";var r=n(4723).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},1885:function(t,e,n){"use strict";var r=n(7593),i=n(853);t.exports=!r&&!i&&"object"==typeof window&&"object"==typeof document},7593:function(t){"use strict";t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},4775:function(t,e,n){"use strict";var r=n(4723);t.exports=/MSIE|Trident/.test(r)},1509:function(t,e,n){"use strict";var r=n(4723);t.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},7724:function(t,e,n){"use strict";var r=n(4723);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},853:function(t,e,n){"use strict";var r=n(1010),i=n(5807);t.exports="process"===i(r.process)},3280:function(t,e,n){"use strict";var r=n(4723);t.exports=/web0s(?!.*chrome)/i.test(r)},4723:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},5683:function(t,e,n){"use strict";var r,i,a=n(1010),s=n(4723),o=a.process,c=a.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},299:function(t,e,n){"use strict";var r=n(4723).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},376:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},5762:function(t,e,n){"use strict";var r=n(1907),i=Error,a=r("".replace),s=String(new i("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,c=o.test(s);t.exports=function(t,e){if(c&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=a(t,o,"");return t}},5884:function(t,e,n){"use strict";var r=n(1626),i=n(5762),a=n(3888),s=Error.captureStackTrace;t.exports=function(t,e,n,o){a&&(s?s(t,e):r(t,"stack",i(n,o)))}},3888:function(t,e,n){"use strict";var r=n(8828),i=n(5817);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},1091:function(t,e,n){"use strict";var r=n(1010),i=n(6024),a=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),d=n(1626),p=n(9724);n(6128);var h=function(t){var e=function(n,r,a){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,a)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,i,f,v,m,g,A,y,_,E=t.target,b=t.global,k=t.stat,C=t.proto,T=b?r:k?r[E]:r[E]&&r[E].prototype,V=b?u:u[E]||d(u,E,{})[E],w=V.prototype;for(v in e)i=!(n=c(b?v:E+(k?".":"#")+v,t.forced))&&T&&p(T,v),g=V[v],i&&(A=t.dontCallGetSet?(_=o(T,v))&&_.value:T[v]),m=i&&A?A:e[v],(n||C||typeof g!=typeof m)&&(y=t.bind&&i?l(m,r):t.wrap&&i?h(m):C&&s(m)?a(m):m,(t.sham||m&&m.sham||g&&g.sham)&&d(y,"sham",!0),d(V,v,y),C&&(p(u,f=E+"Prototype")||d(u,f,{}),d(u[f],v,m),t.real&&w&&(n||!w[v])&&d(w,v,m)))}},8828:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},5681:function(t,e,n){"use strict";var r=n(8828);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},6024:function(t,e,n){"use strict";var r=n(1505),i=Function.prototype,a=i.apply,s=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(a):function(){return s.apply(a,arguments)})},8311:function(t,e,n){"use strict";var r=n(2361),i=n(2159),a=n(1505),s=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:a?s(t,e):function(){return t.apply(e,arguments)}}},1505:function(t,e,n){"use strict";var r=n(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4673:function(t,e,n){"use strict";var r=n(1907),i=n(2159),a=n(6285),s=n(9724),o=n(3427),c=n(1505),u=Function,l=r([].concat),d=r([].join),p={};t.exports=c?u.bind:function(t){var e=i(this),n=e.prototype,r=o(arguments,1),c=function(){var n=l(r,o(arguments));return this instanceof c?function(t,e,n){if(!s(p,e)){for(var r=[],i=0;iA;A++)if((_=I(t[A]))&&u(v,_))return _;return new f(!1)}m=l(t,g)}for(E=T?t.next:m.next;!(b=i(E,m)).done;){try{_=I(b.value)}catch(t){p(m,"throw",t)}if("object"==typeof _&&_&&u(v,_))return _}return new f(!1)}},154:function(t,e,n){"use strict";var r=n(3930),i=n(6624),a=n(9367);t.exports=function(t,e,n){var s,o;i(t);try{if(!(s=a(t,"return"))){if("throw"===e)throw n;return n}s=r(s,t)}catch(t){o=!0,s=t}if("throw"===e)throw n;if(o)throw s;return i(s),n}},7181:function(t,e,n){"use strict";var r=n(5116).IteratorPrototype,i=n(8075),a=n(5817),s=n(4840),o=n(3742),c=function(){return this};t.exports=function(t,e,n,u){var l=e+" Iterator";return t.prototype=i(r,{next:a(+!u,n)}),s(t,l,!1,!0),o[l]=c,t}},183:function(t,e,n){"use strict";var r=n(1091),i=n(3930),a=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),d=n(4840),p=n(1626),h=n(8055),f=n(6264),v=n(3742),m=n(5116),g=s.PROPER,A=s.CONFIGURABLE,y=m.IteratorPrototype,_=m.BUGGY_SAFARI_ITERATORS,E=f("iterator"),b="keys",k="values",C="entries",T=function(){return this};t.exports=function(t,e,n,s,f,m,V){c(n,e,s);var w,S,P,I=function(t){if(t===f&&N)return N;if(!_&&t&&t in L)return L[t];switch(t){case b:case k:case C:return function(){return new n(this,t)}}return function(){return new n(this)}},x=e+" Iterator",R=!1,L=t.prototype,U=L[E]||L["@@iterator"]||f&&L[f],N=!_&&U||I(f),O="Array"===e&&L.entries||U;if(O&&(w=u(O.call(new t)))!==Object.prototype&&w.next&&(a||u(w)===y||(l?l(w,y):o(w[E])||h(w,E,T)),d(w,x,!0,!0),a&&(v[x]=T)),g&&f===k&&U&&U.name!==k&&(!a&&A?p(L,"name",k):(R=!0,N=function(){return i(U,this)})),f)if(S={values:I(k),keys:m?N:I(b),entries:I(C)},V)for(P in S)(_||R||!(P in L))&&h(L,P,S[P]);else r({target:e,proto:!0,forced:_||R},S);return a&&!V||L[E]===N||h(L,E,N,{name:f}),v[e]=N,S}},5116:function(t,e,n){"use strict";var r,i,a,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),d=n(8055),p=n(6264),h=n(7376),f=p("iterator"),v=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):v=!0),!c(r)||s((function(){var t={};return r[f].call(t)!==t}))?r={}:h&&(r=u(r)),o(r[f])||d(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},3742:function(t){"use strict";t.exports={}},575:function(t,e,n){"use strict";var r=n(3121);t.exports=function(t){return r(t.length)}},5703:function(t,e,n){"use strict";var r=n(5582),i=n(2222),a=r("Map");t.exports={Map:a,set:i("set",2),get:i("get",1),has:i("has",1),remove:i("delete",1),proto:a.prototype}},1176:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2292:function(t,e,n){"use strict";var r,i,a,s,o,c=n(1010),u=n(2098),l=n(8311),d=n(9472).set,p=n(9245),h=n(7724),f=n(1509),v=n(3280),m=n(853),g=c.MutationObserver||c.WebKitMutationObserver,A=c.document,y=c.process,_=c.Promise,E=u("queueMicrotask");if(!E){var b=new p,k=function(){var t,e;for(m&&(t=y.domain)&&t.exit();e=b.get();)try{e()}catch(t){throw b.head&&r(),t}t&&t.enter()};h||m||v||!g||!A?!f&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,o=l(s.then,s),r=function(){o(k)}):m?r=function(){y.nextTick(k)}:(d=l(d,c),r=function(){d(k)}):(i=!0,a=A.createTextNode(""),new g(k).observe(a,{characterData:!0}),r=function(){a.data=i=!i}),E=function(t){b.head||r(),b.add(t)}}t.exports=E},6254:function(t,e,n){"use strict";var r=n(2159),i=TypeError,a=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new i("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new a(t)}},2096:function(t,e,n){"use strict";var r=n(160);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},2074:function(t,e,n){"use strict";var r=n(2087),i=TypeError;t.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}},7213:function(t,e,n){"use strict";var r=n(1010),i=n(8828),a=n(1907),s=n(160),o=n(5993).trim,c=n(6395),u=a("".charAt),l=r.parseFloat,d=r.Symbol,p=d&&d.iterator,h=1/l(c+"-0")!=-1/0||p&&!i((function(){l(Object(p))}));t.exports=h?function(t){var e=o(s(t)),n=l(e);return 0===n&&"-"===u(e,0)?-0:n}:l},2778:function(t,e,n){"use strict";var r=n(1010),i=n(8828),a=n(1907),s=n(160),o=n(5993).trim,c=n(6395),u=r.parseInt,l=r.Symbol,d=l&&l.iterator,p=/^[+-]?0x/i,h=a(p.exec),f=8!==u(c+"08")||22!==u(c+"0x16")||d&&!i((function(){u(Object(d))}));t.exports=f?function(t,e){var n=o(s(t));return u(n,e>>>0||(h(p,n)?16:10))}:u},9538:function(t,e,n){"use strict";var r=n(9447),i=n(1907),a=n(3930),s=n(8828),o=n(2875),c=n(7170),u=n(2574),l=n(9298),d=n(6946),p=Object.assign,h=Object.defineProperty,f=i([].concat);t.exports=!p||s((function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!==p({},t)[n]||o(p({},e)).join("")!==i}))?function(t,e){for(var n=l(t),i=arguments.length,s=1,p=c.f,h=u.f;i>s;)for(var v,m=d(arguments[s++]),g=p?f(o(m),p(m)):o(m),A=g.length,y=0;A>y;)v=g[y++],r&&!a(h,m,v)||(n[v]=m[v]);return n}:p},8075:function(t,e,n){"use strict";var r,i=n(6624),a=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),d="prototype",p="script",h=l("IE_PROTO"),f=function(){},v=function(t){return"<"+p+">"+t+""},m=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;g="undefined"!=typeof document?document.domain&&r?m(r):(e=u("iframe"),n="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):m(r);for(var i=s.length;i--;)delete g[d][s[i]];return g()};o[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[d]=i(t),n=new f,f[d]=null,n[h]=t):n=g(),void 0===e?n:a.f(n,e)}},2220:function(t,e,n){"use strict";var r=n(9447),i=n(8661),a=n(4284),s=n(6624),o=n(7374),c=n(2875);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=o(e),i=c(e),u=i.length,l=0;u>l;)a.f(t,n=i[l++],r[n]);return t}},4284:function(t,e,n){"use strict";var r=n(9447),i=n(3648),a=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",h="writable";e.f=r?a?function(t,e,n){if(s(t),e=o(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var r=l(t,e);r&&r[h]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:d in n?n[d]:r[d],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=o(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},3846:function(t,e,n){"use strict";var r=n(9447),i=n(3930),a=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),d=Object.getOwnPropertyDescriptor;e.f=r?d:function(t,e){if(t=o(t),e=c(e),l)try{return d(t,e)}catch(t){}if(u(t,e))return s(!i(a.f,t,e),t[e])}},5407:function(t,e,n){"use strict";var r=n(5807),i=n(7374),a=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"Window"===r(t)?function(t){try{return a(t)}catch(t){return s(o)}}(t):a(i(t))}},4443:function(t,e,n){"use strict";var r=n(3045),i=n(376).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},7170:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},5972:function(t,e,n){"use strict";var r=n(9724),i=n(2250),a=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=o?u.getPrototypeOf:function(t){var e=a(t);if(r(e,c))return e[c];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof u?l:null}},7005:function(t,e,n){"use strict";var r=n(8828),i=n(6285),a=n(5807),s=n(6375),o=Object.isExtensible,c=r((function(){o(1)}));t.exports=c||s?function(t){return!!i(t)&&((!s||"ArrayBuffer"!==a(t))&&(!o||o(t)))}:o},8280:function(t,e,n){"use strict";var r=n(1907);t.exports=r({}.isPrototypeOf)},3045:function(t,e,n){"use strict";var r=n(1907),i=n(9724),a=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);t.exports=function(t,e){var n,r=a(t),u=0,l=[];for(n in r)!i(o,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(t,e,n){"use strict";var r=n(3045),i=n(376);t.exports=Object.keys||function(t){return r(t,i)}},2574:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},9192:function(t,e,n){"use strict";var r=n(1871),i=n(6285),a=n(4239),s=n(43);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return a(n),s(r),i(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},4298:function(t,e,n){"use strict";var r=n(9447),i=n(8828),a=n(1907),s=n(5972),o=n(2875),c=n(7374),u=a(n(2574).f),l=a([].push),d=r&&i((function(){var t=Object.create(null);return t[2]=2,!u(t,2)})),p=function(t){return function(e){for(var n,i=c(e),a=o(i),p=d&&null===s(i),h=a.length,f=0,v=[];h>f;)n=a[f++],r&&!(p?n in i:u(i,n))||l(v,t?[n,i[n]]:i[n]);return v}};t.exports={entries:p(!0),values:p(!1)}},4878:function(t,e,n){"use strict";var r=n(2623),i=n(3948);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},581:function(t,e,n){"use strict";var r=n(3930),i=n(2250),a=n(6285),s=TypeError;t.exports=function(t,e){var n,o;if("string"===e&&i(n=t.toString)&&!a(o=r(n,t)))return o;if(i(n=t.valueOf)&&!a(o=r(n,t)))return o;if("string"!==e&&i(n=t.toString)&&!a(o=r(n,t)))return o;throw new s("Can't convert object to primitive value")}},1042:function(t,e,n){"use strict";var r=n(5582),i=n(1907),a=n(4443),s=n(7170),o=n(6624),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=a.f(o(t)),n=s.f;return n?c(e,n(t)):e}},2046:function(t){"use strict";t.exports={}},4420:function(t){"use strict";t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},1759:function(t,e,n){"use strict";var r=n(1010),i=n(5463),a=n(2250),s=n(7463),o=n(2647),c=n(6264),u=n(1885),l=n(7593),d=n(7376),p=n(5683),h=i&&i.prototype,f=c("species"),v=!1,m=a(r.PromiseRejectionEvent),g=s("Promise",(function(){var t=o(i),e=t!==String(i);if(!e&&66===p)return!0;if(d&&(!h.catch||!h.finally))return!0;if(!p||p<51||!/native code/.test(t)){var n=new i((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[f]=r,!(v=n.then((function(){}))instanceof r))return!0}return!e&&(u||l)&&!m}));t.exports={CONSTRUCTOR:g,REJECTION_EVENT:m,SUBCLASSING:v}},5463:function(t,e,n){"use strict";var r=n(1010);t.exports=r.Promise},3569:function(t,e,n){"use strict";var r=n(6624),i=n(6285),a=n(6254);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},3282:function(t,e,n){"use strict";var r=n(5463),i=n(473),a=n(1759).CONSTRUCTOR;t.exports=a||!i((function(t){r.all(t).then(void 0,(function(){}))}))},9245:function(t){"use strict";var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},4239:function(t,e,n){"use strict";var r=n(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},2098:function(t,e,n){"use strict";var r=n(1010),i=n(9447),a=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!i)return r[t];var e=a(r,t);return e&&e.value}},7118:function(t,e,n){"use strict";var r=n(5582),i=n(9251),a=n(6264),s=n(9447),o=a("species");t.exports=function(t){var e=r(t);s&&e&&!e[o]&&i(e,o,{configurable:!0,get:function(){return this}})}},4840:function(t,e,n){"use strict";var r=n(2623),i=n(4284).f,a=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");t.exports=function(t,e,n,u){var l=n?t:t&&t.prototype;l&&(s(l,c)||i(l,c,{configurable:!0,value:e}),u&&!r&&a(l,"toString",o))}},2522:function(t,e,n){"use strict";var r=n(5816),i=n(6499),a=r("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},6128:function(t,e,n){"use strict";var r=n(7376),i=n(1010),a=n(2532),s="__core-js_shared__",o=t.exports=i[s]||a(s,{});(o.versions||(o.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(t,e,n){"use strict";var r=n(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},8450:function(t,e,n){"use strict";var r=n(6624),i=n(2235),a=n(7136),s=n(6264)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||a(n=r(o)[s])?e:i(n)}},1470:function(t,e,n){"use strict";var r=n(1907),i=n(5482),a=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(t){return function(e,n){var r,l,d=a(s(e)),p=i(n),h=d.length;return p<0||p>=h?t?"":void 0:(r=c(d,p))<55296||r>56319||p+1===h||(l=c(d,p+1))<56320||l>57343?t?o(d,p):r:t?u(d,p,p+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},1156:function(t,e,n){"use strict";var r=n(4723);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},1164:function(t,e,n){"use strict";var r=n(1907),i=n(3121),a=n(160),s=n(9314),o=n(4239),c=r(s),u=r("".slice),l=Math.ceil,d=function(t){return function(e,n,r){var s,d,p=a(o(e)),h=i(n),f=p.length,v=void 0===r?" ":a(r);return h<=f||""===v?p:((d=c(v,l((s=h-f)/v.length))).length>s&&(d=u(d,0,s)),t?p+d:d+p)}};t.exports={start:d(!1),end:d(!0)}},9314:function(t,e,n){"use strict";var r=n(5482),i=n(160),a=n(4239),s=RangeError;t.exports=function(t){var e=i(a(this)),n="",o=r(t);if(o<0||o===1/0)throw new s("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},5819:function(t,e,n){"use strict";var r=n(6833).PROPER,i=n(8828),a=n(6395);t.exports=function(t){return i((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||r&&a[t].name!==t}))}},5993:function(t,e,n){"use strict";var r=n(1907),i=n(4239),a=n(160),s=n(6395),o=r("".replace),c=RegExp("^["+s+"]+"),u=RegExp("(^|[^"+s+"])["+s+"]+$"),l=function(t){return function(e){var n=a(i(e));return 1&t&&(n=o(n,c,"")),2&t&&(n=o(n,u,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},9846:function(t,e,n){"use strict";var r=n(5683),i=n(8828),a=n(1010).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(t,e,n){"use strict";var r=n(3930),i=n(5582),a=n(6264),s=n(8055);t.exports=function(){var t=i("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,o=a("toPrimitive");e&&!e[o]&&s(e,o,(function(t){return r(n,this)}),{arity:1})}},2595:function(t,e,n){"use strict";var r=n(5582),i=n(1907),a=r("Symbol"),s=a.keyFor,o=i(a.prototype.valueOf);t.exports=a.isRegisteredSymbol||function(t){try{return void 0!==s(o(t))}catch(t){return!1}}},9197:function(t,e,n){"use strict";for(var r=n(5816),i=n(5582),a=n(1907),s=n(5594),o=n(6264),c=i("Symbol"),u=c.isWellKnownSymbol,l=i("Object","getOwnPropertyNames"),d=a(c.prototype.valueOf),p=r("wks"),h=0,f=l(c),v=f.length;h0?i(e,9007199254740991):0}},9298:function(t,e,n){"use strict";var r=n(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:function(t,e,n){"use strict";var r=n(3930),i=n(6285),a=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||a(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),o(t,e)}},470:function(t,e,n){"use strict";var r=n(6028),i=n(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},2623:function(t,e,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",t.exports="[object z]"===String(r)},160:function(t,e,n){"use strict";var r=n(3948),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},4640:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:function(t,e,n){"use strict";var r=n(1907),i=0,a=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+a,36)}},1175:function(t,e,n){"use strict";var r=n(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(t,e,n){"use strict";var r=n(9447),i=n(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4787:function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t2&&d(n,arguments[2]);var o=[];return h(t,g,{that:o}),u(n,"errors",o),n};s?s(A,m):o(A,m,{name:!0});var y=A.prototype=c(m.prototype,{constructor:l(1,A),message:l(1,""),name:l(1,"AggregateError")});r({global:!0,constructor:!0,arity:2},{AggregateError:A})},4502:function(t,e,n){"use strict";n(2048)},8545:function(t,e,n){"use strict";var r=n(1091),i=n(8828),a=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),d=n(6968),p=n(7171),h=n(6264),f=n(5683),v=h("isConcatSpreadable"),m=f>=51||!i((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),g=function(t){if(!s(t))return!1;var e=t[v];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,arity:1,forced:!m||!p("concat")},{concat:function(t){var e,n,r,i,a,s=o(this),p=d(s,0),h=0;for(e=-1,r=arguments.length;e1?arguments[1]:void 0)}})},6290:function(t,e,n){"use strict";var r=n(1091),i=n(726).find,a=n(2156),s="find",o=!0;s in[]&&Array(1)[s]((function(){o=!1})),r({target:"Array",proto:!0,forced:o},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(s)},5650:function(t,e,n){"use strict";var r=n(1091),i=n(2914);r({target:"Array",proto:!0,forced:[].forEach!==i},{forEach:i})},7277:function(t,e,n){"use strict";var r=n(1091),i=n(1229);r({target:"Array",stat:!0,forced:!n(473)((function(t){Array.from(t)}))},{from:i})},9748:function(t,e,n){"use strict";var r=n(1091),i=n(4436).includes,a=n(8828),s=n(2156);r({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},6391:function(t,e,n){"use strict";var r=n(1091),i=n(2361),a=n(4436).indexOf,s=n(7623),o=i([].indexOf),c=!!o&&1/o([1],1,-0)<0;r({target:"Array",proto:!0,forced:c||!s("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return c?o(this,t,e)||0:a(this,t,e)}})},2425:function(t,e,n){"use strict";n(1091)({target:"Array",stat:!0},{isArray:n(1793)})},9363:function(t,e,n){"use strict";var r=n(7374),i=n(2156),a=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),d=n(9447),p="Array Iterator",h=s.set,f=s.getterFor(p);t.exports=c(Array,"Array",(function(t,e){h(this,{type:p,target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,u(void 0,!0);switch(t.kind){case"keys":return u(n,!1);case"values":return u(e[n],!1)}return u([n,e[n]],!1)}),"values");var v=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&d&&"values"!==v.name)try{o(v,"name",{value:"values"})}catch(t){}},328:function(t,e,n){"use strict";var r=n(1091),i=n(7144);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},6687:function(t,e,n){"use strict";var r=n(1091),i=n(726).map;r({target:"Array",proto:!0,forced:!n(7171)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},5745:function(t,e,n){"use strict";var r=n(1091),i=n(9298),a=n(575),s=n(3130),o=n(8024);r({target:"Array",proto:!0,arity:1,forced:n(8828)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=i(this),n=a(e),r=arguments.length;o(n+r);for(var c=0;c79&&s<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},8559:function(t,e,n){"use strict";var r=n(1091),i=n(1907),a=n(1793),s=i([].reverse),o=[1,2];r({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),s(this)}})},2099:function(t,e,n){"use strict";var r=n(1091),i=n(1793),a=n(5468),s=n(6285),o=n(4849),c=n(575),u=n(7374),l=n(5543),d=n(6264),p=n(7171),h=n(3427),f=p("slice"),v=d("species"),m=Array,g=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var n,r,d,p=u(this),f=c(p),A=o(t,f),y=o(void 0===e?f:e,f);if(i(p)&&(n=p.constructor,(a(n)&&(n===m||i(n.prototype))||s(n)&&null===(n=n[v]))&&(n=void 0),n===m||void 0===n))return h(p,A,y);for(r=new(void 0===n?m:n)(g(y-A,0)),d=0;A3)){if(f)return!0;if(m)return m<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)g.push({k:e+r,v:n})}for(g.sort((function(t,e){return e.v-t.v})),r=0;ru(n)?1:-1}}(t)),n=o(i),r=0;r_-r+n;m--)p(y,m-1)}else if(n>r)for(m=_-r;m>E;m--)A=m+n-1,(g=m+r-1)in y?y[A]=y[g]:p(y,A);for(m=0;m1?arguments[1]:void 0)}})},7057:function(t,e,n){"use strict";var r=n(1470).charAt,i=n(160),a=n(4932),s=n(183),o=n(9550),c="String Iterator",u=a.set,l=a.getterFor(c);s(String,"String",(function(t){u(this,{type:c,string:i(t),index:0})}),(function(){var t,e=l(this),n=e.string,i=e.index;return i>=n.length?o(void 0,!0):(t=r(n,i),e.index+=t.length,o(t,!1))}))},3356:function(t,e,n){"use strict";var r=n(1091),i=n(1164).start;r({target:"String",proto:!0,forced:n(1156)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},2395:function(t,e,n){"use strict";var r,i=n(1091),a=n(2361),s=n(3846).f,o=n(3121),c=n(160),u=n(2074),l=n(4239),d=n(5735),p=n(7376),h=a("".slice),f=Math.min,v=d("startsWith");i({target:"String",proto:!0,forced:!!(p||v||(r=s(String.prototype,"startsWith"),!r||r.writable))&&!v},{startsWith:function(t){var e=c(l(this));u(t);var n=o(f(arguments.length>1?arguments[1]:void 0,e.length)),r=c(t);return h(e,n,n+r.length)===r}})},727:function(t,e,n){"use strict";var r=n(1091),i=n(5993).trim;r({target:"String",proto:!0,forced:n(5819)("trim")},{trim:function(){return i(this)}})},3997:function(t,e,n){"use strict";n(366)("asyncIterator")},3674:function(t,e,n){"use strict";var r=n(1091),i=n(1010),a=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),d=n(9724),p=n(8280),h=n(6624),f=n(7374),v=n(470),m=n(160),g=n(5817),A=n(8075),y=n(2875),_=n(4443),E=n(5407),b=n(7170),k=n(3846),C=n(4284),T=n(2220),V=n(2574),w=n(8055),S=n(9251),P=n(5816),I=n(2522),x=n(8530),R=n(6499),L=n(6264),U=n(560),N=n(366),O=n(3467),D=n(4840),F=n(4932),M=n(726).forEach,B=I("hidden"),j="Symbol",q="prototype",W=F.set,H=F.getterFor(j),z=Object[q],G=i.Symbol,J=G&&G[q],Q=i.RangeError,Y=i.TypeError,K=i.QObject,Z=k.f,X=C.f,$=E.f,tt=V.f,et=s([].push),nt=P("symbols"),rt=P("op-symbols"),it=P("wks"),at=!K||!K[q]||!K[q].findChild,st=function(t,e,n){var r=Z(z,e);r&&delete z[e],X(t,e,n),r&&t!==z&&X(z,e,r)},ot=c&&l((function(){return 7!==A(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?st:X,ct=function(t,e){var n=nt[t]=A(J);return W(n,{type:j,tag:t,description:e}),c||(n.description=e),n},ut=function(t,e,n){t===z&&ut(rt,e,n),h(t);var r=v(e);return h(n),d(nt,r)?(n.enumerable?(d(t,B)&&t[B][r]&&(t[B][r]=!1),n=A(n,{enumerable:g(0,!1)})):(d(t,B)||X(t,B,g(1,A(null))),t[B][r]=!0),ot(t,r,n)):X(t,r,n)},lt=function(t,e){h(t);var n=f(e),r=y(n).concat(ft(n));return M(r,(function(e){c&&!a(dt,n,e)||ut(t,e,n[e])})),t},dt=function(t){var e=v(t),n=a(tt,this,e);return!(this===z&&d(nt,e)&&!d(rt,e))&&(!(n||!d(this,e)||!d(nt,e)||d(this,B)&&this[B][e])||n)},pt=function(t,e){var n=f(t),r=v(e);if(n!==z||!d(nt,r)||d(rt,r)){var i=Z(n,r);return!i||!d(nt,r)||d(n,B)&&n[B][r]||(i.enumerable=!0),i}},ht=function(t){var e=$(f(t)),n=[];return M(e,(function(t){d(nt,t)||d(x,t)||et(n,t)})),n},ft=function(t){var e=t===z,n=$(e?rt:f(t)),r=[];return M(n,(function(t){!d(nt,t)||e&&!d(z,t)||et(r,nt[t])})),r};u||(G=function(){if(p(J,this))throw new Y("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?m(arguments[0]):void 0,e=R(t),n=function(t){var r=void 0===this?i:this;r===z&&a(n,rt,t),d(r,B)&&d(r[B],e)&&(r[B][e]=!1);var s=g(1,t);try{ot(r,e,s)}catch(t){if(!(t instanceof Q))throw t;st(r,e,s)}};return c&&at&&ot(z,e,{configurable:!0,set:n}),ct(e,t)},w(J=G[q],"toString",(function(){return H(this).tag})),w(G,"withoutSetter",(function(t){return ct(R(t),t)})),V.f=dt,C.f=ut,T.f=lt,k.f=pt,_.f=E.f=ht,b.f=ft,U.f=function(t){return ct(L(t),t)},c&&(S(J,"description",{configurable:!0,get:function(){return H(this).description}}),o||w(z,"propertyIsEnumerable",dt,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),M(y(it),(function(t){N(t)})),r({target:j,stat:!0,forced:!u},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(t,e){return void 0===e?A(t):lt(A(t),e)},defineProperty:ut,defineProperties:lt,getOwnPropertyDescriptor:pt}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ht}),O(),D(G,j),x[B]=!0},5084:function(){},3313:function(t,e,n){"use strict";var r=n(1091),i=n(5582),a=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=s(t);if(a(u,e))return u[e];var n=i("Symbol")(e);return u[e]=n,l[n]=e,n}})},2596:function(t,e,n){"use strict";n(366)("hasInstance")},5721:function(t,e,n){"use strict";n(366)("isConcatSpreadable")},4954:function(t,e,n){"use strict";n(366)("iterator")},4452:function(t,e,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(t,e,n){"use strict";var r=n(1091),i=n(9724),a=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!a(t))throw new TypeError(s(t)+" is not a symbol");if(i(u,t))return u[t]}})},3377:function(t,e,n){"use strict";n(366)("matchAll")},4123:function(t,e,n){"use strict";n(366)("match")},2230:function(t,e,n){"use strict";n(366)("replace")},5344:function(t,e,n){"use strict";n(366)("search")},1660:function(t,e,n){"use strict";n(366)("species")},4610:function(t,e,n){"use strict";n(366)("split")},3669:function(t,e,n){"use strict";var r=n(366),i=n(3467);r("toPrimitive"),i()},4810:function(t,e,n){"use strict";var r=n(5582),i=n(366),a=n(4840);i("toStringTag"),a(r("Symbol"),"Symbol")},3325:function(t,e,n){"use strict";n(366)("unscopables")},1599:function(t,e,n){"use strict";n(4502)},768:function(t,e,n){"use strict";var r=n(6264),i=n(4284).f,a=r("metadata"),s=Function.prototype;void 0===s[a]&&i(s,a,{value:null})},7939:function(t,e,n){"use strict";n(7450)},4362:function(t,e,n){"use strict";n(6415)},7637:function(t,e,n){"use strict";var r=n(1091),i=n(6024),a=n(3427),s=n(6254),o=n(2159),c=n(4420);r({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=a(arguments,1),n=s.f(this),r=c((function(){return i(o(t),void 0,e)}));return(r.error?n.reject:n.resolve)(r.value),n.promise}})},3568:function(t,e,n){"use strict";n(5823)},8549:function(t,e,n){"use strict";n(366)("asyncDispose")},1697:function(t,e,n){"use strict";n(366)("customMatcher")},7152:function(t,e,n){"use strict";n(366)("dispose")},3939:function(t,e,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(t,e,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(t,e,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(t,e,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(t,e,n){"use strict";n(366)("matcher")},6878:function(t,e,n){"use strict";n(366)("metadataKey")},1372:function(t,e,n){"use strict";n(366)("metadata")},4664:function(t,e,n){"use strict";n(366)("observable")},9671:function(t,e,n){"use strict";n(366)("patternMatch")},359:function(t,e,n){"use strict";n(366)("replaceAll")},237:function(){},2560:function(t,e,n){"use strict";n(9363);var r=n(9287),i=n(1010),a=n(4840),s=n(3742);for(var o in r)a(i[o],o),s[o]=s.Array},6450:function(t,e,n){"use strict";var r=n(3607);t.exports=r},8402:function(t,e,n){"use strict";var r=n(3531);t.exports=r},1969:function(t,e,n){"use strict";var r=n(2092);t.exports=r},1374:function(t,e,n){"use strict";var r=n(6535);t.exports=r},3067:function(t,e,n){"use strict";var r=n(4712);n(2560),t.exports=r},9709:function(t,e,n){"use strict";var r=n(3034);t.exports=r},530:function(t,e,n){"use strict";var r=n(8218);t.exports=r},2616:function(t,e,n){"use strict";var r=n(3155);t.exports=r},9617:function(t,e,n){"use strict";var r=n(3246);t.exports=r},4525:function(t,e,n){"use strict";var r=n(3948),i=n(9724),a=n(8280),s=n(1969);n(237);var o=Array.prototype,c={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===o||a(o,t)&&e===o.forEach||i(c,r(t))?s:e}},6343:function(t,e,n){"use strict";var r=n(6880);t.exports=r},7852:function(t,e,n){"use strict";var r=n(4507);t.exports=r},1618:function(t,e,n){"use strict";n(2560);var r=n(3948),i=n(9724),a=n(8280),s=n(1374),o=Array.prototype,c={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.keys;return t===o||a(o,t)&&e===o.keys||i(c,r(t))?s:e}},4166:function(t,e,n){"use strict";var r=n(2860);t.exports=r},8894:function(t,e,n){"use strict";var r=n(9299);t.exports=r},3264:function(t,e,n){"use strict";var r=n(3629);t.exports=r},3266:function(t,e,n){"use strict";var r=n(8685);t.exports=r},9528:function(t,e,n){"use strict";var r=n(8823);t.exports=r},4106:function(t,e,n){"use strict";var r=n(8059);t.exports=r},6686:function(t,e,n){"use strict";var r=n(303);t.exports=r},1086:function(t,e,n){"use strict";var r=n(2757);t.exports=r},26:function(t,e,n){"use strict";var r=n(5029);t.exports=r},2268:function(t,e,n){"use strict";var r=n(7961);t.exports=r},4598:function(t,e,n){"use strict";var r=n(3423);t.exports=r},6660:function(t,e,n){"use strict";var r=n(317);t.exports=r},75:function(t,e,n){"use strict";var r=n(9968);n(2560),t.exports=r},975:function(t,e,n){"use strict";var r=n(7367);t.exports=r},3658:function(t,e,n){"use strict";var r=n(149);t.exports=r},8251:function(t,e,n){"use strict";var r=n(1926);t.exports=r},2102:function(t,e,n){"use strict";var r=n(4137);t.exports=r},9261:function(t,e,n){"use strict";var r=n(6286);t.exports=r},6490:function(t,e,n){"use strict";var r=n(9661);t.exports=r},7777:function(t,e,n){"use strict";var r=n(1418);t.exports=r},5980:function(t,e,n){"use strict";var r=n(8699);t.exports=r},6462:function(t,e,n){"use strict";var r=n(9929);t.exports=r},1921:function(t,e,n){"use strict";var r=n(4326);t.exports=r},5204:function(t,e,n){"use strict";var r=n(7027);n(2560),t.exports=r},5177:function(t,e,n){"use strict";var r=n(6098);t.exports=r},4139:function(t,e,n){"use strict";var r=n(3842);n(2560),t.exports=r},7045:function(t,e,n){"use strict";var r=n(1730);n(2560),t.exports=r},70:function(t,e,n){"use strict";var r=n(1661);t.exports=r}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.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 r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.nc=void 0;var r={};!function(){"use strict";var t="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==n.g&&n.g||{},e="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function h(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function f(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function m(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var n;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((n=t)&&DataView.prototype.isPrototypeOf(n))?(this._bodyArrayBuffer=m(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=m(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=h(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i)return this.blob().then(v);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t,e,n,r,i,a=h(this);if(a)return a;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=f(e),r=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=r?r[1]:"utf-8",e.readAsText(t,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?i:r),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(a),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var s=/([?&])_=[^&]*/;if(s.test(this.url))this.url=this.url.replace(s,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function _(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function E(t,e){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var t=new E(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var b=[301,302,303,307,308];E.redirect=function(t,e){if(-1===b.indexOf(e))throw new RangeError("Invalid status code");return new E(null,{status:e,headers:{location:t}})};var k=t.DOMException;try{new k}catch(t){(k=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function C(e,n){return new Promise((function(r,a){var o=new y(e,n);if(o.signal&&o.signal.aborted)return a(new k("Aborted","AbortError"));var c=new XMLHttpRequest;function d(){c.abort()}if(c.onload=function(){var t,e,n={statusText:c.statusText,headers:(t=c.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{e.append(r,i)}catch(t){console.warn("Response "+t.message)}}})),e)};0===o.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var i="response"in c?c.response:c.responseText;setTimeout((function(){r(new E(i,n))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request timed out"))}),0)},c.onabort=function(){setTimeout((function(){a(new k("Aborted","AbortError"))}),0)},c.open(o.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(o.url),!0),"include"===o.credentials?c.withCredentials=!0:"omit"===o.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":s&&(c.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof p||t.Headers&&n.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(n.headers).forEach((function(t){h.push(u(t)),c.setRequestHeader(t,l(n.headers[t]))})),o.headers.forEach((function(t,e){-1===h.indexOf(e)&&c.setRequestHeader(e,t)}))}else o.headers.forEach((function(t,e){c.setRequestHeader(e,t)}));o.signal&&(o.signal.addEventListener("abort",d),c.onreadystatechange=function(){4===c.readyState&&o.signal.removeEventListener("abort",d)}),c.send(void 0===o._bodyInit?null:o._bodyInit)}))}C.polyfill=!0,t.fetch||(t.fetch=C,t.Headers=p,t.Request=y,t.Response=E)}(),function(){"use strict";n.d(r,{default:function(){return Vn}});var t=n(2321),e=n(2231);function i(n){return i="function"==typeof t&&"symbol"==typeof e?function(t){return typeof t}:function(e){return e&&"function"==typeof t&&e.constructor===t&&e!==t.prototype?"symbol":typeof e},i(n)}var a=n(4997),s=n(7764),o=n(7415),c=n(8959),u=n(3520),l=n(5363),d=n(7166),p=n(288),h=n(4908);function f(){f=function(){return n};var e,n={},r=Object.prototype,v=r.hasOwnProperty,m=a||function(t,e,n){t[e]=n.value},g="function"==typeof t?t:{},A=g.iterator||"@@iterator",y=g.asyncIterator||"@@asyncIterator",_=g.toStringTag||"@@toStringTag";function E(t,e,n){return a(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{E({},"")}catch(e){E=function(t,e,n){return t[e]=n}}function b(t,e,n,r){var i=e&&e.prototype instanceof P?e:P,a=s(i.prototype),o=new j(r||[]);return m(a,"_invoke",{value:D(t,n,o)}),a}function k(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=b;var C="suspendedStart",T="suspendedYield",V="executing",w="completed",S={};function P(){}function I(){}function x(){}var R={};E(R,A,(function(){return this}));var L=o&&o(o(q([])));L&&L!==r&&v.call(L,A)&&(R=L);var U=x.prototype=P.prototype=s(R);function N(t){var e;c(e=["next","throw","return"]).call(e,(function(e){E(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(r,a,s,o){var c=k(t[r],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==i(l)&&v.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,s,o)}),(function(t){n("throw",t,s,o)})):e.resolve(l).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,o)}))}o(c.arg)}var r;m(this,"_invoke",{value:function(t,i){function a(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(a,a):a()}})}function D(t,n,r){var i=C;return function(a,s){if(i===V)throw Error("Generator is already running");if(i===w){if("throw"===a)throw s;return{value:e,done:!0}}for(r.method=a,r.arg=s;;){var o=r.delegate;if(o){var c=F(o,r);if(c){if(c===S)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===C)throw i=w,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=V;var u=k(t,n,r);if("normal"===u.type){if(i=r.done?w:T,u.arg===S)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=w,r.method="throw",r.arg=u.arg)}}}function F(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,F(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),S;var a=k(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,S;var s=a.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,S):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,S)}function M(t){var e,n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),u(e=this.tryEntries).call(e,n)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],c(t).call(t,M,this),this.reset(!0)}function q(t){if(t||""===t){var n=t[A];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=v.call(a,"catchLoc"),c=v.call(a,"finallyLoc");if(o&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),B(n),S}},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 i=r.arg;B(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:q(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),S}},n}function v(t,e,n,r,i,a,s){try{var o=t[a](s),c=o.value}catch(t){return void n(t)}o.done?e(c):d.resolve(c).then(r,i)}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var g=n(9280);function A(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[g];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function y(t,e){for(var n=0;n-1&&(n=n.replace("px","")),R()(n)}},{key:"createSyntheticEvent",value:function(t,e){var n;if(e)try{n=new Event(t),e.dispatchEvent(n)}catch(t){console.warn(t)}}},{key:"setStyle",value:function(t,e){t&&"object"===i(e)&&C()(e).forEach((function(n){t.style[n]=e[n]}))}},{key:"getWidth",value:function(e){return e?t.isNumber(e.offsetWidth)&&0!==e.offsetWidth?e.offsetWidth:t._getStyleAttributeData(e,"width"):0}},{key:"getHeight",value:function(e){return e?t.isNumber(e.offsetHeight)&&0!==e.offsetHeight?e.offsetHeight:t._getStyleAttributeData(e,"height"):0}},{key:"show",value:function(t){t&&(t.style.display="block")}},{key:"hide",value:function(t){t&&(t.style.display="none")}},{key:"removeElement",value:function(t){if(t&&t.parentNode)try{t.parentNode.removeChild(t)}catch(t){console.warn(t)}}},{key:"isNumber",value:function(t){return!("number"!=typeof t||!Number.isFinite(t))}},{key:"openWindow",value:function(t){try{window.open(t,"_blank")}catch(t){console.warn(t)}}},{key:"ajax",value:function(t,e,n){return new(V())((function(r,i){var a=new XMLHttpRequest;a.open("GET",t,!0),a.timeout=e,n&&(a.withCredentials=!0),a.onloadend=function(){"number"==typeof a.status&&a.status>=200&&a.status<300?r("XMLHttpRequest request succeeded"):i("XMLHttpRequest wrong status code: "+a.status)},a.ontimeout=function(){i("XMLHttpRequest timeout")},a.send(null)}))}},{key:"addEvents",value:function(t,e,n){t&&t.length>1&&e&&"function"==typeof n&&t.forEach((function(t){e.addEventListener(t,n)}))}},{key:"removeEvents",value:function(t,e,n){t&&t.length>1&&e&&"function"==typeof n&&t.forEach((function(t){e.removeEventListener(t,n)}))}},{key:"clearTimeout",value:function(t){"number"==typeof t&&window.clearTimeout(t)}},{key:"clearInterval",value:function(t){"number"==typeof t&&window.clearInterval(t)}},{key:"stopPreventEvent",value:function(t){t&&(t.stopPropagation(),t.preventDefault())}},{key:"vastReadableTime",value:function(e){if(t.isNumber(e)&&e>=0){var n=0,r=0,i=0,a=Math.floor(e%1e3);return a=0===a?"000":a<10?"00"+a:a<100?"0"+a:a.toString(),(n=Math.floor(1*e/1e3))>59&&(n-=60*(r=Math.floor(1*n/60))),n=0===n?"00":n<10?"0"+n:n.toString(),r>59&&(r-=60*(i=Math.floor(1*r/60))),r=0===r?"00":r<10?"0"+r:r.toString(),(i=0===i?"00":i<10?"0"+i:i>23?"00":i.toString())+":"+r+":"+n+"."+a}return"00:00:00.000"}},{key:"generateCacheBusting",value:function(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<8;n++)t+=e.charAt(Math.floor(62*Math.random()));return t}},{key:"makeButtonAccessible",value:function(e,n){e.tabIndex=0,e.setAttribute("role","button"),e.addEventListener("keyup",(function(n){var r=n.which;13!==r&&32!==r||(n.stopPropagation(),n.preventDefault(),t.createSyntheticEvent("click",e))})),n&&e.setAttribute("aria-label",n)}}])}(),U=n(6586),N=n.n(U),O=function(){function t(){m(this,t)}return _(t,null,[{key:"_filterVersion",value:function(t){if(navigator.userAgent){var e=navigator.userAgent.match(t);if(Array.isArray(e)&&void 0!==e[1])return N()(e[1],10)}return-1}},{key:"_testVideo",get:function(){return document.createElement("video")}},{key:"_hasTouchEvents",get:function(){return!!(void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof window.DocumentTouch)}},{key:"userAgent",get:function(){return navigator.userAgent?navigator.userAgent:null}},{key:"devicePixelRatio",get:function(){var t=1;return L.isNumber(window.devicePixelRatio)&&window.devicePixelRatio>1&&(t=window.devicePixelRatio),t}},{key:"maxTouchPoints",get:function(){return"number"==typeof navigator.maxTouchPoints?navigator.maxTouchPoints:-1}},{key:"isIos",get:function(){var e=[!1,-1];return/(ipad|iphone|ipod)/i.test(t.userAgent)&&t._hasTouchEvents&&(e=[!0,t._filterVersion(/os\s+(\d+)_/i)]),e}},{key:"isIpadOS",get:function(){return!!(!t.isIos[0]&&t._hasTouchEvents&&/macintel/i.test(navigator.platform)&&t.devicePixelRatio>1&&t.maxTouchPoints>1)}},{key:"isMacOS",get:function(){var e=!1,n=-1;return t.isIos[0]||t.isIpadOS||!/(macintosh|mac\s+os)/i.test(t.userAgent)||(e=!0,n=t._filterVersion(/mac\s+os\s+x\s+(\d+)_(\d+)/i,!0)),[e,n]}},{key:"isSafari",get:function(){var e=!1,n=-1;return/safari\/[.0-9]*/i.test(t.userAgent)&&!/(chrome|chromium|android|crios|fxios)/i.test(t.userAgent)&&(e=!0,n=t._filterVersion(/version\/(\d+)\./i)),[e,n]}},{key:"isMacOSSafari",get:function(){return t.isMacOS[0]&&t.isSafari[0]}},{key:"isAndroid",get:function(){var e=[!1,-1];return!t.isIos[0]&&t._hasTouchEvents&&/android/i.test(t.userAgent)&&(e=[!0,t._filterVersion(/android\s*(\d+)\./i)]),e}},{key:"isMobile",get:function(){return!!(t.isIos[0]||t.isAndroid[0]||t.isIpadOS)}},{key:"hasNativeFullscreenSupport",get:function(){var e=document.documentElement,n=t._testVideo;return!(!e||void 0===e.requestFullscreen&&void 0===e.webkitRequestFullscreen&&void 0===e.mozRequestFullScreen&&void 0===e.msRequestFullscreen&&void 0===n.webkitEnterFullscreen)}},{key:"checkCanPlayType",value:function(e,n){var r=t._testVideo;if("undefined"!==r.canPlayType)if(e&&n){if(""!==r.canPlayType(e+'; codecs="'+n+'"'))return!0}else if(e&&!n){if(""!==r.canPlayType(e))return!0}return!1}}])}(),D=n(5569),F=n.n(D),M=n(1393),B=n.n(M),j=n(6319),q=n.n(j),W=n(4707),H=n.n(W),z=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._onFullscreenchangeFn=null}),[{key:"_onFullscreenchange",value:function(t){if(t&&t.type){this._rmpVast.debugRawConsoleLogs,"event is ".concat(t.type);var e=this._rmpVast.creative.isLinear,n=this._rmpVast.__adOnStage;"fullscreenchange"===t.type?this._rmpVast.isInFullscreen?(this._rmpVast.isInFullscreen=!1,n&&e&&this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent(["adexitfullscreen","adplayercollapse"])):(this._rmpVast.isInFullscreen=!0,n&&e&&this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent(["adfullscreen","adplayerexpand"])):"webkitbeginfullscreen"===t.type?(n&&e&&this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent(["adfullscreen","adplayerexpand"]),this._rmpVast.isInFullscreen=!0):"webkitendfullscreen"===t.type&&(n&&e&&this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent(["adexitfullscreen","adplayercollapse"]),this._rmpVast.isInFullscreen=!1)}}},{key:"_updateVastError",value:function(t){var e,n=[{code:201,description:"Video player expecting different linearity."},{code:204,description:"Ad category was required but not provided."},{code:205,description:"Inline Category violates Wrapper BlockedAdCategories."},{code:303,description:"No VAST response after one or more Wrappers."},{code:400,description:"General Linear error. Video player is unable to display the Linear Ad."},{code:401,description:"File not found. Unable to find Linear/MediaFile from URI."},{code:402,description:"Timeout of MediaFile URI."},{code:403,description:"Couldn't find MediaFile that is supported by this video player, based on the attributes of the MediaFile element."},{code:501,description:"Unable to display NonLinear Ad because creative dimensions do not align with creative display area (i.e. creative dimension too large)."},{code:502,description:"Unable to fetch NonLinearAds/NonLinear resource."},{code:503,description:"Couldn't find NonLinear resource with supported type."},{code:603,description:"Unable to fetch CompanionAds/Companion resource."},{code:900,description:"Undefined Error."},{code:901,description:"General VPAID error."},{code:1001,description:"Invalid input for loadAds method"},{code:1002,description:"Required DOMParser API is not available"},{code:1100,description:"SIMID error: UNSPECIFIED_CREATIVE_ERROR"},{code:1101,description:"SIMID error: CANNOT_LOAD_RESOURCE"},{code:1102,description:"SIMID error: PLAYBACK_AREA_UNUSABLE"},{code:1103,description:"SIMID error: INCORRECT_VERSION"},{code:1104,description:"SIMID error: TECHNICAL_ERROR"},{code:1105,description:"SIMID error: EXPAND_NOT_POSSIBLE"},{code:1106,description:"SIMID error: PAUSE_NOT_HONORED"},{code:1107,description:"SIMID error: PLAYMODE_NOT_ADEQUATE"},{code:1108,description:"SIMID error: CREATIVE_INTERNAL_ERROR"},{code:1109,description:"SIMID error: DEVICE_NOT_SUPPORTED"},{code:1110,description:"SIMID error: MESSAGES_NOT_FOLLOWING_SPEC"},{code:1111,description:"SIMID error: PLAYER_RESPONSE_TIMEOUT"},{code:1200,description:"SIMID error: UNSPECIFIED_PLAYER_ERROR"},{code:1201,description:"SIMID error: WRONG_VERSION"},{code:1202,description:"SIMID error: UNSUPPORTED_TIME"},{code:1203,description:"SIMID error: UNSUPPORTED_FUNCTIONALITY_REQUEST"},{code:1204,description:"SIMID error: UNSUPPORTED_ACTIONS"},{code:1205,description:"SIMID error: POSTMESSAGE_CHANNEL_OVERLOADED"},{code:1206,description:"SIMID error: VIDEO_COULD_NOT_LOAD"},{code:1207,description:"SIMID error: VIDEO_TIME_OUT"},{code:1208,description:"SIMID error: RESPONSE_TIMEOUT"},{code:1209,description:"SIMID error: MEDIA_NOT_SUPPORTED"},{code:1210,description:"SIMID error: SPEC_NOT_FOLLOWED_ON_INIT"},{code:1211,description:"SIMID error: SPEC_NOT_FOLLOWED_ON_MESSAGES"}],r=[201,204,205,400,401,402,403,501,502,503,603,901,1002],i=[303,900,1001],a=q()(n).call(n,(function(e){return e.code===t}));a.length>0?(this._rmpVast.__vastErrorCode=a[0].code,this._rmpVast.__adErrorMessage=a[0].description):(this._rmpVast.__vastErrorCode=-1,this._rmpVast.__adErrorMessage="Error getting VAST error"),this._rmpVast.__vastErrorCode>-1&&(b()(i).call(i,this._rmpVast.__vastErrorCode)>-1?this._rmpVast.__adErrorType="adLoadError":b()(r).call(r,this._rmpVast.__vastErrorCode)>-1&&(this._rmpVast.__adErrorType="adPlayError")),this._rmpVast.debugRawConsoleLogs,B()(e="VAST error code is ".concat(this._rmpVast.__vastErrorCode," with message: ")).call(e,this._rmpVast.__adErrorMessage),this._rmpVast.debugRawConsoleLogs,"Ad error type is ".concat(this._rmpVast.__adErrorType)}},{key:"filterParams",value:function(t){var e=this,n={ajaxTimeout:8e3,creativeLoadTimeout:8e3,ajaxWithCredentials:!1,maxNumRedirects:4,labels:{skipMessage:"Skip ad",closeAd:"Close ad",textForInteractionUIOnMobile:"Learn more"},outstream:!1,showControlsForAdPlayer:!1,vastXmlInput:!1,enableVpaid:!0,enableSimid:!0,vpaidSettings:{width:640,height:360,viewMode:"normal",desiredBitrate:500},useHlsJS:!0,debugHlsJS:!1,debugRawConsoleLogs:!1,omidSupport:!1,omidAllowedVendors:[],omidUnderEvaluation:!1,omidRunValidationScript:!1,omidAutoplay:!1,macros:new(H()),partnerName:"rmp-vast",partnerVersion:"15.1.0"};(this._rmpVast.params=n,t&&"object"===i(t))&&C()(t).forEach((function(n){i(t[n])===i(e._rmpVast.params[n])&&(L.isNumber(t[n])&&t[n]>0||"number"!=typeof t[n])&&("vpaidSettings"===n?(L.isNumber(t.vpaidSettings.width)&&t.vpaidSettings.width>0&&(e._rmpVast.params.vpaidSettings.width=t.vpaidSettings.width),L.isNumber(t.vpaidSettings.height)&&t.vpaidSettings.height>0&&(e._rmpVast.params.vpaidSettings.height=t.vpaidSettings.height),"string"==typeof t.vpaidSettings.viewMode&&"fullscreen"===t.vpaidSettings.viewMode&&(e._rmpVast.params.vpaidSettings.viewMode=t.vpaidSettings.viewMode),L.isNumber(t.vpaidSettings.desiredBitrate)&&t.vpaidSettings.desiredBitrate>0&&(e._rmpVast.params.vpaidSettings.desiredBitrate=t.vpaidSettings.desiredBitrate)):e._rmpVast.params[n]=t[n])}))}},{key:"createApiEvent",value:function(t){var e=this;Array.isArray(t)?t.forEach((function(n){n&&(e._rmpVast.debugRawConsoleLogs,"API EVENT - ".concat(t),e._rmpVast.dispatch(n))})):t&&(this._rmpVast.debugRawConsoleLogs,"API EVENT - ".concat(t),this._rmpVast.dispatch(t))}},{key:"playPromise",value:function(t,e){var n,r=this;switch(t){case"content":n=this._rmpVast.currentContentPlayer;break;case"vast":n=this._rmpVast.currentAdPlayer}if(n){var i=n.play();if(void 0!==i){var a=this._rmpVast.creative.isLinear;i.then((function(){r._rmpVast.debugRawConsoleLogs,"playPromise on ".concat(t," player has succeeded"),e&&r.createApiEvent("adinitialplayrequestsucceeded")})).catch((function(n){console.warn(n),e&&"vast"===t&&a?(r._rmpVast.debugRawConsoleLogs,r.processVastErrors(400,!0),r.createApiEvent("adinitialplayrequestfailed")):e&&"content"===t&&!a?(r._rmpVast.debugRawConsoleLogs,r.createApiEvent("adinitialplayrequestfailed")):(r._rmpVast.debugRawConsoleLogs,"playPromise on ".concat(t," player has been rejected"))}))}}}},{key:"destroyFullscreen",value:function(){this._rmpVast.currentContentPlayer?(this._rmpVast.currentContentPlayer.removeEventListener("webkitbeginfullscreen",this._onFullscreenchangeFn),this._rmpVast.currentContentPlayer.removeEventListener("webkitendfullscreen",this._onFullscreenchangeFn)):document.removeEventListener("fullscreenchange",this._onFullscreenchangeFn)}},{key:"handleFullscreen",value:function(){O.hasNativeFullscreenSupport&&(this._onFullscreenchangeFn=this._onFullscreenchange.bind(this),O.isIos[0]?this._rmpVast.currentContentPlayer&&(this._rmpVast.currentContentPlayer.addEventListener("webkitbeginfullscreen",this._onFullscreenchangeFn),this._rmpVast.currentContentPlayer.addEventListener("webkitendfullscreen",this._onFullscreenchangeFn)):document.addEventListener("fullscreenchange",this._onFullscreenchangeFn))}},{key:"processVastErrors",value:function(t,e){e&&this._rmpVast.rmpVastTracking.error(t),this._updateVastError(t),this.createApiEvent("aderror"),this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.resumeContent()}}])}(),G=n(1564);function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var t=r.next();return o=t.done,t},e:function(t){c=!0,s=t},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw s}}}}var tt=n(8079),et=n.n(tt),nt=n(8979),rt=n.n(nt),it=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this.reset(),this._createTrackingApiEventMap()}),[{key:"_createTrackingApiEventMap",value:function(){this._trackingApiEventMap=new(H()),this._trackingApiEventMap.set("adviewable","viewable"),this._trackingApiEventMap.set("adviewundetermined","viewundetermined"),this._trackingApiEventMap.set("advolumemuted","mute"),this._trackingApiEventMap.set("advolumeunmuted","unmute"),this._trackingApiEventMap.set("adpaused","pause"),this._trackingApiEventMap.set("adresumed","resume"),this._trackingApiEventMap.set("adskipped","skip"),this._trackingApiEventMap.set("adplayerexpand","playerExpand"),this._trackingApiEventMap.set("adplayercollapse","playerCollapse"),this._trackingApiEventMap.set("adfullscreen","fullscreen"),this._trackingApiEventMap.set("adexitfullscreen","exitFullscreen"),this._trackingApiEventMap.set("adloaded","loaded"),this._trackingApiEventMap.set("adstarted","start"),this._trackingApiEventMap.set("adfirstquartile","firstQuartile"),this._trackingApiEventMap.set("admidpoint","midpoint"),this._trackingApiEventMap.set("adthirdquartile","thirdQuartile"),this._trackingApiEventMap.set("adcomplete","complete"),this._trackingApiEventMap.set("adimpression","impression"),this._trackingApiEventMap.set("adcreativeview","creativeView"),this._trackingApiEventMap.set("adcollapse","adCollapse"),this._trackingApiEventMap.set("aduseracceptinvitation","acceptInvitation"),this._trackingApiEventMap.set("adclosed","close"),this._trackingApiEventMap.set("adclick","clickthrough")}},{key:"_dispatch",value:function(t){var e,n=this;this._debugRawConsoleLogs,"ping tracking for ".concat(t," VAST event");var r=q()(e=this._rmpVast.trackingTags).call(e,(function(e){return t===e.event}));r.length>0&&r.forEach((function(t){n.pingURI(t.url)}))}},{key:"_ping",value:function(t){var e=this;if(/\.js$/i.test(t)){var n=document.createElement("script");n.src=t;try{document.head.appendChild(n)}catch(t){console.warn(t),document.body.appendChild(n)}}else L.ajax(t,this._rmpVast.params.ajaxTimeout,!1,"GET").then((function(){e._debugRawConsoleLogs,"VAST tracker successfully loaded ".concat(t)})).catch((function(t){console.warn(t)}))}},{key:"_onVolumeChange",value:function(){if(this._rmpVast.currentAdPlayer){var t=this._rmpVast.currentAdPlayer.muted,e=this._rmpVast.currentAdPlayer.volume;t||0===e?this.dispatchTrackingAndApiEvent("advolumemuted"):!t&&e>0&&this.dispatchTrackingAndApiEvent("advolumeunmuted"),this._rmpVast.rmpVastUtils.createApiEvent("advolumechanged")}}},{key:"_onTimeupdate",value:function(){var t,e=this,n=-1,r=-1;(this._rmpVast.rmpVastAdPlayer&&(r=this._rmpVast.rmpVastAdPlayer.currentTime,n=this._rmpVast.rmpVastAdPlayer.duration),r>0)&&(n>0&&n>r&&(r>=.25*n&&!this._firstQuartileEventFired?(this._firstQuartileEventFired=!0,this.dispatchTrackingAndApiEvent("adfirstquartile")):r>=.5*n&&!this._midpointEventFired?(this._midpointEventFired=!0,this.dispatchTrackingAndApiEvent("admidpoint")):r>=.75*n&&!this._thirdQuartileEventFired&&(this._thirdQuartileEventFired=!0,this.dispatchTrackingAndApiEvent("adthirdquartile"))),this._rmpVast.progressEvents.length>0&&r>this._rmpVast.progressEvents[0].time&&(q()(t=this._rmpVast.progressEvents).call(t,(function(t){return t.time===e._rmpVast.progressEvents[0].time})).forEach((function(t){t.url&&e.pingURI(t.url)})),this._rmpVast.progressEvents.shift(),this._rmpVast.rmpVastUtils.createApiEvent("adprogress")))}},{key:"_onPause",value:function(){if(this._rmpVast.currentAdPlayer&&this._rmpVast.currentAdPlayer.paused){if(this._rmpVast.currentAdPlayer.currentTime===this._rmpVast.currentAdPlayer.duration)return;this.dispatchTrackingAndApiEvent("adpaused")}}},{key:"_onPlay",value:function(){this._rmpVast.currentAdPlayer&&!this._rmpVast.currentAdPlayer.paused&&this.dispatchTrackingAndApiEvent("adresumed")}},{key:"_onPlaying",value:function(){this.dispatchTrackingAndApiEvent(["adimpression","adcreativeview","adstarted"])}},{key:"_onEnded",value:function(){this.dispatchTrackingAndApiEvent("adcomplete"),this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.resumeContent()}},{key:"_dispatchTracking",value:function(t){var e=this;Array.isArray(t)?t.forEach((function(t){e._dispatch(t)})):this._dispatch(t)}},{key:"replaceMacros",value:function(t,e){var n=this;if(!/\[.+?\]/i.test(t))return t;var r=t;if(this._rmpVast.params.macros.size>0){var i,a=$(this._rmpVast.params.macros);try{for(a.s();!(i=a.n()).done;){var s=X(i.value,2),o=s[0],c=s[1],u=new RegExp("\\["+o+"\\]","gi");u.test(r)&&(r=r.replace(u,c.toString()))}}catch(t){a.e(t)}finally{a.f()}}var l=/\[CLICKPOS\]/gi;l.test(r)&&(r=r.replace(l,"-2"));var d=/\[ADCOUNT\]/gi;if(d.test(r)){var p=1;this._rmpVast.adPodLength>0&&(p=this._rmpVast.adSequence),r=r.replace(d,p.toString())}/\[SERVERSIDE\]/gi.test(r)&&(r=r.replace(d,"0"));var h=/\[TIMESTAMP\]/gi,f=(new Date).toISOString();h.test(r)&&(r=r.replace(h,encodeURIComponent(f)));var v=/\[CACHEBUSTING\]/gi;v.test(r)&&(r=r.replace(v,L.generateCacheBusting()));var m=/\[(CONTENTPLAYHEAD|MEDIAPLAYHEAD)\]/gi,g=this._rmpVast.rmpVastContentPlayer.currentTime;m.test(r)&&g>-1&&(r=r.replace(m,encodeURIComponent(L.vastReadableTime(g))));var A=/\[BREAKPOSITION\]/gi,y=-1;this._rmpVast.rmpVastAdPlayer&&(y=this._rmpVast.rmpVastAdPlayer.duration),A.test(r)&&(r=0===g?r.replace(A,"1"):g>0&&g-1&&(r=r.replace(x,encodeURIComponent(L.vastReadableTime(R))));var U=/\[UNIVERSALADID\]/gi;if(U.test(r)&&this._rmpVast.creative.universalAdIds.length>0){var D="";this._rmpVast.creative.universalAdIds.forEach((function(t,e){0===e&&e===n._rmpVast.creative.universalAdIds.length-1||(D+=","),D+=t.idRegistry+" "+t.value})),r=r.replace(U,encodeURIComponent(D))}var F=/\[ASSETURI\]/gi,M=this._rmpVast.adMediaUrl;F.test(r)&&"string"==typeof M&&""!==M&&(r=r.replace(F,encodeURIComponent(M)));var B=/\[PODSEQUENCE\]/gi;B.test(r)&&this._rmpVast.ad.sequence&&(r=r.replace(B,encodeURIComponent(this._rmpVast.ad.sequence.toString())));var j=/\[ADSERVINGID\]/gi;j.test(r)&&this._rmpVast.ad.adServingId&&(r=r.replace(j,encodeURIComponent(this._rmpVast.ad.adServingId)))}else{var q=/\[ADCATEGORIES\]/gi;if(q.test(r)&&this._rmpVast.ad.categories.length>0){var W,H=et()(W=this._rmpVast.ad.categories).call(W,(function(t){return t.value})).join(",");r=r.replace(q,encodeURIComponent(H))}var z=/\[BLOCKEDADCATEGORIES\]/gi;if(z.test(r)&&this._rmpVast.ad.blockedAdCategories.length>0){var G,J=et()(G=this._rmpVast.ad.blockedAdCategories).call(G,(function(t){return t.value})).join(",");r=r.replace(z,encodeURIComponent(J))}var Q=/\[VASTVERSIONS\]/gi;Q.test(r)&&(r=r.replace(Q,"2,3,5,6,7,8,11,12,13,14"));var Y=/\[APIFRAMEWORKS\]/gi;Y.test(r)&&(r=r.replace(Y,"2,7,8,9"));var K=/\[MEDIAMIME\]/gi;if(K.test(r)){var Z="";["video/webm","video/mp4","video/ogg","video/3gpp","application/vnd.apple.mpegurl","application/dash+xml"].forEach((function(t){"application/vnd.apple.mpegurl"===t?(O.checkCanPlayType(t)||n._rmpVast.rmpVastLinearCreative.readingHlsJS)&&(Z+=t+","):O.checkCanPlayType(t)&&(Z+=t+",")})),Z&&(Z=rt()(Z).call(Z,0,-1),r=r.replace(K,encodeURIComponent(Z)))}var tt=/\[PLAYERSTATE\]/gi;if(tt.test(r)){var nt="";this._rmpVast.rmpVastContentPlayer.muted&&(nt+="muted"),this._rmpVast.isInFullscreen&&(nt&&(nt+=","),nt+="fullscreen"),r=r.replace(tt,nt)}}var it=/\[LIMITADTRACKING\]/gi,at=this._rmpVast.regulationsInfo;it.test(r)&&at.limitAdTracking&&(r=r.replace(it,encodeURIComponent(at.limitAdTracking)));var st=/\[REGULATIONS\]/gi;st.test(r)&&at.regulations&&(r=r.replace(st,encodeURIComponent(at.regulations)));var ot=/\[GDPRCONSENT\]/gi;return ot.test(r)&&at.gdprConsent&&(r=r.replace(ot,encodeURIComponent(at.gdprConsent))),r}},{key:"pingURI",value:function(t){var e=this.replaceMacros(t,!0);this._ping(e)}},{key:"error",value:function(t){var e,n=this,r=this._rmpVast.adErrorTags;303===t&&this._rmpVast.vastErrorTags.length>0&&(r=B()(e=[]).call(e,Z(r),Z(this._rmpVast.vastErrorTags)));r.length>0&&r.forEach((function(e){if(e.url){var r=e.url,i=/\[ERRORCODE\]/gi;i.test(r)&&L.isNumber(t)&&t>0&&t<1e3&&(r=r.replace(i,t)),n._ping(r)}}))}},{key:"reset",value:function(){this._onPauseFn=null,this._onPlayFn=null,this._onPlayingFn=null,this._onEndedFn=null,this._onVolumeChangeFn=null,this._onTimeupdateFn=null,this._firstQuartileEventFired=!1,this._midpointEventFired=!1,this._thirdQuartileEventFired=!1}},{key:"dispatchTrackingAndApiEvent",value:function(t){var e=this;Array.isArray(t)?t.forEach((function(t){e._rmpVast.rmpVastUtils.createApiEvent(t),e._dispatchTracking(e._trackingApiEventMap.get(t))})):(this._rmpVast.rmpVastUtils.createApiEvent(t),this._dispatchTracking(this._trackingApiEventMap.get(t)))}},{key:"destroy",value:function(){this._rmpVast.currentAdPlayer&&(this._rmpVast.currentAdPlayer.removeEventListener("pause",this._onPauseFn),this._rmpVast.currentAdPlayer.removeEventListener("play",this._onPlayFn),this._rmpVast.currentAdPlayer.removeEventListener("playing",this._onPlayingFn),this._rmpVast.currentAdPlayer.removeEventListener("ended",this._onEndedFn),this._rmpVast.currentAdPlayer.removeEventListener("volumechange",this._onVolumeChangeFn),this._rmpVast.currentAdPlayer.removeEventListener("timeupdate",this._onTimeupdateFn))}},{key:"wire",value:function(){this._rmpVast.currentAdPlayer&&this._rmpVast.creative.isLinear&&!this._rmpVast.rmpVastVpaidPlayer&&(this._onPauseFn=this._onPause.bind(this),this._rmpVast.currentAdPlayer.addEventListener("pause",this._onPauseFn),this._onPlayFn=this._onPlay.bind(this),this._rmpVast.currentAdPlayer.addEventListener("play",this._onPlayFn),this._onPlayingFn=this._onPlaying.bind(this),this._rmpVast.currentAdPlayer.addEventListener("playing",this._onPlayingFn,{once:!0}),this._onEndedFn=this._onEnded.bind(this),this._rmpVast.currentAdPlayer.addEventListener("ended",this._onEndedFn,{once:!0}),this._onVolumeChangeFn=this._onVolumeChange.bind(this),this._rmpVast.currentAdPlayer.addEventListener("volumechange",this._onVolumeChangeFn),this._onTimeupdateFn=this._onTimeupdate.bind(this),this._rmpVast.currentAdPlayer.addEventListener("timeupdate",this._onTimeupdateFn))}}])}(),at=n(129),st=n.n(at),ot=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._adContainer=e.adContainer,this._adPlayer=e.currentAdPlayer,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this._onPlayingAppendIconsFn=null,this._iconsData=[]}),[{key:"iconsData",get:function(){return this._iconsData}},{key:"_onIconClickThrough",value:function(t,e){var n=this;e&&(e.stopPropagation(),"touchend"===e.type&&e.preventDefault()),L.openWindow(this._iconsData[t].iconClickThroughUrl);var r=this._iconsData[t].iconClickTrackingUrls;r.length>0&&r.forEach((function(t){t.url&&n._rmpVast.rmpVastTracking.pingURI(t.url)})),this._rmpVast.rmpVastUtils.createApiEvent("adiconclick")}},{key:"_onIconLoadPingTracking",value:function(t){this._debugRawConsoleLogs,"IconViewTracking for icon at index ".concat(t),this._rmpVast.rmpVastTracking.pingURI(this._iconsData[t].iconViewTrackingUrl)}},{key:"_onPlayingAppendIcons",value:function(){var t=this;this._debugRawConsoleLogs,this._iconsData.forEach((function(e,n){var r,i;e.staticResourceUrl?(r=document.createElement("img"),i=e.staticResourceUrl):(e.iframeResourceUrl||e.htmlContent)&&((r=document.createElement("iframe")).sandbox="allow-scripts allow-same-origin",i=e.htmlContent?e.htmlContent:e.iframeResourceUrl,L.setStyle(r,{border:"none",overflow:"hidden"}),r.setAttribute("scrolling","no"),r.setAttribute("allow","autoplay; fullscreen; picture-in-picture; encrypted-media"),r.setAttribute("sandbox","allow-scripts allow-presentation allow-same-origin")),r.className="rmp-ad-container-icons",L.setStyle(r,{width:N()(e.width)+"px",height:N()(e.height)+"px"});var a=e.xPosition;"left"===a?r.style.left="0px":"right"===a?r.style.right="0px":N()(a)>=0?r.style.left=a+"px":r.style.left="0px";var s=e.yPosition;if("top"===s?r.style.top="0px":"bottom"===a?r.style.bottom="0px":N()(s)>=0?r.style.top=s+"px":r.style.top="0px",e.iconViewTrackingUrl&&(r.onload=t._onIconLoadPingTracking.bind(t,n)),e.iconClickThroughUrl){var o=t._onIconClickThrough.bind(t,n);L.addEvents(["touchend","click"],r,o)}e.htmlContent?r.srcdoc=i:r.src=i,t._debugRawConsoleLogs,t._adContainer.appendChild(r)}))}},{key:"destroy",value:function(){this._debugRawConsoleLogs;var t=this._adContainer.querySelectorAll(".rmp-ad-container-icons");t.length>0&&t.forEach((function(t){L.removeElement(t)})),this._adPlayer&&this._adPlayer.removeEventListener("playing",this._onPlayingAppendIconsFn)}},{key:"parse",value:function(t){this._debugRawConsoleLogs;for(var e=0;e0)return navigator.connection.downlink;if("string"==typeof navigator.connection.effectiveType&&""!==navigator.connection.effectiveType)switch(navigator.connection.effectiveType){case"slow-2g":return.025;case"2g":return.035;case"3g":return.35;case"4g":return 1.4;case"5g":return 5}else if("string"==typeof navigator.connection.type&&""!==navigator.connection.type)switch(navigator.connection.type){case"ethernet":case"wifi":case"wimax":case"mixed":case"other":return 1.4;case"bluetooth":case"cellular":return.35;case"none":return-1}return.35}},{key:"bandwidthData",get:function(){return void 0===navigator.onLine||navigator.onLine?void 0===navigator.connection?{estimate:-1,connectionType:"unknown"}:{estimate:this._getBandwidthEstimate(),connectionType:this._getConnectionType()}:{estimate:-1,connectionType:"none"}}}])}(),ut=n(8628),lt=n.n(ut),dt=n(7119),pt=n.n(dt),ht=n(165),ft=n.n(ht),vt=n(9763),mt=n.n(vt),gt=n(5413),At=n.n(gt),yt={CREATE_SESSION:"createSession",RESOLVE:"resolve",REJECT:"reject"},_t="Media:durationchange",Et="Media:ended",bt="Media:error",kt="Media:pause",Ct="Media:play",Tt="Media:playing",Vt="Media:seeked",wt="Media:seeking",St="Media:timeupdate",Pt="Media:volumechange",It="Player:init",xt="Player:log",Rt="Player:startCreative",Lt="Player:adSkipped",Ut="Player:adStopped",Nt={CLICK_THRU:"Creative:clickThru",EXPAND_NONLINEAR:"Creative:expandNonlinear",COLLAPSE_NONLINEAR:"Creative:collapseNonlinear",FATAL_ERROR:"Creative:fatalError",GET_MEDIA_STATE:"Creative:getMediaState",LOG:"Creative:log",REQUEST_FULL_SCREEN:"Creative:requestFullScreen",REQUEST_SKIP:"Creative:requestSkip",REQUEST_STOP:"Creative:requestStop",REQUEST_PAUSE:"Creative:requestPause",REQUEST_PLAY:"Creative:requestPlay",REQUEST_RESIZE:"Creative:requestResize",REQUEST_VOLUME:"Creative:requestVolume",REQUEST_TRACKING:"Creative:reportTracking",REQUEST_CHANGE_AD_DURATION:"Creative:requestChangeAdDuration"},Ot=[Nt.GET_MEDIA_STATE,Nt.REQUEST_VIDEO_LOCATION,Nt.READY,Nt.CLICK_THRU,Nt.REQUEST_SKIP,Nt.REQUEST_STOP,Nt.REQUEST_PAUSE,Nt.REQUEST_PLAY,Nt.REQUEST_FULL_SCREEN,Nt.REQUEST_VOLUME,Nt.REQUEST_RESIZE,Nt.REQUEST_CHANGE_AD_DURATION,Nt.REPORT_TRACKING,It,Rt,Lt,Ut,"Player:fatalError",yt.CREATE_SESSION],Dt=1102,Ft=1105,Mt=1202,Bt=1206,jt={UNSPECIFIED:0,USER_INITIATED:1,MEDIA_PLAYBACK_COMPLETE:2,PLAYER_INITATED:3,CREATIVE_INITIATED:4,NON_LINEAR_DURATION_COMPLETE:5},qt=function(){return _((function t(){m(this,t),this.listeners_={},this.sessionId_="",this.nextMessageId_=1,this.target_=window.parent,this.resolutionListeners_={},window.addEventListener("message",this.receiveMessage.bind(this),!1)}),[{key:"reset",value:function(){this.listeners_={},this.sessionId_="",this.nextMessageId_=1,this.resolutionListeners_={}}},{key:"sendMessage",value:function(t,e){var n=this,r=this.nextMessageId_++,i=t===yt.CREATE_SESSION?t:"SIMID:"+t,a={sessionId:this.sessionId_,messageId:r,type:i,timestamp:Date.now(),args:e};return lt()(Ot).call(Ot,t)?new(V())((function(t,e){n.addResolveRejectListener_(r,t,e),n.target_.postMessage(F()(a),"*")})):new(V())((function(t){n.target_.postMessage(F()(a),"*"),t()}))}},{key:"addListener",value:function(t,e){this.listeners_[t]?this.listeners_[t].push(e):this.listeners_[t]=[e]}},{key:"addResolveRejectListener_",value:function(t,e,n){this.resolutionListeners_[t]=function(t){var r=t.type,i=t.args.value;"resolve"===r?e(i):"reject"===r&&n(i)}.bind(this)}},{key:"receiveMessage",value:function(t){var e;if(t&&t.data){var n;try{n=JSON.parse(t.data)}catch(t){return void console.warn(t)}if(n){var r=n.sessionId,i=n.type,a=""===this.sessionId_&&i===yt.CREATE_SESSION,s=this.sessionId_===r;if((a||s)&&null!==i)if(lt()(e=pt()(yt)).call(e,i))this.handleProtocolMessage_(n);else if(ft()(i).call(i,"SIMID:")){var o=i.substr(6),c=this.listeners_[o];c&&c.forEach((function(t){return t(n)}))}}}}},{key:"handleProtocolMessage_",value:function(t){var e,n,r,i=t.type;switch(i){case yt.CREATE_SESSION:this.sessionId_=t.sessionId,this.resolve(t),(e=this.listeners_[i])&&e.forEach((function(e){return e(t)}));break;case yt.RESOLVE:case yt.REJECT:n=t.args.messageId,(r=this.resolutionListeners_[n])&&(r(t),delete this.resolutionListeners_[n])}}},{key:"resolve",value:function(t,e){var n=this.nextMessageId_++,r={messageId:t.messageId,value:e},i={sessionId:this.sessionId_,messageId:n,type:yt.RESOLVE,timestamp:Date.now(),args:r};this.target_.postMessage(F()(i),"*")}},{key:"reject",value:function(t,e){var n=this.nextMessageId_++,r={messageId:t.messageId,value:e},i={sessionId:this.sessionId_,messageId:n,type:yt.REJECT,timestamp:Date.now(),args:r};this.target_.postMessage(F()(i),"*")}},{key:"createSession",value:function(){this.generateSessionId_(),this.sendMessage(yt.CREATE_SESSION).then((function(){}),(function(){}))}},{key:"generateSessionId_",value:function(){var t,e,n=new Uint8Array(16);window.crypto.getRandomValues(n);var r=et()(t=mt()(At()(e=Array(32)).call(e))).call(t,(function(t){var e=t%2==0,r=n[Math.floor(t/2)];return e?r>>4:15&r}));r[12]=4,r[16]=8|3&r[16];var i=et()(r).call(r,(function(t){return t.toString(16)})),a=[rt()(i).call(i,0,8).join(""),rt()(i).call(i,8,12).join(""),rt()(i).call(i,12,16).join(""),rt()(i).call(i,16,20).join(""),rt()(i).call(i,20).join("")].join("-");this.sessionId_=a}},{key:"setMessageTarget",value:function(t){this.target_=t}}])}(),Wt=function(){return _((function t(e,n){var r=this;m(this,t),this.simidProtocol=new qt,this.addListeners_(),this.rmpVast_=n,this._debugRawConsoleLogs=n.debugRawConsoleLogs,this.simidData_=n.creative.simid,this.adContainer_=n.adContainer,this.playerDiv_=n.contentWrapper,this.adPlayerUrl_=e,this.adParameters_=n.creative.simid.adParameters,this.adId_=n.creative.adId,this.creativeId_=n.creative.id,this.adServingId_=n.ad.adServingId,this.clickThroughUrl_=n.creative.clickThroughUrl,this.contentVideoElement_=n.currentContentPlayer,this.adVideoElement_=n.currentAdPlayer,this.simidIframe_=null,this.initializationPromise_=null,this.adVideoTrackingEvents_=new(H()),this.contentVideoTrackingEvents_=new(H()),this.isLinearAd_=n.creative.isLinear,this.nonLinearStartTime_=null,this.requestedDuration_=0,this.resolveSessionCreatedPromise_=null,this.sessionCreatedPromise_=new(V())((function(t){r.resolveSessionCreatedPromise_=t})),this.resolveInitializationPromise_=null,this.rejectInitializationPromise_=null,this.nonLinearDimensions_=null,this.durationInterval_=null,this.initializationPromise_=new(V())((function(t,e){r.resolveInitializationPromise_=t,r.rejectInitializationPromise_=e})),this.trackEventsOnAdVideoElement_(),this.trackEventsOnContentVideoElement_(),this.hideAdPlayer_(),this._debugRawConsoleLogs}),[{key:"initializeAd",value:function(){var t=this;this.isLinearAd_||this.isValidDimensions_(this.getNonlinearDimensions_())?(this.simidIframe_=this.createSimidIframe_(),this.isLinearAd_||this.displayNonlinearCreative_(),this.requestDuration_=0,this.initializationPromise_.catch((function(e){t.onAdInitializedFailed_(e)})),this.sessionCreatedPromise_.then((function(){t.sendInitMessage_()})),this._debugRawConsoleLogs):this._debugRawConsoleLogs}},{key:"playAd",value:function(){var t=this;this.initializationPromise_.then((function(){t.startCreativePlayback_()})).catch((function(t){console.warn(t)}))}},{key:"playAdVideo",value:function(){this.adVideoElement_.play()}},{key:"createSimidIframe_",value:function(){var t=document.createElement("iframe");return t.style.display="none",this.playerDiv_.appendChild(t),this.isLinearAd_&&t.classList.add("rmp-linear-simid-creative"),this.simidProtocol.setMessageTarget(t.contentWindow),t.setAttribute("allowFullScreen",""),t.setAttribute("allow","geolocation"),t.src=this.simidData_.fileURL,t}},{key:"addListeners_",value:function(){this.simidProtocol.addListener(yt.CREATE_SESSION,this.onSessionCreated_.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_FULL_SCREEN,this.onRequestFullScreen.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_PLAY,this.onRequestPlay.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_PAUSE,this.onRequestPause.bind(this)),this.simidProtocol.addListener(Nt.FATAL_ERROR,this.onCreativeFatalError.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_SKIP,this.onRequestSkip.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_STOP,this.onRequestStop.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_CHANGE_AD_DURATION,this.onRequestChangeAdDuration.bind(this)),this.simidProtocol.addListener(Nt.GET_MEDIA_STATE,this.onGetMediaState.bind(this)),this.simidProtocol.addListener(Nt.LOG,this.onReceiveCreativeLog.bind(this)),this.simidProtocol.addListener(Nt.EXPAND_NONLINEAR,this.onExpandResize.bind(this)),this.simidProtocol.addListener(Nt.COLLAPSE_NONLINEAR,this.onCollapse.bind(this)),this.simidProtocol.addListener(Nt.REQUEST_RESIZE,this.onRequestResize.bind(this))}},{key:"onSessionCreated_",value:function(){this.resolveSessionCreatedPromise_()}},{key:"destroySimidIframe_",value:function(){this.simidIframe_&&(this.simidIframe_.remove(),this.simidIframe_=null,this.simidProtocol.reset());var t,e=$(this.adVideoTrackingEvents_);try{for(e.s();!(t=e.n()).done;){var n=X(t.value,2),r=n[0],i=n[1];this.adVideoElement_.removeEventListener(r,i,!0)}}catch(t){e.e(t)}finally{e.f()}var a,s=$(this.contentVideoTrackingEvents_);try{for(s.s();!(a=s.n()).done;){var o=X(a.value,2),c=o[0],u=o[1];this.contentVideoElement_.removeEventListener(c,u,!0)}}catch(t){s.e(t)}finally{s.f()}this.adVideoTrackingEvents_.clear(),this.contentVideoTrackingEvents_.clear()}},{key:"getFullDimensions_",value:function(t){var e=t.getBoundingClientRect();return{x:0,y:0,width:e.width,height:e.height}}},{key:"isValidDimensions_",value:function(t){var e=this.playerDiv_.getBoundingClientRect(),n=N()(t.y)+N()(t.height)<=N()(e.height),r=N()(t.x)+N()(t.width)<=N()(e.width);return n&&r}},{key:"getNonlinearDimensions_",value:function(){if(this.nonLinearDimensions_)return this.nonLinearDimensions_;var t={};return t.x=document.getElementById("x_val").value,t.y=document.getElementById("y_val").value,t.width=document.getElementById("width").value,t.height=document.getElementById("height").value,t}},{key:"displayNonlinearCreative_",value:function(){var t=this.getNonlinearDimensions_();if(this.isValidDimensions_(t)){this.setSimidIframeDimensions_(t),this.simidIframe_.style.position="absolute",this.contentVideoElement_.play();var e=document.getElementById("duration").value;this.requestedDuration_=e}else this._debugRawConsoleLogs}},{key:"setSimidIframeDimensions_",value:function(t){this.simidIframe_.style.height=t.height,this.simidIframe_.style.width=t.width,this.simidIframe_.style.left="".concat(t.x,"px"),this.simidIframe_.style.top="".concat(t.y,"px")}},{key:"onExpandResize",value:function(t){if(this.isLinearAd_){var e={errorCode:Ft,message:"Linear resize not yet supported."};this.simidProtocol.reject(t,e),this._debugRawConsoleLogs,"SIMID: ".concat(e.message)}else{var n=this.getFullDimensions_(this.contentVideoElement_);this.setSimidIframeDimensions_(n),this.contentVideoElement_.pause(),this.simidProtocol.resolve(t)}}},{key:"onCollapse",value:function(t){var e=this.getNonlinearDimensions_();if(this.isLinearAd_){var n={message:"Cannot collapse linear ads."};this.simidProtocol.reject(t,n),this._debugRawConsoleLogs,"SIMID: ".concat(n.message)}else if(this.isValidDimensions_(e))this.setSimidIframeDimensions_(e),this.simidIframe_.style.position="absolute",this.contentVideoElement_.play(),this.simidProtocol.resolve(t);else{var r={message:"Unable to collapse to dimensions bigger than the player. Please modify dimensions to a smaller size."};this.simidProtocol.reject(t,r),this._debugRawConsoleLogs,"SIMID: ".concat(r.message)}}},{key:"onRequestResize",value:function(t){if(this.isLinearAd_){var e={errorCode:Ft,message:"Linear resize not yet supported."};this.simidProtocol.reject(t,e),this._debugRawConsoleLogs,"SIMID: ".concat(e.message)}else if(this.isValidDimensions_(t.args.creativeDimensions))this.nonLinearDimensions_=t.args.creativeDimensions,this.setSimidIframeDimensions_(t.args.creativeDimensions),this.simidProtocol.resolve(t);else{var n={errorCode:Ft,message:"Unable to resize a non-linear ad with dimensions bigger than the player. Please modify dimensions to a smaller size."};this.simidProtocol.reject(t,n),this._debugRawConsoleLogs,"SIMID: ".concat(n.message)}}},{key:"sendInitMessage_",value:function(){var t=this,e={videoDimensions:this.getFullDimensions_(this.contentVideoElement_),creativeDimensions:this.isLinearAd_?this.getFullDimensions_(this.contentVideoElement_):this.getNonlinearDimensions_(),fullscreen:!1,fullscreenAllowed:!0,variableDurationAllowed:!0,skippableState:"adHandles",siteUrl:document.location.host,appId:"",useragent:window.navigator.userAgent,deviceId:"",muted:this.adVideoElement_.muted,volume:this.adVideoElement_.volume},n={adParameters:this.adParameters_,adId:this.adId_,creativeId:this.creativeId_,adServingId:this.adServingId_,clickThroughUrl:this.clickThroughUrl_};this.isLinearAd_||(n.duration=document.getElementById("duration").value);var r={environmentData:e,creativeData:n};this.simidProtocol.sendMessage(It,r).then((function(e){t.resolveInitializationPromise_(e)})).catch((function(e){t.rejectInitializationPromise_(e)}))}},{key:"startCreativePlayback_",value:function(){this.showSimidIFrame_(),this.isLinearAd_?this.playLinearVideoAd_():(this.nonLinearStartTime_=this.contentVideoElement_.currentTime,this.contentVideoElement_.play()),this.simidProtocol.sendMessage(Rt)}},{key:"playLinearVideoAd_",value:function(){this.contentVideoElement_.pause(),this.showAdPlayer_(),this.adVideoElement_.src=this.adPlayerUrl_,this.adVideoElement_.load(),this.adVideoElement_.play()}},{key:"onAdInitializedFailed_",value:function(t){var e=F()(t);this._debugRawConsoleLogs," SIMID: Ad init failed. ".concat(e),this.destroyIframeAndResumeContent_(!0,e.errorCode)}},{key:"hideSimidIFrame_",value:function(){this.simidIframe_.style.display="none"}},{key:"showSimidIFrame_",value:function(){this.simidIframe_.style.display="block"}},{key:"showAdPlayer_",value:function(){this.adVideoElement_.style.display="block",this.adContainer_.style.display="block"}},{key:"hideAdPlayer_",value:function(){this.adVideoElement_.style.display="none",this.adContainer_.style.display="none"}},{key:"trackEventsOnAdVideoElement_",value:function(){var t=this;this.adVideoTrackingEvents_.set("durationchange",(function(){t.simidProtocol.sendMessage(_t,{duration:t.adVideoElement_.duration})})),this.adVideoTrackingEvents_.set("ended",this.videoComplete.bind(this)),this.adVideoTrackingEvents_.set("error",(function(){t.simidProtocol.sendMessage(bt,{error:"",message:""})})),this.adVideoTrackingEvents_.set("pause",(function(){t.simidProtocol.sendMessage(kt)})),this.adVideoTrackingEvents_.set("play",(function(){t.simidProtocol.sendMessage(Ct)})),this.adVideoTrackingEvents_.set("playing",(function(){t.simidProtocol.sendMessage(Tt)})),this.adVideoTrackingEvents_.set("seeked",(function(){t.simidProtocol.sendMessage(Vt)})),this.adVideoTrackingEvents_.set("seeking",(function(){t.simidProtocol.sendMessage(wt)})),this.adVideoTrackingEvents_.set("timeupdate",(function(){t.simidProtocol.sendMessage(St,{currentTime:t.adVideoElement_.currentTime}),t.compareAdAndRequestedDurations_()})),this.adVideoTrackingEvents_.set("volumechange",(function(){t.simidProtocol.sendMessage(Pt,{volume:t.adVideoElement_.volume})}));var e,n=$(this.adVideoTrackingEvents_);try{for(n.s();!(e=n.n()).done;){var r=X(e.value,2),i=r[0],a=r[1];this.adVideoElement_.addEventListener(i,a,!0)}}catch(t){n.e(t)}finally{n.f()}}},{key:"trackEventsOnContentVideoElement_",value:function(){var t=this;this.contentVideoTrackingEvents_.set("timeupdate",(function(){null!==t.nonLinearStartTime_&&t.contentVideoElement_.currentTime-t.nonLinearStartTime_>t.requestedDuration_&&t.stopAd(jt.NON_LINEAR_DURATION_COMPLETE)}));var e,n=$(this.contentVideoTrackingEvents_);try{for(n.s();!(e=n.n()).done;){var r=X(e.value,2),i=r[0],a=r[1];this.contentVideoElement_.addEventListener(i,a,!0)}}catch(t){n.e(t)}finally{n.f()}}},{key:"stopAd",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jt.PLAYER_INITATED,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;this.simidIframe_&&(this.hideSimidIFrame_(),this._debugRawConsoleLogs," SIMID: stopAd ".concat(e),this.simidProtocol.sendMessage(Ut).then((function(){return t.destroyIframeAndResumeContent_(n,r)})))}},{key:"skipAd",value:function(){var t=this;this.hideSimidIFrame_(),this.simidProtocol.sendMessage(Lt).then((function(){return t.destroyIframeAndResumeContent_()}))}},{key:"destroyIframeAndResumeContent_",value:function(t,e){this.destroySimidIframe_(),t?this.rmpVast_.rmpVastUtils.processVastErrors(e,!0):this.rmpVast_.rmpVastAdPlayer&&this.rmpVast_.rmpVastAdPlayer.resumeContent()}},{key:"onRequestFullScreen",value:function(t){var e=this,n=null;this.simidIframe_.requestFullscreen?n=this.simidIframe_.requestFullscreen():this.simidIframe_.mozRequestFullScreen?n=this.simidIframe_.mozRequestFullScreen():this.simidIframe_.webkitRequestFullscreen?n=this.simidIframe_.webkitRequestFullscreen():this.simidIframe_.msRequestFullscreen&&(n=this.simidIframe_.msRequestFullscreen()),n?n.then((function(){return e.simidProtocol.resolve(t)})):this.simidProtocol.resolve(t)}},{key:"onRequestPlay",value:function(t){var e=this;if(this.isLinearAd_)this.adVideoElement_.play().then((function(){return e.simidProtocol.resolve(t)})).catch((function(){var n={errorCode:Bt,message:"The SIMID media could not be loaded."};e.simidProtocol.reject(t,n)}));else{var n={errorCode:Dt,message:"Non linear ads do not play video."};this.simidProtocol.reject(t,n)}}},{key:"onRequestPause",value:function(t){this.adVideoElement_.pause(),this.simidProtocol.resolve(t)}},{key:"pauseAd",value:function(){this.adVideoElement_.pause()}},{key:"onCreativeFatalError",value:function(t){this.simidProtocol.resolve(t),this.stopAd(jt.CREATIVE_INITIATED,!0,1100)}},{key:"onRequestSkip",value:function(t){this.simidProtocol.resolve(t),this.skipAd()}},{key:"onRequestStop",value:function(t){this.simidProtocol.resolve(t),this.stopAd(jt.CREATIVE_INITIATED)}},{key:"onReportTracking",value:function(t){var e=this,n=t.args.trackingUrls;n.forEach((function(t){e.rmpVast_.rmpVastTracking.pingURI(t)})),this._debugRawConsoleLogs,"SIMID: The creative has asked for the player to ping ".concat(n)}},{key:"videoComplete",value:function(){var t=this;if(this.simidProtocol.sendMessage(Et),0===this.requestedDuration_)this.stopAd(jt.MEDIA_PLAYBACK_COMPLETE);else if(-2!==this.requestedDuration_){var e=1e3*(this.requestedDuration_-this.adVideoElement_.duration);setTimeout((function(){t.stopAd(jt.CREATIVE_INITIATED)}),e)}}},{key:"onRequestChangeAdDuration",value:function(t){var e=t.args.duration;if(-2!==e&&e<0){var n={errorCode:Mt,message:"A negative duration is not valid."};this.simidProtocol.reject(t,n)}else this.requestedDuration_=e,this.compareAdAndRequestedDurations_(),this.simidProtocol.resolve(t)}},{key:"compareAdAndRequestedDurations_",value:function(){0!==this.requestedDuration_&&-2!==this.requestedDuration_&&this.adVideoElement_.currentTime>=this.requestedDuration_&&this.stopAd(jt.CREATIVE_INITATED)}},{key:"onGetMediaState",value:function(t){var e={currentSrc:this.adVideoElement_.currentSrc,currentTime:this.adVideoElement_.currentTime,duration:this.adVideoElement_.duration,ended:this.adVideoElement_.ended,muted:this.adVideoElement_.muted,paused:this.adVideoElement_.paused,volume:this.adVideoElement_.volume,fullscreen:this.adVideoElement_.fullscreen};this.simidProtocol.resolve(t,e)}},{key:"onReceiveCreativeLog",value:function(t){var e=t.args.message;this._debugRawConsoleLogs,"SIMID: Received message from creative: ".concat(e)}},{key:"sendLog",value:function(t){var e={message:t};this.simidProtocol.sendMessage(xt,e)}}])}(),Ht=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._adContainer=e.adContainer,this._adPlayer=e.currentAdPlayer,this._params=e.params,this._adParametersData=e.adParametersData,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this._initialWidth=640,this._initialHeight=360,this._initialViewMode="normal",this._desiredBitrate=500,this._vpaidCreativeUrl="",this._vpaidCreative=null,this._vpaidScript=null,this._vpaidIframe=null,this._vpaidAdLoaded=!1,this._initAdTimeout=null,this._vpaidCallbacks={},this._startAdTimeout=null,this._vpaidAdStarted=!1,this._vpaidVersion=-1,this._vpaid1AdDuration=-1,this._adStoppedTimeout=null,this._adSkippedTimeout=null,this._vpaidAdRemainingTimeInterval=null,this._vpaidRemainingTime=-1,this._vpaidCurrentVolume=1,this._vpaidPaused=!0,this._vpaidLoadTimeout=null,this._vpaidAvailableInterval=null,this._vpaidSlot=null}),[{key:"_onAdLoaded",value:function(){var t=this;this._vpaidAdLoaded=!0,this._vpaidCreative&&(L.clearTimeout(this._initAdTimeout),this._vpaidCallbacks.AdLoaded&&this._vpaidCreative.unsubscribe(this._vpaidCallbacks.AdLoaded,"AdLoaded"),this._startAdTimeout=setTimeout((function(){!t._vpaidAdStarted&&t._rmpVast.rmpVastAdPlayer&&t._rmpVast.rmpVastAdPlayer.resumeContent(),t._vpaidAdStarted=!1}),this._params.creativeLoadTimeout),this._rmpVast.__adOnStage=!0,this._vpaidCreative.startAd(),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adloaded"))}},{key:"_onAdStarted",value:function(){if(this._vpaidAdStarted=!0,this._vpaidCreative){if(L.clearTimeout(this._startAdTimeout),this._vpaidCallbacks.AdStarted&&this._vpaidCreative.unsubscribe(this._vpaidCallbacks.AdStarted,"AdStarted"),1===this._vpaidVersion&&(this._vpaid1AdDuration=this._vpaidCreative.getAdRemainingTime()),!this._vpaidCreative.getAdIcons()&&this._rmpVast.rmpVastIcons)this._rmpVast.rmpVastIcons.iconsData.length>0&&this._rmpVast.rmpVastIcons.append();"function"==typeof this._vpaidCreative.getAdLinear&&(this._rmpVast.creative.isLinear=this._vpaidCreative.getAdLinear()),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adcreativeview")}}},{key:"_onAdStopped",value:function(){this._debugRawConsoleLogs,L.clearTimeout(this._adStoppedTimeout),this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.resumeContent()}},{key:"_onAdSkipped",value:function(){L.clearTimeout(this._adSkippedTimeout),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adskipped")}},{key:"_onAdSkippableStateChange",value:function(){this._rmpVast.rmpVastUtils.createApiEvent("adskippablestatechanged")}},{key:"_onAdDurationChange",value:function(){var t=this;if(this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdRemainingTime){var e=this._vpaidCreative.getAdRemainingTime();e>=0&&(this._vpaidRemainingTime=e),L.clearInterval(this._vpaidAdRemainingTimeInterval),this._vpaidAdRemainingTimeInterval=setInterval((function(){var e=t._vpaidCreative.getAdRemainingTime();e>=0&&(t._vpaidRemainingTime=e)}),200),this._rmpVast.rmpVastUtils.createApiEvent("addurationchange")}}},{key:"_onAdVolumeChange",value:function(){var t=-1;this._vpaidCreative&&(t=this._vpaidCreative.getAdVolume()),"number"==typeof t&&t>=0&&(this._vpaidCurrentVolume>0&&0===t?this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("advolumemuted"):0===this._vpaidCurrentVolume&&t>0&&this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("advolumeunmuted"),this._vpaidCurrentVolume=t,this._rmpVast.rmpVastUtils.createApiEvent("advolumechanged"))}},{key:"_onAdImpression",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adimpression")}},{key:"_onAdVideoStart",value:function(){this._vpaidPaused=!1;var t=-1;this._vpaidCreative&&(t=this._vpaidCreative.getAdVolume()),"number"==typeof t&&t>=0&&(this._vpaidCurrentVolume=t,this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adstarted"))}},{key:"_onAdVideoFirstQuartile",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adfirstquartile")}},{key:"_onAdVideoMidpoint",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("admidpoint")}},{key:"_onAdVideoThirdQuartile",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adthirdquartile")}},{key:"_onAdVideoComplete",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adcomplete")}},{key:"_onAdClickThru",value:function(t,e,n){var r;(this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adclick"),"boolean"==typeof n)&&(n&&(t?r=t:this._rmpVast.creative.clickThroughUrl&&(r=this._rmpVast.creative.clickThroughUrl),r&&(this._rmpVast.creative.clickThroughUrl=r,L.openWindow(this._rmpVast.creative.clickThroughUrl))))}},{key:"_onAdPaused",value:function(){this._vpaidPaused=!0,this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adpaused")}},{key:"_onAdPlaying",value:function(){this._vpaidPaused=!1,this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adresumed")}},{key:"_onAdLog",value:function(t){this._debugRawConsoleLogs,"VPAID AdLog event ".concat(t)}},{key:"_onAdError",value:function(t){this._debugRawConsoleLogs,"VPAID AdError event ".concat(t),this._rmpVast.rmpVastUtils.processVastErrors(901,!0)}},{key:"_onAdInteraction",value:function(){this._rmpVast.rmpVastUtils.createApiEvent("adinteraction")}},{key:"_onAdUserAcceptInvitation",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("aduseracceptinvitation")}},{key:"_onAdUserMinimize",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adcollapse")}},{key:"_onAdUserClose",value:function(){this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adclosed")}},{key:"_onAdSizeChange",value:function(){this._rmpVast.rmpVastUtils.createApiEvent("adsizechange")}},{key:"_onAdLinearChange",value:function(){this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdLinear&&(this._rmpVast.creative.isLinear=this._vpaidCreative.getAdLinear(),this._rmpVast.rmpVastUtils.createApiEvent("adlinearchange"))}},{key:"_onAdExpandedChange",value:function(){this._rmpVast.rmpVastUtils.createApiEvent("adexpandedchange")}},{key:"_onAdRemainingTimeChange",value:function(){if(this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdRemainingTime){var t=this._vpaidCreative.getAdRemainingTime();t>=0&&(this._vpaidRemainingTime=t),this._rmpVast.rmpVastUtils.createApiEvent("adremainingtimechange")}}},{key:"_setCallbacksForCreative",value:function(){var t=this;this._vpaidCreative&&(this._vpaidCallbacks={AdLoaded:this._onAdLoaded.bind(this),AdStarted:this._onAdStarted.bind(this),AdStopped:this._onAdStopped.bind(this),AdSkipped:this._onAdSkipped.bind(this),AdSkippableStateChange:this._onAdSkippableStateChange.bind(this),AdDurationChange:this._onAdDurationChange.bind(this),AdVolumeChange:this._onAdVolumeChange.bind(this),AdImpression:this._onAdImpression.bind(this),AdVideoStart:this._onAdVideoStart.bind(this),AdVideoFirstQuartile:this._onAdVideoFirstQuartile.bind(this),AdVideoMidpoint:this._onAdVideoMidpoint.bind(this),AdVideoThirdQuartile:this._onAdVideoThirdQuartile.bind(this),AdVideoComplete:this._onAdVideoComplete.bind(this),AdClickThru:this._onAdClickThru.bind(this),AdPaused:this._onAdPaused.bind(this),AdPlaying:this._onAdPlaying.bind(this),AdLog:this._onAdLog.bind(this),AdError:this._onAdError.bind(this),AdInteraction:this._onAdInteraction.bind(this),AdUserAcceptInvitation:this._onAdUserAcceptInvitation.bind(this),AdUserMinimize:this._onAdUserMinimize.bind(this),AdUserClose:this._onAdUserClose.bind(this),AdSizeChange:this._onAdSizeChange.bind(this),AdLinearChange:this._onAdLinearChange.bind(this),AdExpandedChange:this._onAdExpandedChange.bind(this),AdRemainingTimeChange:this._onAdRemainingTimeChange.bind(this)},C()(this._vpaidCallbacks).forEach((function(e){t._vpaidCreative.subscribe(t._vpaidCallbacks[e],e)})))}},{key:"_unsetCallbacksForCreative",value:function(){var t=this;this._vpaidCreative&&C()(this._vpaidCallbacks).forEach((function(e){t._vpaidCreative.unsubscribe(t._vpaidCallbacks[e],e)}))}},{key:"_isValidVPAID",value:function(t){return"function"==typeof t.initAd&&"function"==typeof t.startAd&&"function"==typeof t.stopAd&&"function"==typeof t.skipAd&&"function"==typeof t.resizeAd&&"function"==typeof t.pauseAd&&"function"==typeof t.resumeAd&&"function"==typeof t.expandAd&&"function"==typeof t.collapseAd&&"function"==typeof t.subscribe&&"function"==typeof t.unsubscribe}},{key:"_onVPAIDAvailable",value:function(){var t=this;if(L.clearInterval(this._vpaidAvailableInterval),L.clearTimeout(this._vpaidLoadTimeout),this._vpaidCreative=this._vpaidIframe.contentWindow.getVPAIDAd(),this._vpaidCreative&&"function"==typeof this._vpaidCreative.handshakeVersion){var e;try{e=this._vpaidCreative.handshakeVersion("2.0")}catch(t){return console.warn(t),this._debugRawConsoleLogs,void this._rmpVast.rmpVastUtils.processVastErrors(901,!0)}if(this._vpaidVersion=N()(e),this._vpaidVersion<1)return this._debugRawConsoleLogs,void this._rmpVast.rmpVastUtils.processVastErrors(901,!0);if(!this._isValidVPAID(this._vpaidCreative))return this._debugRawConsoleLogs,void this._rmpVast.rmpVastUtils.processVastErrors(901,!0);this._setCallbacksForCreative(),this._rmpVast.rmpVastTracking.wire();var n={};n.AdParameters=this._adParametersData,this._debugRawConsoleLogs,this._adParametersData,L.show(this._adContainer),L.show(this._adPlayer);var r={};this._vpaidSlot=document.createElement("div"),this._vpaidSlot.className="rmp-vpaid-container",this._adContainer.appendChild(this._vpaidSlot),r.slot=this._vpaidSlot,r.videoSlot=this._adPlayer,r.videoSlotCanAutoPlay=!0,this._initAdTimeout=setTimeout((function(){t._vpaidAdLoaded||(t._debugRawConsoleLogs,t._rmpVast.rmpVastAdPlayer&&t._rmpVast.rmpVastAdPlayer.resumeContent()),t._vpaidAdLoaded=!1}),10*this._params.creativeLoadTimeout),this._debugRawConsoleLogs,this._vpaidCreative.initAd(this._initialWidth,this._initialHeight,this._initialViewMode,this._desiredBitrate,n,r)}}},{key:"_onJSVPAIDLoaded",value:function(){var t=this;this._debugRawConsoleLogs;var e=this._vpaidIframe.contentWindow;"function"==typeof e.getVPAIDAd?this._onVPAIDAvailable():this._vpaidAvailableInterval=setInterval((function(){"function"==typeof e.getVPAIDAd&&t._onVPAIDAvailable()}),100),this._vpaidScript.onload=null,this._vpaidScript.onerror=null}},{key:"_onJSVPAIDError",value:function(){this._debugRawConsoleLogs,this._rmpVast.rmpVastUtils.processVastErrors(901,!0),this._vpaidScript.onload=null,this._vpaidScript.onerror=null}},{key:"getAdWidth",value:function(){return this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdWidth?this._vpaidCreative.getAdWidth():-1}},{key:"getAdHeight",value:function(){return this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdHeight?this._vpaidCreative.getAdHeight():-1}},{key:"getAdDuration",value:function(){if(this._vpaidCreative){if("function"==typeof this._vpaidCreative.getAdDuration)return this._vpaidCreative.getAdDuration();if(this._vpaid1AdDuration>-1)return this._vpaid1AdDuration}return-1}},{key:"getAdRemainingTime",value:function(){return this._vpaidRemainingTime>=0?this._vpaidRemainingTime:-1}},{key:"getCreativeUrl",value:function(){return this._vpaidCreativeUrl?this._vpaidCreativeUrl:""}},{key:"getAdVolume",value:function(){return this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdVolume?this._vpaidCreative.getAdVolume():-1}},{key:"getAdPaused",value:function(){return this._vpaidPaused}},{key:"getAdExpanded",value:function(){return!(!this._vpaidCreative||"function"!=typeof this._vpaidCreative.getAdExpanded)&&this._vpaidCreative.getAdExpanded()}},{key:"getAdSkippableState",value:function(){return!(!this._vpaidCreative||"function"!=typeof this._vpaidCreative.getAdSkippableState)&&this._vpaidCreative.getAdSkippableState()}},{key:"getAdCompanions",value:function(){return this._vpaidCreative&&"function"==typeof this._vpaidCreative.getAdCompanions?this._vpaidCreative.getAdCompanions():""}},{key:"resizeAd",value:function(t,e,n){var r,i;if(this._vpaidCreative&&L.isNumber(t)&&L.isNumber(e)&&"string"==typeof n&&!(t<=0||e<=0)){var a="normal";"fullscreen"===n&&(a=n),this._debugRawConsoleLogs,B()(r=B()(i="VPAID resizeAd with width ".concat(t,", height ")).call(i,e,", viewMode ")).call(r,n),this._vpaidCreative.resizeAd(t,e,a)}}},{key:"stopAd",value:function(){var t=this;this._vpaidCreative&&(this._debugRawConsoleLogs,this._adStoppedTimeout=setTimeout((function(){t._onAdStopped()}),this._params.creativeLoadTimeout),this._vpaidCreative.stopAd())}},{key:"pauseAd",value:function(){this._debugRawConsoleLogs,this._vpaidCreative&&!this._vpaidPaused&&this._vpaidCreative.pauseAd()}},{key:"resumeAd",value:function(){this._debugRawConsoleLogs,this._vpaidCreative&&this._vpaidPaused&&this._vpaidCreative.resumeAd()}},{key:"expandAd",value:function(){this._vpaidCreative&&this._vpaidCreative.expandAd()}},{key:"collapseAd",value:function(){this._vpaidCreative&&this._vpaidCreative.collapseAd()}},{key:"skipAd",value:function(){var t=this;this._vpaidCreative&&(this._adSkippedTimeout=setTimeout((function(){t._onAdStopped()}),this._params.creativeLoadTimeout),this._vpaidCreative.skipAd())}},{key:"setAdVolume",value:function(t){this._vpaidCreative&&L.isNumber(t)&&t>=0&&t<=1&&"function"==typeof this._vpaidCreative.setAdVolume&&this._vpaidCreative.setAdVolume(t)}},{key:"init",value:function(t,e){var n=this;if(this._initialWidth=e.width,this._initialHeight=e.height,this._initialViewMode=e.viewMode,this._desiredBitrate=e.desiredBitrate,this._vpaidCreativeUrl=t,!this._adPlayer){var r=null;if(this._adContainer&&(r=this._adContainer.querySelector(".rmp-ad-vast-video-player")),null===r)return void this._rmpVast.rmpVastUtils.processVastErrors(900,!0);this._adPlayer=r}this._rmpVast.rmpVastContentPlayer.pause(),this._vpaidIframe=document.createElement("iframe"),this._vpaidIframe.sandbox="allow-scripts allow-same-origin",this._vpaidIframe.id="vpaid-frame",L.setStyle(this._vpaidIframe,{visibility:"hidden",width:"0px",height:"0px",border:"none"});this._vpaidIframe.onload=function(){if(n._debugRawConsoleLogs,n._vpaidIframe.contentWindow&&n._vpaidIframe.contentWindow.document&&n._vpaidIframe.contentWindow.document.body){var t=n._vpaidIframe.contentWindow.document,e=t.body;n._vpaidScript=t.createElement("script"),n._vpaidLoadTimeout=setTimeout((function(){n._debugRawConsoleLogs,n._vpaidScript.onload=null,n._vpaidScript.onerror=null,n._rmpVast.rmpVastAdPlayer&&n._rmpVast.rmpVastAdPlayer.resumeContent()}),n._params.creativeLoadTimeout),n._vpaidScript.onload=n._onJSVPAIDLoaded.bind(n),n._vpaidScript.onerror=n._onJSVPAIDError.bind(n),e.appendChild(n._vpaidScript),n._vpaidScript.src=n._vpaidCreativeUrl}else n._rmpVast.rmpVastUtils.processVastErrors(901,!0)},this._vpaidIframe.src="about:blank",this._adContainer.appendChild(this._vpaidIframe)}},{key:"destroy",value:function(){this._debugRawConsoleLogs,L.clearInterval(this._vpaidAvailableInterval),L.clearInterval(this._vpaidAdRemainingTimeInterval),L.clearTimeout(this._vpaidLoadTimeout),L.clearTimeout(this._initAdTimeout),L.clearTimeout(this._startAdTimeout),this._unsetCallbacksForCreative(),this._vpaidScript&&(this._vpaidScript.onload=null,this._vpaidScript.onerror=null),this._vpaidSlot&&L.removeElement(this._vpaidSlot),this._vpaidIframe&&L.removeElement(this._vpaidIframe)}}])}(),zt=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._params=e.params,this._adContainer=e.adContainer,this._adPlayer=e.currentAdPlayer,this._contentPlayer=e.currentContentPlayer,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this._firstAdPlayerPlayRequest=!0,this._interactionMobileUI=null,this._skipWaitingUI=null,this._skipMessageUI=null,this._skipIconUI=null,this._skipButtonUI=null,this._skippableAdCanBeSkipped=!1,this._onSkipInteractionFn=null,this._onTimeupdateCheckSkipFn=null,this._onDurationChangeFn=null,this._onLoadedmetadataPlayFn=null,this._onContextMenuFn=null,this._onPlaybackErrorFn=null,this._onInteractionOpenClickThroughUrlFn=null,this._creativeLoadTimeoutCallback=null,this._hlsJS=[],this._hlsJSIndex=0,this._readingHlsJS=!1}),[{key:"hlsJSInstances",get:function(){return this._hlsJS}},{key:"hlsJSIndex",get:function(){return this._hlsJSIndex},set:function(t){this._hlsJSIndex=t}},{key:"readingHlsJS",get:function(){return this._readingHlsJS},set:function(t){this._readingHlsJS=t}},{key:"skippableAdCanBeSkipped",get:function(){return this._skippableAdCanBeSkipped}},{key:"_onDurationChange",value:function(){var t,e=this,n=-1;(this._rmpVast.rmpVastAdPlayer&&(n=this._rmpVast.rmpVastAdPlayer.duration),this._rmpVast.rmpVastUtils.createApiEvent("addurationchange"),-1!==n)&&(C()(this._rmpVast.creative.trackingEvents).forEach((function(t){if(/progress-/i.test(t)){var r=t.split("-")[1];if(/%/i.test(r)){var i=rt()(r).call(r,0,-1);i=n*R()(i)/100,e._rmpVast.creative.trackingEvents[t].forEach((function(t){e._rmpVast.progressEvents.push({time:i,url:t})}))}else{e._rmpVast.creative.trackingEvents[t].forEach((function(t){e._rmpVast.progressEvents.push({time:1e3*R()(r),url:t})}))}}})),this._rmpVast.progressEvents.length>0&&st()(t=this._rmpVast.progressEvents).call(t,(function(t,e){return t.time-e.time})))}},{key:"_onLoadedmetadataPlay",value:function(){L.clearTimeout(this._creativeLoadTimeoutCallback),this._adPlayer&&(this._adPlayer.volume!==this._contentPlayer.volume&&(this._adPlayer.volume=this._contentPlayer.volume),this._contentPlayer.muted?this._adPlayer.muted=!0:this._adPlayer.muted=!1),L.show(this._adContainer),L.show(this._adPlayer),this._rmpVast.__adOnStage=!0,this._rmpVast.rmpVastAdPlayer&&(this._rmpVast.rmpVastAdPlayer.play(this._firstAdPlayerPlayRequest),this._firstAdPlayerPlayRequest=!1),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adloaded")}},{key:"_onInteractionOpenClickThroughUrl",value:function(t){t&&t.stopPropagation(),O.isMobile||L.openWindow(this._rmpVast.creative.clickThroughUrl),this._rmpVast.pause(),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adclick")}},{key:"_onPlaybackError",value:function(t){if(t&&t.target){var e=t.target;if(e.error&&L.isNumber(e.error.code)){var n,r=e.error.code,i="";"string"==typeof e.error.message&&(i=e.error.message);var a=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];console.error(B()(n="Error on video element with code ".concat(r.toString()," and message ")).call(n,i)),this._debugRawConsoleLogs,"error type is ".concat(a[r]?a[r]:"unknown type"),4===r&&this._rmpVast.rmpVastUtils.processVastErrors(401,!0)}}}},{key:"_updateWaitingForCanBeSkippedUI",value:function(t){Math.round(t)>0&&(this._skipWaitingUI.textContent=this._params.labels.skipMessage+" "+Math.round(t)+"s")}},{key:"_onTimeupdateCheckSkip",value:function(){"none"===this._skipButtonUI.style.display&&L.setStyle(this._skipButtonUI,{display:"block"});var t=this._adPlayer.currentTime;L.isNumber(t)&&t>0&&(t>=this._rmpVast.creative.skipoffset?(this._adPlayer.removeEventListener("timeupdate",this._onTimeupdateCheckSkipFn),L.setStyle(this._skipWaitingUI,{display:"none"}),L.setStyle(this._skipMessageUI,{display:"block"}),L.setStyle(this._skipIconUI,{display:"block"}),this._skippableAdCanBeSkipped=!0,this._rmpVast.rmpVastUtils.createApiEvent("adskippablestatechanged")):this._rmpVast.creative.skipoffset-t>0&&this._updateWaitingForCanBeSkippedUI(this._rmpVast.creative.skipoffset-t))}},{key:"_onSkipInteraction",value:function(t){t&&(t.stopPropagation(),"touchend"===t.type&&t.preventDefault()),this._skippableAdCanBeSkipped&&(this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adskipped"),this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.resumeContent())}},{key:"_appendSkipUI",value:function(){var t=this._params.labels.skipMessage;this._skipButtonUI=document.createElement("div"),this._skipButtonUI.className="rmp-ad-container-skip",L.setStyle(this._skipButtonUI,{display:"none"}),L.makeButtonAccessible(this._skipButtonUI,t),this._skipWaitingUI=document.createElement("div"),this._skipWaitingUI.className="rmp-ad-container-skip-waiting",this._updateWaitingForCanBeSkippedUI(this._rmpVast.creative.skipoffset),L.setStyle(this._skipWaitingUI,{display:"block"}),this._skipMessageUI=document.createElement("div"),this._skipMessageUI.className="rmp-ad-container-skip-message",this._skipMessageUI.textContent=t,L.setStyle(this._skipMessageUI,{display:"none"}),this._skipIconUI=document.createElement("div"),this._skipIconUI.className="rmp-ad-container-skip-icon",L.setStyle(this._skipIconUI,{display:"none"}),this._onSkipInteractionFn=this._onSkipInteraction.bind(this),L.addEvents(["click","touchend"],this._skipButtonUI,this._onSkipInteractionFn),this._skipButtonUI.appendChild(this._skipWaitingUI),this._skipButtonUI.appendChild(this._skipMessageUI),this._skipButtonUI.appendChild(this._skipIconUI),this._adContainer.appendChild(this._skipButtonUI),this._onTimeupdateCheckSkipFn=this._onTimeupdateCheckSkip.bind(this),this._adPlayer.addEventListener("timeupdate",this._onTimeupdateCheckSkipFn)}},{key:"_onHlsJSError",value:function(t,e){if(e.fatal)switch(e.type){case Hls.ErrorTypes.NETWORK_ERROR:this._hlsJS[this._hlsJSIndex].startLoad();break;case Hls.ErrorTypes.MEDIA_ERROR:this._hlsJS[this._hlsJSIndex].recoverMediaError();break;default:this._rmpVast.rmpVastUtils.processVastErrors(900,!0)}}},{key:"destroy",value:function(){this._interactionMobileUI&&(this._interactionMobileUI.removeEventListener("touchend",this._onInteractionOpenClickThroughUrlFn),L.removeElement(this._interactionMobileUI)),L.clearTimeout(this._creativeLoadTimeoutCallback),L.removeElement(this._skipButtonUI),L.removeEvents(["click","touchend"],this._skipButtonUI,this._onSkipInteractionFn),this._adPlayer&&(this._adPlayer.removeEventListener("click",this._onInteractionOpenClickThroughUrlFn),this._adPlayer.removeEventListener("timeupdate",this._onTimeupdateCheckSkipFn),this._adPlayer.removeEventListener("durationchange",this._onDurationChangeFn),this._adPlayer.removeEventListener("loadedmetadata",this._onLoadedmetadataPlayFn),this._adPlayer.removeEventListener("contextmenu",this._onContextMenuFn),this._adPlayer.removeEventListener("error",this._onPlaybackErrorFn)),this._contentPlayer.removeEventListener("error",this._onPlaybackErrorFn)}},{key:"update",value:function(t,e){var n,r=this;if(this._debugRawConsoleLogs,B()(n="update ad player for linear creative of type ".concat(e," located at ")).call(n,t),this._onDurationChangeFn=this._onDurationChange.bind(this),this._adPlayer.addEventListener("durationchange",this._onDurationChangeFn,{once:!0}),this._onLoadedmetadataPlayFn=this._onLoadedmetadataPlay.bind(this),this._adPlayer.addEventListener("loadedmetadata",this._onLoadedmetadataPlayFn,{once:!0}),this._onContextMenuFn=L.stopPreventEvent,this._adPlayer.addEventListener("contextmenu",this._onContextMenuFn),this._onPlaybackErrorFn=this._onPlaybackError.bind(this),this._creativeLoadTimeoutCallback=setTimeout((function(){r._rmpVast.rmpVastUtils.processVastErrors(402,!0)}),this._params.creativeLoadTimeout),this._params.useHlsJS&&"application/vnd.apple.mpegurl"===e&&void 0!==window.Hls&&Hls.isSupported()){this._readingHlsJS=!0;var i={debug:this._params.debugHlsJS,capLevelToPlayerSize:!0,testBandwidth:!0,startLevel:-1,lowLatencyMode:!1};this._hlsJS[this._hlsJSIndex]=new Hls(i),this._hlsJS[this._hlsJSIndex].on(Hls.Events.ERROR,this._onHlsJSError.bind(this)),this._hlsJS[this._hlsJSIndex].loadSource(t),this._hlsJS[this._hlsJSIndex].attachMedia(this._adPlayer)}else void 0===this._rmpVast.creative.simid||this._rmpVast.creative.simid&&!this._params.enableSimid?(this._adPlayer.addEventListener("error",this._onPlaybackErrorFn),this._adPlayer.src=t,this._adPlayer.load()):(this._rmpVast.rmpVastSimidPlayer&&this._rmpVast.rmpVastSimidPlayer.stopAd(),this._rmpVast.rmpVastSimidPlayer=new Wt(t,this._rmpVast),this._rmpVast.rmpVastSimidPlayer.initializeAd(),this._rmpVast.rmpVastSimidPlayer.playAd());this._onInteractionOpenClickThroughUrlFn=this._onInteractionOpenClickThroughUrl.bind(this),this._rmpVast.creative.clickThroughUrl&&(O.isMobile?(this._interactionMobileUI=document.createElement("a"),this._interactionMobileUI.className="rmp-ad-click-ui-mobile",this._interactionMobileUI.textContent=this._params.labels.textForInteractionUIOnMobile,this._interactionMobileUI.addEventListener("touchend",this._onInteractionOpenClickThroughUrlFn),this._interactionMobileUI.href=this._rmpVast.creative.clickThroughUrl,this._interactionMobileUI.target="_blank",this._adContainer.appendChild(this._interactionMobileUI)):this._adPlayer.addEventListener("click",this._onInteractionOpenClickThroughUrlFn)),this._rmpVast.creative.isSkippableAd&&this._appendSkipUI()}},{key:"parse",value:function(t){var e=t.icons,n=t.adParameters,r=t.mediaFiles;if(0!==r.length){e.length>0&&(this._rmpVast.rmpVastIcons=new ot(this._rmpVast),this._rmpVast.rmpVastIcons.parse(e)),this._rmpVast.adParametersData="",n&&n.value&&(this._rmpVast.adParametersData=n.value);for(var i=[],a=!1,s=0;s0);y++);if(0===m.length){var _=function(t,e,n){return n.codec===t&&n.type===e};d.forEach((function(t){t.codec&&t.type&&O.checkCanPlayType(t.type,t.codec)&&(m=q()(d).call(d,_.bind(null,t.codec,t.type)))}))}if(0===m.length){var E=function(t,e){return e.type===t};d.forEach((function(t){t.type&&O.checkCanPlayType(t.type)&&(m=q()(d).call(d,E.bind(null,t.type)))}))}if(0!==m.length){var b;st()(m).call(m,(function(t,e){return t.width-e.width})),this._debugRawConsoleLogs;var k=[],C=[];if(m.length>1){var T=L.getWidth(this._rmpVast.container)*O.devicePixelRatio,V=L.getHeight(this._rmpVast.container)*O.devicePixelRatio;T>0&&V>0&&(k=q()(m).call(m,(function(t){return T>=t.width&&V>=t.height}))),this._debugRawConsoleLogs,0===k.length&&(k=[m[0]]);var w=(new ct).bandwidthData.estimate;this._debugRawConsoleLogs,"availableBandwidth is ".concat(w," Mbps"),w>-1&&k.length>1&&(st()(k).call(k,(function(t,e){return t.bitrate-e.bitrate})),w=Math.round(1e3*w),C=q()(k).call(k,(function(t){return w>=t.bitrate})),this._debugRawConsoleLogs,b=C[C.length-1])}b||(k.length>0?b=k[k.length-1]:(st()(m).call(m,(function(t,e){return t.bitrate-e.bitrate})),b=m[m.length-1])),this._debugRawConsoleLogs,this._rmpVast.creative.mediaUrl=b.url,this._rmpVast.creative.height=b.height,this._rmpVast.creative.width=b.width,this._rmpVast.creative.type=b.type,this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.append(b.url,b.type)}else this._rmpVast.rmpVastUtils.processVastErrors(403,!0)}}}}])}(),Gt=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._params=e.params,this._adContainer=e.adContainer,this._container=e.container,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this._nonLinearMinSuggestedDuration=0,this._firstContentPlayerPlayRequest=!0,this._nonLinearCloseElement=null,this._nonLinearAElement=null,this._nonLinearInnerElement=null,this._nonLinearContainerElement=null,this._onNonLinearLoadSuccessFn=null,this._onNonLinearLoadErrorFn=null,this._onNonLinearClickThroughFn=null,this._onClickCloseNonLinearFn=null}),[{key:"nonLinearContainerElement",get:function(){return this._nonLinearContainerElement}},{key:"_onNonLinearLoadError",value:function(){this._rmpVast.rmpVastUtils.processVastErrors(502,!0)}},{key:"_onNonLinearLoadSuccess",value:function(){this._debugRawConsoleLogs,"success loading non-linear creative at ".concat(this._rmpVast.creative.mediaUrl),this._rmpVast.__adOnStage=!0,this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent(["adloaded","adimpression","adstarted","adcreativeview"])}},{key:"_onNonLinearClickThrough",value:function(t){try{t&&t.stopPropagation(),this._rmpVast.pause(),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adclick")}catch(t){console.warn(t)}}},{key:"_onClickCloseNonLinear",value:function(t){t&&(t.stopPropagation(),"touchend"===t.type&&t.preventDefault()),L.setStyle(this._nonLinearContainerElement,{display:"none"}),this._rmpVast.rmpVastTracking.dispatchTrackingAndApiEvent("adclosed")}},{key:"_appendCloseButton",value:function(){var t=this;this._nonLinearCloseElement=document.createElement("div"),this._nonLinearCloseElement.className="rmp-ad-non-linear-close",L.makeButtonAccessible(this._nonLinearCloseElement,this._params.labels.closeAd),this._nonLinearMinSuggestedDuration>0?(L.setStyle(this._nonLinearCloseElement,{display:"none"}),setTimeout((function(){L.setStyle(t._nonLinearCloseElement,{display:"block"})}),1e3*this._nonLinearMinSuggestedDuration)):L.setStyle(this._nonLinearCloseElement,{display:"block"}),this._onClickCloseNonLinearFn=this._onClickCloseNonLinear.bind(this),L.addEvents(["touchend","click"],this._nonLinearCloseElement,this._onClickCloseNonLinearFn),this._nonLinearContainerElement.appendChild(this._nonLinearCloseElement)}},{key:"destroy",value:function(){this._nonLinearInnerElement&&(this._nonLinearInnerElement.removeEventListener("load",this._onNonLinearLoadSuccessFn),this._nonLinearInnerElement.removeEventListener("error",this._onNonLinearLoadErrorFn)),L.removeEvents(["touchend","click"],this._nonLinearAElement,this._onNonLinearClickThroughFn),L.removeEvents(["touchend","click"],this._nonLinearCloseElement,this._onClickCloseNonLinearFn)}},{key:"update",value:function(){this._nonLinearContainerElement=document.createElement("div"),this._nonLinearContainerElement.className="rmp-ad-non-linear-container",L.setStyle(this._nonLinearContainerElement,{width:this._rmpVast.creative.width.toString()+"px",height:this._rmpVast.creative.height.toString()+"px"}),this._nonLinearAElement=document.createElement("a"),this._nonLinearAElement.className="rmp-ad-non-linear-anchor",this._rmpVast.creative.clickThroughUrl&&(this._nonLinearAElement.href=this._rmpVast.creative.clickThroughUrl,this._nonLinearAElement.target="_blank",this._onNonLinearClickThroughFn=this._onNonLinearClickThrough.bind(this),L.addEvents(["touchend","click"],this._nonLinearAElement,this._onNonLinearClickThroughFn)),"image"===this._rmpVast.creative.nonLinearType?this._nonLinearInnerElement=document.createElement("img"):(this._nonLinearInnerElement=document.createElement("iframe"),this._nonLinearInnerElement.sandbox="allow-scripts allow-same-origin",L.setStyle(this._nonLinearInnerElement,{border:"none",overflow:"hidden"}),this._nonLinearInnerElement.setAttribute("allow","autoplay; fullscreen; picture-in-picture; encrypted-media"),this._nonLinearInnerElement.setAttribute("scrolling","no"),this._nonLinearInnerElement.setAttribute("sandbox","allow-scripts allow-presentation allow-same-origin")),this._nonLinearInnerElement.className="rmp-ad-non-linear-creative",this._onNonLinearLoadErrorFn=this._onNonLinearLoadError.bind(this),this._nonLinearInnerElement.addEventListener("error",this._onNonLinearLoadErrorFn),this._onNonLinearLoadSuccessFn=this._onNonLinearLoadSuccess.bind(this),this._nonLinearInnerElement.addEventListener("load",this._onNonLinearLoadSuccessFn),"html"===this._rmpVast.creative.nonLinearType?this._nonLinearInnerElement.srcdoc=this._rmpVast.creative.mediaUrl:this._nonLinearInnerElement.src=this._rmpVast.creative.mediaUrl,this._nonLinearAElement.appendChild(this._nonLinearInnerElement),this._nonLinearContainerElement.appendChild(this._nonLinearAElement),this._adContainer.appendChild(this._nonLinearContainerElement),this._appendCloseButton(),L.show(this._adContainer),this._rmpVast.rmpVastContentPlayer.play(this._firstContentPlayerPlayRequest),this._firstContentPlayerPlayRequest=!1}},{key:"parse",value:function(t){var e=this;this._debugRawConsoleLogs;for(var n,r=!1,i=0;iL.getWidth(this._container)||s>L.getHeight(this._container))r=!0;else{this._nonLinearMinSuggestedDuration=n.minSuggestedDuration;var o=n.staticResource,c=n.iframeResource,u=n.htmlResource;if(null!==o||null!==c||null!==u){o?(this._rmpVast.creative.mediaUrl=o,this._rmpVast.creative.nonLinearType="image"):c?(this._rmpVast.creative.mediaUrl=c,this._rmpVast.creative.nonLinearType="iframe"):u&&(this._rmpVast.creative.mediaUrl=u,this._rmpVast.creative.nonLinearType="html"),this._rmpVast.creative.width=a,this._rmpVast.creative.height=s,this._rmpVast.creative.type=n.type,this._debugRawConsoleLogs,this._rmpVast.creative;break}}}if(!this._rmpVast.creative.mediaUrl||r){var l=503;return r&&(l=501),void this._rmpVast.rmpVastUtils.processVastErrors(l,!0)}this._rmpVast.creative.clickThroughUrl=n.nonlinearClickThroughURLTemplate,n.nonlinearClickTrackingURLTemplates.length>0&&n.nonlinearClickTrackingURLTemplates.forEach((function(t){t.url&&e._rmpVast.trackingTags.push({event:"clickthrough",url:t.url})})),this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.append()}}])}(),Jt=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this.reset()}),[{key:"requiredAttribute",get:function(){return this._requiredAttribute}},{key:"_onImgClickThrough",value:function(t,e,n){var r=this;n&&(n.stopPropagation(),"touchend"===n.type&&n.preventDefault()),e&&e.forEach((function(t){t.url&&r._rmpVast.rmpVastTracking.pingURI(t.url)})),L.openWindow(t)}},{key:"reset",value:function(){this._requiredAttribute="",this._validCompanionAds=[],this._companionAdsList=[]}},{key:"parse",value:function(t){var e=this;this._validCompanionAds=[],this._requiredAttribute="",t.required&&(this._requiredAttribute=t.required);var n=t.variations;if(n.length>0)for(var r=function(){var t,r,a,s=n[i],o={width:s.width,height:s.height},c=S()(t=s.staticResources).call(t,(function(t){return!!t.url})),u=S()(r=s.iframeResources).call(r,(function(t){return!!t})),l=S()(a=s.htmlResources).call(a,(function(t){return!!t}));if(c&&c.url&&(o.imageUrl=c.url),u&&u.length>0&&(o.iframeUrl=u),l&&l.length>0&&(o.htmlContent=l),void 0===c&&void 0===u&&void 0===l)return 1;s.companionClickThroughURLTemplate&&(o.companionClickThroughUrl=s.companionClickThroughURLTemplate),s.companionClickTrackingURLTemplates.length>0&&(o.companionClickTrackingUrls=s.companionClickTrackingURLTemplates),s.altText&&(o.altText=s.altText),s.adSlotId&&(o.adSlotId=s.adSlotId),o.trackingEventsUrls=[],s.trackingEvents&&s.trackingEvents.creativeView&&s.trackingEvents.creativeView.forEach((function(t){o.trackingEventsUrls.push(t)})),e._validCompanionAds.push(o)},i=0;i0){var n,r;if("number"==typeof t&&t>0&&"number"==typeof e&&e>0)n=q()(r=this._validCompanionAds).call(r,(function(n){return t>=n.width&&e>=n.height}));else n=this._validCompanionAds;if(n.length>0)return this._companionAdsList=n,this._companionAdsList}return[]}},{key:"getItem",value:function(t){var e=this;if(void 0===this._companionAdsList[t])return null;var n,r=this._companionAdsList[t];if(r.imageUrl||r.iframeUrl?(r.imageUrl?n=document.createElement("img"):(n=document.createElement("iframe")).sandbox="allow-scripts allow-same-origin",r.altText&&(n.alt=r.altText),n.width=r.width,n.height=r.height,n.style.cursor="pointer"):r.htmlContent&&(n=r.htmlContent),r.imageUrl||r.iframeUrl){var i=r.trackingEventsUrls;i.length>0&&(n.onload=function(){i.forEach((function(t){e._rmpVast.rmpVastTracking.pingURI(t)}))},n.onerror=function(){e._rmpVast.rmpVastTracking.error(603)});var a=null;if(r.companionClickTrackingUrls&&(this._debugRawConsoleLogs,a=r.companionClickTrackingUrls),r.companionClickThroughUrl){var s=this._onImgClickThrough.bind(this,r.companionClickThroughUrl,a);L.addEvents(["touchend","click"],n,s)}}if(r.imageUrl)n.src=r.imageUrl;else if(r.iframeUrl)n.src=r.iframeUrl;else if(r.htmlContent)try{n=(n=(new DOMParser).parseFromString(r.htmlContent,"text/html")).documentElement}catch(t){return console.warn(t),null}return n}}])}(),Qt=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._params=e.params,this._contentPlayer=e.currentContentPlayer,this._adContainer=e.adContainer,this._contentWrapper=e.contentWrapper,this._debugRawConsoleLogs=e.debugRawConsoleLogs,this._adPlayer=null}),[{key:"volume",get:function(){return this._adPlayer?this._adPlayer.volume:-1},set:function(t){this._adPlayer&&(this._adPlayer.volume=t)}},{key:"muted",get:function(){return!!this._adPlayer&&this._adPlayer.muted},set:function(t){this._adPlayer&&(t&&!this._adPlayer.muted?this._adPlayer.muted=!0:!t&&this._adPlayer.muted&&(this._adPlayer.muted=!1))}},{key:"duration",get:function(){return this._adPlayer&&L.isNumber(this._adPlayer.duration)?1e3*this._adPlayer.duration:-1}},{key:"currentTime",get:function(){return this._adPlayer&&L.isNumber(this._adPlayer.currentTime)?1e3*this._adPlayer.currentTime:-1}},{key:"destroy",value:function(){this._debugRawConsoleLogs,this._rmpVast.rmpVastIcons&&this._rmpVast.rmpVastIcons.destroy(),this._rmpVast.rmpVastVpaidPlayer&&this._rmpVast.rmpVastVpaidPlayer.destroy(),this._rmpVast.rmpVastNonLinearCreative&&this._rmpVast.rmpVastNonLinearCreative.destroy(),this._rmpVast.rmpVastLinearCreative&&this._rmpVast.rmpVastLinearCreative.destroy(),this._rmpVast.rmpVastTracking.destroy(),L.hide(this._adContainer),this._rmpVast.rmpVastContentPlayer&&this._rmpVast.rmpVastContentPlayer.destroy();try{this._adPlayer&&(this._adPlayer.pause(),this._rmpVast.rmpVastLinearCreative&&this._rmpVast.rmpVastLinearCreative.readingHlsJS?(this._rmpVast.rmpVastLinearCreative.readingHlsJS=!1,this._rmpVast.rmpVastLinearCreative.hlsJSInstances[this._rmpVast.rmpVastLinearCreative.hlsJSIndex].destroy(),this._rmpVast.rmpVastLinearCreative.hlsJSIndex=this._rmpVast.rmpVastLinearCreative.hlsJSIndex++):(this._adPlayer.removeAttribute("src"),this._adPlayer.load()),L.hide(this._adPlayer),this._debugRawConsoleLogs),this._rmpVast.rmpVastNonLinearCreative&&L.removeElement(this._rmpVast.rmpVastNonLinearCreative.nonLinearContainerElement)}catch(t){console.warn(t)}this._rmpVast.resetVariablesForNewLoadAds(),this._rmpVast.rmpVastUtils.createApiEvent("addestroyed")}},{key:"init",value:function(){var t=this;this._rmpVast.adContainer=this._adContainer=document.createElement("div"),this._adContainer.className="rmp-ad-container",this._contentWrapper.appendChild(this._adContainer),L.hide(this._adContainer),this._rmpVast.currentAdPlayer=this._adPlayer=document.createElement("video"),this._debugRawConsoleLogs,this._adPlayer,this._adPlayer.disableRemotePlayback=!0,this._adPlayer.disablePictureInPicture=!0,this._adPlayer.className="rmp-ad-vast-video-player",this._params.showControlsForAdPlayer?this._adPlayer.controls=!0:this._adPlayer.controls=!1,this._contentPlayer.hasAttribute("muted")&&(this._contentPlayer.muted=!0),this._contentPlayer.muted&&(this._adPlayer.muted=!0),this._adPlayer.poster="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",this._adPlayer.setAttribute("x-webkit-airplay","allow"),"boolean"==typeof this._contentPlayer.playsInline&&this._contentPlayer.playsInline&&(this._adPlayer.playsInline=!0),L.hide(this._adPlayer),this._adContainer.appendChild(this._adPlayer),this._contentPlayer.addEventListener("ended",(function(){t._rmpVast.__adOnStage||(t._rmpVast.contentCompleted=!0)})),this._adPlayer.preload="auto",O.isMobile&&(this._contentPlayer.load(),this._adPlayer.load()),this._rmpVast.rmpVastInitialized=!0}},{key:"append",value:function(t,e){if(!this._adPlayer){var n=null;if(this._adContainer&&(n=this._adContainer.querySelector(".rmp-ad-vast-video-player")),null===n)return void this._rmpVast.rmpVastUtils.processVastErrors(900,!0);this._adPlayer=n}if(this._rmpVast.rmpVastContentPlayer.pause(),this._rmpVast.creative.isLinear)t&&e&&this._rmpVast.rmpVastLinearCreative&&this._rmpVast.rmpVastLinearCreative.update(t,e);else{if(this._params.outstream)return this._debugRawConsoleLogs,void this._rmpVast.rmpVastUtils.processVastErrors(201,!0);this._rmpVast.rmpVastNonLinearCreative&&this._rmpVast.rmpVastNonLinearCreative.update()}(this._rmpVast.rmpVastTracking.wire(),this._rmpVast.rmpVastIcons)&&(this._rmpVast.rmpVastIcons.iconsData.length>0&&this._rmpVast.rmpVastIcons.append())}},{key:"play",value:function(t){this._adPlayer&&this._adPlayer.paused&&this._rmpVast.rmpVastUtils.playPromise("vast",t)}},{key:"pause",value:function(){this._adPlayer&&!this._adPlayer.paused&&this._adPlayer.pause()}},{key:"resumeContent",value:function(){this._debugRawConsoleLogs,this._rmpVast.rmpVastAdPlayer&&this._rmpVast.rmpVastAdPlayer.destroy(),this._rmpVast.rmpVastLinearCreative&&(this._rmpVast.rmpVastLinearCreative.readingHlsJS=!1),this._rmpVast.contentCompleted||this._params.outstream||(this._debugRawConsoleLogs,this._rmpVast.rmpVastContentPlayer.play()),this._rmpVast.contentCompleted=!1}}])}(),Yt=function(){return _((function t(e,n){m(this,t),this._rmpVast=n,this._contentPlayer=n.currentContentPlayer,this._adPlayer=n.currentAdPlayer,this._params=n.params,this._isSkippableAd=n.isSkippableAd,this._skipTimeOffset=n.skipTimeOffset,this._debugRawConsoleLogs=n.debugRawConsoleLogs,this.VastProperties=null,this._adEvents=null,this._mediaEvents=null,this._adSession=null,this._lastVideoTime=-1,this._adVerifications=e,this._onFullscreenChangeFn=null}),[{key:"_destroy",value:function(){document.removeEventListener("fullscreenchange",this._onFullscreenChangeFn),this._adSession.finish()}},{key:"_onFullscreenChange",value:function(){var t=null!==document.fullscreenElement?"fullscreen":"normal";this._mediaEvents.playerStateChange(t)}},{key:"_pingVerificationNotExecuted",value:function(t,e){var n=this;void 0!==t.trackingEvents&&Array.isArray(t.trackingEvents.verificationNotExecuted)&&t.trackingEvents.verificationNotExecuted.length>0&&t.trackingEvents.verificationNotExecuted.forEach((function(t){var r=t,i=/\[REASON\]/gi;i.test(r)&&(r=r.replace(i,e)),n._rmpVast.rmpVastTracking.pingURI(r)}))}},{key:"_adPlayerDidDispatchTimeUpdate",value:function(){var t=this;if(this._adEvents&&this._mediaEvents&&this._adPlayer&&0!==this._adPlayer.playbackRate){var e=this._adPlayer.currentTime,n=this._adPlayer.duration;if(e>-1&&n>0){var r=e/n;this._lastVideoTime<0&&r>=0?(this._adEvents.impressionOccurred(),this._mediaEvents.start(n,this._adPlayer.volume)):this._lastVideoTime<.25&&r>=.25?this._mediaEvents.firstQuartile():this._lastVideoTime<.5&&r>=.5?this._mediaEvents.midpoint():this._lastVideoTime<.75&&r>=.75?this._mediaEvents.thirdQuartile():this._lastVideoTime<1&&r>=1&&(this._mediaEvents.complete(),this._adEvents=null,this._mediaEvents=null,setTimeout((function(){t._destroy()}),300)),this._lastVideoTime=r}}}},{key:"_adPlayerDidDispatchEvent",value:function(t){if(this._adSession&&this._adEvents&&this._mediaEvents&&this.VastProperties){var e,n,r="preroll";switch(t.type){case"error":this._adSession.error("video",this._adPlayer.error.message);break;case"loadeddata":if(this._skipTimeOffset<0&&(this._skipTimeOffset=0),this._params.outstream)r="standalone";else{var i=this._contentPlayer.currentTime,a=this._contentPlayer.duration;i>0&&i=a&&(r="postroll")}e=new this.VastProperties(this._isSkippableAd,this._skipTimeOffset,this._params.omidAutoplay,r),this._adEvents.loaded(e);break;case"pause":this._mediaEvents.pause();break;case"play":this._adPlayer.currentTime>0&&this._mediaEvents.resume();break;case"timeupdate":this._adPlayerDidDispatchTimeUpdate();break;case"volumechange":n=this._adPlayer.muted?0:this._adPlayer.volume,this._mediaEvents.volumeChange(n);break;case"click":this._mediaEvents.adUserInteraction("click")}}}},{key:"_onOMWebLoaded",value:function(){for(var t,e=this,n=[],r=[],i=0;i0&&void 0!==a.vendor)if(!lt()(s=this._params.omidAllowedVendors).call(s,a.vendor))continue;void 0===a.browserOptional||!0!==a.browserOptional?n.push(a):r.push(i)}else this._pingVerificationNotExecuted(a,"2");else this._pingVerificationNotExecuted(a,"2")}0===n.length&&r.length>0&&r.forEach((function(t){n.push(e._adVerifications[t])})),this._adVerifications=n;try{t=OmidSessionClient.default}catch(t){return void console.warn(t)}var o=t.AdSession,c=t.Partner,u=t.Context,l=t.VerificationScriptResource,d=t.AdEvents,p=t.MediaEvents;this.VastProperties=t.VastProperties;var h=new c(this._params.partnerName,this._params.partnerVersion),f=[];if(this._params.omidRunValidationScript){var v=F()({k:"v"});f.push(new l("https://cdn.radiantmediatechs.com/rmp/omsdk/1.3.37/omid-validation-verification-script-v1.js","dummyVendor",v))}else{var m;f=et()(m=this._adVerifications).call(m,(function(t){return new l(t.resource,t.vendor,t.parameters,"full")}))}var g=new u(h,f,document.location.href);this._debugRawConsoleLogs,this._params.omidUnderEvaluation&&(g.underEvaluation=!0);var A=window.top;A?(g.setServiceWindow(A),g.setVideoElement(this._adPlayer),this._debugRawConsoleLogs,this._adSession=new o(g),this._adSession.setCreativeType("video"),this._adSession.setImpressionType("beginToRender"),this._adSession.isSupported()?(this._adEvents=new d(this._adSession),this._mediaEvents=new p(this._adSession),this._adSession.start()):this._debugRawConsoleLogs):this._debugRawConsoleLogs}},{key:"init",value:function(){var t=this;["error","loadeddata","pause","play","timeupdate","volumechange","click"].forEach((function(e){t._adPlayer.addEventListener(e,(function(e){return t._adPlayerDidDispatchEvent(e)}))})),this._onFullscreenChangeFn=this._onFullscreenChange.bind(this),document.addEventListener("fullscreenchange",this._onFullscreenChangeFn),this._onOMWebLoaded()}}])}(),Kt=n(385),Zt=n.n(Kt),Xt=function(){return _((function t(e){m(this,t),this.eventName=e,this.callbacks=[]}),[{key:"registerCallback",value:function(t){this.callbacks.push(t)}},{key:"unregisterCallback",value:function(t){var e,n,r=b()(e=this.callbacks).call(e,t);r>-1&&Zt()(n=this.callbacks).call(n,r,1)}},{key:"fire",value:function(t){var e;rt()(e=this.callbacks).call(e,0).forEach((function(e){e(t)}))}}])}(),$t=function(){return _((function t(e){m(this,t),this._rmpVast=e,this._contentPlayer=e.currentContentPlayer,this._customPlaybackCurrentTime=0,this._antiSeekLogicInterval=null}),[{key:"volume",get:function(){return this._contentPlayer?this._contentPlayer.volume:-1},set:function(t){this._contentPlayer&&(this._contentPlayer.volume=t)}},{key:"muted",get:function(){return!!this._contentPlayer&&this._contentPlayer.muted},set:function(t){this._contentPlayer&&(t&&!this._contentPlayer.muted?this._contentPlayer.muted=!0:!t&&this._contentPlayer.muted&&(this._contentPlayer.muted=!1))}},{key:"currentTime",get:function(){return this._contentPlayer&&L.isNumber(this._contentPlayer.currentTime)?1e3*this._contentPlayer.currentTime:-1}},{key:"destroy",value:function(){L.clearInterval(this._antiSeekLogicInterval)}},{key:"play",value:function(t){this._contentPlayer&&this._contentPlayer.paused&&this._rmpVast.rmpVastUtils.playPromise("content",t)}},{key:"pause",value:function(){this._contentPlayer&&!this._contentPlayer.paused&&this._contentPlayer.pause()}},{key:"seekTo",value:function(t){L.isNumber(t)&&t>=0&&this._contentPlayer&&(this._contentPlayer.currentTime=t/1e3)}},{key:"preventSeekingForCustomPlayback",value:function(){var t=this;this._contentPlayer&&(this._antiSeekLogicInterval=setInterval((function(){t._rmpVast.creative.isLinear&&t._rmpVast.__adOnStage&&(Math.abs(t._customPlaybackCurrentTime-t._contentPlayer.currentTime)>1&&(t._contentPlayer.currentTime=t._customPlaybackCurrentTime),t._customPlaybackCurrentTime=t._contentPlayer.currentTime)}),200))}}])}(),te=n(9544),ee=n.n(te),ne=null,re={data:{},length:0,getItem:function(t){return this.data[t]},setItem:function(t,e){this.data[t]=e,this.length=C()(this.data).length},removeItem:function(t){delete this.data[t],this.length=C()(this.data).length},clear:function(){this.data={},this.length=0}},ie=function(){return _((function t(){m(this,t),this.storage=this.initStorage()}),[{key:"initStorage",value:function(){if(ne)return ne;try{ne="undefined"!=typeof window&&null!==window?window.localStorage||window.sessionStorage:null}catch(t){ne=null}return ne&&!this.isStorageDisabled(ne)||(ne=re).clear(),ne}},{key:"isStorageDisabled",value:function(t){var e="__VASTStorage__";try{if(t.setItem(e,e),t.getItem(e)!==e)return t.removeItem(e),!0}catch(t){return!0}return t.removeItem(e),!1}},{key:"getItem",value:function(t){return this.storage.getItem(t)}},{key:"setItem",value:function(t,e){return this.storage.setItem(t,e)}},{key:"removeItem",value:function(t){return this.storage.removeItem(t)}},{key:"clear",value:function(){return this.storage.clear()}}])}(),ae=n(1204),se=n(3375);function oe(t){var e;return oe=l?se(e=o).call(e):function(t){return t.__proto__||o(t)},oe(t)}function ce(){try{var t=!Boolean.prototype.valueOf.call(ae(Boolean,[],(function(){})))}catch(t){}return(ce=function(){return!!t})()}function ue(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function le(t,e){var n;return le=l?se(n=l).call(n):function(t,e){return t.__proto__=e,t},le(t,e)}function de(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:t.id||null,adId:t.adId||null,sequence:t.sequence||null,apiFramework:t.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}var pe=n(6712),he=n.n(pe),fe=n(1265),ve=n.n(fe),me=n(9493),ge=n.n(me),Ae=n(4929),ye=n.n(Ae),_e=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function Ee(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=Ce(t);for(var a in!e.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(e.ERRORCODE)||(e.ERRORCODE=900),e.CACHEBUSTING=Pe(Math.round(1e8*Math.random())),e.TIMESTAMP=(new Date).toISOString(),e.RANDOM=e.random=e.CACHEBUSTING,e)e[a]=Se(e[a]);for(var s in i){var o=i[s];"string"==typeof o&&r.push(be(o,e))}return r}function be(t,e){var n=(t=ke(t,e)).match(/[^[\]]+(?=])/g);if(!n)return t;var r=q()(n).call(n,(function(t){return b()(_e).call(_e,t)>-1}));return 0===r.length?t:ke(t,r=I()(r).call(r,(function(t,e){return t[e]=-1,t}),{}))}function ke(t,e){var n=t;for(var r in e){var i=e[r];n=n.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),i)}return n}function Ce(t){return Array.isArray(t)?et()(t).call(t,(function(t){return t&&t.hasOwnProperty("url")?t.url:t})):t}function Te(t){return/^(https?:\/\/|\/\/)/.test(t)}function Ve(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:8;return ye()(e=t.toString()).call(e,n,"0")}var Ie={track:function(t,e,n){Ee(t,e,n).forEach((function(t){"undefined"!=typeof window&&null!==window&&((new Image).src=t)}))},resolveURLTemplates:Ee,extractURLsFromTemplates:Ce,filterValidUrlTemplates:function(t){return Array.isArray(t)?q()(t).call(t,(function(t){return Te(t.hasOwnProperty("url")?t.url:t)})):Te(t)},containsTemplateObject:Ve,isTemplateObjectEqual:we,encodeURIComponentRFC3986:Se,replaceUrlMacros:be,isNumeric:function(t){return!isNaN(R()(t))&&isFinite(t)},flatten:function t(e){return I()(e).call(e,(function(e,n){return B()(e).call(e,Array.isArray(n)?t(n):n)}),[])},joinArrayOfUniqueTemplateObjs:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Array.isArray(t)?t:[],r=Array.isArray(e)?e:[],i=B()(n).call(n,r);return I()(i).call(i,(function(t,e){return Ve(e,t)||t.push(e),t}),[])},isValidTimeValue:function(t){return Number.isFinite(t)&&t>=-2},addLeadingZeros:Pe};function xe(t){var e;return-1!==b()(e=["true","TRUE","True","1"]).call(e,t)}var Re={childByName:function(t,e){var n=t.childNodes;for(var r in n){var i=n[r];if(i.nodeName===e)return i}},childrenByName:function(t,e){var n=[],r=t.childNodes;for(var i in r){var a=r[i];a.nodeName===e&&n.push(a)}return n},resolveVastAdTagURI:function(t,e){if(!e)return t;if(0===b()(t).call(t,"//")){var n,r=location.protocol;return B()(n="".concat(r)).call(n,t)}if(-1===b()(t).call(t,"://")){var i,a=rt()(e).call(e,0,he()(e).call(e,"/"));return B()(i="".concat(a,"/")).call(i,t)}return t},parseBoolean:xe,parseNodeText:function(t){var e;return t&&ve()(e=t.textContent||t.text||"").call(e)},copyNodeAttribute:function(t,e,n){var r=e.getAttribute(t);r&&n.setAttribute(t,r)},parseAttributes:function(t){for(var e=t.attributes,n={},r=0;r3600||r>60?-1:a+i+r},splitVAST:function(t){var e=[],n=null;return t.forEach((function(r,i){if(r.sequence&&(r.sequence=N()(r.sequence,10)),r.sequence>1){var a=t[i-1];if(a&&a.sequence===r.sequence-1)return void(n&&n.push(r));delete r.sequence}n=[r],e.push(n)})),e},assignAttributes:function(t,e){if(t)for(var n in t){var r=t[n];if(r.nodeName&&r.nodeValue&&e.hasOwnProperty(r.nodeName)){var i=r.nodeValue;"boolean"==typeof e[r.nodeName]&&(i=xe(i)),e[r.nodeName]=i}}},mergeWrapperAdData:function(t,e){var n,r,i,a,s,o;t.errorURLTemplates=B()(n=e.errorURLTemplates).call(n,t.errorURLTemplates),t.impressionURLTemplates=B()(r=e.impressionURLTemplates).call(r,t.impressionURLTemplates),t.extensions=B()(i=e.extensions).call(i,t.extensions),e.viewableImpression.length>0&&(t.viewableImpression=B()(o=[]).call(o,Z(t.viewableImpression),Z(e.viewableImpression))),t.followAdditionalWrappers=e.followAdditionalWrappers,t.allowMultipleAds=e.allowMultipleAds,t.fallbackOnNoAd=e.fallbackOnNoAd;var c=q()(a=e.creatives||[]).call(a,(function(t){return t&&"companion"===t.type})),u=I()(c).call(c,(function(t,e){return(e.variations||[]).forEach((function(e){(e.companionClickTrackingURLTemplates||[]).forEach((function(e){Ie.containsTemplateObject(e,t)||t.push(e)}))})),t}),[]);t.creatives=B()(c).call(c,t.creatives);var l,d,p=e.videoClickTrackingURLTemplates&&e.videoClickTrackingURLTemplates.length,h=e.videoCustomClickURLTemplates&&e.videoCustomClickURLTemplates.length;if(t.creatives.forEach((function(t){if(e.trackingEvents&&e.trackingEvents[t.type])for(var n in e.trackingEvents[t.type]){var r,i=e.trackingEvents[t.type][n];Array.isArray(t.trackingEvents[n])||(t.trackingEvents[n]=[]),t.trackingEvents[n]=B()(r=t.trackingEvents[n]).call(r,i)}if("linear"===t.type){var a,s;if(p)t.videoClickTrackingURLTemplates=B()(a=t.videoClickTrackingURLTemplates).call(a,e.videoClickTrackingURLTemplates);if(h)t.videoCustomClickURLTemplates=B()(s=t.videoCustomClickURLTemplates).call(s,e.videoCustomClickURLTemplates);!e.videoClickThroughURLTemplate||null!==t.videoClickThroughURLTemplate&&void 0!==t.videoClickThroughURLTemplate||(t.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)}"companion"===t.type&&u.length&&(t.variations||[]).forEach((function(t){t.companionClickTrackingURLTemplates=Ie.joinArrayOfUniqueTemplateObjs(t.companionClickTrackingURLTemplates,u)}))})),e.adVerifications&&(t.adVerifications=B()(l=t.adVerifications).call(l,e.adVerifications)),e.blockedAdCategories&&(t.blockedAdCategories=B()(d=t.blockedAdCategories).call(d,e.blockedAdCategories)),null!==(s=e.creatives)&&void 0!==s&&s.length){var f,v,m=q()(f=e.creatives).call(f,(function(t){var e;return(null===(e=t.icons)||void 0===e?void 0:e.length)&&!t.mediaFiles.length}));if(m.length)t.creatives=B()(v=t.creatives).call(v,m)}}};function Le(t,e){var n,r=function(){var t=de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:t.id,adId:t.adId,sequence:t.sequence,apiFramework:t.apiFramework,type:"companion",required:null,variations:[]}}(e);return r.required=t.getAttribute("required")||null,r.variations=et()(n=Re.childrenByName(t,"Companion")).call(n,(function(t){var e,n,r,i,a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:t.id||null,adType:"companionAd",width:t.width||0,height:t.height||0,assetWidth:t.assetWidth||null,assetHeight:t.assetHeight||null,expandedWidth:t.expandedWidth||null,expandedHeight:t.expandedHeight||null,apiFramework:t.apiFramework||null,adSlotId:t.adSlotId||null,pxratio:t.pxratio||"1",renderingMode:t.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}}(Re.parseAttributes(t));a.htmlResources=I()(e=Re.childrenByName(t,"HTMLResource")).call(e,(function(t,e){var n=Re.parseNodeText(e);return n?B()(t).call(t,n):t}),[]),a.iframeResources=I()(n=Re.childrenByName(t,"IFrameResource")).call(n,(function(t,e){var n=Re.parseNodeText(e);return n?B()(t).call(t,n):t}),[]),a.staticResources=I()(r=Re.childrenByName(t,"StaticResource")).call(r,(function(t,e){var n=Re.parseNodeText(e);return n?B()(t).call(t,{url:n,creativeType:e.getAttribute("creativeType")||null}):t}),[]),a.altText=Re.parseNodeText(Re.childByName(t,"AltText"))||null;var s=Re.childByName(t,"TrackingEvents");s&&Re.childrenByName(s,"Tracking").forEach((function(t){var e=t.getAttribute("event"),n=Re.parseNodeText(t);e&&n&&(Array.isArray(a.trackingEvents[e])||(a.trackingEvents[e]=[]),a.trackingEvents[e].push(n))})),a.companionClickTrackingURLTemplates=et()(i=Re.childrenByName(t,"CompanionClickTracking")).call(i,(function(t){return{id:t.getAttribute("id")||null,url:Re.parseNodeText(t)}})),a.companionClickThroughURLTemplate=Re.parseNodeText(Re.childByName(t,"CompanionClickThrough"))||null;var o=Re.childByName(t,"AdParameters");return o&&(a.adParameters={value:Re.parseNodeText(o),xmlEncoded:o.getAttribute("xmlEncoded")||null}),a})),r}function Ue(t,e){var n,r=function(){var t=de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:t.id,adId:t.adId,sequence:t.sequence,apiFramework:t.apiFramework,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}}(e);r.duration=Re.parseDuration(Re.parseNodeText(Re.childByName(t,"Duration")));var i=t.getAttribute("skipoffset");if(null==i)r.skipDelay=null;else if("%"===i.charAt(i.length-1)&&-1!==r.duration){var a=N()(i,10);r.skipDelay=r.duration*(a/100)}else r.skipDelay=Re.parseDuration(i);var s=Re.childByName(t,"VideoClicks");if(s){var o=Re.childByName(s,"ClickThrough");r.videoClickThroughURLTemplate=o?{id:o.getAttribute("id")||null,url:Re.parseNodeText(o)}:null,Re.childrenByName(s,"ClickTracking").forEach((function(t){r.videoClickTrackingURLTemplates.push({id:t.getAttribute("id")||null,url:Re.parseNodeText(t)})})),Re.childrenByName(s,"CustomClick").forEach((function(t){r.videoCustomClickURLTemplates.push({id:t.getAttribute("id")||null,url:Re.parseNodeText(t)})}))}var c=Re.childByName(t,"AdParameters");c&&(r.adParameters={value:Re.parseNodeText(c),xmlEncoded:c.getAttribute("xmlEncoded")||null}),Re.childrenByName(t,"TrackingEvents").forEach((function(t){Re.childrenByName(t,"Tracking").forEach((function(t){var e=t.getAttribute("event"),i=Re.parseNodeText(t);if(e&&i){if("progress"===e){if(!(n=t.getAttribute("offset")))return;e="%"===n.charAt(n.length-1)?"progress-".concat(n):"progress-".concat(Math.round(Re.parseDuration(n)))}Array.isArray(r.trackingEvents[e])||(r.trackingEvents[e]=[]),r.trackingEvents[e].push(i)}}))})),Re.childrenByName(t,"MediaFiles").forEach((function(t){Re.childrenByName(t,"MediaFile").forEach((function(t){r.mediaFiles.push(function(t){var e={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};e.id=t.getAttribute("id"),e.fileURL=Re.parseNodeText(t),e.deliveryType=t.getAttribute("delivery"),e.codec=t.getAttribute("codec"),e.mimeType=t.getAttribute("type"),e.mediaType=t.getAttribute("mediaType")||"2D",e.apiFramework=t.getAttribute("apiFramework"),e.fileSize=N()(t.getAttribute("fileSize")||0),e.bitrate=N()(t.getAttribute("bitrate")||0),e.minBitrate=N()(t.getAttribute("minBitrate")||0),e.maxBitrate=N()(t.getAttribute("maxBitrate")||0),e.width=N()(t.getAttribute("width")||0),e.height=N()(t.getAttribute("height")||0);var n=t.getAttribute("scalable");n&&"string"==typeof n&&(e.scalable=Re.parseBoolean(n));var r=t.getAttribute("maintainAspectRatio");r&&"string"==typeof r&&(e.maintainAspectRatio=Re.parseBoolean(r));return e}(t))}));var e=Re.childByName(t,"InteractiveCreativeFile");e&&(r.interactiveCreativeFile=function(t){var e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:t.type||null,apiFramework:t.apiFramework||null,variableDuration:Re.parseBoolean(t.variableDuration),fileURL:null}}(Re.parseAttributes(t));return e.fileURL=Re.parseNodeText(t),e}(e));var n=Re.childByName(t,"ClosedCaptionFiles");n&&Re.childrenByName(n,"ClosedCaptionFile").forEach((function(t){var e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:t.type||null,language:t.language||null,fileURL:null}}(Re.parseAttributes(t));e.fileURL=Re.parseNodeText(t),r.closedCaptionFiles.push(e)}));var i=Re.childByName(t,"Mezzanine"),a=function(t,e){var n={},r=!1;return e.forEach((function(e){t&&t.getAttribute(e)?n[e]=t.getAttribute(e):r=!0})),r?null:n}(i,["delivery","type","width","height"]);if(a){var s={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};s.id=i.getAttribute("id"),s.fileURL=Re.parseNodeText(i),s.delivery=a.delivery,s.codec=i.getAttribute("codec"),s.type=a.type,s.width=N()(a.width,10),s.height=N()(a.height,10),s.fileSize=N()(i.getAttribute("fileSize"),10),s.mediaType=i.getAttribute("mediaType")||"2D",r.mezzanine=s}}));var u=Re.childByName(t,"Icons");return u&&Re.childrenByName(u,"Icon").forEach((function(t){r.icons.push(function(t){var e={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[]};e.program=t.getAttribute("program"),e.height=N()(t.getAttribute("height")||0),e.width=N()(t.getAttribute("width")||0),e.xPosition=function(t){var e;if(-1!==b()(e=["left","right"]).call(e,t))return t;return N()(t||0)}(t.getAttribute("xPosition")),e.yPosition=function(t){var e;if(-1!==b()(e=["top","bottom"]).call(e,t))return t;return N()(t||0)}(t.getAttribute("yPosition")),e.apiFramework=t.getAttribute("apiFramework"),e.pxratio=t.getAttribute("pxratio")||"1",e.offset=Re.parseDuration(t.getAttribute("offset")),e.duration=Re.parseDuration(t.getAttribute("duration")),Re.childrenByName(t,"HTMLResource").forEach((function(t){e.type=t.getAttribute("creativeType")||"text/html",e.htmlResource=Re.parseNodeText(t)})),Re.childrenByName(t,"IFrameResource").forEach((function(t){e.type=t.getAttribute("creativeType")||0,e.iframeResource=Re.parseNodeText(t)})),Re.childrenByName(t,"StaticResource").forEach((function(t){e.type=t.getAttribute("creativeType")||0,e.staticResource=Re.parseNodeText(t)}));var n=Re.childByName(t,"IconClicks");if(n){e.iconClickThroughURLTemplate=Re.parseNodeText(Re.childByName(n,"IconClickThrough")),Re.childrenByName(n,"IconClickTracking").forEach((function(t){e.iconClickTrackingURLTemplates.push({id:t.getAttribute("id")||null,url:Re.parseNodeText(t)})}));var r=Re.childByName(n,"IconClickFallbackImages");r&&Re.childrenByName(r,"IconClickFallbackImage").forEach((function(t){e.iconClickFallbackImages.push({url:Re.parseNodeText(t)||null,width:t.getAttribute("width")||null,height:t.getAttribute("height")||null})}))}return e.iconViewTrackingURLTemplate=Re.parseNodeText(Re.childByName(t,"IconViewTracking")),e}(t))})),r}function Ne(t,e){var n=function(){var t=de(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return{id:t.id,adId:t.adId,sequence:t.sequence,apiFramework:t.apiFramework,type:"nonlinear",variations:[],trackingEvents:{}}}(e);return Re.childrenByName(t,"TrackingEvents").forEach((function(t){var e,r;Re.childrenByName(t,"Tracking").forEach((function(t){e=t.getAttribute("event"),r=Re.parseNodeText(t),e&&r&&(Array.isArray(n.trackingEvents[e])||(n.trackingEvents[e]=[]),n.trackingEvents[e].push(r))}))})),Re.childrenByName(t,"NonLinear").forEach((function(t){var e={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};e.id=t.getAttribute("id")||null,e.width=t.getAttribute("width"),e.height=t.getAttribute("height"),e.expandedWidth=t.getAttribute("expandedWidth"),e.expandedHeight=t.getAttribute("expandedHeight"),e.scalable=Re.parseBoolean(t.getAttribute("scalable")),e.maintainAspectRatio=Re.parseBoolean(t.getAttribute("maintainAspectRatio")),e.minSuggestedDuration=Re.parseDuration(t.getAttribute("minSuggestedDuration")),e.apiFramework=t.getAttribute("apiFramework"),Re.childrenByName(t,"HTMLResource").forEach((function(t){e.type=t.getAttribute("creativeType")||"text/html",e.htmlResource=Re.parseNodeText(t)})),Re.childrenByName(t,"IFrameResource").forEach((function(t){e.type=t.getAttribute("creativeType")||0,e.iframeResource=Re.parseNodeText(t)})),Re.childrenByName(t,"StaticResource").forEach((function(t){e.type=t.getAttribute("creativeType")||0,e.staticResource=Re.parseNodeText(t)}));var r=Re.childByName(t,"AdParameters");r&&(e.adParameters={value:Re.parseNodeText(r),xmlEncoded:r.getAttribute("xmlEncoded")||null}),e.nonlinearClickThroughURLTemplate=Re.parseNodeText(Re.childByName(t,"NonLinearClickThrough")),Re.childrenByName(t,"NonLinearClickTracking").forEach((function(t){e.nonlinearClickTrackingURLTemplates.push({id:t.getAttribute("id")||null,url:Re.parseNodeText(t)})})),n.variations.push(e)})),n}function Oe(t){var e=[];return t.forEach((function(t){var n=De(t);n&&e.push(n)})),e}function De(t){var e;if("#comment"===t.nodeName)return null;var n,r={name:null,value:null,attributes:{},children:[]},i=t.attributes,a=t.childNodes;if(r.name=t.nodeName,t.attributes)for(var s in i)if(i.hasOwnProperty(s)){var o=i[s];o.nodeName&&o.nodeValue&&(r.attributes[o.nodeName]=o.nodeValue)}for(var c in a)if(a.hasOwnProperty(c)){var u=De(a[c]);u&&r.children.push(u)}if(0===r.children.length||1===r.children.length&&b()(e=["#cdata-section","#text"]).call(e,r.children[0].name)>=0){var l=Re.parseNodeText(t);""!==l&&(r.value=l),r.children=[]}return null===(n=r).value&&0===C()(n.attributes).length&&0===n.children.length?null:r}function Fe(t){var e=[];return t.forEach((function(t){var n,r={id:t.getAttribute("id")||null,adId:Me(t),sequence:t.getAttribute("sequence")||null,apiFramework:t.getAttribute("apiFramework")||null},i=[];Re.childrenByName(t,"UniversalAdId").forEach((function(t){var e={idRegistry:t.getAttribute("idRegistry")||"unknown",value:Re.parseNodeText(t)};i.push(e)}));var a=Re.childByName(t,"CreativeExtensions");for(var s in a&&(n=Oe(Re.childrenByName(a,"CreativeExtension"))),t.childNodes){var o=t.childNodes[s],c=void 0;switch(o.nodeName){case"Linear":c=Ue(o,r);break;case"NonLinearAds":c=Ne(o,r);break;case"CompanionAds":c=Le(o,r)}c&&(i&&(c.universalAdIds=i),n&&(c.creativeExtensions=n),e.push(c))}})),e}function Me(t){return t.getAttribute("AdID")||t.getAttribute("adID")||t.getAttribute("adId")||null}var Be={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function je(t,e){if(Be[t.nodeName]&&Be[t.nodeName].attributes){var n=Be[t.nodeName].attributes,r=q()(n).call(n,(function(e){return!t.getAttribute(e)}));r.length>0&&He({name:t.nodeName,parentName:t.parentNode.nodeName,attributes:r},e)}}function qe(t,e,n){var r=Be[t.nodeName],i=!n&&"Wrapper"!==t.nodeName;if(r&&!i){if(r.subElements){var a=r.subElements,s=q()(a).call(a,(function(e){return!Re.childByName(t,e)}));s.length>0&&He({name:t.nodeName,parentName:t.parentNode.nodeName,subElements:s},e)}if(n&&r.oneOfinLineResources)r.oneOfinLineResources.some((function(e){return Re.childByName(t,e)}))||He({name:t.nodeName,parentName:t.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},e)}}function We(t){return t.children&&0!==t.children.length}function He(t,e){var n=t.name,r=t.parentName,i=t.attributes,a=t.subElements,s=t.oneOfResources,o="Element '".concat(n,"'");e("VAST-warning",{message:o+=i?" missing required attribute(s) '".concat(i.join(", "),"' "):a?" missing required sub element(s) '".concat(a.join(", "),"' "):s?" must provide one of the following '".concat(s.join(", "),"' "):" is empty",parentElement:r,specVersion:4.1})}var ze={verifyRequiredValues:function t(e,n,r){if(e&&e.nodeName)if("InLine"===e.nodeName&&(r=!0),je(e,n),We(e)){qe(e,n,r);for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowMultipleAds,i=n.followAdditionalWrappers,a=t.childNodes;for(var s in a){var o,c=a[s];if(-1!==b()(o=["Wrapper","InLine"]).call(o,c.nodeName)&&("Wrapper"!==c.nodeName||!1!==i)){if(Re.copyNodeAttribute("id",t,c),Re.copyNodeAttribute("sequence",t,c),Re.copyNodeAttribute("adType",t,c),"Wrapper"===c.nodeName)return{ad:Ye(c,e),type:"WRAPPER"};if("InLine"===c.nodeName)return{ad:Je(c,e,{allowMultipleAds:r}),type:"INLINE"}}}}function Je(t,e){return!1===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allowMultipleAds&&t.getAttribute("sequence")?null:Qe(t,e)}function Qe(t,e){var n=[];e&&ze.verifyRequiredValues(t,e);var r,i,a,s,o,c,u=t.childNodes,l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:t.id||null,sequence:t.sequence||null,adType:t.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}}(Re.parseAttributes(t));for(var d in u){var p=u[d];switch(p.nodeName){case"Error":l.errorURLTemplates.push(Re.parseNodeText(p));break;case"Impression":l.impressionURLTemplates.push({id:p.getAttribute("id")||null,url:Re.parseNodeText(p)});break;case"Creatives":l.creatives=Fe(Re.childrenByName(p,"Creative"));break;case"Extensions":var h=Re.childrenByName(p,"Extension");l.extensions=Oe(h),l.adVerifications.length||(n=Ze(h));break;case"AdVerifications":l.adVerifications=Ke(Re.childrenByName(p,"Verification"));break;case"AdSystem":l.system={value:Re.parseNodeText(p),version:p.getAttribute("version")||null};break;case"AdTitle":l.title=Re.parseNodeText(p);break;case"AdServingId":l.adServingId=Re.parseNodeText(p);break;case"Category":l.categories.push({authority:p.getAttribute("authority")||null,value:Re.parseNodeText(p)});break;case"Expires":l.expires=N()(Re.parseNodeText(p),10);break;case"ViewableImpression":l.viewableImpression.push((i=void 0,a=void 0,s=void 0,o=void 0,o=function(t,e){var n=Re.parseNodeText(e);return n&&t.push(n),t},{id:(r=p).getAttribute("id")||null,viewable:I()(i=Re.childrenByName(r,"Viewable")).call(i,o,[]),notViewable:I()(a=Re.childrenByName(r,"NotViewable")).call(a,o,[]),viewUndetermined:I()(s=Re.childrenByName(r,"ViewUndetermined")).call(s,o,[])}));break;case"Description":l.description=Re.parseNodeText(p);break;case"Advertiser":l.advertiser={id:p.getAttribute("id")||null,value:Re.parseNodeText(p)};break;case"Pricing":l.pricing={value:Re.parseNodeText(p),model:p.getAttribute("model")||null,currency:p.getAttribute("currency")||null};break;case"Survey":l.survey={value:Re.parseNodeText(p),type:p.getAttribute("type")||null};break;case"BlockedAdCategories":l.blockedAdCategories.push({authority:p.getAttribute("authority")||null,value:Re.parseNodeText(p)})}}n.length&&(l.adVerifications=B()(c=l.adVerifications).call(c,n));return l}function Ye(t,e){var n=Qe(t,e),r=t.getAttribute("followAdditionalWrappers"),i=t.getAttribute("allowMultipleAds"),a=t.getAttribute("fallbackOnNoAd");n.followAdditionalWrappers=!r||Re.parseBoolean(r),n.allowMultipleAds=!!i&&Re.parseBoolean(i),n.fallbackOnNoAd=a?Re.parseBoolean(a):null;var s=Re.childByName(t,"VASTAdTagURI");if(s?n.nextWrapperURL=Re.parseNodeText(s):(s=Re.childByName(t,"VASTAdTagURL"))&&(n.nextWrapperURL=Re.parseNodeText(Re.childByName(s,"URL"))),n.creatives.forEach((function(t){var e;if(-1!==b()(e=["linear","nonlinear"]).call(e,t.type)){if(t.trackingEvents){n.trackingEvents||(n.trackingEvents={}),n.trackingEvents[t.type]||(n.trackingEvents[t.type]={});var r=function(e){var r=t.trackingEvents[e];Array.isArray(n.trackingEvents[t.type][e])||(n.trackingEvents[t.type][e]=[]),r.forEach((function(r){n.trackingEvents[t.type][e].push(r)}))};for(var i in t.trackingEvents)r(i)}t.videoClickTrackingURLTemplates&&(Array.isArray(n.videoClickTrackingURLTemplates)||(n.videoClickTrackingURLTemplates=[]),t.videoClickTrackingURLTemplates.forEach((function(t){n.videoClickTrackingURLTemplates.push(t)}))),t.videoClickThroughURLTemplate&&(n.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate),t.videoCustomClickURLTemplates&&(Array.isArray(n.videoCustomClickURLTemplates)||(n.videoCustomClickURLTemplates=[]),t.videoCustomClickURLTemplates.forEach((function(t){n.videoCustomClickURLTemplates.push(t)})))}})),n.nextWrapperURL)return n}function Ke(t){var e=[];return t.forEach((function(t){var n={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},r=t.childNodes;for(var i in Re.assignAttributes(t.attributes,n),r){var a=r[i];switch(a.nodeName){case"JavaScriptResource":case"ExecutableResource":n.resource=Re.parseNodeText(a),Re.assignAttributes(a.attributes,n);break;case"VerificationParameters":n.parameters=Re.parseNodeText(a)}}var s=Re.childByName(t,"TrackingEvents");s&&Re.childrenByName(s,"Tracking").forEach((function(t){var e=t.getAttribute("event"),r=Re.parseNodeText(t);e&&r&&(Array.isArray(n.trackingEvents[e])||(n.trackingEvents[e]=[]),n.trackingEvents[e].push(r))})),e.push(n)})),e}function Ze(t){var e=null,n=[];return t.some((function(t){return e=Re.childByName(t,"AdVerifications")})),e&&(n=Ke(Re.childrenByName(e,"Verification"))),n}var Xe=function(){return _((function t(){m(this,t),this._handlers=[]}),[{key:"on",value:function(t,e){if("function"!=typeof e)throw new TypeError("The handler argument must be of type Function. Received type ".concat(i(e)));if(!t)throw new TypeError("The event argument must be of type String. Received type ".concat(i(t)));return this._handlers.push({event:t,handler:e}),this}},{key:"once",value:function(t,e){return this.on(t,function(t,e,n){var r={fired:!1,wrapFn:void 0};function i(){r.fired||(t.off(e,r.wrapFn),r.fired=!0,n.bind(t).apply(void 0,arguments))}return r.wrapFn=i,i}(this,t,e))}},{key:"off",value:function(t,e){var n;return this._handlers=q()(n=this._handlers).call(n,(function(n){return n.event!==t||n.handler!==e})),this}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r2?r-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return new(V())((function(a,s){e.URLTemplateFilters.forEach((function(e){t=e(t)}));var o=Date.now();e.emit("VAST-resolving",{url:t,previousUrl:r,wrapperDepth:n,maxWrapperDepth:e.maxWrapperDepth,timeout:e.fetchingOptions.timeout,wrapperAd:i}),e.urlHandler.get(t,e.fetchingOptions,(function(i,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=Math.round(Date.now()-o),d=ee()({url:t,previousUrl:r,wrapperDepth:n,error:i,duration:l},u);e.emit("VAST-resolved",d),cn(u.byteLength,l),i?s(i):a(c)}))}))}},{key:"initParsingStatus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errorURLTemplates=[],this.fetchingOptions={timeout:t.timeout||tn,withCredentials:t.withCredentials},this.maxWrapperDepth=t.wrapperLimit||10,this.parsingOptions={allowMultipleAds:t.allowMultipleAds},this.remainingAds=[],this.rootErrorURLTemplates=[],this.rootURL="",this.urlHandler=t.urlHandler||t.urlhandler||an,this.vastVersion=null,cn(t.byteLength,t.requestDuration)}},{key:"getRemainingAds",value:function(t){var e=this;if(0===this.remainingAds.length)return V().reject(new Error("No more ads are available for the given VAST"));var n=t?Ie.flatten(this.remainingAds):this.remainingAds.shift();return this.errorURLTemplates=[],this.resolveAds(n,{wrapperDepth:0,url:this.rootURL}).then((function(t){return e.buildVASTResponse(t)}))}},{key:"getAndParseVAST",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.initParsingStatus(n),this.URLTemplateFilters.forEach((function(e){t=e(t)})),this.rootURL=t,this.fetchVAST(t).then((function(r){return n.previousUrl=t,n.isRootVAST=!0,n.url=t,e.parse(r,n).then((function(t){return e.buildVASTResponse(t)}))}))}},{key:"parseVAST",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(t,n).then((function(t){return e.buildVASTResponse(t)}))}},{key:"buildVASTResponse",value:function(t){var e,n={ads:(e={ads:t,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion}).ads||[],errorURLTemplates:e.errorURLTemplates||[],version:e.version||null};return this.completeWrapperResolving(n),n}},{key:"parseVastXml",value:function(t,e){var n=e.isRootVAST,r=void 0!==n&&n,i=e.url,a=void 0===i?null:i,s=e.wrapperDepth,o=void 0===s?0:s,c=e.allowMultipleAds,u=e.followAdditionalWrappers;if(!t||!t.documentElement||"VAST"!==t.documentElement.nodeName)throw this.emit("VAST-ad-parsed",{type:"ERROR",url:a,wrapperDepth:o}),new Error("Invalid VAST XMLDocument");var l=[],d=t.documentElement.childNodes,p=t.documentElement.getAttribute("version");for(var h in r&&p&&(this.vastVersion=p),d){var f=d[h];if("Error"===f.nodeName){var v=Re.parseNodeText(f);r?this.rootErrorURLTemplates.push(v):this.errorURLTemplates.push(v)}else if("Ad"===f.nodeName){if(this.vastVersion&&R()(this.vastVersion)<3)c=!0;else if(!1===c&&l.length>1)break;var m=Ge(f,this.emit.bind(this),{allowMultipleAds:c,followAdditionalWrappers:u});m.ad?(l.push(m.ad),this.emit("VAST-ad-parsed",{type:m.type,url:a,wrapperDepth:o,adIndex:l.length-1,vastVersion:p})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return l}},{key:"parse",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.url,r=void 0===n?null:n,i=e.resolveAll,a=void 0===i||i,s=e.wrapperSequence,o=void 0===s?null:s,c=e.previousUrl,u=void 0===c?null:c,l=e.wrapperDepth,d=void 0===l?0:l,p=e.isRootVAST,h=void 0!==p&&p,f=e.followAdditionalWrappers,v=e.allowMultipleAds,m=[];this.vastVersion&&R()(this.vastVersion)<3&&h&&(v=!0);try{m=this.parseVastXml(t,{isRootVAST:h,url:r,wrapperDepth:d,allowMultipleAds:v,followAdditionalWrappers:f})}catch(t){return V().reject(t)}return 1===m.length&&null!=o&&(m[0].sequence=o),!1===a&&(this.remainingAds=Re.splitVAST(m),m=this.remainingAds.shift()),this.resolveAds(m,{wrapperDepth:d,previousUrl:u,url:r})}},{key:"resolveAds",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=n.wrapperDepth,i=n.previousUrl,a=n.url,s=[];return i=a,e.forEach((function(e){var n=t.resolveWrappers(e,r,i);s.push(n)})),V().all(s).then((function(e){var n=Ie.flatten(e);if(!n&&t.remainingAds.length>0){var s=t.remainingAds.shift();return t.resolveAds(s,{wrapperDepth:r,previousUrl:i,url:a})}return n}))}},{key:"resolveWrappers",value:function(t,e,n){var r=this;return new(V())((function(i){var a;if(e++,!t.nextWrapperURL)return delete t.nextWrapperURL,i(t);if(e>=r.maxWrapperDepth)return t.errorCode=302,delete t.nextWrapperURL,i(t);t.nextWrapperURL=Re.resolveVastAdTagURI(t.nextWrapperURL,n),r.URLTemplateFilters.forEach((function(e){t.nextWrapperURL=e(t.nextWrapperURL)}));var s=null!==(a=r.parsingOptions.allowMultipleAds)&&void 0!==a?a:t.allowMultipleAds,o=t.sequence;r.fetchVAST(t.nextWrapperURL,e,n,t).then((function(a){return r.parse(a,{url:t.nextWrapperURL,previousUrl:n,wrapperSequence:o,wrapperDepth:e,followAdditionalWrappers:t.followAdditionalWrappers,allowMultipleAds:s}).then((function(e){if(delete t.nextWrapperURL,0===e.length)return t.creatives=[],i(t);e.forEach((function(e){e&&Re.mergeWrapperAdData(e,t)})),i(e)}))})).catch((function(e){t.errorCode=301,t.errorMessage=e.message,i(t)}))}))}},{key:"completeWrapperResolving",value:function(t){if(0===t.ads.length)this.trackVastError(t.errorURLTemplates,{ERRORCODE:303});else for(var e=t.ads.length-1;e>=0;e--){var n,r,i=t.ads[e];if(i.errorCode||0===i.creatives.length)this.trackVastError(B()(n=i.errorURLTemplates).call(n,t.errorURLTemplates),{ERRORCODE:i.errorCode||303},{ERRORMESSAGE:i.errorMessage||""},{extensions:i.extensions},{system:i.system}),Zt()(r=t.ads).call(r,e,1)}}}])}(Xe),dn=function(){return _((function t(e,n,r){m(this,t),this.cappingFreeLunch=e||0,this.cappingMinimumTimeInterval=n||0,this.defaultOptions={withCredentials:!1,timeout:0},this.vastParser=new ln,this.storage=r||new ie,void 0===this.lastSuccessfulAd&&(this.lastSuccessfulAd=0),void 0===this.totalCalls&&(this.totalCalls=0),void 0===this.totalCallsTimeout&&(this.totalCallsTimeout=0)}),[{key:"getParser",value:function(){return this.vastParser}},{key:"lastSuccessfulAd",get:function(){return this.storage.getItem("vast-client-last-successful-ad")},set:function(t){this.storage.setItem("vast-client-last-successful-ad",t)}},{key:"totalCalls",get:function(){return this.storage.getItem("vast-client-total-calls")},set:function(t){this.storage.setItem("vast-client-total-calls",t)}},{key:"totalCallsTimeout",get:function(){return this.storage.getItem("vast-client-total-calls-timeout")},set:function(t){this.storage.setItem("vast-client-total-calls-timeout",t)}},{key:"hasRemainingAds",value:function(){return this.vastParser.remainingAds.length>0}},{key:"getNextAds",value:function(t){return this.vastParser.getRemainingAds(t)}},{key:"get",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Date.now();return(n=ee()({},this.defaultOptions,n)).hasOwnProperty("resolveAll")||(n.resolveAll=!1),this.totalCallsTimeout=e.totalCalls)return a(new Error(B()(s="VAST call canceled – FreeLunch capping not reached yet ".concat(e.totalCalls,"/")).call(s,e.cappingFreeLunch)));var o=r-e.lastSuccessfulAd;if(o<0)e.lastSuccessfulAd=0;else if(o-1&&(r.unregisterCallback(e),0===r.callbacks.length&&delete this.events[t])}},{key:"off",value:function(t,e){var n=this;"string"==typeof t&&""!==t&&"function"==typeof e&&t.split(" ").forEach((function(t){n._off(t,e)}))}},{key:"_addTrackingEvents",value:function(t){var e=this;C()(t).forEach((function(n){t[n].forEach((function(t){e.trackingTags.push({event:n,url:t})}))}))}},{key:"_handleIntersect",value:function(t){var e=this;t.forEach((function(t){t.intersectionRatio>e.viewablePreviousRatio&&(e.viewableObserver.unobserve(e.container),e.rmpVastTracking.dispatchTrackingAndApiEvent("adviewable")),e.viewablePreviousRatio=t.intersectionRatio}))}},{key:"_attachViewableObserver",value:function(){if(this.off("adstarted",this.attachViewableObserverFn),void 0!==window.IntersectionObserver){this.viewableObserver=new IntersectionObserver(this._handleIntersect.bind(this),{root:null,rootMargin:"0px",threshold:[.5]}),this.viewableObserver.observe(this.container)}else this.rmpVastTracking.dispatchTrackingAndApiEvent("adviewundetermined")}},{key:"_initViewableImpression",value:function(){var t=this;this.viewableObserver&&this.viewableObserver.unobserve(this.container),this.ad.viewableImpression.forEach((function(e){e.viewable.length>0&&e.viewable.forEach((function(e){t.trackingTags.push({event:"viewable",url:e})})),e.notViewable.length>0&&e.notViewable.forEach((function(e){t.trackingTags.push({event:"notviewable",url:e})})),e.viewUndetermined.length>0&&e.viewUndetermined.forEach((function(e){t.trackingTags.push({event:"viewundetermined",url:e})}))})),this.attachViewableObserverFn=this._attachViewableObserver.bind(this),this.on("adstarted",this.attachViewableObserverFn)}},{key:"_loopAds",value:(t=f().mark((function t(e){var n,r,i=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=f().mark((function t(n){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new(V())((function(t){var r=e[n];if(i.debugRawConsoleLogs,i.ad.id=r.id,i.ad.adServingId=r.adServingId,i.ad.categories=r.categories,i.requireCategory&&(0!==i.ad.categories.length&&i.ad.categories[0].authority||(i.rmpVastUtils.processVastErrors(204,!0),t())),i.ad.blockedAdCategories=r.blockedAdCategories,i.requireCategory){var a=!1;i.ad.blockedAdCategories.forEach((function(t){var e=t.authority,n=t.value;i.ad.categories.forEach((function(t){var r=t.authority,s=t.value;e===r&&n===s&&(i.rmpVastUtils.processVastErrors(205,!0),a=!0)}))})),a&&t()}if(i.ad.adType=r.adType,i.ad.title=r.title,i.ad.description=r.description,i.ad.system=r.system,i.ad.advertiser=r.advertiser,i.ad.pricing=r.pricing,i.ad.survey=r.survey,i.ad.sequence=r.sequence,S()(e).call(e,(function(t){return i.adPod=!1,!!(t.sequence&&t.sequence>1)&&(i.adPod=!0,!0)})),i.adPod){var s=I()(e).call(e,(function(t,e){return t.sequence>e.sequence?t:e})).sequence;if(e.forEach((function(t){null===t.sequence&&(t.sequence=s+1,s++)})),i.adSequence++,0===i.adPodLength){var o=0;e.forEach((function(t){t.sequence&&o++})),i.adPodLength=o,i.debugRawConsoleLogs,"AdPod detected with length ".concat(i.adPodLength)}i.one("addestroyed",(function(){i.adSequence===i.adPodLength&&(i.adPodLength=0,i.adSequence=0,i.adPod=!1,i.rmpVastUtils.createApiEvent("adpodcompleted")),t()}))}i.ad.viewableImpression=r.viewableImpression,i.ad.viewableImpression.length>0&&i._initViewableImpression(),r.errorURLTemplates.forEach((function(t){i.adErrorTags.push({event:"error",url:t})})),r.impressionURLTemplates.forEach((function(t){t.url&&i.trackingTags.push({event:"impression",url:t.url})}));var c=r.creatives;i.debugRawConsoleLogs,S()(c).call(c,(function(t){return"companion"===t.type&&(i.debugRawConsoleLogs,i.rmpVastCompanionCreative.parse(t),!0)}));for(var u=0;u0&&l.videoClickTrackingURLTemplates.forEach((function(t){t.url&&i.trackingTags.push({event:"clickthrough",url:t.url})})),i.creative.isLinear=!0,l.interactiveCreativeFile&&/simid/i.test(l.interactiveCreativeFile.apiFramework)&&/text\/html/i.test(l.interactiveCreativeFile.type)&&(i.creative.simid={fileURL:l.interactiveCreativeFile.fileURL,variableDuration:l.interactiveCreativeFile.variableDuration},l.adParameters&&l.adParameters.value&&(i.creative.simid.adParameters=l.adParameters.value)),i._addTrackingEvents(l.trackingEvents),i.rmpVastLinearCreative=new zt(i),i.rmpVastLinearCreative.parse(l),i.params.omidSupport&&r.adVerifications.length>0&&new Yt(r.adVerifications,i).init();break;case"nonlinear":i.creative.isLinear=!1,i._addTrackingEvents(l.trackingEvents),i.rmpVastNonLinearCreative=new Gt(i),i.rmpVastNonLinearCreative.parse(l.variations)}}}));case 2:case"end":return t.stop()}}),t)})),r=0;case 2:if(!(r0&&t.errorURLTemplates.forEach((function(t){e.vastErrorTags.push({event:"error",url:t})})),0!==t.ads.length?this._loopAds(t.ads):this.rmpVastUtils.processVastErrors(303,!0)}},{key:"_getVastTag",value:function(t){var e=this;if("string"==typeof t&&""!==t)if("undefined"!=typeof DOMParser)if(this.rmpVastUtils.createApiEvent("adtagstartloading"),this.params.vastXmlInput){var n;try{n=(new DOMParser).parseFromString(t,"text/xml")}catch(t){return console.warn(t),void this.rmpVastUtils.processVastErrors(900,!0)}(new ln).parseVAST(n).then((function(t){e.rmpVastUtils.createApiEvent("adtagloaded"),e._handleParsedVast(t)})).catch((function(t){console.warn(t),e.rmpVastUtils.processVastErrors(900,!0)}))}else{var r=new dn,i={timeout:this.params.ajaxTimeout,withCredentials:this.params.ajaxWithCredentials,wrapperLimit:this.params.maxNumRedirects,resolveAll:!1,allowMultipleAds:!0};this.__adTagUrl=t,this.debugRawConsoleLogs,"Try to load VAST tag at: ".concat(this.__adTagUrl),r.get(this.__adTagUrl,i).then((function(t){e.rmpVastUtils.createApiEvent("adtagloaded"),e._handleParsedVast(t)})).catch((function(t){console.warn(t),e.rmpVastUtils.processVastErrors(900,!0)}))}else this.rmpVastUtils.processVastErrors(1002,!1);else this.rmpVastUtils.processVastErrors(1001,!1)}},{key:"loadAds",value:function(t,e,n){if(this.debugRawConsoleLogs,this.rmpVastInitialized||this.initialize(),"object"===i(e)){e.regulations&&/coppa|gdpr/gi.test(e.regulations)&&(this.regulationsInfo.regulations=e.regulations);e.limitAdTracking&&/0|1/gi.test(e.limitAdTracking)&&(this.regulationsInfo.limitAdTracking=e.limitAdTracking),e.gdprConsent&&(this.regulationsInfo.gdprConsent=e.gdprConsent)}n&&(this.requireCategory=!0);var r=t;if(this.params.vastXmlInput||(r=this.rmpVastTracking.replaceMacros(t,!1)),this.__adOnStage)return this.debugRawConsoleLogs,this.one("addestroyed",this.loadAds.bind(this,r)),void this.stopAds();this._getVastTag(r)}},{key:"play",value:function(){this.__adOnStage&&this.creative&&this.creative.isLinear?this.rmpVastVpaidPlayer?this.rmpVastVpaidPlayer.resumeAd():this.rmpVastAdPlayer&&this.rmpVastAdPlayer.play():this.rmpVastContentPlayer.play()}},{key:"pause",value:function(){this.__adOnStage&&this.creative&&this.creative.isLinear?this.rmpVastVpaidPlayer?this.rmpVastVpaidPlayer.pauseAd():this.rmpVastAdPlayer&&this.rmpVastAdPlayer.pause():this.rmpVastContentPlayer.pause()}},{key:"stopAds",value:function(){this.__adOnStage&&(this.rmpVastVpaidPlayer?this.rmpVastVpaidPlayer.stopAd():this.rmpVastSimidPlayer?this.rmpVastSimidPlayer.stopAd():this.rmpVastAdPlayer&&this.rmpVastAdPlayer.resumeContent())}},{key:"destroy",value:function(){this.rmpVastUtils.destroyFullscreen(),this.rmpVastAdPlayer&&this.rmpVastAdPlayer.destroy(),this._initInstanceVariables()}},{key:"skipAd",value:function(){this.__adOnStage&&this.adSkippableState&&(this.rmpVastVpaidPlayer?this.rmpVastVpaidPlayer.skipAd():this.rmpVastSimidPlayer?this.rmpVastSimidPlayer.skipAd():this.rmpVastAdPlayer&&this.rmpVastAdPlayer.resumeContent())}},{key:"environment",get:function(){return this.environmentData}},{key:"adPaused",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getAdPaused();if(this.currentAdPlayer)return this.currentAdPlayer.paused}return!1}},{key:"volume",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getAdVolume();if(this.rmpVastAdPlayer)return this.rmpVastAdPlayer.volume}return this.rmpVastContentPlayer.volume},set:function(t){if(L.isNumber(t)){var e=0;e=t<0?0:t>1?1:t,this.__adOnStage&&this.creative&&this.creative.isLinear&&(this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.setAdVolume(e),this.rmpVastAdPlayer&&(this.rmpVastAdPlayer.volume=e)),this.rmpVastContentPlayer.volume=e}}},{key:"muted",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer)return 0===this.rmpVastVpaidPlayer.getAdVolume();if(this.rmpVastAdPlayer)return this.rmpVastAdPlayer.muted}return this.rmpVastContentPlayer.muted},set:function(t){"boolean"==typeof t&&(this.__adOnStage&&this.creative&&this.creative.isLinear&&(this.rmpVastVpaidPlayer?t?this.rmpVastVpaidPlayer.setAdVolume(0):this.rmpVastVpaidPlayer.setAdVolume(1):this.rmpVastAdPlayer&&(this.rmpVastAdPlayer.muted=t)),this.rmpVastContentPlayer.muted=t)}},{key:"adTagUrl",get:function(){return this.__adTagUrl}},{key:"adMediaUrl",get:function(){if(this.__adOnStage){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getCreativeUrl();if(this.creative&&this.creative.mediaUrl)return this.creative.mediaUrl}return""}},{key:"adLinear",get:function(){return!(!this.creative||!this.creative.isLinear)}},{key:"adSystem",get:function(){return this.ad&&this.ad.system?{value:this.ad.system.value||"",version:this.ad.system.version||""}:{value:"",version:""}}},{key:"adUniversalAdIds",get:function(){return this.creative&&this.creative.universalAdIds?this.creative.universalAdIds:[]}},{key:"adContentType",get:function(){return this.creative&&this.creative.type?this.creative.type:""}},{key:"adTitle",get:function(){return this.ad&&this.ad.title?this.ad.title:""}},{key:"adDescription",get:function(){return this.ad&&this.ad.description?this.ad.description:""}},{key:"adAdvertiser",get:function(){return this.ad&&this.ad.advertiser&&null!==this.ad.advertiser?this.ad.advertiser:{id:"",value:""}}},{key:"adPricing",get:function(){return this.ad&&this.ad.pricing&&null!==this.ad.pricing?this.ad.pricing:{value:"",model:"",currency:""}}},{key:"adSurvey",get:function(){return this.ad&&this.ad.survey?this.ad.survey:{value:"",type:""}}},{key:"adAdServingId",get:function(){return this.ad&&this.ad.adServingId?this.ad.adServingId:""}},{key:"adCategories",get:function(){return this.ad&&this.ad.categories&&this.ad.categories.length>0?this.ad.categories:[]}},{key:"adBlockedAdCategories",get:function(){return this.ad&&this.ad.blockedAdCategories&&this.ad.blockedAdCategories.length>0?this.ad.blockedAdCategories:[]}},{key:"adDuration",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer){var t=this.rmpVastVpaidPlayer.getAdDuration();return t>0&&(t*=1e3),t}if(this.rmpVastAdPlayer)return this.rmpVastAdPlayer.duration}return-1}},{key:"adCurrentTime",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer){var t=this.rmpVastVpaidPlayer.getAdRemainingTime(),e=this.rmpVastVpaidPlayer.getAdDuration();return-1===t||-1===e||t>e?-1:1e3*(e-t)}if(this.rmpVastAdPlayer)return this.rmpVastAdPlayer.currentTime}return-1}},{key:"adRemainingTime",get:function(){if(this.__adOnStage&&this.creative&&this.creative.isLinear){if(this.rmpVastVpaidPlayer){var t=this.rmpVastVpaidPlayer.getAdRemainingTime();return t>0&&(t*=1e3),t}if(this.rmpVastAdPlayer){var e=this.rmpVastAdPlayer.currentTime,n=this.rmpVastAdPlayer.duration;return-1===e||-1===n||e>n?-1:n-e}}return-1}},{key:"adOnStage",get:function(){return this.__adOnStage}},{key:"adMediaWidth",get:function(){if(this.__adOnStage){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getAdWidth();if(this.creative&&this.creative.width)return this.creative.width}return-1}},{key:"adMediaHeight",get:function(){if(this.__adOnStage){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getAdHeight();if(this.creative&&this.creative.height)return this.creative.height}return-1}},{key:"clickThroughUrl",get:function(){return this.creative&&this.creative.clickThroughUrl?this.creative.clickThroughUrl:""}},{key:"skipTimeOffset",get:function(){return this.creative&&this.creative.skipoffset?this.creative.skipoffset:-1}},{key:"isSkippableAd",get:function(){return!(!this.creative||!this.creative.isSkippableAd)}},{key:"contentPlayerCompleted",get:function(){return this.contentCompleted},set:function(t){"boolean"==typeof t&&(this.contentCompleted=t)}},{key:"adErrorMessage",get:function(){return this.__adErrorMessage}},{key:"adVastErrorCode",get:function(){return this.__vastErrorCode}},{key:"adErrorType",get:function(){return this.__adErrorType}},{key:"adSkippableState",get:function(){if(this.__adOnStage){if(this.rmpVastVpaidPlayer)return this.rmpVastVpaidPlayer.getAdSkippableState();if(this.rmpVastSimidPlayer)return!0;if(this.isSkippableAd&&this.rmpVastLinearCreative)return this.rmpVastLinearCreative.skippableAdCanBeSkipped}return!1}},{key:"adPlayer",get:function(){return this.currentAdPlayer}},{key:"contentPlayer",get:function(){return this.currentContentPlayer}},{key:"initialized",get:function(){return this.rmpVastInitialized}},{key:"adPodInfo",get:function(){if(this.adPod&&this.adPodLength){var t={};return t.adPodCurrentIndex=this.adSequence,t.adPodLength=this.adPodLength,t}return{adPodCurrentIndex:-1,adPodLength:0}}},{key:"companionAdsRequiredAttribute",get:function(){return this.rmpVastCompanionCreative.requiredAttribute}},{key:"getCompanionAdsList",value:function(t,e){return this.rmpVastCompanionCreative.getList(t,e)}},{key:"getCompanionAd",value:function(t){return this.rmpVastCompanionCreative.getItem(t)}},{key:"initialize",value:function(){this.rmpVastInitialized||(this.debugRawConsoleLogs,this.rmpVastAdPlayer=new Qt(this),this.rmpVastAdPlayer.init())}},{key:"resizeAd",value:function(t,e,n){this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.resizeAd(t,e,n)}},{key:"expandAd",value:function(){this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.expandAd()}},{key:"collapseAd",value:function(){this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.collapseAd()}},{key:"adExpanded",get:function(){return this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.getAdExpanded(),!1}},{key:"vpaidCompanionAds",get:function(){return this.rmpVastVpaidPlayer&&this.rmpVastVpaidPlayer.getAdCompanions(),""}}]);var t,e}()}(),window.RmpVast=r.default}(); //# sourceMappingURL=rmp-vast.min.js.map \ No newline at end of file