crayon-syntax-highlighter/js/min/crayon.te.min.js

8 lines
42 KiB
JavaScript
Raw Normal View History

2019-08-30 19:30:19 +02:00
var jQueryCrayon=jQuery;(function(a){CrayonUtil=new function(){var c=this;var b=null;c.init=function(){b=CrayonSyntaxSettings;c.initGET()};c.addPrefixToID=function(d){return d.replace(/^([#.])?(.*)$/,"$1"+b.prefix+"$2")};c.removePrefixFromID=function(e){var d=new RegExp("^[#.]?"+b.prefix,"i");return e.replace(d,"")};c.cssElem=function(d){return a(c.addPrefixToID(d))};c.setDefault=function(e,f){return(typeof e=="undefined")?f:e};c.setMax=function(e,d){return e<=d?e:d};c.setMin=function(d,e){return d>=e?d:e};c.setRange=function(e,f,d){return c.setMax(c.setMin(e,f),d)};c.getExt=function(e){if(e.indexOf(".")==-1){return undefined}var d=e.split(".");if(d.length){d=d[d.length-1]}else{d=""}return d};c.initGET=function(){window.currentURL=window.location.protocol+"//"+window.location.host+window.location.pathname;window.currentDir=window.currentURL.substring(0,window.currentURL.lastIndexOf("/"));function d(e){e=e.split("+").join(" ");var h={},g,f=/[?&]?([^=]+)=([^&]*)/g;while(g=f.exec(e)){h[decodeURIComponent(g[1])]=decodeURIComponent(g[2])}return h}window.GET=d(document.location.search)};c.getAJAX=function(d,e){d.version=b.version;a.get(b.ajaxurl,d,e)};c.postAJAX=function(d,e){d.version=b.version;a.post(b.ajaxurl,d,e)};c.reload=function(){var d="?";for(var e in window.GET){d+=e+"="+window.GET[e]+"&"}window.location=window.currentURL+d};c.escape=function(d){if(typeof encodeURIComponent=="function"){return encodeURIComponent(d)}else{if(typeof escape!="function"){return escape(d)}else{return d}}};c.log=function(d){if(typeof console!="undefined"&&b.debug){console.log(d)}};c.decode_html=function(d){return String(d).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")};c.encode_html=function(d){return String(d).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};c.getReadableColor=function(g,f){f=a.extend({amount:0.5,xMulti:1,yMulti:1.5,normalizeHue:[20,180],normalizeHueXMulti:1/2.5,normalizeHueYMulti:1},f);var d=tinycolor(g);var e=d.toHsv();var i={x:e.s,y:1-e.v};i.x*=f.xMulti;i.y*=f.yMulti;if(f.normalizeHue&&e.h>f.normalizeHue[0]&&e.h<f.normalizeHue[1]){i.x*=f.normalizeHueXMulti;i.y*=f.normalizeHueYMulti}var h=Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2));if(h<f.amount){e.v=0}else{e.v=1}e.s=0;return tinycolor(e).toHexString()};c.removeChars=function(e,f){var d=new RegExp("["+e+"]","gmi");return f.replace(d,"")}};a(document).ready(function(){CrayonUtil.init()});a.fn.bindFirst=function(c,e){this.bind(c,e);var b=this.data("events")[c.split(".")[0]];var d=b.pop();b.splice(0,0,d)};a.keys=function(d){var c=[];for(var b in d){c.push(b)}return c};RegExp.prototype.execAll=function(c){var f=[];var b=null;while((b=this.exec(c))!=null){var e=[];for(var d in b){if(parseInt(d)==d){e.push(b[d])}}f.push(e)}return f};RegExp.prototype.escape=function(b){return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};String.prototype.sliceReplace=function(d,b,c){return this.substring(0,d)+c+this.substring(b)};String.prototype.escape=function(){var b={"&":"&amp;","<":"&lt;",">":"&gt;"};return this.replace(/[&<>]/g,function(c){return b[c]||c})};String.prototype.linkify=function(b){b=typeof b!="undefined"?b:"";return this.replace(/(http(s)?:\/\/(\S)+)/gmi,'<a href="$1" target="'+b+'">$1</a>')};String.prototype.toTitleCase=function(){var b=this.split(/\s+/);var c="";a.each(b,function(e,d){if(d!=""){c+=d.slice(0,1).toUpperCase()+d.slice(1,d.length);if(e!=b.length-1&&b[e+1]!=""){c+=" "}}});return c}})(jQueryCrayon);jqueryPopup=Object();jqueryPopup.defaultSettings={centerBrowser:0,centerScreen:0,height:500,left:0,location:0,menubar:0,resizable:0,scrollbars:0,status:0,width:500,windowName:null,windowURL:null,top:0,toolbar:0,data:null,event:"click"};(function(a){popupWindow=function(d,c,f,b){f=typeof f!=="undefined"?f:null;b=typeof b!=="undefined"?b:null;if(typeof d=="string"){d=jQuery(d)}if(!(d instanceof jQuery)){return false}var e=jQuery.extend({},jqueryPopup.defaultSettings,c||{});d.handler=jQuery(d).bind(e.event,function(){if(f){f()}var g="height="+e.height+",width="+e.width+",toolbar="+e.toolbar+",scrollbars="+e.scrollbars+",status="+e.status+
/*!
Colorbox v1.5.9 - 2014-04-25
jQuery lightbox and modal window plugin
(c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
license: http://www.opensource.org/licenses/mit-license.php
*/
(function(aT,a8,a4){function aZ(a,d,c){var b=a8.createElement(a);return d&&(b.id=ab+d),c&&(b.style.cssText=c),aT(b)}function aY(){return a4.innerHeight?a4.innerHeight:aT(a4).height()}function aV(b,a){a!==Object(a)&&(a={}),this.cache={},this.el=b,this.value=function(c){var d;return void 0===this.cache[c]&&(d=aT(this.el).attr("data-cbox-"+c),void 0!==d?this.cache[c]=d:void 0!==a[c]?this.cache[c]=a[c]:void 0!==ad[c]&&(this.cache[c]=ad[c])),this.cache[c]},this.get=function(d){var c=this.value(d);return aT.isFunction(c)?c.call(this.el,this):c}}function a5(b){var c=ag.length,a=(aM+b)%c;return 0>a?c+a:a}function bd(a,b){return Math.round((/%/.test(a)?("x"===b?az.width():aY())/100:1)*parseInt(a,10))}function aU(a,b){return a.get("photo")||a.get("photoRegex").test(b)}function a1(a,b){return a.get("retinaUrl")&&a4.devicePixelRatio>1?b.replace(a.get("photoRegex"),a.get("retinaSuffix")):b}function a9(a){"contains" in aP[0]&&!aP[0].contains(a.target)&&a.target!==aR[0]&&(a.stopPropagation(),aP.focus())}function ba(a){ba.str!==a&&(aP.add(aR).removeClass(ba.str).addClass(a),ba.str=a)}function a6(a){aM=0,a&&a!==!1?(ag=aT("."+af).filter(function(){var b=aT.data(this,ac),c=new aV(this,b);return c.get("rel")===a}),aM=ag.index(bf.el),-1===aM&&(ag=ag.add(bf.el),aM=ag.length-1)):ag=aT(bf.el)}function aS(a){aT(a8).trigger(a),aA.triggerHandler(a)}function a7(b){var g;if(!ax){if(g=aT(b).data("colorbox"),bf=new aV(b,g),a6(bf.get("rel")),!aH){aH=aW=!0,ba(bf.get("className")),aP.css({visibility:"hidden",display:"block",opacity:""}),ar=aZ(aG,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),bb.css({width:"",height:""}).append(ar),aB=aj.height()+a2.height()+bb.outerHeight(!0)-bb.height(),a3=aC.width()+aw.width()+bb.outerWidth(!0)-bb.width(),aF=ar.outerHeight(!0),ap=ar.outerWidth(!0);var d=bd(bf.get("initialWidth"),"x"),c=bd(bf.get("initialHeight"),"y"),a=bf.get("maxWidth"),e=bf.get("maxHeight");bf.w=(a!==!1?Math.min(d,bd(a,"x")):d)-ap-a3,bf.h=(e!==!1?Math.min(c,bd(e,"y")):c)-aF-aB,ar.css({width:"",height:bf.h}),au.position(),aS(bc),bf.get("onOpen"),ao.add(av).hide(),aP.focus(),bf.get("trapFocus")&&a8.addEventListener&&(a8.addEventListener("focus",a9,!0),aA.one(aO,function(){a8.removeEventListener("focus",a9,!0)})),bf.get("returnFocus")&&aA.one(aO,function(){aT(bf.el).focus()})}aR.css({opacity:parseFloat(bf.get("opacity"))||"",cursor:bf.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),bf.get("closeButton")?aE.html(bf.get("close")).appendTo(bb):aE.appendTo("<div/>"),aQ()}}function aX(){!aP&&a8.body&&(ah=!1,az=aT(a4),aP=aZ(aG).attr({id:ac,"class":aT.support.opacity===!1?ab+"IE":"",role:"dialog",tabindex:"-1"}).hide(),aR=aZ(aG,"Overlay").hide(),ak=aT([aZ(aG,"LoadingOverlay")[0],aZ(aG,"LoadingGraphic")[0]]),aN=aZ(aG,"Wrapper"),bb=aZ(aG,"Content").append(av=aZ(aG,"Title"),al=aZ(aG,"Current"),an=aT('<button type="button"/>').attr({id:ab+"Previous"}),at=aT('<button type="button"/>').attr({id:ab+"Next"}),ay=aZ("button","Slideshow"),ak),aE=aT('<button type="button"/>').attr({id:ab+"Close"}),aN.append(aZ(aG).append(aZ(aG,"TopLeft"),aj=aZ(aG,"TopCenter"),aZ(aG,"TopRight")),aZ(aG,!1,"clear:left").append(aC=aZ(aG,"MiddleLeft"),bb,aw=aZ(aG,"MiddleRight")),aZ(aG,!1,"clear:left").append(aZ(aG,"BottomLeft"),a2=aZ(aG,"BottomCenter"),aZ(aG,"BottomRight"))).find("div div").css({"float":"left"}),aq=aZ(aG,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),ao=at.add(an).add(al).add(ay),aT(a8.body).append(aR,aP.append(aN,aq)))}function a0(){function a(b){b.which>1||b.shiftKey||b.altKey||b.metaKey||b.ctrlKey||(b.preventDefault(),a7(this))}return aP?(ah||(ah=!0,at.click(function(){au.next()}),an.click(function(){au.prev()}),aE.click(function(){au.close()}),aR.click(function(){bf.get("overlayClose")&&au.close()}),aT(a8).bind("keydown."+ab,function(b){var c=b.keyCode;aH&&bf.get("escKey")&&27===c&&(b.preventDefault(),au.close()),aH&&bf.get("arrowKey")&&ag[1]&&!b.altKey&&(37===c?(b.preventDefault(),an.click()):39===c&&(b.preventDefault(),at.click()))}),aT.isFunction(aT.fn.on)?aT(a8).on("click."+ab,"."+af,a):