2018-01-19 11:36:38 +00:00
|
|
|
!function(){"use strict";var e=function(t){var n=t,l=function(){return n};return{get:l,set:function(e){n=e},clone:function(){return e(l())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=tinymce.util.Tools.resolve("tinymce.html.DomParser"),i=tinymce.util.Tools.resolve("tinymce.html.Node"),r=tinymce.util.Tools.resolve("tinymce.html.Serializer"),o=function(e){return e.getParam("fullpage_hide_in_source_view")},a=function(e){return e.getParam("fullpage_default_xml_pi")},c=function(e){return e.getParam("fullpage_default_encoding")},s=function(e){return e.getParam("fullpage_default_font_family")},u=function(e){return e.getParam("fullpage_default_font_size")},d=function(e){return e.getParam("fullpage_default_text_color")},f=function(e){return e.getParam("fullpage_default_title")},g=function(e){return e.getParam("fullpage_default_doctype","<!DOCTYPE html>")},m=function(e){return l({validate:!1,root_name:"#document"}).parse(e)},h=m,p=function(e,t){function l(e,t){return e.attr(t)||""}var i,r,o=m(t),a={};return a.fontface=s(e),a.fontsize=u(e),7===(i=o.firstChild).type&&(a.xml_pi=!0,(r=/encoding="([^"]+)"/.exec(i.value))&&(a.docencoding=r[1])),(i=o.getAll("#doctype")[0])&&(a.doctype="<!DOCTYPE"+i.value+">"),(i=o.getAll("title")[0])&&i.firstChild&&(a.title=i.firstChild.value),n.each(o.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),(i=o.getAll("html")[0])&&(a.langcode=l(i,"lang")||l(i,"xml:lang")),a.stylesheets=[],n.each(o.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),(i=o.getAll("body")[0])&&(a.langdir=l(i,"dir"),a.style=l(i,"style"),a.visited_color=l(i,"vlink"),a.link_color=l(i,"link"),a.active_color=l(i,"alink")),a},y=function(e,t,l){function o(e,t,n){e.attr(t,n||undefined)}function a(e){s.firstChild?s.insert(e,s.firstChild):s.append(e)}var c,s,u,d,f,g=e.dom;c=m(l),(s=c.getAll("head")[0])||(d=c.getAll("html")[0],s=new i("head",1),d.firstChild?d.insert(s,d.firstChild,!0):d.append(s)),d=c.firstChild,t.xml_pi?(f='version="1.0"',t.docencoding&&(f+=' encoding="'+t.docencoding+'"'),7!==d.type&&(d=new i("xml",7),c.insert(d,c.firstChild,!0)),d.value=f):d&&7===d.type&&d.remove(),d=c.getAll("#doctype")[0],t.doctype?(d||(d=new i("#doctype",10),t.xml_pi?c.insert(d,c.firstChild):a(d)),d.value=t.doctype.substring(9,t.doctype.length-1)):d&&d.remove(),d=null,n.each(c.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(d=e)}),t.docencoding?(d||((d=new i("meta",1)).attr("http-equiv","Content-Type"),d.shortEnded=!0,a(d)),d.attr("content","text/html; charset="+t.docencoding)):d&&d.remove(),d=c.getAll("title")[0],t.title?(d?d.empty():a(d=new i("title",1)),d.append(new i("#text",3)).value=t.title):d&&d.remove(),n.each("keywords,description,author,copyright,robots".split(","),function(e){var n,l,r=c.getAll("meta"),o=t[e];for(n=0;n<r.length;n++)if((l=r[n]).attr("name")===e)return void(o?l.attr("content",o):l.remove());o&&((d=new i("meta",1)).attr("name",e),d.attr("content",o),d.shortEnded=!0,a(d))});var h={};return n.each(c.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(h[e.attr("href")]=e)}),n.each(t.stylesheets,function(e){h[e]||((d=new i("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),d.shortEnded=!0,a(d)),delete h[e]}),n.each(h,function(e){e.remove()}),(d=c.getAll("body")[0])&&(o(d,"dir",t.langdir),o(d,"style",t.style),o(d,"vlink",t.visited_color),o(d,"link",t.link_color),o(d,"alink",t.active_color),g.setAttribs(e.getBody(),{style:t.style,dir:t.dir,vLink:t.visited_color,link:t.link_color,aLink:t.active_color})),(d=c.getAll("html")[0])&&(o(d,"lang",t.langcode),o(d,"xml:lang",t.langcode)),s.firstChild||s.remove(),(u=r({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(c)).substring(0,u.indexOf("</body>"))},v=function(e,
|