!function(){"use strict";functione(n){returnfunction(e){returnr=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;vart,r}}functions(e){returnnull!=e}functiono(e){returnfunction(){returne}}functiont(e){returne}functionr(){returnd}varn=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(vart,r=1,n=arguments.length;r<n;r++)for(varaint=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);returne}).apply(this,arguments)},i=e("string"),u=e("object"),l=e("array"),c=o(!1),m=o(!0),d={fold:function(e,t){returne()},isSome:c,isNone:m,getOr:t,getOrThunk:a,getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void0),or:t,orThunk:a,map:r,each:function(){},bind:r,exists:c,forall:m,filter:function(){returnd},toArray:function(){return[]},toString:o("none()")};functiona(e){returne()}functionh(e,t){for(varr=0,n=e.length;r<n;r++)t(e[r],r)}functionf(e){vart=e;return{get:function(){returnt},set:function(e){t=e}}}functiong(e,t){returnJ(e,t)?W.from(e[t]):W.none()}functionv(e){returne.getParam("media_scripts")}functionb(e,t){if(e)for(varr=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))returne[r]}functionw(e){returne.replace(/px$/,"")}functiony(i,e){varc=f(!1),s={};returnV({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(J(t.map,"data-ephox-embed-iri"))c.set(!0),o=(a=(n=t).map.style)?X.parseStyle(a):{},s={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:g(o,"max-width").map(w).getOr(""),height:g(o,"max-height").map(w).getOr("")};else{if(s.source||"param"!==e||(s.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(s.type||(s.type=e),s=K.extend(t.map,s)),"script"===e){varr=b(i,t.map.src);if(!r)return;s={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(s.source?s.altsource||(s.altsource=t.map.src):s.source=t.map.src),"img"!==e||s.poster||(s.poster=t.map.src)}varn,a,o}}).parse(e),s.source=s.source||s.src||s.data,s.altsource=s.altsource||"",s.poster=s.poster||"",s}functionx(e){return{mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()]||""}functionj(e){return/^[0-9.]+$/.test(e)?e+"px":e}functionO(o,e){!function(e){for(vart=q(e),r=0,n=t.length;r<n;r++){vara=t[r];!function(e,t){varr=""+e;if(o.map[t])for(varn=o.length;n--;){vara=o[n];a.name===t&&(r?(o.map[t]=r,a.value=r):(deleteo.map[t],o.splice(n,1)))}elser&&(o.push({name:t,value:r}),o.map[t]=r)}(e[a],a)}}(e)}functionS(e,c,s){varu,l=Z(),m=f(!1),d=0;returnV({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(J(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,(i=(o=(a=t).map.style)?ee.parseStyle(o):{})["max-width"]=j(n.width),i["max-height"]=j(n.height),O(a,{style:ee.serializeStyle(i)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":void0!==c.height&&void0!==c.width&&O(t,{width:c.width,height:c.height})}if(s)switch(e){case"video":O(t,{poster:c.poster,src:""}),c.altsource&&O(t,{src:""});break;case"iframe":O(t,{src:c.source});break;case"source":if(d<2&&(O(t,{src:c[te[d]],type:c[te[d]+"mime"]}),!c[te[d]]))return;d++;break;case"img":if(!c.poster)return;u=!0}}varn,a,o,i;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&s)for(vart,r=0;r<2;r++)c[te[r]]&&((t=[]).map={},d<=r&&(O(t,{src:c[te[r]],type:c[te[r]+"mime"]}),l.start("source",t,!0)));varn;c.poster&&"object"===e&&s&&!u&&((n=[]).map={},O(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0))}l.end(e)}},Y({})).parse(e),l.getContent()}function_(e,t){for(var