PageSourceSearch

https://wooddale.org/wp-content/themes/wooddale_church/js/ttw-document-viewer.min.js?ver=3.5

js wooddale.org collected 2026-09-30 10:45:29 UTC 15,875 bytes, 1 lines download raw bytes

1"use strict";var DocumentViewerDependencyLoader=function(e){function t(t){var s=$.extend({},e,t);i=[],a[s.dependency]()?s.callback():yepnope({load:n[s.dependency],complete:function(){a[s.dependency]()?$.isFunction(s.callback)&&s.callback():s.errorHandler("There was an error loading the dependency ("+n[s.dependency]+") Please check your options.path value")}})}var i,n,a;if(n={pdfjs:["libs/pdfjs/compatibility.js","libs/pdfjs/pdf.js"],prettify:["libs/google-code-prettify/prettify.js","libs/google-code-prettify/prettify.css"],flowplayer:["libs/flowplayer/flowplayer-3.2.6.min.js"],jplayer:["libs/jPlayer/jquery.jplayer.min.js"]},yepnope.errorTimeout=e.errorTimeout||4e3,a={pdfjs:function(){return"undefined"!=typeof PDFJS},prettify:function(){return"undefined"!=typeof prettyPrint},flowplayer:function(){return"undefined"!=typeof flowplayer},jplayer:function(){return"undefined"!=typeof $.jPlayer}},e.path){var s={};$.each(n,function(t,i){var n=[];$.each(i,function(t,i){n.push(e.path+i)}),s[t]=n}),n=s}return{loadDependency:t}},DocumentViewer=function(e){function t(){k=$.extend(!0,{},x,e),f=new DocumentViewerDependencyLoader({path:k.path,errorHandler:a})}function i(e){var t=!1;return"pdf"===e?t="pdf":"txt"===e?t="txt":-1!==$.inArray(e,w)?t="code":-1!==$.inArray(e,b)?t="video":-1!==$.inArray(e,j)?t="audio":-1!==$.inArray(e,P)&&(t="image"),t}function n(){return(new Date).getTime()+"-"+Math.floor(1e5*Math.random())+1}function a(e){k.debug&&window.console&&console.log("DOCUMENT VIEWER: "+e)}function s(e){var t=/(?:\.([^.]+))?$/;return t.exec(e)[1]}function r(e,t){k.autoLoadDependencies?f.loadDependency({dependency:e,callback:t}):t()}function o(){C=language}function d(e,t){var i=p(e,t);return i.load(),i}function l(e){var t,i,n,a,s,r;return t=new InvisibleDom(!0),i=v(),n='<div class="document-viewer audio">'+i+"</div>",a=t.element($(n).width(e)),y=a.getSize().height,s='<div class="document-viewer video">'+i+"</div>",r=t.element($(s).width(e)),g=r.$element.find(".player-controls").outerHeight(!0),t.destroy(),{audioPlayerHeight:y,videoPlayerHeight:g}}function p(e,t){var i,n;return i=$.extend(!0,{},k,t),n=new I(e,i),T[n.width]||(T[n.width]=l(n.width)),n.renderPlaceHolder(),n}function c(e){return i(s(e))}function h(e){return e.replace(/^.*[\\\/]/,"")}function u(e){var t={};return t.name=h(e),t.extension=s(e),t.type=i(t.extension),t}function v(){return I.prototype.getJPlayerMarkup()}var f,y,g,m,w=["bsh","c","cc","cpp","cs","csh","css","cyc","cv","htm","html","java","js","m","mxml","perl","php","pl","pm","py","rb","sh","xhtml","xml","xsl","sql","vb"],P=["png","jpg","jpeg","gif"],j=["mp3","m4a","oga","webma","fla"],b=["mp4","ogv","ogg","webmv","flv"],x=(b.concat(j),{width:500,height:"auto",debug:!1,autoPlay:!0,autoLoadDependencies:!0,enableTextAndCode:!1,jPlayer:{},timeoutValue:4e3,path:"document-viewer/",isModal:!1,setUnsupportedSizeAsSquare:!0}),k={},C={emptyText:'<div class="document-viewer-empty-text">No Document Loaded</div>',unsupportedBrowserText:'<div class="document-viewer-empty-text">This document can not be opened in this browser. Please upgrade.</div>',errorText:"An error occurred while loading the ",serverResponseText:"Unexpected server response of "},T={},I=function(e,t){this.filename=e,this.type=null,this.extension=null,this.$anchor=null,this.$element=null,this.$inner=null,this.$loadingIndicator=null,this.loadEventId=null,this.$jPlayerAnchor=null,this.isLoaded=null,this.hasPlaceholder=!1,this.$placeHolder=null,this.leavePlaceholder=!1,$.extend(!0,this,k,t),this.init()};return I.prototype.initModal=function(){var e,t,i=this;e=$("body"),t=$('<div class="document-viewer-close"></div>'),this.$anchor=$('<div class="document-viewer-modal-overlay"></div>'),e.prepend(this.$anchor),e.addClass("has-document-viewer-modal"),this.$element.addClass("document-viewer-modal"),this.$element.append(t),t.on("click",function(){i.close(),e.removeClass("has-document-viewer-modal")}),this.$element.on("click",function(e){e.stopPropagation()}),this.$anchor.on("click",function(){})},I.prototype.close=function(){this.$anchor.empty().remove()},I.prototype.init=function(){var e,t,a;
1e={scrollable:".scrollable",viewport:".viewport",scrollContent:".scroll-content",wrapper:".document-viewer-wrapper",outer:".document-viewer-outer",anchor:".document-viewer"},t='<div class="document-viewer-wrapper dv-markup clearfix"><div class="document-viewer-outer dv-markup clearfix"><div class="document-viewer dv-markup clearfix"></div></div></div>',this.$element=$(t),m=this.$element.find(".document-viewer"),this.isModal?this.initModal():this.$anchor.empty(),this.$anchor.append(this.$element),this.$inner=this.$element.find(e.anchor),this.innerHorizontalPadding=parseInt(this.$inner.css("padding-right"),10)+parseInt(this.$inner.css("padding-left"),10),a="document-viewer"+n(),this.$inner.attr("id",a),this.id=a,this.extension||(this.extension=s(this.filename)),this.type||(this.type=i(this.extension)),this.$element.addClass(this.type),this.loadEventId=n(),this.name=this.filename.split("/").pop(),$.isFunction(this.width)&&(this.width=this.width(this)),this.setSize(k),this.bindCallback()},I.prototype.initMenu=function(){var e,t,i=this;e='<div class="document-viewer-menu"><span class="document-viewer-download">Download</span><span class="document-viewer-expand">Expand</span></div>',t=$(e),t.on("click",".document-viewer-download",function(){i.download()}),t.on("click",".document-viewer-expand",function(){i.fullScreen()}),this.$element.append(t)},I.prototype.download=function(){var e,t="hiddenDownloader";e=document.getElementById(t),null===e&&(e=document.createElement("iframe"),e.id=t,e.style.display="none",document.body.appendChild(e)),e.src=this.filename},I.prototype.fullScreen=function(){("audio"==this.type||"video"==this.type)&&this.pause();var e=new I(this.filename,{isModal:!0,width:.95*$(window).width()});e.load()},I.prototype.bindCallback=function(){var e=this;e.callback&&$.isFunction(e.callback)&&e.$inner.bind(e.loadEventId,e.callback)},I.prototype.calculateSixteenNine=function(e){return Math.round(e/16*9)},I.prototype.renderPlaceHolder=function(){var e=this.getHeight();"video"==this.type?e=this.height&&"string"!=typeof this.height?this.height:Math.round(this.width/16*9)+T[this.width].videoPlayerHeight:"audio"==this.type?e=T[this.width].audioPlayerHeight:"image"==this.type?e=this.width-this.innerHorizontalPadding:this.type===!1?(e=this.setUnsupportedSizeAsSquare===!0?this.width-this.innerHorizontalPadding:"auto",this.leavePlaceholder=!0):"txt"!==this.type&&"code"!=this.type||this.enableTextAndCode?e="90%":(e=this.setUnsupportedSizeAsSquare===!0?this.width-this.innerHorizontalPadding:"auto",this.leavePlaceholder=!0),this.hasPlaceholder=!0;var t='<div class="document-viewer-placeholder"><div class="document-viewer-placeholder-inner"><div class="document-icon"></div><div class="placeholder-info"><div class="filename">'+this.name+'</div><div class="file-extension">'+this.extension+"</div></div></div></div>";this.$placeHolder=$(t).height(e).width(this.width-this.innerHorizontalPadding),this.setContent(this.$placeHolder)},I.prototype.removePlaceholder=function(){this.hasPlaceholder&&!this.leavePlaceholder&&this.$placeHolder.remove()},I.prototype.getHeight=function(e,t){var i;return"pdf"===t||"txt"===t||"code"===t?(i="string"!=typeof this.height?this.height:1.3*this.width,"pdf"==t&&(i+=20),"txt"!=t&&"code"!=t||this.enableTextAndCode||(i="auto")):i="video"===t?"auto":"image"===t?this.height:"audio"===t?"auto":0==t?!1:"auto",i},I.prototype.setSize=function(e){var t=this.type;this.width=this.width||x.width,this.height=this.getHeight(e,t),this.$element.width(this.width+2),"pdf"==t?this.$inner.height(this.height).parent().height(this.height):"txt"===t||"code"===t?this.$inner.parent().height(this.height):this.$inner.height(this.height).parent().height(this.height)},I.prototype.unsupportedType=function(){this.triggerLoadedEvent()},I.prototype.load=function(){var e=this,t='<div class="dv-loading"></div>';switch(this.isLoaded=new $.Deferred,this.$loadingIndicator=$(t),this.$loadingIndicator.css({top:"10%"}),this.$inner.append(this.$loadingIndicator),setTimeout(function(){e.isLoaded.reject()},e.timeoutValue),this.type){case"pdf":this.loadPdf();break;case"code":case"txt":this.enableTextAndCode===!0?this.loadText():this.unsupportedType();break;case"video":this.loadJPlayer();break;case"audio":this.loadJPlayer();break;case"image":this.loadImage();break;default:this.unsupportedType()}},I.prototype.setContent=function(e,t){t===!0?this.$inner.append(e):this.$inner.html(e)},I.prototype.hideLoadingIndicator=function(){this.$loadingIndicator.remove()},I.prototype.getWidth=function(){return this.$inner.width()},I.prototype.triggerLoadedEvent=function(){this.removePlaceholder(),this.$inner.trigger(this.loadEventId),this.$loadingIndicator.remove(),this.isLoaded.resolve()},I.prototype.error=function(e,t){var i="<br/><span>"+C.serverResponseText+" "+e+" ("+t+")</span>";a("Error loading file ("+this.filename+"). Please make sure that the path is correct"),this.setContent('<div class="dv-error">
1'+C.errorText+this.type+i+"</div>")},I.prototype.loadPdf=function(){function e(){return!!document.createElement("canvas").getContext}function t(){g.find("#pdf-num-pages").text(p.numPages)}function i(){m.val(h)}function n(e){c.setContent(f),PDFJS.workerSrc=c.path+"libs/pdfjs/pdf.worker.js";var i=PDFJS.getDocument(e).then(function(e){p=e,t(),a(h)});i.catch(function(e){c.error(e.target.status,e.target.statusText)})}function a(e){h=e,y.find("canvas").remove(),y.append(l(e)),s()}function s(){i(),o()?P.addClass("disabled"):P.removeClass("disabled"),d()?w.addClass("disabled"):w.removeClass("disabled")}function o(){return 1==h}function d(){return h==p.numPages}function l(e){var t=document.createElement("canvas");return t.id="page"+e,p.getPage(e).then(function(e){var i=c.$inner.width(),n=e.getViewport(1),a=i/n.width,s=e.getViewport(a),r=t.getContext("2d");t.height=s.height,t.width=s.width;var o={canvasContext:r,viewport:s};e.render(o).then(function(){j===!1&&(j=!0,c.triggerLoadedEvent())}),j===!1&&c.hideLoadingIndicator()}),t}var p,c=this,h=1,u='<div class="pdf-menu"><div class="prev-page" >Prev Page</div><div class="next-page">Next Page</div><div class="go-to-page"><input> / <span id="pdf-num-pages"></span></div></div>',v=u+'<div class="pdf-page"></div>',f=$(v),y=f.filter(".pdf-page"),g=f.filter(".pdf-menu"),m=f.find("input"),w=f.find(".next-page"),P=f.find(".prev-page"),j=!1;return g.on("click",".prev-page",function(){h>1&&a(h-1)}),g.on("click",".next-page",function(){h<p.numPages&&a(h+1)}),g.on("keyup","input",function(){var e=parseInt($(this).val(),10);e>0&&e<=p.numPages&&a(e)}),e()?(r(["pdfjs"],function(){n(c.filename)}),{load:n,setPage:a}):void c.setContent(this.unsupportedBrowserText)},I.prototype.loadText=function(){var e=this;$.ajax({url:e.path+"libs/getContents.php",type:"POST",data:{file:e.filename},success:function(t){if(t=$.parseJSON(t),"success"===t.status){var i=$('<pre class="prettyprint linenums">'+t.response+"</pre>").css("opacity",0);e.hideLoadingIndicator(),e.setContent(i),i.animate({opacity:1}),"code"===e.type&&r(["prettify"],function(){prettyPrint()}),e.triggerLoadedEvent()}else e.error("404","Not Found")},error:function(){e.error()}})},I.prototype.loadJPlayer=function(){function e(){var e,t,n;return e=p.getJPlayerMarkup(),t=$(e).css({opacity:0}),t.find(o.player).addClass(l),p.setContent(t),n=p.getWidth(),i.size.width=n,i.size.height=d?p.calculateSixteenNine(n):0,t.animate({opacity:1}),t}function t(){var t;d=-1!==$.inArray(p.extension,b),i=$.extend(!0,{},n,p.jPlayer),p.hideLoadingIndicator(),t=e(),s=p.$inner.find(".jPlayer-container"),s.bind($.jPlayer.event.ready,function(){var e={};e[p.extension]=p.filename,s.jPlayer("setMedia",e),a("jPlayer Ready"),p.autoPlay&&s.jPlayer("play")}),s.bind($.jPlayer.event.loadstart,function(){p.triggerLoadedEvent()}),s.bind($.jPlayer.event.error,function(){p.error("404","Not Found")}),s.jPlayer(i),p.$jPlayerAnchor=s}var i,n,s,o,d,l,p=this;o={jPlayer:"#jquery-jplayer-"+p.id,jPlayerContainer:".jPlayer-container",playlist:".playlist",playing:".playing",progress:".progress-wrapper",volume:".volume-wrapper",player:".player"},l="jp-interface-"+p.id,n={swfPath:p.path+"libs/jPlayer",supplied:this.extension,solution:"html, flash",cssSelectorAncestor:"."+l,errorAlerts:p.debug,warningAlerts:p.debug,size:{height:p.height,width:p.width,cssClass:"show-video"},sizeFull:{width:"100%",height:"90%",cssClass:"show-video-full"},play:function(){$(this).jPlayer("pauseOthers")}},r(["jplayer"],function(){t()})},I.prototype.getJPlayerMarkup=function(){var e='<div class="ttw-video-player"><div class="jPlayer-container"></div><div class="clear"></div><div class="player"><div class="player-controls"><div class="play jp-play button"></div><div class="pause jp-pause button"></div><div class="progress-wrapper"><div class="progress-bg"><div class="progress jp-seek-bar"><div class="elapsed jp-play-bar"></div></div></div></div><div class="volume-wrapper"><div class="volume jp-volume-bar"><div class="volume-value jp-volume-bar-value"></div></div></div></div><!-- These controls aren\'t used by this plugin, but jPlayer seems to require that they exist --><span class="unused-controls"><span class="previous jp-previous"></span><span class="next jp-next"></span><span class="jp-video-play"></span><span class="jp-stop"></span><span class="jp-mute"></span><span class="jp-unmute"></span><span class="jp-volume-max"></span><span class="jp-current-time"></span><span class="jp-duration"></span><span class="jp-repeat"></span><span class="jp-repeat-off"></span><span class="jp-gui"></span><span class="jp-restore-screen"></span><span class="jp-full-screen"></span><span class="jp-no-solution"></span><span class="jp-playback-rate-bar"></span><span class="jp-playback-rate-bar-value"></span><span class="jp-title"></span></span></div><div class="clear"></div></div>';return e},I.prototype.play=function(){this.$jPlayerAnchor.jPlayer("play")},I.prototype.pause=function(){this.$jPlayerAnchor.jPlayer("pause")},I.prototype.destroyPlayer=function(){this.$jPlayerAnchor.jPlayer("destroy")},I.prototype.loadImage=function(){var e=this,t=$('<img class="dv-image">').css("opacity",0);t.error(function(){e.error("404","Not Found")}),t.attr("src",this.filename);var i=new Image;
1i.onload=function(){e.hideLoadingIndicator(),e.$inner.append(t),t.animate({opacity:1}),e.triggerLoadedEvent()},i.src=t.attr("src")},t(),{initRender:p,load:d,close:close,getDocumentType:c,getDetails:u,setLanguage:o,getPlayerMarkup:v,testPlayerSizes:l}},InvisibleDom=function(e){function t(){s.empty(),s.remove()}function i(e){return new r(e)}function n(){var e,t;return void 0===a&&(e=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),t=e.children(),a=t.innerWidth()-t.height(99).innerWidth(),e.remove()),a}var a,s;s=$("<div></div>").css({display:"block",position:"absolute",bottom:-99999,left:-99999,opacity:0}),e===!0&&s.css({bottom:0,left:0,opacity:1,"z-index":99999}),$("body").append(s);var r=function(e){this.$element=e,this.isAddedToDom=!1,this.add()};return r.prototype.add=function(){this.isAddedToDom||s.append(this.$element)},r.prototype.getSize=function(){var e={};return e.height=this.$element.height(),e.outerHeight=this.$element.outerHeight(!0),e.width=this.$element.width(),e.outerWidth=this.$element.outerWidth(!0),e},r.prototype.getHorizontalPadding=function(){var e={};return e.rightPadding=parseInt(this.$element.css("padding-right"),10),e.leftPadding=parseInt(this.$element.css("padding-left"),10),e.total=e.rightPadding+e.leftPadding,e},r.prototype.getHorizontalMargin=function(){var e={};return e.rightPadding=parseInt(this.$element.css("margin-right"),10),e.leftPadding=parseInt(this.$element.css("margin-left"),10),e.total=e.rightPadding+e.leftPadding,e},{element:i,scrollbarWidth:n,destroy:t}};

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.