[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
05122024
/
htdocs
/
tracer
/
assets
/
tinymceee
/
js
/
tinymce
/
plugins
/
media
/
[
Home
]
File: plugin.min.js
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("1",tinymce.PluginManager),h("6",tinymce.util.Delay),h("c",tinymce.util.Tools),h("9",tinymce.html.SaxParser),h("a",tinymce.html.Schema),g("e",[],function(){var a=function(a,b){if(a)for(var c=0;c<a.length;c++)if(b.indexOf(a[c].filter)!==-1)return a[c]};return{getVideoScriptMatch:a}}),g("7",["c","9","a","e"],function(a,b,c,d){var e=function(c,e){var f={};return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(b,e){f.source1||"param"!==b||(f.source1=e.map.movie);var g=e.map["data-ephox-embed-iri"];if(g&&(f.type="ephox-embed-iri",f.source1=g),"iframe"!==b&&"object"!==b&&"embed"!==b&&"video"!==b&&"audio"!==b||(f.type||(f.type=b),f=a.extend(e.map,f)),"script"===b){var h=d.getVideoScriptMatch(c,e.map.src);if(!h)return;f={type:"script",source1:e.map.src,width:h.width,height:h.height}}"source"===b&&(f.source1?f.source2||(f.source2=e.map.src):f.source1=e.map.src),"img"!==b||f.poster||(f.poster=e.map.src)}}).parse(e),f.source1=f.source1||f.src||f.data,f.source2=f.source2||"",f.poster=f.poster||"","ephox-embed-iri"===f.type?a.extend({},{type:f.type,source1:f.source1,source2:"",poster:"",width:f.width,height:f.height}):f};return{htmlToData:e}}),h("8",tinymce.html.Writer),g("4",["8","9","a"],function(a,b,c){var d=function(a,b){var c,d,e,f;for(c in b)if(e=""+b[c],a.map[c])for(d=a.length;d--;)f=a[d],f.name===c&&(e?(a.map[c]=e,f.value=e):(delete a.map[c],a.splice(d,1)));else e&&(a.push({name:c,value:e}),a.map[c]=e)},e=function(e,f,g){var h,i=new a,j=0;return new b({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(a){i.comment(a)},cdata:function(a){i.cdata(a)},text:function(a,b){i.text(a,b)},start:function(a,b,c){switch(a){case"video":case"object":case"embed":case"img":case"iframe":d(b,{width:f.width,height:f.height})}if(g)switch(a){case"video":d(b,{poster:f.poster,src:""}),f.source2&&d(b,{src:""});break;case"iframe":d(b,{src:f.source1});break;case"source":if(j++,j<=2&&(d(b,{src:f["source"+j],type:f["source"+j+"mime"]}),!f["source"+j]))return;break;case"img":if(!f.poster)return;h=!0}i.start(a,b,c)},end:function(a){if("video"===a&&g)for(var b=1;b<=2;b++)if(f["source"+b]){var c=[];c.map={},j<b&&(d(c,{src:f["source"+b],type:f["source"+b+"mime"]}),i.start("source",c,!0))}if(f.poster&&"object"===a&&g&&!h){var e=[];e.map={},d(e,{src:f.poster,width:f.width,height:f.height}),i.start("img",e,!0)}i.end(a)}},new c({})).parse(e),i.getContent()};return{updateHtml:e}}),g("i",[],function(){var a=function(a){var b={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},c=a.toLowerCase().split(".").pop(),d=b[c];return d?d:""};return{guess:a}}),g("j",[],function(){var a=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}];return{urlPatterns:a}}),g("g",["i","7","j","e","4","c"],function(a,b,c,d,e,f){var g=function(g,h){var i="",j=f.extend({},h);if(!j.source1&&(f.extend(j,b.htmlToData(g.settings.media_scripts,j.embed)),!j.source1))return"";if(j.source2||(j.source2=""),j.poster||(j.poster=""),j.source1=g.convertURL(j.source1,"source"),j.source2=g.convertURL(j.source2,"source"),j.source1mime=a.guess(j.source1),j.source2mime=a.guess(j.source2),j.poster=g.convertURL(j.poster,"poster"),f.each(c.urlPatterns,function(a){var b,c,d=a.regex.exec(j.source1);if(d){for(c=a.url,b=0;d[b];b++)c=c.replace("$"+b,function(){return d[b]});j.source1=c,j.type=a.type,j.allowFullscreen=a.allowFullscreen,j.width=j.width||a.w,j.height=j.height||a.h}}),j.embed)i=e.updateHtml(j.embed,j,!0);else{var k=d.getVideoScriptMatch(g.settings.media_scripts,j.source1);if(k&&(j.type="script",j.width=k.width,j.height=k.height),j.width=j.width||300,j.height=j.height||150,f.each(j,function(a,b){j[b]=g.dom.encode(a)}),"iframe"===j.type){var l=j.allowFullscreen?' allowFullscreen="1"':"";i+='<iframe src="'+j.source1+'" width="'+j.width+'" height="'+j.height+'"'+l+"></iframe>"}else"application/x-shockwave-flash"===j.source1mime?(i+='<object data="'+j.source1+'" width="'+j.width+'" height="'+j.height+'" type="application/x-shockwave-flash">',j.poster&&(i+='<img src="'+j.poster+'" width="'+j.width+'" height="'+j.height+'" />'),i+="</object>"):j.source1mime.indexOf("audio")!==-1?g.settings.audio_template_callback?i=g.settings.audio_template_callback(j):i+='<audio controls="controls" src="'+j.source1+'">'+(j.source2?'\n<source src="'+j.source2+'"'+(j.source2mime?' type="'+j.source2mime+'"':"")+" />\n":"")+"</audio>":"script"===j.type?i+='<script src="'+j.source1+'"></script>':i=g.settings.video_template_callback?g.settings.video_template_callback(j):'<video width="'+j.width+'" height="'+j.height+'"'+(j.poster?' poster="'+j.poster+'"':"")+' controls="controls">\n<source src="'+j.source1+'"'+(j.source1mime?' type="'+j.source1mime+'"':"")+" />\n"+(j.source2?'<source src="'+j.source2+'"'+(j.source2mime?' type="'+j.source2mime+'"':"")+" />\n":"")+"</video>"}return i};return{dataToHtml:g}}),h("h",tinymce.util.Promise),g("b",["g","h"],function(a,b){var c=function(a,c,d){var e={};return new b(function(b,f){var g=function(d){return d.html&&(e[a.source1]=d),b({url:a.source1,html:d.html?d.html:c(a)})};e[a.source1]?g(e[a.source1]):d({url:a.source1},g,f)})},d=function(a,c){return new b(function(b){b({html:c(a),url:a.source1})})},e=function(b){return function(c){return a.dataToHtml(b,c)}},f=function(a,b){var f=a.settings.media_url_resolver;return f?c(b,e(a),f):d(b,e(a))};return{getEmbedHtml:f}}),h("d",tinymce.Env),g("2",["6","7","4","b","c","d"],function(a,b,c,d,e,f){var g=f.ie&&f.ie<=8?"onChange":"onInput",h=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},i=function(a){var c=a.selection.getNode(),d=c.getAttribute("data-ephox-embed-iri");return d?{source1:d,"data-ephox-embed-iri":d}:c.getAttribute("data-mce-object")?b.htmlToData(a.settings.media_scripts,a.serializer.serialize(c,{selection:!0})):{}},j=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object"))return a.selection.getContent()},k=function(a,c){return function(d){var f=d.html;a.find("#embed").value(f);var g=e.extend(b.htmlToData(c.settings.media_scripts,f),{source1:d.url});a.fromJSON(g),n(a)}},l=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c<b.length;c++)for(d=e.length-1;d>=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},m=function(a){return function(){var b=this.toJSON();d.getEmbedHtml(a,b).then(function(c){var d=a.dom.select("img[data-mce-object]"),e=b.embed?b.embed:c.html;a.insertContent(e),l(a,d),a.nodeChanged()}).catch(h(a))}},n=function(a){var b=a.find("#width")[0],c=a.find("#height")[0];b&&c&&(b.state.set("oldVal",b.value()),c.state.set("oldVal",c.value()))},o=function(a,b){e.each(b,function(b,c){a.find("#"+c).value(b)})},p=function(a){var f,l,p=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){d.getEmbedHtml(a,f.toJSON()).then(k(f,a)).catch(h(a))},1)},onchange:function(b){d.getEmbedHtml(a,f.toJSON()).then(k(f,a)).catch(h(a)),o(f,b.meta)},onbeforecall:function(a){a.meta=f.toJSON()}}],q=function(a){var b=f.find("#width")[0],d=f.find("#height")[0],e=b.state.get("oldVal"),g=d.state.get("oldVal"),h=b.value(),i=d.value();f.find("#constrain")[0].checked()&&e&&g&&h&&i&&(a.control.name()===b.name()?(i=Math.round(h/e*i),isNaN(i)||d.value(i)):(h=Math.round(i/g*h),isNaN(h)||b.value(h))),l=f.toJSON(),f.find("#embed").value(c.updateHtml(l.embed,l)),n(f)};a.settings.media_alt_source!==!1&&p.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&p.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1&&p.push({type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:q,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:q,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),l=i(a);var r={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:j(a),multiline:!0,label:"Source"},s=function(){l=e.extend({},b.htmlToData(a.settings.media_scripts,this.value())),this.parent().parent().fromJSON(l)};r[g]=s,f=a.windowManager.open({title:"Insert/edit video",data:l,bodyType:"tabpanel",body:[{title:"General",type:"form",items:p},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},r]}],onSubmit:m(a)}),n(f)};return{showDialog:p}}),g("3",["c","8","9","a"],function(a,b,c,d){var e=function(a,e){if(a.settings.media_filter_html===!1)return e;var f,g=new b;return new c({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){g.comment(a)},cdata:function(a){g.cdata(a)},text:function(a,b){g.text(a,b)},start:function(b,c,d){if(f=!0,"script"!==b&&"noscript"!==b){for(var e=0;e<c.length;e++){if(0===c[e].name.indexOf("on"))return;"style"===c[e].name&&(c[e].value=a.dom.serializeStyle(a.dom.parseStyle(c[e].value),b))}g.start(b,c,d),f=!1}},end:function(a){f||g.end(a)}},new d({})).parse(e),g.getContent()};return{sanitize:e}}),h("f",tinymce.html.Node),g("5",["3","e","f","d"],function(a,b,c,d){var e=function(a,b){var e,f=b.name;return e=new c("img",1),e.shortEnded=!0,g(a,b,e),e.attr({width:b.attr("width")||"300",height:b.attr("height")||("audio"===f?"30":"150"),style:b.attr("style"),src:d.transparentSrc,"data-mce-object":f,class:"mce-object mce-object-"+f}),e},f=function(a,b){var d,e,f,h=b.name;return d=new c("span",1),d.attr({contentEditable:"false",style:b.attr("style"),"data-mce-object":h,class:"mce-preview-object mce-object-"+h}),g(a,b,d),e=new c(h,1),e.attr({src:b.attr("src"),allowfullscreen:b.attr("allowfullscreen"),width:b.attr("width")||"300",height:b.attr("height")||("audio"===h?"30":"150"),frameborder:"0"}),f=new c("span",1),f.attr("class","mce-shim"),d.append(e),d.append(f),d},g=function(b,c,d){var e,f,g,h,i;for(g=c.attributes,h=g.length;h--;)e=g[h].name,f=g[h].value,"width"!==e&&"height"!==e&&"style"!==e&&("data"!==e&&"src"!==e||(f=b.convertURL(f,e)),d.attr("data-mce-p-"+e,f));i=c.firstChild&&c.firstChild.value,i&&(d.attr("data-mce-html",escape(a.sanitize(b,i))),d.firstChild=null)},h=function(a){return function(c){for(var g,h,i,j=c.length;j--;)g=c[j],g.parent&&(g.parent.attr("data-mce-object")||("script"!==g.name||(i=b.getVideoScriptMatch(a.settings.media_scripts,g.attr("src"))))&&(i&&(i.width&&g.attr("width",i.width.toString()),i.height&&g.attr("height",i.height.toString())),h="iframe"===g.name&&a.settings.media_live_embeds!==!1&&d.ceFalse?f(a,g):e(a,g),g.replace(h)))}};return{createPreviewNode:f,createPlaceholderNode:e,placeHolderConverter:h}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){var f=function(a){a.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("</"+a+"[^>]*>","gi")});var d=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){d[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",e.placeHolderConverter(a)),a.serializer.addAttributeFilter("data-mce-object",function(b,d){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(e=b[m],e.parent){for(k=e.attr(d),f=new tinymce.html.Node(k,1),"audio"!==k&&"script"!==k&&(l=e.attr("class"),l&&l.indexOf("mce-preview-object")!==-1?f.attr({width:e.firstChild.attr("width"),height:e.firstChild.attr("height")}):f.attr({width:e.attr("width"),height:e.attr("height")})),f.attr({style:e.attr("style")}),h=e.attributes,g=h.length;g--;){var n=h[g].name;0===n.indexOf("data-mce-p-")&&f.attr(n.substr(11),h[g].value)}"script"===k&&f.attr("type","text/javascript"),i=e.attr("data-mce-html"),i&&(j=new tinymce.html.Node("#text",3),j.raw=!0,j.value=c.sanitize(a,unescape(i)),f.append(j)),e.replace(f)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(d.updateHtml(b,{width:a.width,height:a.height})))))}),this.showDialog=function(){b.showDialog(a)},a.addButton("media",{tooltip:"Insert/edit video",onclick:this.showDialog,stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),a.addMenuItem("media",{icon:"media",text:"Media",onclick:this.showDialog,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('<span class="mce-shim"></span>')})}),a.addCommand("mceMedia",this.showDialog)};return a.add("media",f),function(){}}),d("0")()}();