Opened 5 years ago

Closed 7 months ago

#930 closed Bug/Fehler (fixed)

compactor.php hat Probleme mit Doppel-Slashes im Datei-Header

Reported by: Tomcraft Owned by: GTB
Priority: hoch Milestone: modified-shop-2.0.6.0
Component: Module Version: 2.0.0.0

Description

Der Compactor hat Probleme, wenn man mit zwei Slashes auskommentiert im Header der Datei. Aufgefallen ist das Problem nach Changeset r9974.

Fehler aus der Konsole:

TypeError: $.alerts is undefined

$.alerts.overlayOpacity = .2;

/trunk/ (Zeile 199, Spalte 3)
TypeError: $(...).SumoSelect is not a function

$('select').SumoSelect();

/trunk/ (Zeile 98, Spalte 5)

Jetzt kann man natürlich einfach die Header entsprechend anpassen:

/* Easy Responsive Tabs Plugin
 * Author: Samson.Onna <Email : samson3d@gmail.com>
 * https://github.com/samsono/Easy-Responsive-Tabs-to-Accordion
 */

bzw.:

/* CSS3MultiColumn - a javascript implementation of the CSS3 multi-column module
 * v1.02 beta - Jan 08 2008
 * Copyright (c) 2005 Cdric Savarese <pro@4213miles.com>
 * Copyright (c) 2012 Gabriel Saldana <gabriel@gabrielsaldana.org>
 * This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
 *
 * For additional information, see : http://www.csscripting.com/
 *
 * Supported Properties:
 * column-count
 * column-width
 * column-gap
 * column-rule
 
 * Unsupported Properties:
 * column-rule-width (use column-rule instead)
 * column-rule-style (use column-rule instead)
 * column-rule-color (use column-rule instead)
 * column-span
 * column-width-policy
 * column-space-distribution
 */

Aber das wird das generelle Problem nicht lösen, wenn jemand das JS-Array um weitere Skripte erweitert, wo im Header auch mit Doppel-Slashes auskommentiert ist.

Attachments (4)

komprimiertedateien.zip (335.7 KB) - added by FräuleinGarn 18 months ago.
komprimierte tpl_plugin.min.css und js Dateien mit 2.0.4.2 und 2.0.5.0 compactor.php
changeset_12501.zip (8.6 KB) - added by Tomcraft 18 months ago.
changeset_12559.zip (5.4 KB) - added by Tomcraft 15 months ago.
changeset_12696.zip (5.4 KB) - added by Tomcraft 15 months ago.

Download all attachments as: .zip

Change History (54)

comment:1 Changed 5 years ago by web28

single line comment ist in der compactor Klasse auskommentiert, deshalb die Probleme

// Remove single line comment
// $code = preg_replace('/[^:]\/\/.*/', '', $code);

comment:2 Changed 5 years ago by GTB

  • Owner set to GTB
  • Resolution set to fixed
  • Status changed from new to closed

In 10006:

Partly fix #930 (fix js combine)

comment:3 Changed 5 years ago by GTB

In 10007:

Partly fix #930 (fix js combine)

comment:4 Changed 5 years ago by GTB

In 10008:

Partly fix #930 (fix js combine)

comment:5 Changed 5 years ago by GTB

In 10009:

Partly fix #930 (fix js combine)

comment:6 follow-up: Changed 5 years ago by Tomcraft

  • Resolution fixed deleted
  • Status changed from closed to reopened

Die Frage ist, ob Gerhard "Remove single line comment" damals nicht evtl. mit Grund auskommentiert hatte.

comment:7 Changed 5 years ago by anonymous

*thumbs up* danke Torsten

comment:8 in reply to: ↑ 6 Changed 5 years ago by Tomcraft

Replying to Tomcraft:

Die Frage ist, ob Gerhard "Remove single line comment" damals nicht evtl. mit Grund auskommentiert hatte.

Ich habe nun nochmal in der originalen Version der compactor.php geschaut und auch dort ist diese Zeile auskommentiert.

Ich habe mal testweise die Zeile auskommentiert, aber auch das führt nicht zum Erfolg, dass die "single line comments" entfernt werden und es produziert unbrauchbare minimierte JS-Dateien.

Merkwürdig daran ist, dass auch andere Projekte wie "HtmlCompressor.php" den selben Regex verwenden:

    private static function _removeSpacesInJsAndCss( $code )
        {
        /**
         * Remove multiline comment
         */
        $mulLineComment = '/\/\*(?!-)[\x00-\xff]*?\*\//';
        $code = preg_replace( $mulLineComment , '' , $code );

        /**
         * Remove single line comment
         */
        $singLineComment = '/[^:]\/\/.*/';
        $code = preg_replace( $singLineComment , '' , $code );

        /**
         * Remove extra spaces
         */
        $extraSpace = '/\s+/';
        $code = preg_replace( $extraSpace , ' ' , $code );

        /**
         * Remove spaces that can be removed
         */
        $removableSpace = '/\s?([\{\};\=\(\)\\\/\+\*-])\s?/';
        $code = preg_replace( '/\s?([\{\};\=\(\)\/\+\*-])\s?/' , '\\1' , $code );

        return $code;
        }

Die Frage ist generell, ob es nicht Sinn macht auf eine aktuelle Version umzusteigen, da die compactor.php seit 2011 nicht weiter entwickelt wurde.

Aktuellere Projekte sind:

Last edited 5 years ago by Tomcraft (previous) (diff)

comment:9 Changed 5 years ago by Tomcraft

  • Milestone changed from modified-shop-2.0.1.0 to modified-shop-2.0.1.1

comment:10 Changed 4 years ago by Tomcraft

  • Milestone changed from modified-shop-2.0.2.0 to modified-shop-2.0.2.1

comment:11 Changed 4 years ago by Tomcraft

  • Milestone changed from modified-shop-2.0.2.1 to modified-shop-2.1.0.0

comment:12 Changed 4 years ago by Tomcraft

  • Milestone changed from modified-shop-2.1.0.0 to modified-shop-2.0.4.0

comment:13 follow-up: Changed 3 years ago by Tomcraft

  • Milestone modified-shop-2.0.5.0 deleted

comment:14 in reply to: ↑ 13 ; follow-up: Changed 3 years ago by info@…

Da ich gerade vor dem gleichen Problem stand:

Das hinzufügen einer Zeile in der compactor.php hat es gelöst:

private function _stripPHPComments($html) {
      $html = preg_replace('/[^:]\/\/.*?[\\n\\r]{1,2}/', '', $html);
      return preg_replace('/\/\*.*?\*\//s', '', $html);
    }

