(function($){var tmp,loading,overlay,wrap,outer,content,close,title,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image,imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$/i,loadingTimer,loadingFrame=1,titleHeight=0,titleStr="",start_pos,final_pos,busy=!1,fx=$.extend($("
")[0],{prop:0}),isIE=!+"\v1",isIE6=isIE&&!window.XMLHttpRequest;_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort()}tmp.empty()},_error=function(){if(!1===selectedOpts.onError(selectedArray,selectedIndex,selectedOpts)){loading.hide();busy=!1;return}selectedOpts.titleShow=!1;selectedOpts.width="auto";selectedOpts.height="auto";tmp.html('

The requested content cannot be loaded.
Please try again later.

');_process_inline()},_start=function(){var obj=selectedArray[selectedIndex],href,type,title,str,emb,ret;_abort();selectedOpts=$.extend({},$.fn.fancybox.defaults,typeof $(obj).data("fancybox")=="undefined"?selectedOpts:$(obj).data("fancybox"));ret=selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts);if(ret===!1){busy=!1;return}else if(typeof ret=="object"){selectedOpts=$.extend(selectedOpts,ret)}title=selectedOpts.title||(obj.nodeName?$(obj).attr("title"):obj.title)||"";if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj)}if(title===""&&selectedOpts.orig&&selectedOpts.titleFromAlt){title=selectedOpts.orig.attr("alt")}href=selectedOpts.href||(obj.nodeName?$(obj).attr("href"):obj.href)||null;if(/^(?:javascript)/i.test(href)||href=="#"){href=null}if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content}}else if(selectedOpts.content){type="html"}else if(href){if(href.match(imgRegExp)){type="image"}else if(href.match(swfRegExp)){type="swf"}else if($(obj).hasClass("iframe")){type="iframe"}else if(href.indexOf("#")===0){type="inline"}else{type="ajax"}}if(!type){_error();return}if(type=="inline"){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?"inline":"ajax"}selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions){if(selectedOpts.type=="html"||selectedOpts.type=="inline"||selectedOpts.type=="ajax"){selectedOpts.width="auto";selectedOpts.height="auto"}else{selectedOpts.autoDimensions=!1}}if(selectedOpts.modal){selectedOpts.overlayShow=!0;selectedOpts.hideOnOverlayClick=!1;selectedOpts.hideOnContentClick=!1;selectedOpts.enableEscapeButton=!1;selectedOpts.showCloseButton=!1}selectedOpts.padding=parseInt(selectedOpts.padding,10);selectedOpts.margin=parseInt(selectedOpts.margin,10);tmp.css("padding",selectedOpts.padding+selectedOpts.margin);$(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){$(this).replaceWith(content.children())});switch(type){case"html":tmp.html(selectedOpts.content);_process_inline();break;case"inline":if($(obj).parent().is("#fancybox-content")===!0){busy=!1;return}$('
').hide().insertBefore($(obj)).bind("fancybox-cleanup",function(){$(this).replaceWith(content.children())}).bind("fancybox-cancel",function(){$(this).replaceWith(tmp.children())});$(obj).appendTo(tmp);_process_inline();break;case"image":busy=!1;$.fancybox.showActivity();imgPreloader=new Image;imgPreloader.onerror=function(){_error()};imgPreloader.onload=function(){busy=!0;imgPreloader.onerror=imgPreloader.onload=null;_process_image()};imgPreloader.src=href;break;case"swf":selectedOpts.scrolling="no";str='';emb="";$.each(selectedOpts.swf,function(name,val){str+='';emb+=" "+name+'="'+val+'"'});str+='";tmp.html(str);_process_inline();break;case"ajax":busy=!1;$.fancybox.showActivity();selectedOpts.ajax.win=selectedOpts.ajax.success;ajaxLoader=$.ajax($.extend({},selectedOpts.ajax,{url:href,data:selectedOpts.ajax.data||{},error:function(XMLHttpRequest,textStatus,errorThrown){if(XMLHttpRequest.status>0){_error()}},success:function(data,textStatus,XMLHttpRequest){var o=typeof XMLHttpRequest=="object"?XMLHttpRequest:ajaxLoader;if(o.status==200){if(typeof selectedOpts.ajax.win=="function"){ret=selectedOpts.ajax.win(href,data,textStatus,XMLHttpRequest);if(ret===!1){loading.hide();return}else if(typeof ret=="string"||typeof ret=="object"){data=ret}}tmp.html(data);_process_inline()}}}));break;case"iframe":_show();break}},_process_inline=function(){var w=selectedOpts.width,h=selectedOpts.height;if(w.toString().indexOf("%")>-1){w=parseInt(($(window).width()-selectedOpts.margin*2)*parseFloat(w)/100,10)+"px"}else{w=w=="auto"?"auto":w+"px"}if(h.toString().indexOf("%")>-1){h=parseInt(($(window).height()-selectedOpts.margin*2)*parseFloat(h)/100,10)+"px"}else{h=h=="auto"?"auto":h+"px"}tmp.wrapInner('
');selectedOpts.width=tmp.width();selectedOpts.height=tmp.height();_show()},_process_image=function(){selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;$("").attr({id:"fancybox-img",src:imgPreloader.src,alt:selectedOpts.title}).appendTo(tmp);_show()},_show=function(){var pos,equal;loading.hide();if(wrap.is(":visible")&&!1===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){$(".fancybox-inline-tmp").trigger("fancybox-cancel");busy=!1;return}busy=!0;$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind("keydown.fb");if(wrap.is(":visible")&¤tOpts.titlePosition!=="outside"){wrap.css("height",wrap.height())}currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;if(currentOpts.overlayShow){overlay.css({"background-color":currentOpts.overlayColor,opacity:currentOpts.overlayOpacity,cursor:currentOpts.hideOnOverlayClick?"pointer":"auto",height:$(document).height()});if(!overlay.is(":visible")){if(isIE6){$("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}overlay.show()}}else{overlay.hide()}final_pos=_get_zoom_to();_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();pos=wrap.position(),start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=start_pos.width==final_pos.width&&start_pos.height==final_pos.height;content.fadeTo(currentOpts.changeFade,.3,function(){var finish_resizing=function(){content.html(tmp.contents()).fadeTo(currentOpts.changeFade,1,_finish)};$(".fancybox-inline-tmp").trigger("fancybox-change");content.empty().removeAttr("filter").css({"border-width":currentOpts.padding,width:final_pos.width-currentOpts.padding*2,height:selectedOpts.autoDimensions?"auto":final_pos.height-titleHeight-currentOpts.padding*2});if(equal){finish_resizing()}else{fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:_draw,complete:finish_resizing})}});return}wrap.removeAttr("style");content.css("border-width",currentOpts.padding);if(currentOpts.transitionIn=="elastic"){start_pos=_get_zoom_from();content.html(tmp.contents());wrap.show();if(currentOpts.opacity){final_pos.opacity=0}fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:_draw,complete:_finish});return}if(currentOpts.titlePosition=="inside"&&titleHeight>0){title.show()}content.css({width:final_pos.width-currentOpts.padding*2,height:selectedOpts.autoDimensions?"auto":final_pos.height-titleHeight-currentOpts.padding*2}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=="none"?0:currentOpts.speedIn,_finish)},_format_title=function(title){if(title&&title.length){if(currentOpts.titlePosition=="float"){return'
'+title+'
'}return'
'+title+"
"}return!1},_process_title=function(){titleStr=currentOpts.title||"";titleHeight=0;title.empty().removeAttr("style").removeClass();if(currentOpts.titleShow===!1){title.hide();return}titleStr=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(titleStr,currentArray,currentIndex,currentOpts):_format_title(titleStr);if(!titleStr||titleStr===""){title.hide();return}title.addClass("fancybox-title-"+currentOpts.titlePosition).html(titleStr).appendTo("body").show();switch(currentOpts.titlePosition){case"inside":title.css({width:final_pos.width-currentOpts.padding*2,marginLeft:currentOpts.padding,marginRight:currentOpts.padding});titleHeight=title.outerHeight(!0);title.appendTo(outer);final_pos.height+=titleHeight;break;case"over":title.css({marginLeft:currentOpts.padding,width:final_pos.width-currentOpts.padding*2,bottom:currentOpts.padding}).appendTo(outer);break;case"float":title.css("left",parseInt((title.width()-final_pos.width-40)/2,10)*-1).appendTo(wrap);break;default:title.css({width:final_pos.width-currentOpts.padding*2,paddingLeft:currentOpts.padding,paddingRight:currentOpts.padding}).appendTo(wrap);break}title.hide()},_set_navigation=function(){if(currentOpts.enableEscapeButton||currentOpts.enableKeyboardNav){$(document).bind("keydown.fb",function(e){if(e.keyCode==27&¤tOpts.enableEscapeButton){e.preventDefault();$.fancybox.close()}else if((e.keyCode==37||e.keyCode==39)&¤tOpts.enableKeyboardNav&&e.target.tagName!=="INPUT"&&e.target.tagName!=="TEXTAREA"&&e.target.tagName!=="SELECT"){e.preventDefault();$.fancybox[e.keyCode==37?"prev":"next"]()}})}if(!currentOpts.showNavArrows){nav_left.hide();nav_right.hide();return}if(currentOpts.cyclic&¤tArray.length>1||currentIndex!==0){nav_left.show()}if(currentOpts.cyclic&¤tArray.length>1||currentIndex!=currentArray.length-1){nav_right.show()}},_finish=function(){if(!$.support.opacity){content.css("filter",0);wrap.css("filter",0)}if(selectedOpts.autoDimensions){content.css("height","auto")}wrap.css("height","auto");if(titleStr&&titleStr.length){title.show()}if(currentOpts.showCloseButton){close.show()}_set_navigation();if(currentOpts.hideOnContentClick){content.bind("click",$.fancybox.close)}if(currentOpts.hideOnOverlayClick){overlay.bind("click",$.fancybox.close)}$(window).bind("resize.fb",$.fancybox.resize);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center)}if(currentOpts.type=="iframe"){$('').appendTo(content)}wrap.show();busy=!1;$.fancybox.center();currentOpts.onComplete(currentArray,currentIndex,currentOpts);_preload_images()},_preload_images=function(){var href,objNext;if(currentArray.length-1>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=="undefined"&&href.match(imgRegExp)){objNext=new Image;objNext.src=href}}if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=="undefined"&&href.match(imgRegExp)){objNext=new Image;objNext.src=href}}},_draw=function(pos){var dim={width:parseInt(start_pos.width+(final_pos.width-start_pos.width)*pos,10),height:parseInt(start_pos.height+(final_pos.height-start_pos.height)*pos,10),top:parseInt(start_pos.top+(final_pos.top-start_pos.top)*pos,10),left:parseInt(start_pos.left+(final_pos.left-start_pos.left)*pos,10)};if(typeof final_pos.opacity!=="undefined"){dim.opacity=pos<.5?.5:pos}wrap.css(dim);content.css({width:dim.width-currentOpts.padding*2,height:dim.height-titleHeight*pos-currentOpts.padding*2})},_get_viewport=function(){return[$(window).width()-currentOpts.margin*2,$(window).height()-currentOpts.margin*2,$(document).scrollLeft()+currentOpts.margin,$(document).scrollTop()+currentOpts.margin]},_get_zoom_to=function(){var view=_get_viewport(),to={},resize=currentOpts.autoScale,double_padding=currentOpts.padding*2,ratio;if(currentOpts.width.toString().indexOf("%")>-1){to.width=parseInt(view[0]*parseFloat(currentOpts.width)/100,10)}else{to.width=currentOpts.width+double_padding}if(currentOpts.height.toString().indexOf("%")>-1){to.height=parseInt(view[1]*parseFloat(currentOpts.height)/100,10)}else{to.height=currentOpts.height+double_padding}if(resize&&(to.width>view[0]||to.height>view[1])){if(selectedOpts.type=="image"||selectedOpts.type=="swf"){ratio=currentOpts.width/currentOpts.height;if(to.width>view[0]){to.width=view[0];to.height=parseInt((to.width-double_padding)/ratio+double_padding,10)}if(to.height>view[1]){to.height=view[1];to.width=parseInt((to.height-double_padding)*ratio+double_padding,10)}}else{to.width=Math.min(to.width,view[0]);to.height=Math.min(to.height,view[1])}}to.top=parseInt(Math.max(view[3]-20,view[3]+(view[1]-to.height-40)*.5),10);to.left=parseInt(Math.max(view[2]-20,view[2]+(view[0]-to.width-40)*.5),10);return to},_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseInt(obj.css("paddingTop"),10)||0;pos.left+=parseInt(obj.css("paddingLeft"),10)||0;pos.top+=parseInt(obj.css("border-top-width"),10)||0;pos.left+=parseInt(obj.css("border-left-width"),10)||0;pos.width=obj.width();pos.height=obj.height();return pos},_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):!1,from={},pos,view;if(orig&&orig.length){pos=_get_obj_pos(orig);from={width:pos.width+currentOpts.padding*2,height:pos.height+currentOpts.padding*2,top:pos.top-currentOpts.padding-20,left:pos.left-currentOpts.padding-20}}else{view=_get_viewport();from={width:currentOpts.padding*2,height:currentOpts.padding*2,top:parseInt(view[3]+view[1]*.5,10),left:parseInt(view[2]+view[0]*.5,10)}}return from},_animate_loading=function(){if(!loading.is(":visible")){clearInterval(loadingTimer);return}$("div",loading).css("top",loadingFrame*-40+"px");loadingFrame=(loadingFrame+1)%12};$.fn.fancybox=function(options){if(!$(this).length){return this}$(this).data("fancybox",$.extend({},options,$.metadata?$(this).metadata():{})).unbind("click.fb").bind("click.fb",function(e){e.preventDefault();if(busy){return}busy=!0;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr("rel")||"";if(!rel||rel==""||rel==="nofollow"){selectedArray.push(this)}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this)}_start();return});return this};$.fancybox=function(obj){var opts;if(busy){return}busy=!0;opts=typeof arguments[1]!=="undefined"?arguments[1]:{};selectedArray=[];selectedIndex=parseInt(opts.index,10)||0;if($.isArray(obj)){for(var i=0,j=obj.length;iselectedArray.length||selectedIndex<0){selectedIndex=0}_start()};$.fancybox.showActivity=function(){clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(_animate_loading,66)};$.fancybox.hideActivity=function(){loading.hide()};$.fancybox.next=function(){return $.fancybox.pos(currentIndex+1)};$.fancybox.prev=function(){return $.fancybox.pos(currentIndex-1)};$.fancybox.pos=function(pos){if(busy){return}pos=parseInt(pos);selectedArray=currentArray;if(pos>-1&&pos1){selectedIndex=pos>=currentArray.length?0:currentArray.length-1;_start()}return};$.fancybox.cancel=function(){if(busy){return}busy=!0;$(".fancybox-inline-tmp").trigger("fancybox-cancel");_abort();selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);busy=!1};$.fancybox.close=function(){if(busy||wrap.is(":hidden")){return}busy=!0;if(currentOpts&&!1===currentOpts.onCleanup(currentArray,currentIndex,currentOpts)){busy=!1;return}_abort();$(close.add(nav_left).add(nav_right)).hide();$(content.add(overlay)).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind("keydown.fb");content.find("iframe").attr("src",isIE6&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");if(currentOpts.titlePosition!=="inside"){title.empty()}wrap.stop();function _cleanup(){overlay.fadeOut("fast");title.empty().hide();wrap.hide();$(".fancybox-inline-tmp, select:not(#fancybox-tmp select)").trigger("fancybox-cleanup");content.empty();currentOpts.onClosed(currentArray,currentIndex,currentOpts);currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=!1}if(currentOpts.transitionOut=="elastic"){start_pos=_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1}title.empty().hide();fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:_draw,complete:_cleanup})}else{wrap.fadeOut(currentOpts.transitionOut=="none"?0:currentOpts.speedOut,_cleanup)}};$.fancybox.resize=function(){if(overlay.is(":visible")){overlay.css("height",$(document).height())}$.fancybox.center(!0)};$.fancybox.center=function(){var view,align;if(busy){return}align=arguments[0]===!0?1:0;view=_get_viewport();if(!align&&(wrap.width()>view[0]||wrap.height()>view[1])){return}wrap.stop().animate({top:parseInt(Math.max(view[3]-20,view[3]+(view[1]-content.height()-40)*.5-currentOpts.padding)),left:parseInt(Math.max(view[2]-20,view[2]+(view[0]-content.width()-40)*.5-currentOpts.padding))},typeof arguments[0]=="number"?arguments[0]:200)};$.fancybox.init=function(){if($("#fancybox-wrap").length){return}$("body").append(tmp=$('
'),loading=$('
'),overlay=$('
'),wrap=$('
'));outer=$('
').append('
').appendTo(wrap);outer.append(content=$('
'),close=$(''),title=$('
'),nav_left=$(''),nav_right=$(''));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev()});nav_right.click(function(e){e.preventDefault();$.fancybox.next()});if($.fn.mousewheel){wrap.bind("mousewheel.fb",function(e,delta){if(busy){e.preventDefault()}else if($(e.target).get(0).clientHeight==0||$(e.target).get(0).scrollHeight===$(e.target).get(0).clientHeight){e.preventDefault();$.fancybox[delta>0?"prev":"next"]()}})}if(!$.support.opacity){wrap.addClass("fancybox-ie")}if(isIE6){loading.addClass("fancybox-ie6");wrap.addClass("fancybox-ie6");$('').prependTo(outer)}};$.fn.fancybox.defaults={padding:10,margin:40,opacity:!1,modal:!1,cyclic:!1,scrolling:"auto",width:560,height:340,autoScale:!0,autoDimensions:!0,centerOnScroll:!1,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:!0,hideOnContentClick:!1,overlayShow:!0,overlayOpacity:.7,overlayColor:"#777",titleShow:!0,titlePosition:"float",titleFormat:null,titleFromAlt:!1,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:!0,showNavArrows:!0,enableEscapeButton:!0,enableKeyboardNav:!0,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};$(document).ready(function(){$.fancybox.init()})})(jQuery); /** * @file postscribe * @description Asynchronously write javascript, even with document.write. * @version v2.0.8 * @see {@link https://krux.github.io/postscribe} * @license MIT * @author Derek Brans * @copyright 2016 Krux Digital, Inc */ var advanced_ads_pro,advads_pro_utils;if(function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports&&(exports.advads_postscribe=t()),e.advads_postscribe=t()}(this,(function(){return function(e){var t={};function a(i){if(t[i])return t[i].exports;var s=t[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,a),s.loaded=!0,s.exports}return a.m=e,a.c=t,a.p="",a(0)}([function(e,t,a){"use strict";var i,s=a(1),r=(i=s)&&i.__esModule?i:{default:i};e.exports=r.default},function(e,t,a){"use strict";t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,i=_+t;o.existy(a)&&""!==a?e.setAttribute(i,a):e.removeAttribute(i)}var T=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(this,e),this.root=t,this.options=a,this.doc=t.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new n.default("",{autoFix:a.autoFix}),this.actuals=[t],this.proxyHistory="",this.proxyRoot=this.doc.createElement(t.nodeName),this.scriptStack=[],this.writeQueue=[],u(this.proxyRoot,"proxyof",0)}return e.prototype.write=function(){var e;for((e=this.writeQueue).push.apply(e,arguments);!this.deferredRemote&&this.writeQueue.length;){var t=this.writeQueue.shift();o.isFunction(t)?this._callFunction(t):this._writeImpl(t)}},e.prototype._callFunction=function(e){var t={type:"function",value:e.name||e.toString()};this._onScriptStart(t),e.call(this.win,this.doc),this._onScriptDone(t)},e.prototype._writeImpl=function(e){this.parser.append(e);for(var t=void 0,a=void 0,i=void 0,s=[];(t=this.parser.readToken())&&!(a=o.isScript(t))&&!(i=o.isStyle(t));)(t=this.options.beforeWriteToken(t))&&s.push(t);s.length>0&&this._writeStaticTokens(s),a&&this._handleScriptToken(t),i&&this._handleStyleToken(t)},e.prototype._writeStaticTokens=function(e){var t=this._buildChunk(e);return t.actual?(t.html=this.proxyHistory+t.actual,this.proxyHistory+=t.proxy,this.proxyRoot.innerHTML=t.html,this._walkChunk(),t):null},e.prototype._buildChunk=function(e){for(var t=this.actuals.length,a=[],i=[],s=[],r=e.length,n=0;n)/," data-ps-id="+_+" $1")),o.attrs.id!==l&&o.attrs.id!==c&&s.push("atomicTag"===o.type?"":"<"+o.tagName+" "+"data-ps-proxyof="+_+(o.unary?" />":">"))}}else i.push(d),s.push("endTag"===o.type?d:"")}return{tokens:e,raw:a.join(""),actual:i.join(""),proxy:s.join("")}},e.prototype._walkChunk=function(){for(var e=void 0,t=[this.proxyRoot];o.existy(e=t.shift());){var a=1===e.nodeType;if(!(a&&p(e,"proxyof"))){a&&(this.actuals[p(e,"id")]=e,u(e,"id"));var i=e.parentNode&&p(e.parentNode,"proxyof");i&&this.actuals[i].appendChild(e)}t.unshift.apply(t,o.toArray(e.childNodes))}},e.prototype._handleScriptToken=function(e){var t=this,a=this.parser.clear();a&&this.writeQueue.unshift(a),e.src=e.attrs.src||e.attrs.SRC,(e=this.options.beforeWriteToken(e))&&(e.src&&this.scriptStack.length?this.deferredRemote=e:this._onScriptStart(e),this._writeScriptToken(e,(function(){t._onScriptDone(e)})))},e.prototype._handleStyleToken=function(e){var t=this.parser.clear();t&&this.writeQueue.unshift(t),e.type=e.attrs.type||e.attrs.TYPE||"text/css",(e=this.options.beforeWriteToken(e))&&this._writeStyleToken(e),t&&this.write()},e.prototype._writeStyleToken=function(e){var t=this._buildStyle(e);this._insertCursor(t,c),e.content&&(t.styleSheet&&!t.sheet?t.styleSheet.cssText=e.content:t.appendChild(this.doc.createTextNode(e.content)))},e.prototype._buildStyle=function(e){var t=this.doc.createElement(e.tagName);return t.setAttribute("type",e.type),o.eachKey(e.attrs,(function(e,a){t.setAttribute(e,a)})),t},e.prototype._insertCursor=function(e,t){this._writeImpl('');var a=this.doc.getElementById(t);a&&a.parentNode.replaceChild(e,a)},e.prototype._onScriptStart=function(e){e.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(e)},e.prototype._onScriptDone=function(e){e===this.scriptStack[0]?(this.scriptStack.shift(),this.write.apply(this,e.outerWrites),!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)):this.options.error({msg:"Bad script nesting or script finished twice"})},e.prototype._writeScriptToken=function(e,t){var a=this._buildScript(e),i=this._shouldRelease(a),s=this.options.afterAsync;e.src&&(a.src=e.src,this._scriptLoadHandler(a,i?s:function(){t(),s()}));try{this._insertCursor(a,l),a.src&&!i||t()}catch(e){this.options.error(e),t()}},e.prototype._buildScript=function(e){var t=this.doc.createElement(e.tagName);return o.eachKey(e.attrs,(function(e,a){t.setAttribute(e,a)})),e.content&&(t.text=e.content),t},e.prototype._scriptLoadHandler=function(e,t){function a(){e=e.onload=e.onreadystatechange=e.onerror=null}var i=this.options.error;function r(){a(),null!=t&&t(),t=null}function n(e){a(),i(e),null!=t&&t(),t=null}function o(e,t){var a=e["on"+t];null!=a&&(e["_on"+t]=a)}o(e,"load"),o(e,"error"),s(e,{onload:function(){if(e._onload)try{e._onload.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){n({msg:"onload handler failed "+t+" @ "+e.src})}r()},onerror:function(){if(e._onerror)try{e._onerror.apply(this,Array.prototype.slice.call(arguments,0))}catch(t){return void n({msg:"onerror handler failed "+t+" @ "+e.src})}n({msg:"remote script failed "+e.src})},onreadystatechange:function(){/^(loaded|complete)$/.test(e.readyState)&&r()}})},e.prototype._shouldRelease=function(e){return!/^script$/i.test(e.nodeName)||!!(this.options.releaseAsync&&e.src&&e.hasAttribute("async"))},e}();t.default=T},function(e,t,a){ /** * @file prescribe * @description Tiny, forgiving HTML parser * @version vundefined * @see {@link https://github.com/krux/prescribe/} * @license MIT * @author Derek Brans * @copyright 2016 Krux Digital, Inc */ var i;i=function(){return function(e){var t={};function a(i){if(t[i])return t[i].exports;var s=t[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,a),s.loaded=!0,s.exports}return a.m=e,a.c=t,a.p="",a(0)}([function(e,t,a){"use strict";var i,s=a(1),r=(i=s)&&i.__esModule?i:{default:i};e.exports=r.default},function(e,t,a){"use strict";t.__esModule=!0;var i,s=_(a(2)),r=_(a(3)),n=a(6),o=(i=n)&&i.__esModule?i:{default:i},d=a(5);function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var l={comment:/^