/* SCEditor v3.2.0 | (C) 2017, Sam Clarke | sceditor.com/license */
!function(a,n){"use strict";var c=n.dom,l=/(^|\s)(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/watch\?v=)([^"&?\/ ]{11})(?:\&[\&_\?0-9a-z\#]+)?(\s|$)/i;function d(e){return'<iframe width="560" height="315" frameborder="0" src="https://www.youtube-nocookie.com/embed/'+e+'" data-youtube-id="'+e+'" allowfullscreen></iframe>'}n.plugins.autoyoutube=function(){this.signalPasteRaw=function(e){var t;c.closest(this.currentNode(),"code")||(e.html||e.text)&&((t=a.createElement("div")).innerHTML=e.html||n.escapeEntities(e.text),function e(t,n){var r,i,o=t.firstChild,s=t.textContent||"",u=(s=n?s.trim():s).match(l);if(s===s.trim()&&u&&u[0].length===s.length)c.removeAttr(t,"style"),c.removeAttr(t,"class"),t.innerHTML=d(u[2]);else for(;o;)3===o.nodeType?(r=o.nodeValue,i=o.parentNode,(u=r.match(l))&&(i.insertBefore(a.createTextNode(r.substr(0,u.index)+u[1]),o),i.insertBefore(c.parseHTML(d(u[2])),o),o.nodeValue=u[3]+r.substr(u.index+u[0].length))):c.is(o,"code")||e(o),o=o.nextSibling}(t,!0),e.html=t.innerHTML)}}}(document,sceditor);