comment:15 in reply to: ↑ 14 Changed 3 years ago by anonymous

Replying to info@…:

Da ich gerade vor dem gleichen Problem stand:

Das hinzufügen einer Zeile in der compactor.php hat es gelöst:

private function _stripPHPComments($html) {
      $html = preg_replace('/[^:]\/\/.*?[\\n\\r]{1,2}/', '', $html);
      return preg_replace('/\/\*.*?\*\//s', '', $html);
    }

Der letzte Code war noch nicht perfekt.

mit dem ist es besser

private function _stripPHPComments($html) {
      $html = preg_replace('/[^:\'\"]\/\/.*?[\\n\\r]{1,2}/', ' ', $html);
      return preg_replace('/\/\*.*?\*\//s', '', $html);
    }

comment:16 Changed 3 years ago by Tomcraft

  • Milestone set to modified-shop-2.0.5.0

comment:17 Changed 2 years ago by anonymous

Ich erlaube mir mal einen Thread hier zu verlinken ("Compactor zerstört Inline-CSS unter bestimmten Umständen") der ein weiteres Problem des momentan benutzten Compactors (in 2.0.4.2) anspricht. Dabei geht es darum, daß negative px-Werte bei explizit geschrieben Styles innerhalb von style-tags verkehrt komprimiert werden und den betreffenden Wert einer CSS-Eigenschaft somit invalide und wirkungslos machen.

Das

#IRGENDWAS {background:#89362C; box-shadow:2px 2px 2px #89362C, -2px -2px 2px #89362C;}

wird zu dem

#IRGENDWAS{background:#89362C;box-shadow:2px 2px 2px #89362C,-2px-2px 2px #89362C;}

(Leerzeichen vor dem zweiten -2 wurde entfernt.)

Insofern nicht ohnehin eine neuere/modernere Version zum Komprimieren angestrebt wird, weise ich darauf hin, daß ich in dem zitierten Thread auch einen Lösungsansatz gepostet habe.

Gruß,
noRiddle

Last edited 2 years ago by Tomcraft (previous) (diff)

comment:18 Changed 2 years ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 11906:

fix #930

comment:19 Changed 2 years ago by Tomcraft

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ist leider noch etwas schräg...

Ich habe das mit den Doppelslashes in der jquery.colorbox.min.js getestet:

/*!
	Colorbox 1.6.4
	license: MIT
	http://www.jacklmoore.com/colorbox
*/
// Kommentar 1
// Kommentar 2
// Kommentar 3
(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);

Die Ausgabe in der tpl_plugins.min.js sieht dann wie folgt aus (inklusive dem Leerzeichen als erstes zeichen in der Datei):

 // Kommentar 2 (function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
