1/** 2 * @license 3 * 4 * Copyright 2006 - 2018 TubePress LLC (http://tubepress.com). 5 * This file is part of TubePress (http://tubepress.com). 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 */ 10var tubePressDomInjector,tubePressBeacon,TubePress=function(e,n){"use strict";var r=n.location,t=n.document,s=function(){var e=function(e){return void 0!==e},n=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n="[\\?&]"+e+"=([^&#]*)",t=RegExp(n),s=t.exec(r.search);return null===s?"":decodeURIComponent(s[1].replace(/\+/g," "))},t=function(e){var n=parseInt(e,10);return isNaN(n)?0:n},s=function(e,n,r){if(!0===n())return void e();var t=function(){s(e,n,r)};setTimeout(t,r)};return{isDefined:e,getParameterByName:n,parseIntOrZero:t,callWhenTrue:s,hasOwnNestedProperty:function(e){if(!e)return!1;var n,r=Array.prototype.slice.call(arguments),t=r.shift();for(n=0;n<r.length;n+=1){if(!t.hasOwnProperty(r[n]))return!1;t=t[r[n]]}return!0},trimSlashes:function(e,n){var r;return r=n?/^\/+/:/\/+$/,e.replace(r,"")}}}(),i=function(){var e=-1!==r.search.indexOf("tubepress_debug=true"),t=n.console,i=s.isDefined(t);return{on:function(){return e&&i},log:function(e){t.log("tubepress: "+e)},dir:function(e){t.dir(e)}}}(),o=function(){var e,r=!1,i=function(){return n.TubePressJsConfig},o=function(){var n,o,u,a=i();if(!r){if(s.hasOwnNestedProperty(a,"urls","base"))e=s.trimSlashes(a.urls.base,!1);else for(n=t.getElementsByTagName("script"),o=0;o<n.length;o+=1)if(u=n[o].src,-1!==u.indexOf("/tubepress.js")){e=s.trimSlashes(u.substr(0,u.lastIndexOf("/")).split("?")[0].replace("web/js",""),!1);break}r=!0}return e};return{getBaseUrl:o,getAjaxEndpointUrl:function(){var e=i();return s.hasOwnNestedProperty(e,"urls","ajax")?e.urls.ajax:o()+"/web/php/ajaxEndpoint.php"},getUserContentUrl:function(){var e=i();return s.hasOwnNestedProperty(e,"urls","usr")?e.urls.usr:o()+"/tubepress-content"}}}(),u=function(){var n=e({});return{subscribe:function(){n.on.apply(n,arguments)},unsubscribe:function(){n.off.apply(n,arguments)},publish:function(){if(i.on()){var e=arguments;i.log("firing event "+e[0]),e.length>1&&i.dir(e[1])}n.trigger.apply(n,arguments)}}}(),a=function(){var e=[],r=function(n){return!0===e[n]},u=function(e,n){if(0===e.indexOf("/")||0===e.indexOf("http"))return e;return(n?o.getBaseUrl():o.getUserContentUrl())+"/"+s.trimSlashes(e,!0)},a=function(e,n){i.on()&&i.log("Injecting "+n+": "+e)},c=function(e){t.getElementsByTagName("head")[0].appendChild(e)},l=function(n,i){if(i=!s.isDefined(i)||i,n=u(n,i),!r(n)){e[n]=!0;var o=t.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=n,a(n,"css"),c(o)}},f=function(n,i){if(i=!s.isDefined(i)||i,n=u(n,i),!r(n)){e[n]=!0,a(n,"js");var o=t.createElement("script");o.type="text/javascript",o.src=n,o.async=!0,t.getElementsByTagName("head")[0].appendChild(o)}},p=function(e){var r=n.TubePressJsConfig;f(s.hasOwnNestedProperty(r,"urls","js","sys",e)?r.urls.js.sys[e]:"web/js/"+e+".js")};return{loadJs:f,loadCss:l,loadGalleryJs:function(){p("gallery")},loadPlayerApiJs:function(){p("playerApi")},loadAjaxSearchJs:function(){p("ajaxSearch")}}}(),c=function(){return{processQueueCalls:function(r,t){var o,u=i.on(),a=n[r],c=function(e){var n=e[0],r=e.slice(1);t[n].apply(this,r)};if(s.isDefined(a)&&e.isArray(a))for(o=a.length,u&&i.log("Running "+o+" queue items for "+r),a.reverse();a.length;)c(a.pop());u&&i.log(r+" is now connected"),n[r]={push:c}}}}(),l=function(){var n=function(n,r){e(n).fadeTo(0,r)};return{applyLoadingStyle:function(e){n(e,.3)},removeLoadingStyle:function(e){n(e,1)}}}();return function(){var r,t=function(){u.publish("tubepress.window.resize")},s=function(){clearTimeout(r),r=setTimeout(t,150)};e(function(){e(n).resize(s)})}(),function(){c.processQueueCalls("tubePressDomInjector",a),c.processQueueCalls("tubePressBeacon",u)}(),{Ajax:{LoadStyler:l},AsyncUtil:c,Beacon:u,DomInjector:a,Environment:o,Lang:{Utils:s},Logger:i,Vendors:{jQuery:e}}}(jQuery,window);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.