(function($){$.fn.unveil=function(threshold,callback){var $w=$(window),th=threshold||0,retina=window.devicePixelRatio>1,attrib=retina?"data-src-retina":"data-src",images=this,loaded;this.one("unveil",function(){var source=this.getAttribute(attrib);source=source||this.getAttribute("data-src");if(source){this.setAttribute("src",source);if(typeof callback==="function")callback.call(this);}});function unveil(){var inview=images.filter(function(){var $e=$(this),wt=$w.scrollTop(),wb=wt+$w.height(),et=$e.offset().top,eb=et+$e.height();return eb>=wt-th&&et<=wb+th;});loaded=inview.trigger("unveil");images=images.not(loaded);}$w.scroll(unveil);$w.resize(unveil);unveil();return this;};})(window.jQuery||window.Zepto);
!function(t){var e={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,wrapperClass:"bx-wrapper",touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,ariaLive:!0,ariaHidden:!0,keyboardEnabled:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",stopAutoOnClick:!1,autoHover:!1,autoDelay:0,autoSlideForOnePage:!1,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,shrinkItems:!1,onSliderLoad:function(){return!0},onSlideBefore:function(){return!0},onSlideAfter:function(){return!0},onSlideNext:function(){return!0},onSlidePrev:function(){return!0},onSliderResize:function(){return!0},onAutoChange:function(){return!0}};t.fn.bxSlider=function(n){if(0===this.length)return this;if(this.length>1)return this.each(function(){t(this).bxSlider(n)}),this;var s={},o=this,r=t(window).width(),a=t(window).height();if(!t(o).data("bxSlider")){var l=function(){t(o).data("bxSlider")||(s.settings=t.extend({},e,n),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=o.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"===s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!==s.settings.mode&&function(){for(var t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"],i=0;i<e.length;i++)if(void 0!==t.style[e[i]])return s.cssPrefix=e[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"===s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),o.data("origStyle",o.attr("style")),o.children(s.settings.slideSelector).each(function(){t(this).data("origStyle",t(this).attr("style"))}),d())},d=function(){var e=s.children.eq(s.settings.startSlide);o.wrap('<div class="'+s.settings.wrapperClass+'"><div class="bx-viewport"></div></div>'),s.viewport=o.parent(),s.settings.ariaLive&&!s.settings.ticker&&s.viewport.attr("aria-live","polite"),s.loader=t('<div class="bx-loading" />'),s.viewport.prepend(s.loader),o.css({width:"horizontal"===s.settings.mode?1e3*s.children.length+215+"%":"auto",position:"relative"}),s.usingCSS&&s.settings.easing?o.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing"),s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:u()}),s.children.css({float:"horizontal"===s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"===s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"===s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=t('<div class="bx-controls" />'),s.settings.captions&&k(),s.active.last=s.settings.startSlide===f()-1,s.settings.video&&o.fitVids(),"none"===s.settings.preloadImages?e=null:("all"===s.settings.preloadImages||s.settings.ticker)&&(e=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),s.settings.pager&&b(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),null===e?g():c(e,g)},c=function(e,i){var n=e.find('img:not([src=""]), iframe').length,s=0;if(0===n)return void i();e.find('img:not([src=""]), iframe').each(function(){t(this).one("load error",function(){++s===n&&i()}).each(function(){(this.complete||""==this.src)&&t(this).trigger("load")})})},g=function(){if(s.settings.infiniteLoop&&"fade"!==s.settings.mode&&!s.settings.ticker){var e="vertical"===s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,e).clone(!0).addClass("bx-clone"),n=s.children.slice(-e).clone(!0).addClass("bx-clone");s.settings.ariaHidden&&(i.attr("aria-hidden",!0),n.attr("aria-hidden",!0)),o.append(i).prepend(n)}s.loader.remove(),m(),"vertical"===s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(p()),o.redrawSlider(),s.settings.onSliderLoad.call(o,s.active.index),s.initialized=!0,s.settings.responsive&&t(window).on("resize",U),s.settings.auto&&s.settings.autoStart&&(f()>1||s.settings.autoSlideForOnePage)&&L(),s.settings.ticker&&O(),s.settings.pager&&z(s.settings.startSlide),s.settings.controls&&q(),s.settings.touchEnabled&&!s.settings.ticker&&X(),s.settings.keyboardEnabled&&!s.settings.ticker&&t(document).keydown(B)},p=function(){var e=0,n=t();if("vertical"===s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1===s.settings.moveSlides?s.active.index:s.active.index*x();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=o+i>=s.children.length?n.add(s.children.eq(i-1)):n.add(s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"===s.settings.mode?(n.each(function(i){e+=t(this).outerHeight()}),s.settings.slideMargin>0&&(e+=s.settings.slideMargin*(s.settings.minSlides-1))):e=Math.max.apply(Math,n.map(function(){return t(this).outerHeight(!1)}).get()),"border-box"===s.viewport.css("box-sizing")?e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))+parseFloat(s.viewport.css("border-top-width"))+parseFloat(s.viewport.css("border-bottom-width")):"padding-box"===s.viewport.css("box-sizing")&&(e+=parseFloat(s.viewport.css("padding-top"))+parseFloat(s.viewport.css("padding-bottom"))),e},u=function(){var t="100%";return s.settings.slideWidth>0&&(t="horizontal"===s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),t},h=function(){var t=s.settings.slideWidth,e=s.viewport.width();if(0===s.settings.slideWidth||s.settings.slideWidth>e&&!s.carousel||"vertical"===s.settings.mode)t=e;else if(s.settings.maxSlides>1&&"horizontal"===s.settings.mode){if(e>s.maxThreshold)return t;e<s.minThreshold?t=(e-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides:s.settings.shrinkItems&&(t=Math.floor((e+s.settings.slideMargin)/Math.ceil((e+s.settings.slideMargin)/(t+s.settings.slideMargin))-s.settings.slideMargin))}return t},v=function(){var t=1,e=null;return"horizontal"===s.settings.mode&&s.settings.slideWidth>0?s.viewport.width()<s.minThreshold?t=s.settings.minSlides:s.viewport.width()>s.maxThreshold?t=s.settings.maxSlides:(e=s.children.first().width()+s.settings.slideMargin,t=Math.floor((s.viewport.width()+s.settings.slideMargin)/e)||1):"vertical"===s.settings.mode&&(t=s.settings.minSlides),t},f=function(){var t=0,e=0,i=0;if(s.settings.moveSlides>0){if(!s.settings.infiniteLoop){for(;e<s.children.length;)++t,e=i+v(),i+=s.settings.moveSlides<=v()?s.settings.moveSlides:v();return i}t=Math.ceil(s.children.length/x())}else t=Math.ceil(s.children.length/v());return t},x=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=v()?s.settings.moveSlides:v()},m=function(){var t,e,i;s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop?"horizontal"===s.settings.mode?(e=s.children.last(),t=e.position(),S(-(t.left-(s.viewport.width()-e.outerWidth())),"reset",0)):"vertical"===s.settings.mode&&(i=s.children.length-s.settings.minSlides,t=s.children.eq(i).position(),S(-t.top,"reset",0)):(t=s.children.eq(s.active.index*x()).position(),s.active.index===f()-1&&(s.active.last=!0),void 0!==t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0)))},S=function(e,i,n,r){var a,l;s.usingCSS?(l="vertical"===s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)",o.css("-"+s.cssPrefix+"-transition-duration",n/1e3+"s"),"slide"===i?(o.css(s.animProp,l),0!==n?o.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),A())}):A()):"reset"===i?o.css(s.animProp,l):"ticker"===i&&(o.css("-"+s.cssPrefix+"-transition-timing-function","linear"),o.css(s.animProp,l),0!==n?o.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(e){t(e.target).is(o)&&(o.off("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),S(r.resetValue,"reset",0),F())}):(S(r.resetValue,"reset",0),F()))):(a={},a[s.animProp]=e,"slide"===i?o.animate(a,n,s.settings.easing,function(){A()}):"reset"===i?o.css(s.animProp,e):"ticker"===i&&o.animate(a,n,"linear",function(){S(r.resetValue,"reset",0),F()}))},w=function(){for(var e="",i="",n=f(),o=0;o<n;o++)i="",s.settings.buildPager&&t.isFunction(s.settings.buildPager)||s.settings.pagerCustom?(i=s.settings.buildPager(o),s.pagerEl.addClass("bx-custom-pager")):(i=o+1,s.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a href="" data-slide-index="'+o+'" class="bx-pager-link">'+i+"</a></div>";s.pagerEl.html(e)},b=function(){s.settings.pagerCustom?s.pagerEl=t(s.settings.pagerCustom):(s.pagerEl=t('<div class="bx-pager" />'),s.settings.pagerSelector?t(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),w()),s.pagerEl.on("click touchend","a",I)},C=function(){s.controls.next=t('<a class="bx-next" href="">'+s.settings.nextText+"</a>"),s.controls.prev=t('<a class="bx-prev" href="">'+s.settings.prevText+"</a>"),s.controls.next.on("click touchend",P),s.controls.prev.on("click touchend",E),s.settings.nextSelector&&t(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&t(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=t('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=t('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=t('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=t('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",M),s.controls.autoEl.on("click",".bx-stop",y),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?t(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),D(s.settings.autoStart?"stop":"start")},k=function(){s.children.each(function(e){var i=t(this).find("img:first").attr("title");void 0!==i&&(""+i).length&&t(this).append('<div class="bx-caption"><span>'+i+"</span></div>")})},P=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToNextSlide())},E=function(t){t.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),o.goToPrevSlide())},M=function(t){o.startAuto(),t.preventDefault()},y=function(t){o.stopAuto(),t.preventDefault()},I=function(e){var i,n;e.preventDefault(),s.controls.el.hasClass("disabled")||(s.settings.auto&&s.settings.stopAutoOnClick&&o.stopAuto(),i=t(e.currentTarget),void 0!==i.attr("data-slide-index")&&(n=parseInt(i.attr("data-slide-index")))!==s.active.index&&o.goToSlide(n))},z=function(e){var i=s.children.length;if("short"===s.settings.pagerType)return s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(e+1+s.settings.pagerShortSeparator+i);s.pagerEl.find("a").removeClass("active"),s.pagerEl.each(function(i,n){t(n).find("a").eq(e).addClass("active")})},A=function(){if(s.settings.infiniteLoop){var t="";0===s.active.index?t=s.children.eq(0).position():s.active.index===f()-1&&s.carousel?t=s.children.eq((f()-1)*x()).position():s.active.index===s.children.length-1&&(t=s.children.eq(s.children.length-1).position()),t&&("horizontal"===s.settings.mode?S(-t.left,"reset",0):"vertical"===s.settings.mode&&S(-t.top,"reset",0))}s.working=!1,s.settings.onSlideAfter.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)},D=function(t){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[t]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+t+")").addClass("active"))},q=function(){1===f()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0===s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index===f()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},H=function(){o.startAuto()},W=function(){o.stopAuto()},L=function(){s.settings.autoDelay>0?setTimeout(o.startAuto,s.settings.autoDelay):(o.startAuto(),t(window).focus(H).blur(W)),s.settings.autoHover&&o.hover(function(){s.interval&&(o.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(o.startAuto(!0),s.autoPaused=null)})},O=function(){var e,i,n,r,a,l,d,c,g=0;"next"===s.settings.autoDirection?o.append(s.children.clone().addClass("bx-clone")):(o.prepend(s.children.clone().addClass("bx-clone")),e=s.children.first().position(),g="horizontal"===s.settings.mode?-e.left:-e.top),S(g,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover&&(s.usingCSS?(r="horizontal"===s.settings.mode?4:5,s.viewport.hover(function(){i=o.css("-"+s.cssPrefix+"-transform"),n=parseFloat(i.split(",")[r]),S(n,"reset",0)},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(n))),F(d)})):s.viewport.hover(function(){o.stop()},function(){c=0,s.children.each(function(e){c+="horizontal"===s.settings.mode?t(this).outerWidth(!0):t(this).outerHeight(!0)}),a=s.settings.speed/c,l="horizontal"===s.settings.mode?"left":"top",d=a*(c-Math.abs(parseInt(o.css(l)))),F(d)})),F()},F=function(t){var e,i,n,r=t||s.settings.speed,a={left:0,top:0},l={left:0,top:0};"next"===s.settings.autoDirection?a=o.find(".bx-clone").first().position():l=s.children.first().position(),e="horizontal"===s.settings.mode?-a.left:-a.top,i="horizontal"===s.settings.mode?-l.left:-l.top,n={resetValue:i},S(e,"ticker",r,n)},N=function(e){var i=t(window),n={top:i.scrollTop(),left:i.scrollLeft()},s=e.offset();return n.right=n.left+i.width(),n.bottom=n.top+i.height(),s.right=s.left+e.outerWidth(),s.bottom=s.top+e.outerHeight(),!(n.right<s.left||n.left>s.right||n.bottom<s.top||n.top>s.bottom)},B=function(t){var e=document.activeElement.tagName.toLowerCase();if(null==new RegExp(e,["i"]).exec("input|textarea")&&N(o)){if(39===t.keyCode)return P(t),!1;if(37===t.keyCode)return E(t),!1}},X=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.on("touchstart MSPointerDown pointerdown",Y),s.viewport.on("click",".bxslider a",function(t){s.viewport.hasClass("click-disabled")&&(t.preventDefault(),s.viewport.removeClass("click-disabled"))})},Y=function(t){if("touchstart"===t.type||0===t.button)if(t.preventDefault(),s.controls.el.addClass("disabled"),s.working)s.controls.el.removeClass("disabled");else{s.touch.originalPos=o.position();var e=t.originalEvent,i=void 0!==e.changedTouches?e.changedTouches:[e],n="function"==typeof PointerEvent;if(n&&void 0===e.pointerId)return;s.touch.start.x=i[0].pageX,s.touch.start.y=i[0].pageY,s.viewport.get(0).setPointerCapture&&(s.pointerId=e.pointerId,s.viewport.get(0).setPointerCapture(s.pointerId)),s.originalClickTarget=e.originalTarget||e.target,s.originalClickButton=e.button,s.originalClickButtons=e.buttons,s.originalEventType=e.type,s.hasMove=!1,s.viewport.on("touchmove MSPointerMove pointermove",R),s.viewport.on("touchend MSPointerUp pointerup",Z),s.viewport.on("MSPointerCancel pointercancel",V)}},V=function(t){t.preventDefault(),S(s.touch.originalPos.left,"reset",0),s.controls.el.removeClass("disabled"),s.viewport.off("MSPointerCancel pointercancel",V),s.viewport.off("touchmove MSPointerMove pointermove",R),s.viewport.off("touchend MSPointerUp pointerup",Z),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId)},R=function(t){var e=t.originalEvent,i=void 0!==e.changedTouches?e.changedTouches:[e],n=Math.abs(i[0].pageX-s.touch.start.x),o=Math.abs(i[0].pageY-s.touch.start.y),r=0,a=0;s.hasMove=!0,3*n>o&&s.settings.preventDefaultSwipeX?t.preventDefault():3*o>n&&s.settings.preventDefaultSwipeY&&t.preventDefault(),"touchmove"!==t.type&&t.preventDefault(),"fade"!==s.settings.mode&&s.settings.oneToOneTouch&&("horizontal"===s.settings.mode?(a=i[0].pageX-s.touch.start.x,r=s.touch.originalPos.left+a):(a=i[0].pageY-s.touch.start.y,r=s.touch.originalPos.top+a),S(r,"reset",0))},Z=function(e){e.preventDefault(),s.viewport.off("touchmove MSPointerMove pointermove",R),s.controls.el.removeClass("disabled");var i=e.originalEvent,n=void 0!==i.changedTouches?i.changedTouches:[i],r=0,a=0;s.touch.end.x=n[0].pageX,s.touch.end.y=n[0].pageY,"fade"===s.settings.mode?(a=Math.abs(s.touch.start.x-s.touch.end.x))>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):("horizontal"===s.settings.mode?(a=s.touch.end.x-s.touch.start.x,r=s.touch.originalPos.left):(a=s.touch.end.y-s.touch.start.y,r=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0===s.active.index&&a>0||s.active.last&&a<0)?S(r,"reset",200):Math.abs(a)>=s.settings.swipeThreshold?(a<0?o.goToNextSlide():o.goToPrevSlide(),o.stopAuto()):S(r,"reset",200)),s.viewport.off("touchend MSPointerUp pointerup",Z),s.viewport.get(0).releasePointerCapture&&s.viewport.get(0).releasePointerCapture(s.pointerId),!1!==s.hasMove||0!==s.originalClickButton&&"touchstart"!==s.originalEventType||t(s.originalClickTarget).trigger({type:"click",button:s.originalClickButton,buttons:s.originalClickButtons})},U=function(e){if(s.initialized)if(s.working)window.setTimeout(U,10);else{var i=t(window).width(),n=t(window).height();r===i&&a===n||(r=i,a=n,o.redrawSlider(),s.settings.onSliderResize.call(o,s.active.index))}},j=function(t){var e=v();s.settings.ariaHidden&&!s.settings.ticker&&(s.children.attr("aria-hidden","true"),s.children.slice(t,t+e).attr("aria-hidden","false"))},Q=function(t){return t<0?s.settings.infiniteLoop?f()-1:s.active.index:t>=f()?s.settings.infiniteLoop?0:s.active.index:t};return o.goToSlide=function(e,i){var n,r,a,l,d=!0,c=0,g={left:0,top:0},u=null;if(s.oldIndex=s.active.index,s.active.index=Q(e),!s.working&&s.active.index!==s.oldIndex){if(s.working=!0,void 0!==(d=s.settings.onSlideBefore.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index))&&!d)return s.active.index=s.oldIndex,void(s.working=!1);"next"===i?s.settings.onSlideNext.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1):"prev"===i&&(s.settings.onSlidePrev.call(o,s.children.eq(s.active.index),s.oldIndex,s.active.index)||(d=!1)),s.active.last=s.active.index>=f()-1,(s.settings.pager||s.settings.pagerCustom)&&z(s.active.index),s.settings.controls&&q(),"fade"===s.settings.mode?(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){t(this).css("zIndex",s.settings.slideZIndex),A()})):(s.settings.adaptiveHeight&&s.viewport.height()!==p()&&s.viewport.animate({height:p()},s.settings.adaptiveHeightSpeed),!s.settings.infiniteLoop&&s.carousel&&s.active.last?"horizontal"===s.settings.mode?(u=s.children.eq(s.children.length-1),g=u.position(),c=s.viewport.width()-u.outerWidth()):(n=s.children.length-s.settings.minSlides,g=s.children.eq(n).position()):s.carousel&&s.active.last&&"prev"===i?(r=1===s.settings.moveSlides?s.settings.maxSlides-x():(f()-1)*x()-(s.children.length-s.settings.maxSlides),u=o.children(".bx-clone").eq(r),g=u.position()):"next"===i&&0===s.active.index?(g=o.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1):e>=0&&(l=e*parseInt(x()),g=s.children.eq(l).position()),void 0!==g&&(a="horizontal"===s.settings.mode?-(g.left-c):-g.top,S(a,"slide",s.settings.speed)),s.working=!1),s.settings.ariaHidden&&j(s.active.index*x())}},o.goToNextSlide=function(){if((s.settings.infiniteLoop||!s.active.last)&&!0!==s.working){var t=parseInt(s.active.index)+1;o.goToSlide(t,"next")}},o.goToPrevSlide=function(){if((s.settings.infiniteLoop||0!==s.active.index)&&!0!==s.working){var t=parseInt(s.active.index)-1;o.goToSlide(t,"prev")}},o.startAuto=function(t){s.interval||(s.interval=setInterval(function(){"next"===s.settings.autoDirection?o.goToNextSlide():o.goToPrevSlide()},s.settings.pause),s.settings.onAutoChange.call(o,!0),s.settings.autoControls&&!0!==t&&D("stop"))},o.stopAuto=function(t){s.autoPaused&&(s.autoPaused=!1),s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.onAutoChange.call(o,!1),s.settings.autoControls&&!0!==t&&D("start"))},o.getCurrentSlide=function(){return s.active.index},o.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},o.getSlideElement=function(t){return s.children.eq(t)},o.getSlideCount=function(){return s.children.length},o.isWorking=function(){return s.working},o.redrawSlider=function(){s.children.add(o.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",p()),s.settings.ticker||m(),s.active.last&&(s.active.index=f()-1),s.active.index>=f()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(w(),z(s.active.index)),s.settings.ariaHidden&&j(s.active.index*x())},o.destroySlider=function(){s.initialized&&(s.initialized=!1,t(".bx-clone",this).remove(),s.children.each(function(){void 0!==t(this).data("origStyle")?t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void 0!==t(this).data("origStyle")?this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&!s.settings.pagerCustom&&s.pagerEl.remove(),t(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&t(window).off("resize",U),s.settings.keyboardEnabled&&t(document).off("keydown",B),t(this).removeData("bxSlider"),t(window).off("blur",W).off("focus",H))},o.reloadSlider=function(e){void 0!==e&&(n=e),o.destroySlider(),l(),t(o).data("bxSlider",this)},l(),t(o).data("bxSlider",this),this}}}(jQuery);
(function(e){e.fn.extend({easyResponsiveTabs:function(t){var n={type:"default",width:"auto",fit:true,closed:false,activate:function(){}};var t=e.extend(n,t);var r=t,i=r.type,s=r.fit,o=r.width,u="vertical",a="accordion";var f=window.location.hash;var l=!!(window.history&&history.replaceState);e(this).bind("tabactivate",function(e,n){if(typeof t.activate==="function"){t.activate.call(n,e)}});this.each(function(){function h(){if(i==u){n.addClass("resp-vtabs")}if(s==true){n.css({width:"100%",margin:"0px"})}if(i==a){n.addClass("resp-easy-accordion");n.find(".resp-tabs-list").css("display","none")}}var n=e(this);var r=n.find("ul.resp-tabs-list");var c=n.attr("id");n.find("ul.resp-tabs-list li").addClass("resp-tab-item");n.css({display:"block",width:o});n.find(".resp-tabs-container > div").addClass("resp-tab-content");h();var p;n.find(".resp-tab-content").before("<h2 class='resp-accordion' role='tab'><span class='resp-arrow'></span></h2>");var d=0;n.find(".resp-accordion").each(function(){p=e(this);var t=n.find(".resp-tab-item:eq("+d+")");var r=n.find(".resp-accordion:eq("+d+")");r.append(t.html());r.data(t.data());p.attr("aria-controls","tab_item-"+d);d++});var v=0,m="",g;n.find(".resp-tab-item").each(function(){$tabItem=e(this);$tabItem.attr("aria-controls","tab_item-"+v);$tabItem.attr("role","tab");var t=0;n.find(".resp-tab-content").each(function(){g=e(this);g.attr("aria-labelledby","tab_item-"+t);if(n.find('[aria-controls="tab_item-'+t+'"] input:checked').length===1){m=t}t++});v++});var y=0;if(f!=""){var b=f.match(new RegExp(c+"([0-9]+)"));if(b!==null&&b.length===2){y=parseInt(b[1],10)-1;if(y>v){y=0}}}e(n.find(".resp-tab-item")[y]).addClass("resp-tab-active");if(t.closed!==true&&!(t.closed==="accordion"&&!r.is(":visible"))&&!(t.closed==="tabs"&&r.is(":visible"))){e(n.find(".resp-accordion")[y]).addClass("resp-tab-active");e(n.find(".resp-tab-content")[y]).addClass("resp-tab-content-active").attr("style","display:block")}else{e(n.find(".resp-tab-content")[y]).addClass("resp-tab-content-active resp-accordion-closed")}if(m!==""){e(n.find('.resp-tab-content[aria-labelledby="tab_item-'+m+'"]')).removeClass("resp-tab-content-active resp-accordion-closed");e(n.find('.resp-tab-content[aria-labelledby="tab_item-'+m+'"]')).addClass("resp-tab-content-active");e(n.find('.resp-accordion[aria-controls="tab_item-'+m+'"]')).addClass("resp-tab-active")}n.find("[role=tab]").each(function(){var t=e(this);t.click(function(){var t=e(this);var r=t.attr("aria-controls");if(t.hasClass("resp-accordion")&&t.hasClass("resp-tab-active")){n.find(".resp-tab-content-active").slideUp("",function(){e(this).addClass("resp-accordion-closed")});t.removeClass("resp-tab-active");return false}if(!t.hasClass("resp-tab-active")&&t.hasClass("resp-accordion")){n.find(".resp-tab-active").removeClass("resp-tab-active");n.find(".resp-tab-content-active").slideUp().removeClass("resp-tab-content-active resp-accordion-closed");n.find("[aria-controls="+r+"]").addClass("resp-tab-active");n.find(".resp-tab-content[aria-labelledby = "+r+"]").slideDown().addClass("resp-tab-content-active")}else{n.find(".resp-tab-active").removeClass("resp-tab-active");n.find(".resp-tab-content-active").removeAttr("style").removeClass("resp-tab-content-active").removeClass("resp-accordion-closed");n.find("[aria-controls="+r+"]").addClass("resp-tab-active");n.find(".resp-tab-content[aria-labelledby = "+r+"]").addClass("resp-tab-content-active").attr("style","display:block")}t.trigger("tabactivate",t);if(l){var i=window.location.hash;var s=c+(parseInt(r.substring(9),10)+1).toString();if(i!=""){var o=new RegExp(c+"[0-9]+");if(i.match(o)!=null){s=i.replace(o,s)}else{s=i+"|"+s}}else{s="#"+s}tmpUrl=window.location.href;tmpBis=tmpUrl.indexOf("#");if(tmpBis>0){tmpUrl=tmpUrl.substr(0,tmpBis)}history.replaceState(null,null,tmpUrl+s)}})});if(i==a){n.find(".resp-tabs-list").remove()}e(window).resize(function(){n.find(".resp-accordion-closed").removeAttr("style")})})}})})(jQuery);
!function(p){p.alerts={verticalOffset:-75,horizontalOffset:0,repositionOnResize:!0,overlayOpacity:.01,overlayColor:"#FFF",draggable:!0,okButton:"OK",cancelButton:"Cancel",dialogClass:null,alert:function(e,o,t,s){null==o&&(o="Alert"),null==s&&(s="alert"),p.alerts._show(o,e,null,s,function(p){t&&t(p)})},confirm:function(e,o,t,s,i){null==o&&(o="Confirm"),null!=s&&(p.alerts.okButton=s),null!=i&&(p.alerts.cancelButton=i),p.alerts._show(o,e,null,"confirm",function(p){t&&t(p)})},prompt:function(e,o,t,s){null==t&&(t="Prompt"),p.alerts._show(t,e,o,"prompt",function(p){s&&s(p)})},_show:function(e,o,t,s,i){p.alerts._hide(),p.alerts._overlay("show"),p("BODY").append('<div id="js_popup_container"><h1 id="js_popup_title"></h1><div id="js_popup_content"><div id="js_popup_message"></div></div></div>'),p.alerts.dialogClass&&p("#js_popup_container").addClass(p.alerts.dialogClass);switch(p("#js_popup_container").css({position:"fixed",zIndex:99999}),p("#js_popup_title").text(e),p("#js_popup_content").addClass(s),p("#js_popup_message").text(o),p("#js_popup_message").html(p("#js_popup_message").text().replace(/\n/g,"<br />")),p("#js_popup_container").css({minWidth:p("#js_popup_container").outerWidth(),maxWidth:p("#js_popup_container").outerWidth()}),p.alerts._reposition(),p.alerts._maintainPosition(!0),s){case"alert":case"alert_error":p("#js_popup_message").after('<div id="js_popup_panel"><input type="button" value="'+p.alerts.okButton+'" id="js_popup_ok" /></div>'),p("#js_popup_ok").click(function(){p.alerts._hide(),i(!0)});break;case"confirm":p("#js_popup_message").after('<div id="js_popup_panel"><input type="button" value="'+p.alerts.okButton+'" id="js_popup_ok" /> <input type="button" value="'+p.alerts.cancelButton+'" id="js_popup_cancel" /></div>'),p("#js_popup_ok").click(function(){p.alerts._hide(),i&&i(!0)}),p("#js_popup_cancel").click(function(){p.alerts._hide(),i&&i(!1)}),p("#js_popup_ok").focus(),p("#js_popup_ok, #js_popup_cancel").keypress(function(e){13==e.keyCode&&p("#js_popup_ok").trigger("click"),27==e.keyCode&&p("#js_popup_cancel").trigger("click")});break;case"prompt":p("#js_popup_message").append('<br /><input type="text" size="30" id="js_popup_prompt" />').after('<div id="js_popup_panel"><input type="button" value="'+p.alerts.okButton+'" id="js_popup_ok" /> <input type="button" value="'+p.alerts.cancelButton+'" id="js_popup_cancel" /></div>'),p("#js_popup_prompt").width(p("#js_popup_message").width()),p("#js_popup_ok").click(function(){var e=p("#js_popup_prompt").val();p.alerts._hide(),i&&i(e)}),p("#js_popup_cancel").click(function(){p.alerts._hide(),i&&i(null)}),p("#js_popup_prompt, #js_popup_ok, #js_popup_cancel").keypress(function(e){13==e.keyCode&&p("#js_popup_ok").trigger("click"),27==e.keyCode&&p("#js_popup_cancel").trigger("click")}),t&&p("#js_popup_prompt").val(t),p("#js_popup_prompt").focus().select()}if(p.alerts.draggable)try{p("#js_popup_container").draggable({handle:p("#js_popup_title")}),p("#js_popup_title").css({cursor:"move"})}catch(p){}},_hide:function(){p("#js_popup_container").remove(),p.alerts._overlay("hide"),p.alerts._maintainPosition(!1)},_overlay:function(e){switch(e){case"show":p.alerts._overlay("hide"),p("BODY").append('<div id="js_popup_overlay"></div>'),p("#js_popup_overlay").css({position:"absolute",zIndex:99998,top:"0px",left:"0px",width:"100%",height:p(document).height(),background:p.alerts.overlayColor,opacity:p.alerts.overlayOpacity});break;case"hide":p("#js_popup_overlay").remove()}},_reposition:function(){var e=p(window).height()/2-p("#js_popup_container").outerHeight()/2+p.alerts.verticalOffset,o=p(window).width()/2-p("#js_popup_container").outerWidth()/2+p.alerts.horizontalOffset;e<0&&(e=0),o<0&&(o=0),p("#js_popup_container").css({top:e+"px",left:o+"px"}),p("#js_popup_overlay").height(p(document).height())},_maintainPosition:function(e){if(p.alerts.repositionOnResize)switch(e){case!0:p(window).bind("resize",p.alerts._reposition);break;case!1:p(window).unbind("resize",p.alerts._reposition)}}},jAlert=function(e,o,t){p.alerts.alert(e,o,t)},jAlertError=function(e,o,t){p.alerts.alert(e,o,t,"alert_error")},jConfirm=function(e,o,t,s,i){p.alerts.confirm(e,o,t,s,i)},jPrompt=function(e,o,t,s){p.alerts.prompt(e,o,t,s)}}(jQuery);

comment:20 Changed 2 years ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 11931:

fix #930

comment:21 Changed 21 months ago by noRiddle

Habt Ihr meine Ausführung zu Inline-CSS oben beachtet ?
Oder kommt evtl. gar ein neues Tool anstelle des Compactors der bislang verwendet wurde, was das Genannte dann obsolet machen würde ?

Gruß,
noRiddle

comment:22 Changed 21 months ago by GTB

du kannst ja aktuell testen =)

comment:23 Changed 18 months ago by Tomcraft

  • Milestone changed from modified-shop-2.0.5.0 to modified-shop-2.0.5.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

Das Problem besteht nun wieder durch neue neue JavaScript? Komprimierung in den "/javascript/extra/" Dateien.

Ersetzt man beispielsweise in Datei cookieconsent.js.php:

  var consent_type = 'opt-in';

Mit:

  //var consent_type = 'opt-in';
  var consent_type = 'opt-in';

Dann funktioniert der Cookie-Banner nicht mehr.

comment:24 Changed 18 months ago by FräuleinGarn

Der Cookie Banner funktioniert auch nicht wenn ein Skript im JavaScript? Ordner nicht richtig komprimiert wird. Muss also nicht zwingend im extra Ordner liegen wo die Dateien auto inkludiert werden.

Und es gibt auch Probleme bei der Komprimierung die nicht Doppelslashes betrifft sondern Leerzeichen am Ende einer JS Datei.

comment:25 Changed 18 months ago by FräuleinGarn

Wenn man in Zeile 454 der neuen compactor.php

//  Removes single line '//' comments, treats blank characters
      $html = preg_replace('![ \t]*[^:]//.*[ \t]*[\r\n]!', '', $html);

ändert zu

//  Removes single line '//' comments, treats blank characters
      $html = preg_replace('!^[ \t]*[^:]//.*[ \t]*[\r\n]!', '', $html);

(also das Dach vorne einfügt) dann wird bei mir nicht mehr die Seite zerstört mit eingeschalteter CSS und JS Komprimierung. Ob damit dann aber überhaupt noch komprimiert wird bzw was das überhaupt ändert kann ich nicht sagen.

comment:26 Changed 18 months ago by Tomcraft

Vorschlag von p3e:

$html = preg_replace('![ \t]*//.*[ \t]*[\r\n]!', ' ', $html);

Quelle: modified eCommerce Shopsoftware 2.0.5.0 rev 12487 veröffentlicht

comment:27 Changed 18 months ago by FräuleinGarn

Der Vorschlag von p3e funktioniert leider genauso nicht, wie die original Zeile in der neuen compactor.php.

comment:28 Changed 18 months ago by FräuleinGarn

Bei meiner magicsroll.css Datei liegt es an einem base64 image (für ein sich bewegender Unveil Ladekreis) das 4Slahes nacheinander beinhaltet. Mit der neuen compactor.php wird der Teil ausgeschnitten.

Bei der magicslideshow.js seh ich nicht sofort warum etwas abgeschnitten wird. Allerdings ist die Zeile dazu in der tpl_plugin.min.js nur noch halb so lang an Zeichen. Er löscht also die Hälfte vom Skript. Ich hänge euch die beiden tpl_plugin.min.css und js Dateien mit alter und neuer compactor.php mit an.

Changed 18 months ago by FräuleinGarn

komprimierte tpl_plugin.min.css und js Dateien mit 2.0.4.2 und 2.0.5.0 compactor.php

comment:29 Changed 18 months ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12501:

fix #930 - fix removing single line comments

Changed 18 months ago by Tomcraft

comment:30 Changed 17 months ago by Tomcraft

  • Resolution fixed deleted
  • Status changed from closed to reopened

Das Ticket muss nochmal geöffnet werden, denn ich habe ein weiteres Problem erkannt, dass für weisse Seiten sorgt:

Hat ein Shopbetreiber in einer Sprachdatei einen Umlaut drin und die "HTML Komprimierung" ist aktiv, dann erhält man sofort eine weisse Seite, wo die Sprachkonstante benötigt wird.
Das ist im Demoshop sehr leicht nachzuvollziehen, indem man in der "/lang/german/german.php" die Zeile:

define('TAX_INFO_INCL','inkl. %s MwSt.');

Ersetzt gegen:

define('TAX_INFO_INCL','inkl. %s MwSt.ö');

Da im Demoshop der Cache aktiv ist diesen zum Testen vorher unbedingt deaktivieren oder nach Änderung der Sprachdatei einmal den Cache leeren, damit die weisse Seite erzeugt wird.

comment:31 Changed 17 months ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12559:

fix #930 - fix html compression for german umlauts

comment:32 Changed 15 months ago by FräuleinGarn

Könntet ihr hier das changeset für den letzten html Fix noch anhängen? Scheinbar gibt es bei manchen Nutzern mit eingeschalteter Html Komprimierung Probleme mit dem DHL Modul. Ich hab das Problem allerdings nicht.

Changed 15 months ago by Tomcraft

comment:33 Changed 15 months ago by noRiddle

Das in diesem Thread beschriebene Problem besteht immer noch (kein Vorwurf, habt ihr wahrscheinlich gar nicht gesehen):
Compactor zerstört Inline-CSS unter bestimmten Umständen

Wenn Minus-Werte in Inline-CSS stehen, wie z.B. bei Effekten mit box-shadow schonmal benutzt, werden diese invalide wenn der Minus-Wert hinter einem anderen Wert steht. Ist im Thread erklärt.

Wie ich im Thread auch schrieb:
"Kurze Klarstellung:
Den Begriff "Inline-CSS" habe ich mißverständlich benutzt.
Das Browser-Tool von Firefox nennt es auch "Inline" wenn auf einer Seite CSS explizit innerhalb von style-tags eingebunden ist, also nicht als Link zu einer CSS-Datei.
Diese Bedeutung von "Inline" meine ich."

Gruß,
noRiddle

comment:34 Changed 15 months ago by Tomcraft

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ich öffne das Ticket vorsichtshalber nochmal, obwohl wir eigentlich der Meinung waren das bereits korrigiert zu haben.

Mit dem letzten angehängten Changeset r12559 hattest du das bereits getestet?

comment:35 Changed 15 months ago by noRiddle

Jau, Changest 12559 ist im Shop, Problem besteht fort und zwar exakt in dem im Thread beschriebenen Fall:
Aus

#IRGENDWAS {background:#89362C; box-shadow:2px 2px 2px #89362C, -2px -2px 2px #89362C;}

wird

#IRGENDWAS {background:#89362C; box-shadow:2px 2px 2px #89362C,-2px-2px 2px #89362C;}

Da Ihr, wie ich gerade sehe, meinen Vorschlag aus dem Thread mit dem negativen Lookbehind verwendet habt ist die nachfolgende Zeile verkehrt

return trim(preg_replace('/\s?([\{\};\=\(\)\/\+\*-])\s?/', "\\1", $code));

müsste dann (ohne das - hinter dem *) so aussehen, oder ?

return trim(preg_replace('/\s?([\{\};\=\(\)\/\+\*])\s?/', "\\1", $code));

Gruß,
noRiddle

comment:36 Changed 15 months ago by noRiddle

*NACHTRAG*
Hab's gerade getestet.
Mein letzter Vorschlag (Entfernung des - hinter *) führt zum Erfolg.
Ich meine auch, ich hätte das damals schon getestet als ich es in den Thread schrieb, weiß es aber nicht mehr genau.

Gruß,
noRiddle

comment:37 Changed 15 months ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12696:

fix #930 - fix compactor

Changed 15 months ago by Tomcraft

comment:38 Changed 10 months ago by Tomcraft

  • Milestone changed from modified-shop-2.0.5.1 to modified-shop-2.0.5.2
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:39 Changed 9 months ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12899:

fix #930 - revised compactor (props hpzeller)

comment:40 Changed 9 months ago by FräuleinGarn

Muss leider nochmal geöffnet werden. Bei meinem magicslideshow.js Skript wird der Inhalt gekürzt, siehe Email an Euch von heute.

comment:41 Changed 9 months ago by FräuleinGarn

Die Stelle wo abgeschnitten wird sieht so aus

/*2p: 7a !1C;*

im Original sieht es so aus

/*2p: 7a !1C;*//*}*/.1d-1c-4V {

comment:42 Changed 9 months ago by Tomcraft

Der Compactor mag genau diesen Teil hier nicht:

*//*

Quick&Dirty wäre mein Vorschlag:

Suche in Datei "/includes/external/compactor/compactor.php":

    private function _stripPHPComments($html) {
      $html = $this->_removeMultiLineAndSingleLineComments($html); 
      // Strip blank lines
      $html = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $html);
      return trim($html);
    }

Ersetze mit:

    private function _stripPHPComments($html) {
      $html = str_replace('*//*', '*/ /*', $html);
      $html = $this->_removeMultiLineAndSingleLineComments($html); 
      // Strip blank lines
      $html = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $html);
      return trim($html);
    }

comment:43 Changed 9 months ago by FräuleinGarn

Damit würde es funktionieren.

comment:44 Changed 9 months ago by Tomcraft

Eine vermutlich elegantere Lösung über den RegEx? wurde hier von hpzeller veröffentlicht: MODUL: OIL.js Cookie Consent Management

comment:45 Changed 9 months ago by noRiddle

Finde deine Losungsidee im Prinzip gar nicht so schlecht, weil pragmatisch und gut nachvollziehbar.

hpzellers Lösung benötigt natürlich weniger Code und ist sicherer (weil es evtl. Fälle gibt wo deine Lösung nicht ausreicht oder gar etwas zerschießt). Er hat die beiden preg_replace() klugerweise einfach in der Reihenfolge vertauscht, sodaß zuerst die Multi-Line-Comments entfernt werden und somit ein

*//*

nicht mehr vorkommen kann wenn es an die Single-Line-Comments geht.

Wie auch immer sollte man das im Code kommentieren, damit man die Wichtigkeit und den Sinn auch in Monaten noch versteht und nachvollziehen kann.

Gruß,
noRiddle

comment:46 Changed 9 months ago by Tomcraft

  • Resolution fixed deleted
  • Status changed from closed to reopened

Welche Lösung würdest du bevorzugen?

comment:47 Changed 9 months ago by noRiddle

Das ist schwer zu sagen, das müsste ich tiefer durchdenken und mir vorher alle möglichen Kommentar-Anwendungen ausdenken, was momentan zeitlich nicht so gut geht.
Ich denke hpzellers Lösung ist schon sehr gut. Sie baut allerdings ja auf seinem vorher gemachten Vorschlag auf, den man für die Lösung übernehmen müsste.

Gruß,
noRiddle

comment:48 Changed 9 months ago by Tomcraft

Alles klar, dann wird es wohl die Lösung von hpzeller werden.
Wir hatten den Vorschlag von ihm bereits in r12899 ins SVN übernommen.

comment:49 Changed 7 months ago by Tomcraft

Damit das nicht untergeht. Folgende Änderung ist noch zu übernehmen: MODUL: OIL.js Cookie Consent Management

comment:50 Changed 7 months ago by GTB

  • Resolution set to fixed
  • Status changed from reopened to closed

In 12976:

fix #930 - revised compactor (props hpzeller)

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.