1/* 2 Zoomify Image Viewer, version on line 25 below. Copyright Zoomify, Inc., 1999-2016. All rights reserved. You may 3use this file on private and public websites, for personal and commercial purposes, with or without modifications, so long as this 4notice is included. Redistribution via other means is not permitted without prior permission. Additional terms apply. For complete 5license terms please see the Zoomify License Agreement in this product and on the Zoomify website at www.zoomify.com. 6:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7*/ 8(function(){(function(){return this}).call().Z={}})();Z.version="4.01 Express";Z.setCallback=function(a,b){"undefined"===typeof Z.callbacks&&(Z.callbacks=[]);var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackEvent",a,null,"callbackFunction",b);-1==c&&(c=Z.callbacks.length);Z.callbacks[c]={callbackEvent:a,callbackFunction:b}}; 9Z.showImage=function(a,b,c){if(Z.showImage.done)Z.Utils.declareGlobals(),Z.pageContainerID=a,"undefined"!==typeof b&&Z.Utils.stringValidate(b)?Z.imagePath=Z.Utils.stringRemoveTrailingSlashCharacters(b):Z.imagePath=null,"undefined"!==typeof c&&(Z.parameters=Z.Utils.parseParameters(c)),Z.initialize();else{Z.showImage.done=!0;Z.Utils.addCrossBrowserMethods();Z.Utils.addCrossBrowserEvents();Z.Utils.declareGlobals();Z.pageContainerID=a;Z.setEditPermissionFunction=function(a){Z.externalEditPermissionFunction= 10a};Z.clearCallback=function(a,b){var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackEvent",a,null,"callbackFunction",b);-1!=c&&(Z.callbacks=Z.Utils.arraySplice(Z.callbacks,c,1))};a="undefined"!==typeof b&&Z.Utils.stringValidate(b);var d="undefined"!==typeof c&&("string"===typeof c&&-1!=c.indexOf("zIIIFServer")||"object"===typeof c&&"undefined"!==typeof c.zIIIFServer);a&&-1!=b.indexOf("zXMLParametersPath")?(b=b.substring(19,b.length),Z.xmlParametersPath=Z.Utils.stringRemoveTrailingSlashCharacters(b)): 11Z.imagePath=d?"IIIFImageServer":a?Z.Utils.stringRemoveTrailingSlashCharacters(b):null;"undefined"!==typeof c&&("string"===typeof c&&(c=unescape(c),c=Z.Utils.stringUnescapeAmpersandCharacters(c)),Z.parameters=Z.Utils.parseParameters(c));"complete"!=document.readyState?(Z.Utils.addEventListener(document,"DOMContentLoaded",Z.initialize),Z.Utils.addEventListener(window,"load",Z.initialize)):Z.initialize()}}; 12Z.initialize=function(){Z.Utils.removeEventListener(document,"DOMContentLoaded",Z.initialize);Z.Utils.removeEventListener(window,"load",Z.initialize);Z.Utils.detectBrowserFeatures();Z.xmlParametersPath&&!Z.parameters?Z.loadParametersXML():null!==Z.parameters&&"undefined"!==typeof Z.parameters.zXMLParametersPath?Z.Utils.setParameters(Z.parameters):(Z.Utils.setParameters(Z.parameters),Z.Viewer=new Z.ZoomifyImageViewer,Z.Utils.stringValidate(Z.copyrightPath)?Z.Utils.enforceCopyright():Z.Viewer.configureViewer(), 131!=Z.debug&&2!=Z.debug&&3!=Z.debug||Z.Utils.trace(Z.Utils.getResource("z445"),!1,!0))};Z.loadParametersXML=function(){Z.xmlParametersParsing=!0;var a=new Z.NetConnector,b=Z.Utils.cacheProofPath(Z.xmlParametersPath);a.loadXML(b)}; 14Z.ZoomifyImageViewer=function(){function a(){document.getElementsByTagName("body")?document.getElementsByTagName("body")[0].onorientationchange=b:window.setTimeout(a,100)}function b(a){Z.interactive&&Z.fullView&&(Z.Toolbar&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1),Z.Viewport&&(Z.Viewport.toggleFullViewMode(!1),Z.Viewport.toggleFullViewMode(!0)),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0),Z.Toolbar&&Z.toolbarAutoShowHide&& 15Z.Toolbar.show(!0))}function c(a){if(Z.interactive&&Z.keys&&"INPUT"!=document.activeElement.tagName&&"TEXTAREA"!=document.activeElement.tagName){a=Z.Utils.event(a);var b=a.altKey;18==a.keyCode||a.altKey||(Z.viewportCurrent.zoomAndPanAllStop(!0,!0),Z.maskingSelection&&Z.viewportCurrent.clearLabelMask());if(a){var c=a.type,d=a.keyCode;if("keydown"==c){Z.keyIsDown=!0;switch(d){case 90:Z.viewportCurrent.zoom("out");break;case 17:Z.viewportCurrent.zoom("out");break;case 65:Z.viewportCurrent.zoom("in"); 16break;case 16:Z.viewportCurrent.zoom("in");break;case 37:!Z.tracking&&!Z.animation||Z.viewportCurrent.getZoom()!=Z.minZ?Z.viewportCurrent.pan("left"):Z.imageSet&&f.viewportPrior();break;case 38:!Z.tracking&&!Z.animation||Z.viewportCurrent.getZoom()!=Z.minZ?Z.viewportCurrent.pan("up"):Z.imageSet&&f.viewportNext();break;case 40:!Z.tracking&&!Z.animation||Z.viewportCurrent.getZoom()!=Z.minZ?Z.viewportCurrent.pan("down"):Z.imageSet&&f.viewportPrior();break;case 39:!Z.tracking&&!Z.animation||Z.viewportCurrent.getZoom()!= 17Z.minZ?Z.viewportCurrent.pan("right"):Z.imageSet&&f.viewportNext();break;case 27:Z.fullView?Z.viewportCurrent.toggleFullViewMode(!1):Z.viewportCurrent.reset();break;case 190:Z.rotationVisible&&Z.viewportCurrent.rotate("clockwise",b);break;case 188:Z.rotationVisible&&Z.viewportCurrent.rotate("counterwise",b);break;case 33:Z.imageSet&&!Z.overlays&&f.viewportNext();break;case 34:Z.imageSet&&!Z.overlays&&f.viewportPrior()}!Z.imageSet||33!=d&&34!=d||(a.preventDefault?a.preventDefault():a.returnValue=!1)}else"keyup"== 18c&&((Z.keyIsDown=!1,90==d||17==d||65==d||16==d)?Z.viewportCurrent.zoom("stop"):37==d||39==d||38==d||40==d?Z.tracking||(37==d||39==d?Z.viewportCurrent.pan("horizontalStop"):38!=d&&40!=d||Z.viewportCurrent.pan("verticalStop")):!Z.rotationVisible||190!=d&&188!=d?!Z.imageSet||33!=d&&34!=d||(Z.imageSet&&Z.viewportCurrent.updateView(!0),a.preventDefault?a.preventDefault():a.returnValue=!1):Z.viewportCurrent.rotate("stop"))}}}function d(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c=Z.Utils.isRightMouseButton(a), 19d=a.altKey;if(!("mouseover"!=b&&"mouseout"!=b&&!Z.interactive||"mousedown"==b&&(!Z.interactive||Z.coordinatesVisible&&d)||c)){Z.touchSupport&&!Z.clickZoomAndPanBlock&&"touchmove"!=b&&"gesturechange"!=b&&a.preventDefault();switch(b){case "mouseover":Z.fullView||"TEXTAREA"==document.activeElement.tagName||Z.Viewer.initializeViewerKeyDefaultListeners(!0);break;case "mouseout":Z.tracking||Z.Viewer.initializeViewerKeyDefaultListeners(!1)}var h;h=Z.Utils.event(a);var f=h.type;if(h&&f){var v;a=Z.Utils.target(h); 20c=Z.Utils.relatedTarget(h);"resize"!=f&&(v=Z.Utils.getMousePosition(h));d=h.altKey;
20"DOMMouseScroll"==f&&(f="mousewheel");switch(f){case "mouseover":d=Z.Utils.nodeIsInViewer(a);h=Z.Utils.nodeIsInViewer(c);d&&h||(Z.viewportCurrent&&Z.viewportCurrent.showLists(!0),Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!0),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0),Z.mouseOutDownPoint=null);break;case "mouseout":d=Z.Utils.nodeIsInViewer(a);h=Z.Utils.nodeIsInViewer(c);d&&h||"[object HTMLSelectElement]"== 21a||"[object HTMLOptionElement]"==a||"[object HTMLSelectElement]"==c||"[object HTMLOptionElement]"==c||(Z.mouseIsDown?Z.mouseOutDownPoint=new Z.Utils.Point(v.x,v.y):(Z.viewportCurrent&&Z.viewportCurrent.showLists(!1),Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1)));break;case "resize":p||(p=window.setTimeout(e,A));break;case "mousewheel":0<Z.mouseWheel&&(v=Math.max(-1,Math.min(1,h.wheelDelta||-h.detail)),Z.viewportCurrent.mouseWheelHandler(v, 22d))}}if("mousedown"==b||"mousemove"==b)return!1}}}function e(){p&&(window.clearTimeout(p),p=null,h())}function h(){if(!Z.fullScreenEntering){var a=Z.Utils.getContainerSize(Z.pageContainer,Z.ViewerDisplay),b=Z.viewportCurrent.calculateZoomForResize(Z.viewportCurrent.getZoom(),Z.viewerW,Z.viewerH,a.x,a.y);f.resizeViewer(a.x,a.y,b)}}var f=this,q=[];Z.ViewerDisplay=Z.Utils.createContainerElement("div","ViewerDisplay","inline-block","relative","hidden","100%","100%","0px","0px","none","0px","transparent none", 23"0px","0px","normal","pointer");Z.pageContainer=document.getElementById(Z.pageContainerID);Z.Utils.getElementStyle(Z.pageContainer);Z.ViewerDisplay.style["-webkit-touch-callout"]="none";Z.ViewerDisplay.style["-moz-user-select"]="none";Z.ViewerDisplay.style["-khtml-user-select"]="none";Z.ViewerDisplay.style["-webkit-user-select"]="none";Z.ViewerDisplay.style["-ms-user-select"]="none";Z.ViewerDisplay.style["-o-user-select"]="none";Z.ViewerDisplay.style["user-select"]="none";var n=Z.Utils.getContainerSize(Z.pageContainer, 24Z.ViewerDisplay);Z.viewerW=n.x;Z.viewerH=n.y;Z.pageContainer.innerHTML="";Z.pageContainer.appendChild(Z.ViewerDisplay);Z.autoResize=Z.autoResize||Z.Utils.isElementFluid(Z.pageContainer);var A=parseInt(Z.Utils.getResource("DEFAULT_AUTORESIZESKIPDURATION"),10),p;Z.mouseWheelCompleteDuration=parseInt(Z.Utils.getResource("z165"),10);this.configureViewer=function(){if(!Z.Viewer.getStatus("configureCalled")){var b=function(){Z.clearCallback("readyViewer",b);Z.Utils.getMessage()!=Z.Utils.getResource("ALERT_LOADINGIMAGESET")&& 25Z.Utils.getMessage()!=Z.Utils.getResource("ALERT_LOADINGANNOTATIONS")||Z.Utils.hideMessage()},c=function(){Z.clearCallback(e,c);f.initializeViewerKeyEventListeners(!0);Z.Utils.addEventListener(Z.ViewerDisplay,"mouseover",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mouseout",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mousemove",Z.Utils.preventDefault);Z.Utils.addEventListener(Z.ViewerDisplay,"mousewheel",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mousewheel",Z.Utils.preventDefault);a();Z.autoResize&& 26Z.Utils.addEventListener(window,"resize",Z.Viewer.viewerEventsHandler);var b=Z["Viewport"+(Z.imageSetLength-1).toString()];f.configureComponents(Z.overlays?b:Z.viewportCurrent)};Z.Viewer.setStatus("configureCalled",!0);var e=Z.imageSet?"initializedViewer":"initializedViewport";Z.setCallback(e,c);Z.setCallback("readyViewer",b);if(Z.imageSet)if(Z.Utils.showMessage(Z.Utils.getResource("ALERT_LOADINGIMAGESET"),!1,null,"center"),"undefined"!==typeof Z.overlayJSONObject&&"object"===typeof Z.overlayJSONObject&& 27null!==Z.overlayJSONObject){var h=Z.Utils.jsonConvertObjectToXMLText(Z.overlayJSONObject),h=Z.Utils.xmlConvertTextToDoc(h);f.parseImageSetXML(h,"overlay")}else{var u=new Z.NetConnector;".xml"!=Z.imageSetPath.toLowerCase().substring(Z.imageSetPath.length-4,Z.imageSetPath.length)&&(Z.imageSetPath=Z.imageSetPath+"/"+Z.Utils.getResource("DEFAULT_IMAGESETXMLFILE"));h=Z.Utils.cacheProofPath(Z.imageSetPath);u.loadXML(h)}else Z.Viewport=new Z.ZoomifyViewport,Z.viewportCurrent=Z.Viewport}};this.configureComponents=
28function(a){0<Z.toolbarVisible&&!Z.Toolbar&&(Z.Toolbar=new Z.ZoomifyToolbar(a));0<Z.navigatorVisible&&!Z.Navigator&&(Z.Navigator=new Z.ZoomifyNavigator(a),Z.Navigator&&Z.Navigator.z682());Z.helpCustom&&(new Z.NetConnector).loadHTML(Z.helpPath,f.receiveHelpHTML,null,"loadHTML")};this.receiveHelpHTML=function(a){4==a.readyState&&200==a.status&&Z.Utils.stringValidate(a.responseText)&&(Z.helpContent=a.responseText)};this.getVersion=function(){return Z.version};this.setSizeAndPosition=function(a,b,c,d, 29e){Z.viewerW=a;Z.viewerH=b;Z.ViewerDisplay.style.width=a+"px";Z.ViewerDisplay.style.height=b+"px";Z.Viewport&&Z.Viewport.getStatus("initializedViewport")&&Z.Viewport.setSizeAndPosition(a,b,c,d);b=1==Z.toolbarPosition?b-Z.toolbarH:0;Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&(Z.Toolbar.setSizeAndPosition(a,null,null,b),0!=Z.toolbarVisible&&8!=Z.toolbarVisible&&Z.Toolbar.show(!0));Z.Navigator&&Z.Navigator.getInitialized()&&(Z.Navigator.setSizeAndPosition(null,null,0==Z.navigatorL?c:Z.navigatorL+ 30Z.navigatorW>a?a-Z.navigatorW:Z.navigatorL,0!=Z.navigatorT?Z.navigatorT:d,Z.navigatorFit),1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0));e&&Z.Viewport.updateView(!0)};this.getImagePath=function(){return f.getImage()};this.getImage=function(){return Z.imagePath};this.getStatus=function(a){a=Z.Utils.arrayIndexOfObjectValue(q,"state",a);return-1==a?!1:q[a].status};this.setStatus=function(a,b){var c=!1,d=Z.Utils.arrayIndexOfObjectValue(q,"state",a);-1==d?(c=b,q[q.length]={state:a,status:b}):(!q[d].status&& 31b&&(c=!0),q[d].status=b);c&&(Z.Utils.validateCallback(a),f.validateViewerReady(a))};this.validateViewerStatus=function(a){var b=!0;if(Z.imageSet)for(var c=0,d=Z.imageSetLength;c<d;c++)if(!Z["Viewport"+c.toString()].getStatus(a)){b=!1;break}b&&(b=a.indexOf("Viewport"),-1!=b&&(a=a.substring(0,b)),f.setStatus(a+"Viewer",!0))};this.validateViewerReady=function(a){a=Z.Viewport&&Z.Viewport&&Z.Viewport.getStatus("initializedViewport")&&("unconverted"==Z.tileSource||Z.Viewport.getStatus("precacheLoadedViewport")&& 32Z.Viewport.getStatus("backfillLoadedViewport")&&Z.Viewport.getStatus("backfillDrawnViewport"))&&Z.Viewport.getStatus("displayLoadedViewport")&&Z.Viewport.getStatus("displayDrawnViewport");var b=!Z.hotspots||Z.Viewport&&Z.Viewport.getStatus("hotspotsLoadedViewport"),c=!Z.annotations||Z.Viewport&&Z.Viewport.getStatus("annotationsLoadedViewport")&&(!Z.annotationPanelVisible||Z.Viewport.getStatus("annotationPanelInitializedViewport")),d=0==Z.ToolbarVisible||Z.Toolbar&&Z.Toolbar.getInitialized(),e=!Z.NavigatorVisible|| 33Z.Navigator&&Z.Navigator.getInitialized(),h=!Z.GalleryVisible||Z.Gallery&&Z.Gallery.getInitialized(),f=!Z.RulerVisible||Z.Ruler&&Z.Ruler.getInitialized(),n=!Z.imageSet||Z.Viewer&&Z.Viewer.getStatus("initializedViewer")&&("unconverted"==Z.tileSource||Z.Viewer.getStatus("precacheLoadedViewer")&&Z.Viewer.getStatus("backfillLoadedViewer")&&Z.Viewer.getStatus("backfillDrawnViewer"))&&Z.Viewer.getStatus("displayLoadedViewer")&&Z.Viewer.getStatus("displayDrawnViewer"),q=!Z.imageSet||!Z.hotspots||Z.Viewer&& 34Z.Viewer.getStatus("hotspotsLoadedViewer"),p=!Z.imageSet||!Z.annotations||Z.Viewer&&Z.Viewer.getStatus("annotationsLoadedViewer")&&(!Z.annotationPanelVisible||Z.Viewer.getStatus("annotationPanelInitializedViewer"));(a=a&&b&&c&&d&&e&&h&&f&&n&&q&&p)&&Z.Viewer.setStatus("readyViewer",!0);return a};this.initializeViewerKeyEventListeners=function(a){a?(Z.Utils.addEventListener(document,"keydown",c),Z.Utils.addEventListener(document,"keyup",c)):(Z.Utils.removeEventListener(document,"keydown",c),Z.Utils.removeEventListener(document, 35"keyup",c))};this.initializeViewerKeyDefaultListeners=function(a){a?(Z.Utils.addEventListener(document,"keydown",Z.Utils.preventDefault),Z.Utils.addEventListener(document,"keyup",Z.Utils.preventDefault)):(Z.Utils.removeEventListener(document,"keydown",Z.Utils.preventDefault),Z.Utils.removeEventListener(document,"keyup",Z.Utils.preventDefault))};this.viewerEventsHandler=function(a){d(a)};this.autoResizeViewer=function(){h()};this.resizeViewer=function(a,b,c){f.setSizeAndPosition(a,b,0,0,!1);Z.viewportCurrent.resizeViewport(Z.imageX, 36Z.imageY,c,Z.imageR)};this.z586=function(a){Z.mouseWheelIsDown=!1;Z.mouseWheelCompleteTimer&&(window.clearTimeout(Z.mouseWheelCompleteTimer),Z.mouseWheelCompleteTimer=null,Z.zooming="stop",Z.viewportCurrent.updateView(!0))}}; 37Z.ZoomifyViewport=function(a,b,c,d,e,h){function f(a,b,Dc,c,d,g,e,m,h,f,l){p();Z.imageW=a;Z.imageH=b;Z.imageCtrX=Z.imageW/2;Z.imageCtrY=Z.imageH/2;Z.imageD=Math.round(Math.sqrt(a*a+b*b));Ec=g;Fc=e;Wb=m;dc=d;Ha=Dc;Ia=c;V();H(W,T,Gc,ec);
37k.validateXYZDefaults();Aa>Hc?(Da=ca(Ta,Z.initialZ),S&&na.scale(Da,Da)):na=$a=S=null;fb=ca(oa,Z.initialZ);vb=X=ca(O,Z.initialZ);if(Z.useCanvas)try{sa.scale(X,X)}catch(r){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE"),!1,Z.messageDurationStandard, 38"center"),console.log("In function initializeViewportContinue scaling canvas: "+r)}"unconverted"!=Z.tileSource&&k.z619();Xb(Z.initialX,Z.initialY,Z.initialZ,Z.initialR,null,!0);Z.initialFullPage&&k.toggleFullViewMode(!0);Z.Utils.addEventListener(ba,"mousedown",M);Z.Utils.addEventListener(ba,"mousemove",Z.Utils.preventDefault);Z.Utils.addEventListener(ba,"touchstart",M);Z.Utils.addEventListener(ba,"touchmove",M);Z.Utils.addEventListener(ba,"touchend",M);Z.Utils.addEventListener(ba,"touchcancel",M); 39Z.Utils.addEventListener(ba,"gesturestart",M);Z.Utils.addEventListener(ba,"gesturechange",M);Z.Utils.addEventListener(ba,"gestureend",M);Z.Utils.addEventListener(da,"contextmenu",Z.Utils.preventDefault);Z.Utils.addEventListener(fa,"contextmenu",Z.Utils.preventDefault);fc&&Z.Utils.addEventListener(fc,"contextmenu",Z.Utils.preventDefault);ld&&Z.Utils.addEventListener(ld,"contextmenu",Z.Utils.preventDefault);k.setStatus("initializedViewport",!0);k.syncViewportRelated()}function q(b,c,Dc,y,d,g,e,m,h, 40f,l){k.setStatus("initializedViewport",!1);k.clearAll(!0,!1,!0,!0);Z.imageW=b;Z.imageH=c;Z.imageCtrX=Z.imageW/2;Z.imageCtrY=Z.imageH/2;Z.imageD=Math.round(Math.sqrt(b*b+c*c));Ec=g;Fc=e;Wb=m;dc=d;Ha=Dc;Ia=y;Z.Utils.setParameters(Z.parameters);V();A();p();k.validateXYZDefaults();Aa>Hc?(Da=ca(Ta,Z.initialZ),na.restore(),na.scale(Da,Da)):S=$a=na=null;fb=ca(oa,Z.initialZ);vb=X=ca(O,Z.initialZ);Z.useCanvas&&(sa.restore(),sa.scale(X,X));"unconverted"!=Z.tileSource&&k.z619();k.setSizeAndPosition(W,T,Gc,ec); 41k.setStatus("initializedViewport",!0);(b=0==a?Z.Navigator:Z.Navigator2)&&b.setImage(k.getImagePath());k.syncViewportRelated()}function n(){Aa=1;oa=O=0;Ic=Jc=Kc=la=!1;"undefined"!==typeof Ea&&Z.Utils.arrayClear(Ea);"undefined"!==typeof Ma&&Z.Utils.arrayClear(Ma);"undefined"!==typeof xa&&Z.Utils.arrayClear(xa);"undefined"!==typeof Ua&&Z.Utils.arrayClear(Ua);"undefined"!==typeof Na&&Z.Utils.arrayClear(Na);"undefined"!==typeof Ob&&Z.Utils.arrayClear(Ob);"undefined"!==typeof tierTileOffsetsCount&&Z.Utils.arrayClear(tierTileOffsetsCount); 42"undefined"!==typeof tierTileOffsetChunks&&Z.Utils.arrayClear(tierTileOffsetChunks);"undefined"!==typeof tierTileOffsetLast&&Z.Utils.arrayClear(tierTileOffsetLast);"undefined"!==typeof Eb&&Z.Utils.arrayClear(Eb);"undefined"!==typeof tierTileByteCountsCount&&Z.Utils.arrayClear(tierTileByteCountsCount);"undefined"!==typeof tierTileByteCountChunks&&Z.Utils.arrayClear(tierTileByteCountChunks);"undefined"!==typeof tierTileByteCountLast&&Z.Utils.arrayClear(tierTileByteCountLast);"undefined"!==typeof Ja&& 43Z.Utils.arrayClear(Ja);"undefined"!==typeof sc&&Z.Utils.arrayClear(sc)}function A(a){if("undefined"===typeof a||null===a)a=0;a=a.toString();Z.useCanvas&&!S&&(gc=Z.Utils.createContainerElement("canvas","oversizeDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),Z.ViewerDisplay.appendChild(gc),S=gc,$a=S.style);ba||(ib=Z.Utils.createContainerElement("div","viewportContainer"+a,"inline-block","absolute","visible","1px","1px","0px", 44"0px","none","0px","transparent none","0px","0px","normal"),Z.comparison?Dd.appendChild(ib):Z.ViewerDisplay.appendChild(ib),ba=ib,C=ba.style);da||(Lc=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportBackfillDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),ib.appendChild(Lc),da=Lc,I=da.style);fa||(hc=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportDisplay"+a,"inline-block","absolute","visible", 45"1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),ib.appendChild(hc),fa=hc,ga=fa.style);Z.useCanvas&&!Oa&&(Mc=Z.Utils.createContainerElement("canvas","transitionCanvas","none","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),ib.appendChild(Mc),Oa=Mc,Fb=Oa.style);Z.useCanvas||(da.innerHTML="",fa.innerHTML="")}function p(){Z.useCanvas&&(S&&(na=S.getContext("2d")),Gb=da.getContext("2d"),sa=fa.getContext("2d"),Pb=Oa.getContext("2d"), 46Qb&&(Nc=Qb.getContext("2d")),jb&&(Oc=jb.getContext("2d")),tc&&(Pc=tc.getContext("2d")),md&&md.getContext("2d"),Z.imageFilters&&
46(Ed.getContext("2d"),Fd.getContext("2d")))}function H(a,b,c,y){if("undefined"===typeof c||null===c)c=0;if("undefined"===typeof y||null===y)y=0;Z.viewerW=W=a;Z.viewerH=T=b;ia=W*nd;ja=T*nd;a=Z.imageSet?Gd:"unconverted"==Z.tileSource&&Z.mobileDevice?Hd:"unconverted"==Z.tileSource&&Z.browser==Z.browsers.FIREFOX?Id:Jd;b=Z.constrainPanStrict?Z.imageW:2*Z.imageW;var d=Z.constrainPanStrict? 47Z.imageH:2*Z.imageH;ia>a&&(ia=a);ja>a&&(ja=a);ia>b&&(ia=b);ja>d&&(ja=d);ia<W&&(ia=W);ja<T&&(ja=T);Va=Z.Utils.roundToFixed(ia/2,4);Wa=Z.Utils.roundToFixed(ja/2,4);ta=Z.Utils.roundToFixed(-((ia-W)/2)+c,4);Z.Utils.roundToFixed((ia-W)/2+c,4);ua=Z.Utils.roundToFixed(-((ja-T)/2)+y,4);Z.Utils.roundToFixed((ja-T)/2+y,4);S&&(S.width=W,S.height=T,$a.width=W+"px",$a.height=T+"px",$a.left="0px",$a.top="0px");ba.width=ia;ba.height=ja;C.width=ia+"px";C.height=ja+"px";C.left=ta+"px";C.top=ua+"px";fa.width=ia;fa.height= 48ja;ga.width=ia+"px";ga.height=ja+"px";if(Z.useCanvas){S&&(na.translate(W/2,T/2),na.save());try{sa.translate(Va,Wa)}catch(g){Z.Utils.showMessage(Z.Utils.getResource("ERROR_TRANSLATINGCANVASFORUNCONVERTEDIMAGE"),!1,Z.messageDurationStandard,"center")}sa.save();tc&&(Pc.translate(Va,Wa),Pc.save());Qb&&(Nc.translate(Va,Wa),Nc.save());jb&&(Oc.translate(Va,Wa),Oc.save())}}function P(a,b,c){if("ZoomifyImageFile"==Z.tileSource){c=parseFloat(Z.Utils.getResource("z125"));var y=parseFloat(Z.Utils.getResource("z124")); 49b.loadByteRange(a,c,y,"header")}else if("ZoomifyImageFolder"==Z.tileSource)a=Z.Utils.cacheProofPath(a+"/ImageProperties.xml"),b.loadXML(a,c);else if("ZoomifyPFFFile"==Z.tileSource){var y=Z.Utils.getResource("z125"),d=Z.Utils.getResource("z123");a=a.replace(".","%2E");b.loadXML(Z.tileHandlerPathFull+"?file="+a+"&requestType=1&begin="+y+"&end="+d,c)}}function Q(a,b){n();if("undefined"===typeof k.getStatus)window.setTimeout(function(){Q(a,b)},100);else{var c=null,y=null,d=null,g=null,e=null,m=null,h= 50null,l=null,r=null,t=null,u=null;"ZoomifyImageFolder"==Z.tileSource?(c=parseInt(a.documentElement.getAttribute("WIDTH"),10),y=parseInt(a.documentElement.getAttribute("HEIGHT"),10),e=parseInt(a.documentElement.getAttribute("NUMTILES"),10),parseInt(a.documentElement.getAttribute("NUMIMAGES"),10),m=parseInt(a.documentElement.getAttribute("VERSION"),10),d=g=parseInt(a.documentElement.getAttribute("TILESIZE"),10)):"ZoomifyPFFFile"==Z.tileSource?(c=parseInt(a.documentElement.getAttribute("WIDTH"),10),y= 51parseInt(a.documentElement.getAttribute("HEIGHT"),10),d=g=parseInt(a.documentElement.getAttribute("TILESIZE"),10),e=parseInt(a.documentElement.getAttribute("NUMTILES"),10),parseInt(a.documentElement.getAttribute("NUMIMAGES"),10),m=parseInt(a.documentElement.getAttribute("VERSION"),10),h=parseInt(a.documentElement.getAttribute("HEADERSIZE"),10),l=1060+h):"IIIFImageServer"==Z.tileSource?(c=parseInt(a.documentElement.getAttribute("WIDTH"),10),y=parseInt(a.documentElement.getAttribute("HEIGHT"),10),e= 52m=d=g=null):"ImageServer"==Z.tileSource&&(c=parseInt(a.documentElement.getAttribute("WIDTH"),10),y=parseInt(a.documentElement.getAttribute("HEIGHT"),10),g=a.documentElement.getAttribute("TILESIZE"),d=Z.Utils.stringValidate(g)?parseInt(g,10):Ha,g=Z.Utils.stringValidate(g)?parseInt(g,10):Ia,r=a.documentElement.getAttribute("MAGNIFICATION"),r=Z.Utils.stringValidate(r)?parseInt(r,10):Z.sourceMagnification,t=a.documentElement.getAttribute("FOCAL"),t=Z.Utils.stringValidate(t)?parseInt(t,10):Z.focal,u=a.documentElement.getAttribute("QUALITY"), 53u=Z.Utils.stringValidate(u)?parseInt(u,10):Z.quality);null!==Z.tileW&&(d=Z.tileW);null!==Z.tileH&&(g=Z.tileH);if("ZoomifyImageFolder"==Z.tileSource||"IIIFImageServer"==Z.tileSource||"ImageServer"==Z.tileSource){if(null===d||isNaN(d))d=Ha;if(null===g||isNaN(g))g=Ia;if(null===e||isNaN(e))e=1}!isNaN(c)&&0<c&&!isNaN(y)&&0<y&&!isNaN(d)&&0<d&&!isNaN(g)&&0<g&&0<e?k.getStatus("initializedViewport")?q(c,y,d,g,e,m,h,l,r,t,u,b):f(c,y,d,g,e,m,h,l,r,t,u,b):"ZoomifyImageFolder"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z252"), 54!1,Z.messageDurationStandard,"center"):Z.Utils.showMessage(Z.Utils.getResource("z250"),!1,Z.messageDurationStandard,"center")}}function V(){if("unconverted"==Z.tileSource)Ea[0]=Z.imageW,Ma[0]=Z.imageH,xa[0]=1,Ua[0]=1,Aa=Na[0]=1;
54else if("ZoomifyImageFile"==Z.tileSource)for(var a=Aa-1;0<=a;a--)xa[a]=Math.ceil(Ea[a]/Ha),Ua[a]=Math.ceil(Ma[a]/Ia),Na[a]=xa[a]*Ua[a];else{for(var a=Z.imageW,b=Z.imageH;a>Ha||b>Ia;)a/=2,b/=2,Aa++;for(var a=Z.imageW,b=Z.imageH,c=0,y=Aa-1;0<=y;y--)Ea[y]=a,Ma[y]=b,xa[y]=Math.ceil(Ea[y]/ 55Ha),Ua[y]=Math.ceil(Ma[y]/Ia),Na[y]=xa[y]*Ua[y],a/=2,b/=2,c+=Na[y];if(c!=dc&&("ZoomifyImageFolder"==Z.tileSource||"ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)){Ea=[];Ma=[];xa=[];Ua=[];Aa=1;a=Z.imageW;b=Z.imageH;for(c=2;a>Ha||b>Ia;)a=Math.floor(Z.imageW/c),b=Math.floor(Z.imageH/c),c*=2,a%2&&a++,b%2&&b++,Aa++;a=Z.imageW;b=Z.imageH;c=2;tileCounter=0;for(y=Aa-1;0<=y;y--)xa[y]=Math.floor(a/Ha),a%Ha&&xa[y]++,Ua[y]=Math.floor(b/Ia),b%Ia&&Ua[y]++,Na[y]=xa[y]*Ua[y],tileCounter+=Na[y], 56Ea[y]=a,Ma[y]=b,a=Math.floor(Z.imageW/c),b=Math.floor(Z.imageH/c),c*=2,a%2&&a++,b%2&&b++;a=tileCounter;a!=dc&&Z.Utils.showMessage(Z.Utils.getResource("z254"),!1,Z.messageDurationStandard,"center")}}}function u(a,b){for(var c=xa[a]-1,y=Ua[a]-1,d=0;d<=c;d++)for(var g=0;g<=y;g++)b[b.length]=a+"-"+d+"-"+g}function J(a){if(a){a=k.z542(oa);Z.Utils.arrayClear(Ba);Z.Utils.arrayClear(wb);b=a.l;for(c=a.r;b<=c;b++)for(y=a.t,d=a.b;y<=d;y++)g=oa+"-"+b+"-"+y,wb[wb.length]=g,Ba[Ba.length]=g;F(Ba,ma,"simple","image-backfill")}else{Z.Utils.arrayClear(xb); 57Z.Utils.arrayClear(yb);Z.Utils.arrayClear(kb);Z.Utils.arrayClear(U);a=k.z542();for(var b=a.l,c=a.r;b<=c;b++)for(var y=a.t,d=a.b;y<=d;y++){var g=O+"-"+b+"-"+y;xb[xb.length]=g;U[U.length]=g}if(k.getStatus("initializedViewport")&&0<Fa.length&&(O==uc||O==vc||O==ic))for(b=0,c=Fa.length;b<c;b++)(y=Fa[b])&&y.t==O&&y.c>=a.l&&y.c<=a.r&&y.r>=a.t&&y.r<=a.b&&(kb[kb.length]=y.name,yb[yb.length]=y,d=Z.Utils.arrayIndexOf(U,y.name),-1!=d&&(U=Z.Utils.arraySplice(U,d,1)));b=0;for(c=Ka.length;b<c;b++)(y=Ka[b])&&y.t== 58O&&y.c>=a.l&&y.c<=a.r&&y.r>=a.t&&y.r<=a.b&&(d=Z.Utils.arrayIndexOf(kb,y.name),-1==d&&(kb[kb.length]=y.name,yb[yb.length]=y),y=Z.Utils.arrayIndexOf(U,y.name),-1!=y&&(U=Z.Utils.arraySplice(U,y,1)));if(0!=jc){b=0;for(c=ab.length;b<c;b++)y=ab[b],y.alpha=1;Z.Utils.arrayClear(ab);Z.Utils.arrayClear(lb)}kc=U.length;k.traceDebugValues("tilesToDisplay",null,xb.length,xb);k.traceDebugValues("tilesInCache",null,kb.length,kb);k.traceDebugValues("tilesToLoad",null,U.length,U)}}function v(a,b,c,y,d,g){d||Z.Utils.clearDisplay(a); 59if("canvasCopy"==y)Z.Utils.clearDisplay(fa),sa.restore(),sa.save(),sa.scale(1,1),sa.drawImage(Oa,-Va,-Wa),sa.restore(),sa.save(),sa.scale(X,X);else{d=k.z542(b);g=[];if(null===c)for(var e=0,h=yb.length;e<h;e++)g[e]=yb[e];else if(0<c.length)for(e=0,h=c.length;e<h;e++){var f=c[e];f&&f.t==b&&(b==oa&&!la||f.c>=d.l&&f.c<=d.r&&f.r>=d.t&&f.r<=d.b)&&(g[g.length]=c[e])}if(0<g.length)if(k.traceDebugValues("z622-"+a.id,null,null,g),"centerOut"==y)for(e=Math.floor(g.length/2),h=g.length;e<h;e++)m(a,b,g[e]),g.length- 60e-1!=e&&m(a,b,g[g.length-e-1]);else for(e=0,h=g.length;e<h;e++)m(a,b,g[e]);else k.traceDebugValues("No cached tiles in view");k.traceDebugValues("blankLine")}}function w(a,b){var c=k.z542();syncTransitionCanvas();for(var d=0,e=b.length;d<e;d++){var g=b[d];g&&g.t==a&&(a==oa||g.c>=c.l&&g.c<=c.r&&g.r>=c.t&&g.r<=c.b)&&m(Oa,a,g)}}function K(){if("undefined"!==typeof Pa){var a=Z.Utils.createContainerElement("div","testImageContainer","inline-block","absolute","hidden",W+"px",T+"px","0px","0px","none","0px", 61"transparent none","0px","0px","normal",null,!0);a.appendChild(Pa);a.removeChild(Pa);var a=null,a=Pa.width,b=Pa.height;0!=a&&0!=b?f(a,b,a,b,null,null,null,null,null,null,null):window.setTimeout(function(){K()},100)}else window.setTimeout(function(){K()},100)}function wa(){Z.Utils.showMessage(Z.Utils.getResource("ERROR_UNCONVERTEDIMAGEPATHINVALID"))}function F(a,b,c,d){var e="undefined"!==typeof d&&null!==d?"-"+d:"";if(0<a.length){k.traceDebugValues("z577"+e,null,null,a);e=(new Date).getTime();if("centerOut"== 62c&&4<a.length){var g=[],m=0,h=0,f=0,l=0;for(c=0;c<a.length;c++){var r=a[c];r&&(r=new ka(r,d),g[g.length]=r,0==c?(m=h=r.c,f=l=r.r):(r.c<m?m=r.c:r.c>h&&(h=r.c),r.r<f?f=r.r:r.r>l&&(l=r.r)))}a=m+(h-m)/2;d=f+(l-f)/2;for(c=0;c<g.length;c++)g[c].r-=d,g[c].c-=a;g.sort(function(a,b){return a.r*a.r+a.c*a.c-(b.r*b.r+b.c*b.c)});for(c=0;c<g.length;c++)g[c].r+=d,g[c].c+=a,Y(g[c],e,b)}else for(c=0,g=a.length;c<g;c++)if(r=a[c])r=new ka(r,d),Y(r,e,b);k.traceDebugValues("blankLine")}else k.traceDebugValues("z577"+ 63e,"No new tiles requested")}function ka(a,b){this.imagePath=Z.imagePath;this.name=a;var c=new ea(a);this.t=c.t;this.c=c.c;this.r=c.r;this.x=Math.floor(this.c*Ha);this.y=Math.floor(this.r*Ia);this.image=null;this.alpha=0;this.url=k.formatTilePath(this.t,this.c,this.r,b);this.style=this.elmt=this.loadTime=null}function ea(a){this.t=parseInt(a.substring(0,a.indexOf("-")),10);this.c=parseInt(a.substring(a.indexOf("-")+1,a.lastIndexOf("-")),10);this.r=parseInt(a.substring(a.lastIndexOf("-")+1),10)}function ya(a, 64b,c){c=b+c*xa[a];b=8*c+Ob[a];c=Math.floor(c/Ga);var d=c*Ga,d=d+Ga>Na[a]?8*(Na[a]-d):od;this.chunkStart=Ob[a]+c*od;this.chunkEnd=this.chunkStart+d;this.offsetStartInChunk=b-this.chunkStart;this.chunkID=a.toString()+"-"+c.toString()}function gb(a,b,c){c=b+c*xa[a];b=4*c+Eb[a];c=Math.floor(c/Ga);var d=c*Ga,d=d+Ga>Na[a]?4*(Na[a]-d):pd;this.chunkStart=Eb[a]+c*pd;this.chunkEnd=this.chunkStart+d;this.bcStartInChunk=b-this.chunkStart;this.chunkID=a.toString()+"-"+c.toString()}function va(a,b,c){sc[a]=c;c= 65mb.replace(".","%2E");a=Z.tileHandlerPathFull+"?file="+c+"&requestType=2&begin="+a+"&end="+b;(new Z.NetConnector).loadXML(a)}function D(a,b){for(var c=0,d=ha.length;c<d;c++){var e=ha[c].split(",");e[0]==a&&e[5]==b&&(void 0!==e[4]&&"image-display"==e[4]?pa[pa.length]=e[1]+"-"+e[2]+"-"+e[3]:"image-backfill"==e[4]&&(za[za.length]=e[1]+"-"+e[2]+"-"+e[3]),ha=Z.Utils.arraySplice(ha,c,1),c--,d--)}0<pa.length&&(pa.sort(),pa=Z.Utils.arrayUnique(pa),k.traceDebugValues("z637",pa),c=k.getStatus("imageSaving")? 66zb:qa,R(pa,c,"simple","image-display"));0<za.length&&(za.sort(),za=Z.Utils.arrayUnique(za),c=k.getStatus("imageSaving")?z599ToSave:ma,R(za,c,"simple","image-backfill"))}function R(a,b,c,d){c=(new Date).getTime();for(var e=0,g=a.length;e<g;e++){var m=null;if(m=a[e])a=Z.Utils.arraySplice(a,e,1),e--,g--,index=Z.Utils.arrayIndexOfObjectValue(Ab,"name",m),-1!=index?(m=Ab[index],Ab=Z.Utils.arraySplice(Ab,index,1),m.url=k.formatTilePath(m.t,m.c,m.r,d)):m=new ka(m,d),null!=m&&-1==m.url.indexOf("NaN")?(k.traceDebugValues("z577Retry", 67m.name+" "+m.url),Y(m,c,b)):-1==m.url.indexOf("NaN")&&Z.Utils.showMessage(Z.Utils.getResource("z280-ZIF")+m.name+".jpg",!1,Z.messageDurationShort,"center",!1)}}function Y(a,b,c){var d=a.name;if("z647"==a.url.substr(0,8)){nb(a);b=a.name;c=Z.Utils.arrayIndexOf(U,b);-1!=c&&(U=Z.Utils.arraySplice(U,c,1));
67if("ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)c=Z.Utils.arrayIndexOf(pa,b),-1!=c&&(pa=Z.Utils.arraySplice(pa,c,1));ab[ab.length]=a;lb[lb.length]=b}else if("offsetLoading"==a.url)-1== 68Z.Utils.arrayIndexOfObjectValue(Ab,"name",d)&&(Ab[Ab.length]=a),k.traceDebugValues("z581DelayForOffset",d);else if("offsetLoading"!=a.url){var e;if(c==qa||c==zb)e="image-display";else if(c==ma||c==z599ToSave)e="image-backfill";var g=a.t==uc&&Kc||a.t==vc&&Jc||a.t==ic&&Ic;"image-display"==e&&g||(a.loadTime=b,k.traceDebugValues("z581-"+e,d),Kd.loadImage(a.url,Z.Utils.createCallback(null,c,a),e,a))}}function qa(a,b){if(a&&b&&a.imagePath==Z.imagePath){a.image=b;var c=a.name,d=Z.Utils.arrayIndexOf(U,c); 69if(-1!=d){U=Z.Utils.arraySplice(U,d,1);nb(a);if(Z.preloadVisible&&!Z.imageSet&&a.t!=O){Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADING-STORINGORDRAWINGTILES")+" Tile: "+c,!1,Z.messageDurationShort/10,"center");a.alpha=1;return}-1==Z.Utils.arrayIndexOf(lb,c)&&(lb[lb.length]=c,ab[ab.length]=a);Z.preloadVisible&&Z.imageSet&&k.getViewportID()!=Z.viewportCurrentID&&(c=(k.getViewportID()+1).toString()+" of "+Z.imageSetLength.toString()+" Tile: "+c,Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADING-STORINGORDRAWINGTILES")+ 70c,!1,Z.messageDurationShort/10,"center"));wc||(wc=window.setInterval(Qa,50));jc=U.length;if(0==jc){Z.useCanvas&&0<Rb&&(Qc?(w(O,Ka),v(fa,O,Ka,"canvasCopy",!1,"4. Updating view: all new tiles loaded"),window.setTimeout(function(){Z.Utils.clearDisplay(Oa)},200),Qc=!1):v(fa,O,Ka,"centerOut",!1,"4. Updating view: all new tiles loaded"));for(;ob.length>Rb&&Ka.length>Rb;)ob=Z.Utils.arraySplice(ob,0,1),Ka=Z.Utils.arraySplice(Ka,0,1);kc=0}k.traceDebugValues("onTileLoad",a.name,a.loadTime);k.updateProgress(kc, 71jc)}xc==yc+Hb&&k.setStatus("displayLoadedViewport",!0)}else"undefined"!==typeof b&&null!==b||console.log(Z.Utils.getResource("z280")+a.name+".jpg")}function ma(a,b){if(a&&b&&a.imagePath==Z.imagePath){a.image=b;var c=a.name;Fa[Fa.length]=a;var d=Z.Utils.arrayIndexOf(Ba,c);-1!=d&&(Ba=Z.Utils.arraySplice(Ba,d,1));if("ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)c=Z.Utils.arrayIndexOf(za,c),-1!=c&&(za=Z.Utils.arraySplice(za,c,1));a.alpha=1;a.t==oa&&m(da,oa,a);k.traceDebugValues("onTileBackfillPrecache", 72a.name);qd==Rc&&k.setStatus("precacheLoadedViewport",!0);k.traceDebugValues("z599",a.name);Sc<=0+Tc&&k.setStatus("backfillLoadedViewport",!0);a.t==O&&qa(a,b)}else if("undefined"===typeof b||null===b)Z.mobileDevice?console.log(Z.Utils.getResource("z280")+a.name+".jpg"):Z.Utils.showMessage(Z.Utils.getResource("z280")+a.name+".jpg")}function Qa(){for(var a=0,b=0,c=ab.length;b<c;b++){var d=ab[b];d.t==O?(Z.fadeIn&&0!=Uc&&1>d.alpha+Uc?d.alpha+=Uc:(d.alpha=1,a++),m(fa,O,d),a>=c&&(window.clearInterval(wc), 73wc=null,b=c)):(ab=Z.Utils.arraySplice(ab,b,1),lb=Z.Utils.arraySplice(lb,b,1),d=Z.Utils.arrayIndexOf(U,d.name),-1!=d&&(U=Z.Utils.arraySplice(U,d,1)),c--)}}function m(a,b,c){if("z647"!=c.url.substr(0,8)&&0!=c.image.width&&0!=c.image.height){var d=c.x,e=c.y;b=E(b,1);Da=ca(Ta,k.getZoom());var g=8<Da;Z.useCanvas?(a==fa||a==Oa||a==da&&la?(d-=Z.imageX*b,e-=Z.imageY*b):a==S&&(la||g)&&(g=k.calculateCurrentCenterCoordinates(),d-=g.x*b,e-=g.y*b),b=a.getContext("2d"),Z.alphaSupported&&1>c.alpha&&"transitionCanvas"!= 74a.id&&-1==a.id.indexOf("oversizeDisplay")&&"savingDisplay"!=a.id&&(b.globalAlpha=c.alpha),Z.imageFilters&&0!=imageFiltersApplied.length?(g=z456(c.name,c.image),Z.Utils.clearDisplay(Oa),Pb.putImageData(g,0,0),b.drawImage(Oa,d,e)):b.drawImage(c.image,d,e),Z.alphaSupported&&1>c.alpha&&"transitionCanvas"!=a.id&&"oversizeDisplay"!=a.id&&"savingDisplay"!=a.id&&(b.globalAlpha=1),2!=Z.debug&&4!=Z.debug||r(a,c.name,d,e,X)):(a==fa?(d-=Z.imageX*b-Va/X,e-=Z.imageY*b-Wa/X,b=X):b=fb,c.elmt||(c.elmt=Z.Utils.createContainerElement("img"), 75c.elmt.onmousedown=Z.Utils.preventDefault,Z.Utils.addEventListener(c.elmt,"contextmenu",Z.Utils.preventDefault),c.elmt.src=c.url,c.style=c.elmt.style,c.style.position="absolute",Z.Utils.renderQuality(c,Z.renderQuality),Z.cssTransformsSupported&&(c.style[Z.cssTransformProperty+"Origin"]="0px 0px")),c.elmt.parentNode!=a&&a.appendChild(c.elmt),g=c.style,g.display="none",Z.cssTransformsSupported?g[Z.cssTransformProperty]=["matrix(",(c.image.width/c.elmt.width*b).toFixed(8),",0,0,",(c.image.height/c.elmt.height* 76b).toFixed(8),",",(d*b).toFixed(8),Z.cssTransformNoUnits?",":"px,",(e*b).toFixed(8),Z.cssTransformNoUnits?")":"px)"].join(""):(g.width=c.image.width*b+"px",g.height=c.image.height*b+"px",g.left=d*b+"px",g.top=e*b+"px"),g.dis
76play="inline-block",Z.Utils.setOpacity(c,c.alpha),2!=Z.debug&&4!=Z.debug||r(a,c.name,d,e,b));a==fa?(k.traceDebugValues("z507",c.name),xc==lc&&k.setStatus("displayDrawnViewport",!0)):(k.traceDebugValues("displayBackfillTile",c.name),Sc<=Vc&&k.setStatus("backfillDrawnViewport",!0))}} 77function r(a,b,c,d,e){if(Z.useCanvas){var g=parseInt(Z.Utils.getResource("z129"),10),m=parseInt(Z.Utils.getResource("z160"),10),k=parseInt(Z.Utils.getResource("z151"),10),g=Math.round(g*e),m=2*(g<m?m:g>k?k:g);a=a.getContext("2d");a.font=m+"px verdana";a.textAlign="left";a.textBaseline="top";m=Ha*e/2;e=Ia*e/2;a.fillStyle="#FFFFFF";a.fillText(b,c+m,d+e);a.fillStyle="#000000";a.fillText(b,c+m+1,d+e+1)}else{var g=parseInt(Z.Utils.getResource("z129"),10),m=parseInt(Z.Utils.getResource("z160"),10),k=parseInt(Z.Utils.getResource("z151"), 7810),g=Math.round(g*e),h=2*(g<m?m:g>k?k:g),m=parseInt(Z.Utils.getResource("z130"),10)*e,k=Z.Utils.createContainerElement("div","tileNameTextBox","inline-block","absolute","hidden","auto","auto","1px","1px","none","0px","transparent none","0px",m+"px","nowrap"),g=document.createTextNode(b);k.appendChild(g);a.appendChild(k);Z.Utils.setTextNodeStyle(g,"white","verdana",h+"px","none","normal","normal","normal","normal","1em","center","none");var f=Z.Utils.createContainerElement("div","tileNameTextBox2", 79"inline-block","absolute","hidden","auto","auto","1px","1px","none","0px","transparent none","0px",m+"px","nowrap"),r=document.createTextNode(b);f.appendChild(r);a.appendChild(f);Z.Utils.setTextNodeStyle(r,"black","verdana",h+"px","none","normal","normal","normal","normal","1em","center","none");m=parseFloat(k.style.padding);a=parseFloat(Z.Utils.getElementStyleProperty(k,"width"));isNaN(a)&&(a=parseFloat(Z.Utils.getResource("z115")),a=parseFloat(k.style.fontSize)/a,a=Math.round(parseFloat(b.length* 80a)));b=Ha*e/2;h=Ia*e/2;k.style.left=c*e+(b-a/2-m)+"px";k.style.top=d*e+h+"px";f.style.left=1+c*e+(b-a/2-m)+"px";f.style.top=1+d*e+h+"px";Z.Utils.addEventListener(k,"contextmenu",Z.Utils.preventDefault);Z.Utils.disableTextInteraction(g);Z.Utils.addEventListener(f,"contextmenu",Z.Utils.preventDefault);Z.Utils.disableTextInteraction(r)}}function G(a,b){var c=E(b,1),d=Math.floor(a.l*c/Ha),e=Math.floor(a.r*c/Ha),g=Math.floor(a.t*c/Ia),c=Math.floor(a.b*c/Ia);0>d&&(d=0);e>xa[b]-1&&(e=xa[b]-1);0>g&&(g=0); 81c>Ua[b]-1&&(c=Ua[b]-1);this.l=d;this.r=e;this.t=g;this.b=c}function l(a,b,c,d,e,g,m,k,h){"undefined"===typeof k||null===k?(this.l=a+c/m,this.r=a+d/m,this.t=b+e/m,this.b=b+g/m):(m=W/Ea[k],k=T/Ma[k],this.l=a+c*m,this.r=a+d*m,this.t=b+e*k,this.b=b+g*k);h&&(this.l-=256-this.l%256,this.r+=256-this.r%256,this.t-=256-this.t%256,this.b+=256-this.b%256)}function E(a,b){return Ea[a]/Z.imageW*b}function ca(a,b){return b/(Ea[a]/Z.imageW)}function hb(a,b,c,d,e){if(Z.constrainPan){c="undefined"!==typeof c&&null!== 82c?c:Z.imageZ;d="undefined"!==typeof d&&null!==d?Math.round(d):Math.round(Z.imageR);0>d&&(d+=360);var g=a,m=b;"image"==e&&(b=k.convertImageCoordsToViewportEdgeCoords(a,b,c,d),a=b.x,b=b.y);var h=Z.imageW,f=Z.imageH,r=Math.round(h*c),l=Math.round(f*c);Math.round(h*c/2);Math.round(f*c/2);var h=W,f=T,t=Math.round(.1*W),u=Math.round(.1*T),B=Math.round(.5*W),G=Math.round(.5*T),v,n;v=B-ta+(Z.imageCtrX-Z.imageX)*c+a;n=G-ua+(Z.imageCtrY-Z.imageY)*c+b;var J=v+r/2,La=n-l/2,q=v+r/2,E=n+l/2,w=v-r/2,K=n+l/2,x=Z.Utils.getPositionRotated(v- 83r/2,n-l/2,v,n,d),J=Z.Utils.getPositionRotated(J,La,v,n,d),q=Z.Utils.getPositionRotated(q,E,v,n,d),K=Z.Utils.getPositionRotated(w,K,v,n,d);v=Math.min(x.x,J.x,q.x,K.x);n=Math.min(x.y,J.y,q.y,K.y);w=Math.max(x.x,J.x,q.x,K.x);x=Math.max(x.y,J.y,q.y,K.y);w-v>h||!Z.constrainPanStrict?3==Z.constrainPanLimit?a=0<v?a-v:w<h?a-(w-h):a:2==Z.constrainPanLimit?a=v>B?a-(v-B):w<B?a-(w-B):a:1==Z.constrainPanLimit&&(a=v>9*t?a-(v-9*t):w<t?a-(w-t):a):a=v>B-r/2?a-(v-(B-r/2)):w<B+r/2?a-(w-(B+r/2)):a;x-n>f||!Z.constrainPanStrict? 843==Z.constrainPanLimit?b=0<n?b-n:x<f?b-(x-f):b:2==Z.constrainPanLimit?b=n>G?b-(n-G):x<G?b-(x-G):b:1==Z.constrainPanLimit&&(b=n>9*u?b-(n-9*u):x<u?b-(x-u):b):b=n>G-l/2?b-(n-(G-l/2)):x<G+l/2?b-(x-(G+l/2)):b;"image"==e&&(b=k.convertViewportEdgeCoordsToImageCoords(a,b,c,d),a=b.x,b=b.y);if(a!=g||b!=m)a=Math.round(a),b=Math.round(b),Z.Utils.validateCallback("panConstrained")}return new Z.Utils.Point(a,b)}function Ib(a){a>Z.maxZ?(a=Z.maxZ,Z.Utils.validateCallback("zoomConstrainedMax")):a<Z.minZ&&(a=Z.minZ, 85Z.Utils.validateCallback("zoomConstrainedMin"));return a}function nb(a){if(0<Rb){var b=Z.Utils.arrayIndexOf(ob,a.name);-1!=b&&(ob=Z.Utils.arraySplice(ob,b,1),Ka=Z.Utils.arraySplice(Ka,b,1));ob[ob.length]=a.name;Ka[Ka.length]=a}}function pb(){window.clearTimeout(Yb);Yb=null;Sb=((new Date).getTime()-tilesTimeStart)/1E3;
85var a=zc*Sb,a=Jb&&Hb<a,b=Jb&&Hb>=mc;if(2==Z.debug||3==Z.debug)Z.Utils.trace("View validation-time elapsed: "+Sb),0<Jb&&(a?Z.Utils.trace("Loading delay - re-calling updateView"):b?Z.Utils.trace("Display delay - re-calling updateView"): 86Z.Utils.trace("Progress slow, resetting timer")),Z.Utils.trace(""),Z.traces.scrollTop=Z.traces.scrollHeight,Z.Utils.traceTileSpeed(Sb,zc);0<Jb?Ac<Ld?a||b?(Ac+=1,k.updateView(!0)):Yb=window.setTimeout(pb,rd):console.log(Z.Utils.getResource("ERROR_VALIDATEVIEW")):(Ac=0,Z.Utils.validateCallback("viewUpdateComplete"),Z.Utils.validateCallback("viewUpdateCompleteGetLabelIDs"))}function zb(a,b,c){}function Tb(){Z.preventDupCall||(Z.priorX=Math.round(Z.imageX),Z.priorY=Math.round(Z.imageY),Z.priorZ=Z.imageZ, 87Z.priorR=Math.round(Z.imageR));Z.preventDupCall="undefined"!==typeof called&&null!==called}function Xb(a,b,c,d,e,g){g||k.zoomAndPanAllStop();Z.maskingSelection&&Z.maskClearOnUserAction&&k.clearMask();if("undefined"===typeof a||null===a)a=Z.imageW/2;if("undefined"===typeof b||null===b)b=Z.imageH/2;"undefined"===typeof c||null===c?c=Z.fitZ:1<c&&c>Z.maxZ&&(c/=100);if("undefined"===typeof d||null===d)d=Z.imageR;c=Ib(c);Z.rotationFree||(d=90*Math.round(Math.abs(d)/90)*Z.Utils.getSign(d));-360>=d?d+=360: 88360<=d&&(d-=360);a=hb(a,b,c,d,"image");Z.imageX=aa=a.x;Z.imageY=L=a.y;Z.imageZ=c;d!=Z.imageR&&Z.Utils.rotateElement(C,d);Z.imageR=d;k.updateView(!0);"function"===typeof e&&e()}function db(){if(Bb&&(0!=Ra||0!=Sa||0!=Xa))if(Z.tracking&&0==Xa)k.zoomAndPanToView(k.getX()+Ra,k.getY()+Sa);else{var a=Ra,b=Sa,c=Xa,d=k.getZoom();
880!=c&&(d=E(O,X*(1+c)),d=Ib(d),d!=Z.imageZ&&B(d));if(0!=a||0!=b)a=parseFloat(C.left)+a,b=parseFloat(C.top)+b,d=hb(a,b,d,Z.imageR,"container"),C.left=Math.round(d.x)+"px",C.top=Math.round(d.y)+ 89"px",b=d.x-ta,d=d.y-ua,S&&la&&(Z.mobileDevice||Math.abs(b)>W/2||Math.abs(d)>T/2)&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display");k.syncViewportRelated();sd++;Bb=window.setTimeout(db,Wc)}}function t(a,b,c,d,e,g,m){nc++;var h=e/g,f=nc*h,r=Z.Utils.easing(Z.imageX,a,f,e),l=Z.Utils.easing(Z.imageY,b,f,e),u=Z.Utils.easing(Z.imageZ,c,f,e),f=Z.Utils.easing(Z.imageR,d,f,e),l=k.convertImageCoordsToViewportEdgeCoords(r,l,u),r=l.x,l=l.y,G=!1,n=syncOversize=!1;if(parseFloat(C.left)!=r||parseFloat(C.top)!= 90l)C.left=r+"px",C.top=l+"px",n=!0,S&&la&&(syncOversize=!0);u!=Z.imageZ&&(B(u,!1),G=n=!0,S&&la&&(na.restore(),na.save(),na.scale(Da,Da),syncOversize=!0));f!=Z.imageR&&(Z.Utils.rotateElement(C,f),S&&la&&(na.rotate((f-Z.imageR)*Math.PI/180),syncOversize=!0),Z.imageR=f,n=!0);syncOversize&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display");0==nc%2&&k.syncViewportRelated(!1,!1,G,n,G);u=Z.tour&&Z.tourStop&&0==Math.round(Z.imageR%90);nc<g+1&&!u?Kb=window.setTimeout(function(){t(a,b,c,d,e,g,m)},h): 91(u&&(Z.tourPlaying=!1),Z.interactive=!0,Kb&&(window.clearTimeout(Kb),Kb=null),k.updateView(),"function"===typeof m&&m())}function La(){sd=Xa=Sa=Ra=0;Bb&&(window.clearTimeout(Bb),Bb=null)}function B(a,b){var c=!1,d=ca(O,a);if(d!=X){X=d;var c=d/vb,e=ia*c,g=ja*c,m=(ia-e)/2,h=(ja-g)/2;d<vb&&(d=hb(parseFloat(C.left),parseFloat(C.top),a,Z.imageR,"container"),C.left=d.x+"px",C.top=d.y+"px");if(Z.useCanvas)if(ga.width=e+"px",ga.height=g+"px",ga.left=m+"px",ga.top=h+"px",Qb&&(Ya.width=e+"px",Ya.height=g+"px", 92Ya.left=m+"px",Ya.top=h+"px"),jb&&(Za.width=e+"px",Za.height=g+"px",Za.left=m+"px",Za.top=h+"px"),Da=ca(Ta,k.getZoom()),d=8<Da,la||d){if(null!==na&&"undefined"===typeof b||null===b||b&&S&&("in"!=Z.zooming||e>Z.scaleThreshold||g>Z.scaleThreshold))na.restore(),na.save(),na.scale(Da,Da),na.rotate(Z.imageR*Math.PI/180),v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display");fb=c=ca(oa,a);e=c/tierBackfillScalePrior;c=qb*e;e*=rb;g=bb+(qb-c)/2;d=cb+(rb-e)/2;I.width=c+"px";I.height=e+"px";I.left=g+"px"; 93I.top=d+"px"}else S&&Z.Utils.clearDisplay(S),e=qb*c,g=rb*c,m=bb+Z.imageX*(1-c)*Z.imageZ,h=cb+Z.imageY*(1-c)*Z.imageZ,I.width=e+"px",I.height=g+"px",I.left=m+"px",I.top=h+"px";else v(fa,O,Ka,"centerOut",!1,"Scaling: non-canvas zoom"),la?(c=td,qb=ia*c,rb=ja*c,bb=-(ia/c),cb=-(ja/c),Xc=Va*c,Yc=Wa*c,da.width=qb,da.height=rb,I.width=da.width+"px",I.height=da.height+"px"):(c=Ma[oa],da.width=Ea[oa],da.height=c,c=Z.imageY*a,bb=Va-Z.imageX*a,cb=Wa-c),I.left=bb+"px",I.top=cb+"px",v(da,oa,Fa,"simple",!1,"Scaling: non-canvas zoom - backfill"); 94c=!0}return c}function Cb(){k.toggleFullViewMode(!1)}function M(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c=Z.Utils.isRightMouseButton(a),d=a.altKey;if("mouseover"!=b&&"mouseout"!=b&&!Z.interactive||"mousedown"==b&&(!Z.interactive||Z.coordinatesVisible&&d)||c)Z.tourStop=!0;else{if("mousedown"==b||"touchstart"==b||Z.tourPlaying&&Z.tourStop)k.zoomAndPanAllStop(),Z.tourStop=!0,Z.interactive=!0;Z.touchSupport&&!Z.clickZoomAndPanBlock&&"touchmove"!=b&&"gesturechange"!=b&&a.preventDefault();if("mousedown"== 95b)window.setTimeout(function(){k.zoomAndPanAllStop(!1,!0)},1),Z.maskingSelection&&Z.maskClearOnUserAction&&k.clearMask();else if("touchstart"==b||"gesturestart"==b)c=!1,touch=Z.Utils.getFirstTouch(a),"undefined"!==typeof touch&&null!==touch&&(d=z538(touch.target),null===d?c=!0:(d=d.id.substring(3,d.id.length),d=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",d),-1!=d&&(d=hotspots[d],null!==d&&"function"==d.clickURL&&(c=!0)))),c&&a.preventDefault(),k.zoomAndPanAllStop(!1,!0),Z.maskingSelection&& 96Z.maskClearOnUserAction&&k.clearMask();switch(b){case "mouseover":Z.fullView||"TEXTAREA"==document.activeElement.tagName||Z.Viewer.initializeViewerKeyDefaultListeners(!0);break;case "mousedown":!Z.fullView&&document.activeElement&&document.activeElement.blur();Z.Viewer.initializeViewerKeyEventListeners(!0);Z.Utils.addEventListener(document,"mousemove",M);Z.Utils.addEventListener(document,"mouseup",M);break;case "mouseup":Z.Utils.removeEventListener(document,"mousemove",M),Z.Utils.removeEventListener(document, 97"mouseup",M)}Md(a);if("mousedown"==b||"mousemove"==b)return!1}}}function Md(b){var c=Lb.toString();b=Z.Utils.event(b);var d=b.type;if(b&&d){var e,m,g;if("touchstart"==d||"touchmove"==d||"touchend"==d||"touchcancel"==d)e=Z.Utils.getFirstTouch(b),"undefined"!==typeof e&&(m=e.target,g=new Z.Utils.Point(e.pageX,e.pageY));else{m=Z.Utils.target(b);Z.Utils.relatedTarget(b);var h=Z.Utils.isRightMouseButton(b),f=b.altKey;"resize"!=d&&(g=Z.Utils.getMousePosition(b));Z.smoothPan&&(Ub=g)}"DOMMouseScroll"==d&& 98(d="mousewheel");var r=k.getZoom(),l=(100*r).toString(),t;"undefined"!==typeof g&&null!==g&&(t=k.getClickCoordsInImage(b,r,g));switch(d){case "mousedown":Z.mouseIsDown=!0;Ca=new Z.Utils.Point(g.x,g.y);oc=(new Date).getTime();ba.mouseXPrior=g.x;ba.mouseYPrior=g.y;if(("rectangle"==Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode)&&null!==hotspotCurrentID||"rectangle"==Z.labelMode&&null===hotspotCurrentID)controlPointCurrent=z534(b,t);if(Z.zoomRectangle&&f&&!Z.measureVisible&&"view"==Z.labelMode&& 99null===Z.editing){if("none"==Zb.display||"none"==Za.display||"none"==Ya.display)Zb.display=Za.display=Ya.display="inline-block",Z.Utils.addEventListener(Zc,"mousedown",Z.Utils.preventDefault);zoomRectangleDragging=!0;createdNewLabel=!1;l=1;z489(null,!1,t);z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y));z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y+l));z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x,t.y+l));z474(hotspotCurrentID,!0);controlPointCurrent=2}else if(!f&&"view"!=Z.labelMode&& 100("addLabel"==Z.editing||"editLabel"==Z.editing||null===Z.editMode&&"measure"==Z.labelMode)){Z.Utils.hideMessage();if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction()&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode))break;"addLabel"==Z.editing&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode&&null===controlPointCurrent)&&k.saveEditsLabel(!0,!1,!1);createdNewLabel=!1;"freehand"==Z.labelMode&&Z.mouseIsDown? 101("editLabel"==Z.editing&&hotspotCurrent&&Z.Utils.arrayClear(hotspotCurrent.polygonPts),b="editLabel"==Z.editing?hotspotCurrentID:null,z489(b,!1,t),$b=(t.x-Z.imageX)*r,ac=(t.y-Z.imageY)*r,z474(hotspotCurrentID,!1),createdNewLabel=!0):"rectangle"==Z.labelMode&&null===controlPointCurrent&&(l=1,b=null,"editLabel"==Z.editing&&(b=hotspotCurrentID,hotspotCurrent&&null===controlPointCurrent&&Z.Utils.arrayClear(hotspotCurrent.polygonPts)),z489(b,!1,t),z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y)), 102z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y+l)),z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x,t.y+l)),z474(hotspotCurrentID,!0),controlPointCurrent=2,createdNewLabel=!0);createdNewLabel&&!Z.annotationsAddMultiple&&(Z.editing="editLabel")}else if(!f&&!Z.labelsClickDrag||"addLabel"!=Z.editing&&"editLabel"!=Z.editing)Z.smoothPan&&!f&&Z.mousePan&&1<Z.smoothPanEasing&&($c(void 0),ad=Ca,null===pc&&(pc=new Z.Utils.Point(parseFloat(C.left),parseFloat(C.top))),null===sb&&(sb=window.setInterval(Nd, 10350)));else if(x=z538(m)){l=k.z480(b.clientX,b.clientY);g=new Z.Utils.Point(parseFloat(x.style.left),parseFloat(x.style.top));b=l.x-g.x;l=l.y-g.y;x.mouseXPrior=Ca.x;
103x.mouseYPrior=Ca.y;x.mouseXOffset=b;x.mouseYOffset=l;x.style.zIndex=hotspots.length+1;b=x.id.substring(3,x.id.length);if(hotspotCurrentID&&hotspotCurrentID!=b){if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;z632("save","labels");var u=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID", 104b);-1!=u&&(b=hotspots[u]);Z.Utils.validateCallback("labelSelectedInViewportGetIDs")}hotspotList&&(Z.hotspotListTitle||Z.tourListTitle)&&(hotspotList.selectedIndex=0)}break;case "mousemove":ra=new Z.Utils.Point(g.x,g.y);l=(t.x-Z.imageX)*r;d=(t.y-Z.imageY)*r;N&&(clearTimeout(N),N=null,z604(b,t,n));if(Z.zoomRectangle&&f&&"view"==Z.labelMode&&null===Z.editing)z672(hotspotCurrentID,controlPointCurrent,t);else if(f||Z.tracking||(null!==Z.editMode||"measure"!=Z.labelMode)&&("view"==Z.labelMode||"addLabel"!= 105Z.editing&&"editLabel"!=Z.editing))if(x){if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;k.getLabelEditable(hotspotCurrentID)&&(f=x.style,l=ra.x-x.mouseXPrior,g=ra.y-x.mouseYPrior,l=parseFloat(f.left)+l,g=parseFloat(f.top)+g,f.left=l+"px",f.top=g+"px",x.mouseXPrior=ra.x,x.mouseYPrior=ra.y,z670(b,x,ra))}else!f&&Z.mousePan&&(sb?Ub=g:Z.animation&&k.getZoom()==Z.minZ?(g.x>ba.mouseXPrior?Z.Viewer.viewportNext():g.x<ba.mouseXPrior&&Z.Viewer.viewportPrior(), 106ba.mouseXPrior=g.x,ba.mouseYPrior=g.y):(l=g.x-ba.mouseXPrior,b=g.y-ba.mouseYPrior,isNaN(l)||isNaN(b)||(l=parseFloat(C.left)+l,b=parseFloat(C.top)+b,f=hb(l,b,Z.imageZ,Z.imageR,"container"),C.left=f.x+"px",C.top=f.y+"px",ba.mouseXPrior=g.x,ba.mouseYPrior=g.y,l=f.x-ta,b=f.y-ua,S&&la&&(Z.mobileDevice||Math.abs(l)>W/2||Math.abs(b)>T/2)&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display"),b=k.calculateCurrentCenterCoordinates(f,Z.imageZ,Z.imageR),Z.Navigator&&Z.Navigator.z658(b),Z.Utils.setBookmarksURL(), 107Z.Viewer.syncComparisonViewport(),Z.Viewer.syncOverlayViewports(null,a),Z.tracking&&k.syncTrackingToViewport())));else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction()&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode))break;b=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",hotspotCurrentID);b=-1!=b?hotspots[b].polyClosed:!1;"freehand"==Z.labelMode&&Z.mouseIsDown?(z511($b,ac,l,d,t),$b=l,ac=d):!Z.measureVisible&& 108!k.getLabelEditable(hotspotCurrentID)||"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||null===controlPointCurrent||!Z.mouseIsDown?"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||b||Z.mouseIsDown&&(!Z.mouseIsDown||null===controlPointCurrent)||z516(l,d,t):z672(hotspotCurrentID,controlPointCurrent,t)}break;case "mouseup":Z.mouseIsDown=!1;document.mousemove=null;document.mouseup=null;e=(new Date).getTime();Z.mouseOutDownPoint?(d=Z.mouseOutDownPoint,t=k.getClickCoordsInImage(b, 109r,Z.mouseOutDownPoint)):d=new Z.Utils.Point(g.x,g.y);g=Z.Utils.calculatePointsDistance(Ca.x,Ca.y,d.x,d.y);r=e-oc;if(g<Od&&r<Pd||!f&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode))if(!x&&(null===Z.editMode&&"measure"==Z.labelMode||"view"!=Z.labelMode&&("addLabel"==Z.editing||"editLabel"==Z.editing))){if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;"addLabel"!=Z.editing||f||"text"!=Z.labelMode&&"icon"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!= 110Z.labelMode||k.saveEditsLabel(!0,!1,!1);if(f&&!h||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode)if(f)f&&("text"==Z.labelMode||"icon"==Z.labelMode)&&hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0));else{b="undefined"!==typeof poiList&&0<poiList.options.length?b=poiList.options[poiList.selectedIndex].value:0;createdNewLabel=!1;if("text"==Z.labelMode)"addLabel"==Z.editing?(k.createLabelFromParameters(null, 111null,"text",null,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor,null,null,null,null,null,null,null,"5","0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0));else if("icon"==Z.labelMode){if(g=document.getElementById("labelIconList"+c)){g=g[g.selectedIndex].value;switch(g){case "shim":u=Z.labelIconsInternal?"circle":qc+"/circle.png";break;case "External Graphics File":u= 112g;break;default:u=Z.labelIconsInternal?g:qc+"/"+g}"addLabel"==Z.editing?(k.createLabelFromParameters(null,null,"icon",u,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor,null,lineStrokeColor,null,null,null,null,null,null,"0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0))}}else if("counter"==Z.labelMode&&"addLabel"==Z.editing){var f=Z.Utils.getResource("CONTENT_TRACKINGTEXTCOLOR"), 113d=Z.Utils.getResource("CONTENT_TRACKINGLINECOLOR"),G=Z.Utils.getResource("CONTENT_TRACKINGFILLCOLOR"),c=Z.userName;m=Z.userInitials;l=Math.round(t.x).toString();g=Math.round(t.y).toString();var h=k.getTrackingCellIDFromCoordinates(l,g,"100"),B=e=r=null,u=Z.Utils.arrayIndexOfObjectValue(trackingTypesListDP,"value",Z.trackingTypeCurrent);-1!=u&&(u=trackingTypesListDP[u],r=u.text,B=u.text+" : "+Z.userName,e=u.value,G=u.fillColor);var J=h+" "+l+", "+g+", 100: "+c,q=Z.Utils.stringPadFront(h,6,"0")+Z.Utils.stringPadFront("0", 1146,"0"),u="circle",La=Z.Utils.getResource("CONTENT_COUNTERCAPTIONPOSITION"),E=Z.Utils.getCurrentUTCDateAsString();
114k.createLabelFromParameters("0",r,"counter",u,null,l,g,"100",null,null,40,"0","0",null,null,null,m,null,B,f,null,d,G,"1","0","1","1",La,"0",null,b,null,null,null,null,null,null,null,null,e,null,null,null,null,c,Z.userInitials,E);createdNewLabel=!0;trackingInstancesListDP[trackingInstancesListDP.length]={text:J,value:"0",sortKey:q,cell:h,typeID:e,x:l,y:g,zoom:"100",user:c,name:r,mediaType:"counter", 115media:u,radius:(40).toString(),caption:m,captionPosition:La,fillColor:G,initials:Z.userInitials,date:E};k.syncTrackingToViewport()}createdNewLabel&&(b=labelListDP[labelListDP.length-1],z611(b.poiID,b.value),createdNewLabel=!1,Z.annotationsAddMultiple||(Z.editing="editLabel"))}else if(f||h)z604(b,t);else{Z.Utils.addEventListener(document,"mousemove",M);var n=!1;N?(n=!0,clearTimeout(N),N=null,z604(b,t,n),Z.Utils.removeEventListener(document,"mousemove",M)):(N=setTimeout(function(a){N=null;z604(a,t, 116n)},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"mousemove",M))}}else if(null!==x&&(Z.measureVisible||Z.tour||Z.hotspots||Z.annotations))x=null;else{if((null===Z.editing||"view"==Z.labelMode)&&!x)if(l=null,Z.labelClickSelect&&(l=z538(m)),null!==l)b=l.id.substring(3,l.id.length),u=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",b),-1!=u&&(b=hotspots[u],k.zoomAndPanToView(b.x,b.y,b.z/100,b.rotation),Z.Utils.validateCallback("labelSelectedInViewportGetIDs")), 117hotspotList&&(Z.hotspotListTitle||Z.tourListTitle)&&(hotspotList.selectedIndex=0);else{if(Z.clickZoom||Z.clickPan)var l=N&&Z.doubleClickZoom?!0:!1,w=k.getClickZoomCoords3D(b,Ca,O,X,l);Z.clickZoom?Z.doubleClickZoom?N?(clearTimeout(N),N=null,k.zoomAndPanToView(w.x,w.y,w.z)):N=setTimeout(function(a){N=null;k.zoomAndPanToView(w.x,w.y,w.z)},Z.doubleClickDelay):window.setTimeout(function(){k.zoomAndPanToView(w.x,w.y,w.z)},1):Z.clickPan&&k.zoomAndPanToView(w.x,w.y,Z.imageZ);Z.zoomRectangle&&zoomRectangleDragging&& 118(b=hotspots[hotspotCurrentID].polygonPts,k.deleteLabel(hotspotCurrentID),zoomRectangleDragging=null,Z.measureVisible||Z.tour||Z.hotspots||Z.annotations||(Zb.display=Za.display=Ya.display="none",Z.Utils.removeEventListener(Zc,"mousedown",Z.Utils.preventDefault)))}}else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;Z.zoomRectangle&&zoomRectangleDragging&&"view"==Z.labelMode&&null===Z.editing?(b=hotspots[hotspotCurrentID].polygonPts,k.deleteLabel(hotspotCurrentID, 119!0),zoomRectangleDragging=null,Z.measureVisible||Z.tour||Z.hotspots||Z.annotations||(Zb.display=Za.display=Ya.display="none",Z.Utils.removeEventListener(Zc,"mousedown",Z.Utils.preventDefault)),k.zoomAndPanToZoomRectangle(b)):"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||!controlPointDragging?x&&(k.getLabelEditable(hotspotCurrentID)&&(f=x.style,l=d.x-x.mouseXPrior,g=d.y-x.mouseYPrior,l=parseFloat(f.left)+l,g=parseFloat(f.top)+g,f.left=l+"px",f.top=g+"px",z670(b,x,d)),x.style.zIndex= 120x.zIndex,x=null):(controlPointCurrent=null,controlPointDragging=!1,b=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",hotspotCurrentID),-1!=b&&(b=hotspots[b],l=Z.Utils.polygonCenter(b.polygonPts,b.polyClosed),b.x=l.x,b.y=l.y,Z.Utils.clearDisplay(jb),l=new HotspotContext,displayHotspot(b,l)));ra=null;Z.mousePan&&!Z.smoothPan&&k.updateView()}Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1));break; 121case "touchstart":if(e&&!Db){Z.mouseIsDown=!0;rc=!1;Ca=new Z.Utils.Point(g.x,g.y);oc=(new Date).getTime();ba.mouseXPrior=g.x;ba.mouseYPrior=g.y;if(("rectangle"==Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode)&&null!==hotspotCurrentID||"rectangle"==Z.labelMode&&null===hotspotCurrentID)controlPointCurrent=z534(b,t);if(!f&&"view"!=Z.labelMode&&("addLabel"==Z.editing||"editLabel"==Z.editing||null===Z.editMode&&"measure"==Z.labelMode)){"markup"!=Z.editMode&&k.toggleLabelColorPicker(!1);k.toggleLabelIconPicker(!1); 122Z.Utils.hideMessage();if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction()&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode))break;"addLabel"==Z.editing&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode&&null===controlPointCurrent)&&k.saveEditsLabel(!0,!1,!1);"freehand"==Z.labelMode&&Z.mouseIsDown?("editLabel"==Z.editing&&hotspotCurrent&&Z.Utils.arrayClear(hotspotCurrent.polygonPts),b="editLabel"==Z.editing? 123hotspotCurrentID:null,z489(b,!1,t),$b=(t.x-Z.imageX)*r,ac=(t.y-Z.imageY)*r,z474(hotspotCurrentID,!1)):"rectangle"==Z.labelMode&&null===controlPointCurrent&&(l=1,b=null,"editLabel"==Z.editing&&(b=hotspotCurrentID,hotspotCurrent&&null===controlPointCurrent&&Z.Utils.arrayClear(hotspotCurrent.polygonPts)),z489(b,!1,t),z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y)),z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x+l,t.y+l)),z489(hotspotCurrentID,!1,new Z.Utils.Point(t.x,t.y+l)),z474(hotspotCurrentID, 124!0),controlPointCurrent=2)}else if(f&&("addLabel"==Z.editing||"editLabel"==Z.editing)&&(x=z538(m))){l=k.z480(b.clientX,b.clientY);g=new Z.Utils.Point(parseFloat(x.style.left),parseFloat(x.style.top));b=l.x-g.x;l=l.y-g.y;x.mouseXPrior=Ca.x;
124x.mouseYPrior=Ca.y;x.mouseXOffset=b;x.mouseYOffset=l;x.style.zIndex=hotspots.length+1;b=x.id.substring(3,x.id.length);if(hotspotCurrentID&&hotspotCurrentID!=b){if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;z632("save", 125"labels");u=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",b);-1!=u&&(b=hotspots[u]);Z.Utils.validateCallback("labelSelectedInViewportGetIDs")}hotspotList&&(Z.hotspotListTitle||Z.tourListTitle)&&(hotspotList.selectedIndex=0)}}break;case "touchmove":if(e&&!Db&&!rc)if(ra=new Z.Utils.Point(g.x,g.y),l=(t.x-Z.imageX)*r,d=(t.y-Z.imageY)*r,N&&(clearTimeout(N),N=null,z604(b,t,n)),f||(null!==Z.editMode||"measure"!=Z.labelMode)&&("view"==Z.labelMode||"addLabel"!=Z.editing&&"editLabel"!=Z.editing))if(x){if("function"=== 126typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;f=x.style;l=ra.x-x.mouseXPrior;g=ra.y-x.mouseYPrior;l=parseFloat(f.left)+l;g=parseFloat(f.top)+g;f.left=l+"px";f.top=g+"px";x.mouseXPrior=ra.x;x.mouseYPrior=ra.y;z670(b,x,ra)}else!f&&Z.mousePan&&(sb?Ub=g:(l=g.x-ba.mouseXPrior,b=g.y-ba.mouseYPrior,isNaN(l)||isNaN(b)||(l=parseFloat(C.left)+l,b=parseFloat(C.top)+b,f=hb(l,b,Z.imageZ,Z.imageR,"container"),C.left=f.x+"px",C.top=f.y+"px",ba.mouseXPrior=g.x,ba.mouseYPrior= 127g.y,l=f.x-ta,b=f.y-ua,S&&la&&(Z.mobileDevice||Math.abs(l)>W/2||Math.abs(b)>T/2)&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display"),b=k.calculateCurrentCenterCoordinates(f,Z.imageZ,Z.imageR),Z.Navigator&&Z.Navigator.z658(b),Z.Utils.setBookmarksURL(),Z.Viewer.syncComparisonViewport(),Z.Viewer.syncOverlayViewports(null,a),Z.tracking&&k.syncTrackingToViewport())));else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction()&&("freehand"==Z.labelMode||"rectangle"== 128Z.labelMode||"polygon"==Z.labelMode||"measure"==Z.labelMode))break;b=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",hotspotCurrentID);b=-1!=b?hotspots[b].polyClosed:!1;"freehand"==Z.labelMode&&Z.mouseIsDown?(z511($b,ac,l,d,t),$b=l,ac=d):"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||null===controlPointCurrent||!Z.mouseIsDown?"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||b||Z.mouseIsDown&&(!Z.mouseIsDown||null===controlPointCurrent)||z516(l,d,t):z672(hotspotCurrentID, 129controlPointCurrent,t)}break;case "touchend":if(!Db&&!rc){Z.mouseIsDown=!1;document.mousemove=null;document.mouseup=null;e=(new Date).getTime();Z.mouseOutDownPoint?(d=Z.mouseOutDownPoint,t=k.getClickCoordsInImage(b,r,Z.mouseOutDownPoint)):d="undefined"!==typeof g&&null!==g?new Z.Utils.Point(g.x,g.y):"undefined"!==typeof ra&&null!==ra?ra:Ca;g=Z.Utils.calculatePointsDistance(Ca.x,Ca.y,d.x,d.y);r=e-oc;if(g<ud&&r<vd||!f&&("rectangle"==Z.labelMode||"freehand"==Z.labelMode))if(x||(null!==Z.editMode||"measure"!= 130Z.labelMode)&&("view"==Z.labelMode||"addLabel"!=Z.editing&&"editLabel"!=Z.editing))null!==x&&(Z.measureVisible||Z.tour||Z.hotspots||Z.annotations)?x=null:null!==Z.editing&&"view"!=Z.labelMode||x||(Z.clickZoom?(l=N&&Z.doubleClickZoom?!0:!1,w=k.getClickZoomCoords3D(b,Ca,O,X,l),Z.doubleClickZoom?N?(clearTimeout(N),N=null,k.zoomAndPanToView(w.x,w.y,w.z)):N=setTimeout(function(a){N=null;k.zoomAndPanToView(w.x,w.y,w.z)},Z.doubleClickDelay):window.setTimeout(function(){k.zoomAndPanToView(w.x,w.y,w.z)},1)): 131Z.clickPan&&k.zoomAndPanToView(w.x,w.y,Z.imageZ));else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;"addLabel"!=Z.editing||f||"text"!=Z.labelMode&&"icon"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||k.saveEditsLabel(!0,!1,!1);if(f||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode)if(f)f&&("text"==Z.labelMode||"icon"==Z.labelMode)&&hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID, 132"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0));else{b="undefined"!==typeof poiList&&0<poiList.options.length?b=poiList.options[poiList.selectedIndex].value:0;createdNewLabel=!1;if("text"==Z.labelMode)"addLabel"==Z.editing?(k.createLabelFromParameters(null,null,"text",null,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor,null,null,null,null,null,null,null,"5","0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID, 133"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0));else if("icon"==Z.labelMode&&(g=document.getElementById("labelIconList"+c))){g=g[g.selectedIndex].value;switch(g){case "shim":u=Z.labelIconsInternal?"circle":qc+"/circle.png";break;case "External Graphics File":u=g;break;default:u=Z.labelIconsInternal?g:qc+"/"+g}"addLabel"==Z.editing?(k.createLabelFromParameters(null,null,"icon",u,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor, 134null,lineStrokeColor,null,null,null,null,null,null,"0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y,!1,!0))}createdNewLabel&&(b=labelListDP[labelListDP.length-1],z611(b.poiID,b.value),createdNewLabel=!1)}else f||h?z604(b,t):(Z.Utils.addEventListener(document,"touchmove",M),n=!1,N?(n=!0,clearTimeout(N),N=null,z604(b,t,n),Z.Utils.removeEventListener(document,"touchmove",M)):(N=setTimeout(function(a){N=null;z604(a, 135t,n)},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"touchmove",M)));z638("label",Z.editing)}else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||!controlPointDragging?x&&(f=x.style,l=d.x-x.mouseXPrior,g
135=d.y-x.mouseYPrior,l=parseFloat(f.left)+l,g=parseFloat(f.top)+g,f.left=l+"px",f.top=g+"px",z670(b,x,d),x.style.zIndex= 136x.zIndex,x=null):(controlPointCurrent=null,controlPointDragging=!1,b=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",hotspotCurrentID),-1!=b&&(b=hotspots[b],l=Z.Utils.polygonCenter(b.polygonPts,b.polyClosed),b.x=l.x,b.y=l.y,Z.Utils.clearDisplay(jb),l=new HotspotContext,displayHotspot(b,l)));ra=null;Z.mousePan&&!sb&&k.updateView()}Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1))}break;case "touchcancel":if(!Db&& 137!rc){Z.mouseIsDown=!1;document.mousemove=null;document.mouseup=null;e=(new Date).getTime();Z.mouseOutDownPoint?(d=Z.mouseOutDownPoint,t=k.getClickCoordsInImage(b,r,Z.mouseOutDownPoint)):d="undefined"!==typeof g&&null!==g?new Z.Utils.Point(g.x,g.y):"undefined"!==typeof ra&&null!==ra?ra:Ca;g=Z.Utils.calculatePointsDistance(Ca.x,Ca.y,d.x,d.y);r=e-oc;if(g<ud&&r<vd||!f&&("rectangle"==Z.labelMode||"freehand"==Z.labelMode))if(x||(null!==Z.editMode||"measure"!=Z.labelMode)&&("view"==Z.labelMode||"addLabel"!= 138Z.editing&&"editLabel"!=Z.editing))null!==x&&(Z.measureVisible||Z.tour||Z.hotspots||Z.annotations)?x=null:null!==Z.editing&&"view"!=Z.labelMode||x||(Z.clickZoom?(l=N&&Z.doubleClickZoom?!0:!1,w=k.getClickZoomCoords3D(b,Ca,O,X,l),Z.doubleClickZoom?N?(clearTimeout(N),N=null,k.zoomAndPanToView(w.x,w.y,w.z)):N=setTimeout(function(a){N=null;k.zoomAndPanToView(w.x,w.y,w.z)},Z.doubleClickDelay):window.setTimeout(function(){k.zoomAndPanToView(w.x,w.y,w.z)},1)):Z.clickPan&&k.zoomAndPanToView(w.x,w.y,Z.imageZ)); 139else{if("function"===typeof Z.externalEditPermissionFunction&&!Z.externalEditPermissionFunction())break;"addLabel"!=Z.editing||f||"text"!=Z.labelMode&&"icon"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||k.saveEditsLabel(!0,!1,!1);f||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode?f?f&&("text"==Z.labelMode||"icon"==Z.labelMode)&&hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID,"y",t.y, 140!1,!0)):(b="undefined"!==typeof poiList&&0<poiList.options.length?b=poiList.options[poiList.selectedIndex].value:0,createdNewLabel=!1,"text"==Z.labelMode?"addLabel"==Z.editing?(k.createLabelFromParameters(null,null,"text",null,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor,null,null,null,null,null,null,null,"5","0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID, 141"y",t.y,!1,!0)):"icon"==Z.labelMode&&(g=document.getElementById("labelIconList"+c))&&(g=g[g.selectedIndex].value,u="shim"==g?"":"External Graphics File"==g?g:qc+"/"+g,"addLabel"==Z.editing?(k.createLabelFromParameters(null,null,"icon",u,null,t.x.toString(),t.y.toString(),l,null,null,null,"0","0",null,null,null,null,null,null,captionTextColor,null,lineStrokeColor,null,null,null,null,null,null,"0",null,b),createdNewLabel=!0):hotspotCurrent&&(k.modifyHotspot(hotspotCurrentID,"x",t.x,!0,!0),k.modifyHotspot(hotspotCurrentID, 142"y",t.y,!1,!0))),createdNewLabel&&(b=labelListDP[labelListDP.length-1],z611(b.poiID,b.value),createdNewLabel=!1)):f||h?z604(b,t):(Z.Utils.addEventListener(document,"touchmove",M),n=!1,N?(n=!0,clearTimeout(N),N=null,z604(b,t,n),Z.Utils.removeEventListener(document,"touchmove",M)):(N=setTimeout(function(a){N=null;z604(a,t,n)},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"touchmove",M)));z638("label",Z.editing)}else{if("function"===typeof Z.externalEditPermissionFunction&& 143!Z.externalEditPermissionFunction())break;"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||!controlPointDragging?x&&(f=x.style,l=d.x-x.mouseXPrior,g=d.y-x.mouseYPrior,l=parseFloat(f.left)+l,g=parseFloat(f.top)+g,f.left=l+"px",f.top=g+"px",z670(b,x,d),x.style.zIndex=x.zIndex,x=null):(controlPointCurrent=null,controlPointDragging=!1,b=Z.Utils.arrayIndexOfObjectValue(hotspots,"internalID",hotspotCurrentID),-1!=b&&(b=hotspots[b],l=Z.Utils.polygonCenter(b.polygonPts,b.polyClosed), 144b.x=l.x,b.y=l.y,Z.Utils.clearDisplay(jb),l=new HotspotContext,displayHotspot(b,l)));ra=null;Z.mousePan&&!sb&&k.updateView()}Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.Navigator&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1))}break;case "gesturestart":Qd(b);Db||(Db=window.setInterval(Rd,Sd));break;case "gesturechange":bd=Math.round(100*b.scale)/100;break;case "gestureend":Db&&(window.clearInterval(Db),rc=!0,Db=null),Z.mou
144sePan&&k.updateView()}}}function $c(a){null!== 145sb&&a&&(window.clearInterval(sb),sb=null);pc=cd=dd=eb=null;tb=ub=Mb=Nb=0}function Nd(){if(Z.animation&&k.getZoom()==Z.minZ)smoothAnimateStep();else{var a=parseFloat(C.left),b=parseFloat(C.top);if(Z.mouseIsDown||eb){var c=(eb?cd:Ub.x)-ad.x,d=(eb?dd:Ub.y)-ad.y,e=a-pc.x,g=b-pc.y;if(!(isNaN(c)||isNaN(d)||isNaN(e)||isNaN(g)||0==c&&0==d&&0==e&&0==g)){var l=eb?Z.smoothPanGlide:1,m=eb?1:100;tb=Math.round((c-e)/(Z.smoothPanEasing*l)*m/m);ub=Math.round((d-g)/(Z.smoothPanEasing*l)*m/m);Z.mouseIsDown?(Mb=tb, 146Nb=ub):(Math.abs(tb)>Math.abs(Mb)&&(tb=Mb),Math.abs(ub)>Math.abs(Nb)&&(ub=Nb));a+=tb;b+=ub;c=hb(a,b,Z.imageZ,Z.imageR,"container");C.left=c.x+"px";C.top=c.y+"px";tb-=a-c.x;ub-=b-c.y;S&&la&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display");eb&&0==Math.round(tb*m)/m&&0==Math.round(ub*m)/m&&(eb=!1);m=k.calculateCurrentCenterCoordinates(c,Z.imageZ,Z.imageR);Z.comparison&&0!=Lb||Z.Navigator&&Z.Navigator.z658(m)}}else if(Z.mouseIsDown||null!==eb||0==tb||0==ub)$c(!0),k.updateView();else if(c=hb(a+ 147Mb,b+Nb,Z.imageZ,Z.imageR,"container"),Mb=c.x-a,Nb=c.y-b,0!=Mb||0!=Nb)cd=Ub.x+Mb,dd=Ub.y+Nb,eb=!0}}function Qd(a){a=Z.Utils.event(a);a.preventDefault();bd=Math.round(100*a.scale)/100}function Rd(a){if(Z.mousePan){a=E(O,vb*bd);var b=Ib(a);a!=Z.imageZ&&k.z633(b)}}function Bc(a){if(a=Z.Utils.event(a)){var b;if(Z.geoCoordinatesVisible){if(b="",geoTop&&geoBottom&&geoLeft&&geoRight){var c=k.getClickCoordsInImage(a);b=c;c=geoLeftDec+b.x*Math.abs(geoXSpan/Z.imageW);b=geoTopDec-b.y*Math.abs(geoYSpan/Z.imageH); 148var d="E",e=1;180<c&&(c-=360);-180>c&&(c+=360);0>c&&(d="W",e=-1);var g=(c-c%1)*e,c=Z.Utils.roundToFixed(c%1*60*e,5),c=g+", "+c+", "+d,d="N",e=1;0>b&&(d="S",e=-1);g=(b-b%1)*e;b=Z.Utils.roundToFixed(b%1*60*e,5);b=geoCoordsString=g+", "+b+", "+d+" "+c}}else"IIIFImageServer"==Z.tileSource?(c=k.getClickCoordsInImage(a),"mousemove"==a.type?b=k.getViewCoordinatesIIIFString(null,c,"show"):"mousedown"==a.type&&a.altKey&&(b=k.getViewCoordinatesIIIFString(null,c,"save")+"\n")):(c=Z.Utils.event(a),b=k.getZoom(), 149d=k.getClickCoordsInImage(c,b),c=Math.round(d.x).toString(),d=Math.round(d.y).toString(),b=(Math.round(1E3*b)/10).toString(),b='X="'+c+'" Y="'+d+'" ZOOM="'+b+'"');"mousemove"==a.type?Z.Utils.showCoordinates(b):"mousedown"==a.type&&a.altKey&&Z.Utils.saveCoordinates(b)}}var qc,aa=null,L=null,Lb=0;"undefined"!==typeof a&&null!==a&&(Lb=a);var mb;mb="undefined"!==typeof b&&null!==b?b:Z.imagePath;var k=this,Vb=[],Ec=-1,Fc=0,Wb=0,Ga=parseInt(Z.Utils.getResource("z90"),10),od=8*Ga,pd=4*Ga,dc=0,Ha=parseInt(Z.Utils.getResource("z221"), 15010),Ia=parseInt(Z.Utils.getResource("z219"),10),ed=parseFloat(Z.Utils.getResource("z218")),Td=ed/2,Rb=parseInt(Z.Utils.getResource("z220"),10),wd=1==Z.toolbarVisible?Z.toolbarH:0,Od=parseInt(Z.Utils.getResource("DEFAULT_MOUSECLICKTHRESHOLDVIEWPORT"),10),Pd=parseInt(Z.Utils.getResource("DEFAULT_MOUSECLICKTHRESHOLDTIMEVIEWPORT"),10),ud=parseInt(Z.Utils.getResource("DEFAULT_TOUCHTAPTHRESHOLDVIEWPORT"),10),vd=parseInt(Z.Utils.getResource("DEFAULT_TOUCHTAPTHRESHOLDTIMEVIEWPORT"),10),gc,S,$a,na,Dd,ib,ba, 151C,Lc,da,I,Gb,hc,fa,ga,sa,Mc,Oa,Fb,Pb,fc,Zc,ld,Zb,Qb,Ya,Nc,jb,Za,Oc,Ed,Fd,$b,ac,tc,Pc,md;A(Lb);var Pa,Aa=1,O=0,oa=0,la=!1,Ta=0,Qc=!1,X,vb,fb,Da,Ea=[],Ma=[],xa=[],Ua=[],Na=[],Ob=[];tierTileOffsetsCount=[];tierTileOffsetChunks=[];tierTileOffsetLast=[];var Eb=[];tierTileByteCountsCount=[];tierTileByteCountChunks=[];tierTileByteCountLast=[];var wb=[],Fa=[],Ba=[],ab=[],lb=[],kc=0,jc=0,qd=0,Rc=0,Sc=0,Tc=0,Vc=0,xd,xc=0,yc=0,mc=0,Hb=0,lc=0,Jb=0,Sb=0,zc=0,xb=[],U=[],Ka=[],ob=[],yb=[],kb=[],Yb=null,Ac=0,Ld= 152parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYLIMIT"),10),rd=parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYDELAY"),10),Ja=[],sc=[],pa=[],ha=[],Ab=[],za=[],Kd=new Z.NetConnector,Hc=parseInt(Z.Utils.getResource("z81"),10),Ud=parseInt(Z.Utils.getResource("z78"),10),yd=parseInt(Z.Utils.getResource("z80"),10),ic=parseInt(Z.Utils.getResource("z77"),10),Ta=ic,zd=parseInt(Z.Utils.getResource("z79"),10),vc=parseInt(Z.Utils.getResource("z76"),10),uc=parseInt(Z.Utils.getResource("z75"),10), 153Kc=null,Jc=null,Ic=null,Vd=parseFloat(Z.Utils.getResource("z173UNCONVERTED"),10),Wd=null!==Z.panBuffer?Z.panBuffer:parseFloat(Z.Utils.getResource("z173"),10),nd="unconverted"!=Z.tileSource?Wd:Vd,td=parseFloat(Z.Utils.getResource("z74"),10),Jd=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXBROWSER"),10),Id=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXFIREFOX"),10),Hd=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXMOBILE"),10),Gd=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXIMAGESET"), 15410),W,T,Gc,ec,ia,ja,Va,Wa,ta,ua,qb,rb,Xc,Yc,bb,cb;W=Z.viewerW;T=Z.viewerH;Gc=ec=0;T-=wd;0==Z.toolbarPosition&&(ec+=wd);var N=null,Ca,ra,oc,Db=null,bd=null,rc=!1,Sd=parseInt(Z.Utils.getResource("z122"),10),Cc=Math.round(parseFloat(Z.Utils.getResource("z176"))*Z.panSpeed),Ra=0,Sa=0;parseInt(Z.Utils.getResource("DEFAULT_ANIMATIONOPTIMALMOTIONIMAGES"),10);parseInt(Z.Utils.getResource("DEFAULT_ANIMATIONOPTIMALPOSITIONDELTA"),10);var sb=null,ad=null,pc=null,Ub=null,tb=0,ub=0,Mb=0,Nb=0,eb=null,cd=null,dd= 155null,bc=parseFloat(Z.Utils.getResource("z242"))*Z.zoomSpeed;Z.mobileDevice&&(bc/=2);var Xa=0,Bb=null,sd=0,Wc=parseInt(Z.Utils.getResource("z238"),10),Uc=parseFloat(Z.Utils.getResource("z112"))*Z.fadeInSpeed,wc=null;parseInt(Z.Utils.getResource("DEFAULT_ROTATIONSTEPDEGREES"),10);parseInt(Z.Utils.getResource("DEFAULT_ROTATIONSTEPDURATION"),10);var Xd=parseFloat(Z.Utils.getResource("z239")),fd=parseFloat(Z.Utils.getResource("z240"));Z.mobileDevice&&(fd/=2);var Kb=null,nc=0;if(!Z.fullScreenVisible&&!Z.fullPageVisible)var gd, 156hd,Ad,Bd,jd,Cd,cc,kd;var x=!1;if(null!==Z.imagePath&&"null"!=Z.imagePath){if(1==Z.localUse&&"ZoomifyImageFile"==Z.tileSource){Z.Utils.showMessage(Z.Utils.getResource("z290"),!1,Z.messageDurationShort,"center");return}if(1==Z.localUse&&"ZoomifyPFFFile"==Z.tileSource){Z.Utils.showMessage(Z.Utils.getResource("z289"),!1,Z.messageDurationStort,"center");return}1==Z.localUse&&(Z.browser==Z.browsers.CHROME||Z.browser==Z.browsers.OPERA||Z.browser==Z.browsers.IE&&11==Z.browserVersion||Z.browser==Z.browsers.SAFARI&& 1577<=Z.browserVersion)&&Z.Utils.showMessage(Z.Utils.getResource("z288"),!1,Z.messageDurationStandard,"center");if(-1==Z.imagePath.indexOf("zComparisonPath")&&-1==Z.imagePath.indexOf("zSlidePath")&&-1==Z.imagePath.indexOf("zOverlayPath")&&-1==Z.imagePath.indexOf("zAnimationPath")&&-1==Z.imagePath.indexOf("zSlidestackPath")){var Yd=new Z.NetConnector;P(mb,Yd,Lb)}}this.clearAll=function(a,b,c,d){a&&(jc=kc=0,"undefined"!==typeof Fa&&Z.Utils.arrayClear(Fa
157),"undefined"!==typeof Ba&&Z.Utils.arrayClear(Ba), 158"undefined"!==typeof wb&&Z.Utils.arrayClear(wb),"undefined"!==typeof xb&&Z.Utils.arrayClear(xb),"undefined"!==typeof U&&Z.Utils.arrayClear(U),"undefined"!==typeof Ka&&Z.Utils.arrayClear(Ka),"undefined"!==typeof ob&&Z.Utils.arrayClear(ob),"undefined"!==typeof yb&&Z.Utils.arrayClear(yb),"undefined"!==typeof kb&&Z.Utils.arrayClear(kb),"undefined"!==typeof ab&&Z.Utils.arrayClear(ab),"undefined"!==typeof lb&&Z.Utils.arrayClear(lb),"undefined"!==typeof Ab&&Z.Utils.arrayClear(Ab),"undefined"!==typeof ha&& 159Z.Utils.arrayClear(ha),"undefined"!==typeof pa&&Z.Utils.arrayClear(pa),"undefined"!==typeof za&&Z.Utils.arrayClear(za));b&&n();d&&(S&&Z.Utils.clearDisplay(S),da&&Z.Utils.clearDisplay(da),fa&&Z.Utils.clearDisplay(fa),Oa&&Z.Utils.clearDisplay(Oa))};this.setSizeAndPosition=function(a,b,c,d){H(a,b,c,d)};this.syncViewportResize=function(a,b,c,d){k.setSizeAndPosition(Z.viewerW,Z.viewerH,0,0);k.resizeViewport(a,b,c,d)};this.resizeViewport=function(a,b,c,d){k.validateXYZDefaults();k.setView(a,b,c,d)};this.loadImageProperties= 160function(a,b,c){P(a,b,c)};this.parseZIFHeader=function(a){n();if(73==a[0]&&73==a[1]&&43==a[2]&&0==a[3]&&8==a[4]&&0==a[5]&&0==a[6]&&0==a[7]&&16==a[8]&&0==a[9]&&0==a[10]&&0==a[11]&&0==a[12]&&0==a[13]&&0==a[14]&&0==a[15]){for(var b=Z.Utils.longValue(a,8),c=Z.Utils.longValue(a,b),d=1,e=null,g=null,m=null,l=null,h=null,t=null,t=2;0!=b;){for(e=0;e<c;e++)switch(g=b+8+20*e,Z.Utils.shortValue(a,g)){case 256:Ea[d-1]=Z.Utils.intValue(a,g+12);break;case 257:Ma[d-1]=Z.Utils.intValue(a,g+12);break;case 322:m=Z.Utils.intValue(a, 161g+12);break;case 323:l=Z.Utils.intValue(a,g+12);break;case 324:var r=tierTileOffsetsCount[d-1]=Z.Utils.longValue(a,g+4);Ob[d-1]=Z.Utils.longValue(a,g+12);h+=r;break;case 325:r=tierTileByteCountsCount[d-1]=Z.Utils.longValue(a,g+4),Eb[d-1]=1==r?Z.Utils.intValue(a,g+12):2==r?Z.Utils.intValue(a,g+12)+","+Z.Utils.intValue(a,g+16):Z.Utils.longValue(a,g+12)}b=Z.Utils.longValue(a,b+20*c+8);c=Z.Utils.longValue(a,b);d++}e=Ea[0];g=Ma[0];Aa=d-1;Ea.reverse();Ma.reverse();tierTileOffsetsCount.reverse();Ob.reverse(); 162tierTileByteCountsCount.reverse();Eb.reverse();!isNaN(e)&&0<e&&!isNaN(g)&&0<g&&!isNaN(m)&&0<m&&!isNaN(l)&&0<l&&0<h?k.getStatus("initializedViewport")?q(e,g,m,l,h,t,null,null,null,null,null):f(e,g,m,l,h,t,null,null,null,null,null):"ZoomifyImageFolder"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z252"),!1,Z.messageDurationStandard,"center"):Z.Utils.showMessage(Z.Utils.getResource("z250"),!1,Z.messageDurationStandard,"center")}};this.parseZIFOffsetChunk=function(a,b){var c=Z.Utils.arrayIndexOfObjectValue(tierTileOffsetChunks, 163"chunkID",b);-1!=c&&(tierTileOffsetChunks[c].chunk=a,D(b,"offset"))};this.parseZIFByteCountChunk=function(a,b){var c=Z.Utils.arrayIndexOfObjectValue(tierTileByteCountChunks,"chunkID",b);-1!=c&&(tierTileByteCountChunks[c].chunk=a,D(b,"byteCount"))};this.parseZIFImage=function(a,b,c){a="data:image/jpeg;base64,"+Z.Utils.encodeBase64(a);var d;"image-display"==c?d=k.getStatus("imageSaving")?zb:qa:"image-backfill"==c?d=k.getStatus("imageSaving")?z599ToSave:ma:"navigator"==c?d=Z.Navigator.z556:"gallery"== 164c&&(d=Z.Gallery.initializeGallery);b=Z.Utils.createCallback(null,d,b);Z.Utils.createImageElementFromBytes(a,b)};this.z602=function(a,b){Q(a,b)};this.validateXYZDefaults=function(a){a&&Z.Utils.resetParametersXYZ(Z.parameters);var b=parseFloat(Z.Utils.getResource("z143")),c=parseFloat(Z.Utils.getResource("z144")),d=parseFloat(Z.Utils.getResource("z145")),e=parseFloat(Z.Utils.getResource("DEFAULT_INITIALR")),g=parseFloat(Z.Utils.getResource("z163"));a=parseFloat(Z.Utils.getResource("z153"));b=isNaN(b)? 165null:b;c=isNaN(c)?null:c;d=isNaN(d)?null:d;e=isNaN(e)?null:e;g=isNaN(g)?null:g;a=isNaN(a)?null:a;Z.bookmarksGet?(Z.initialX||(Z.initialX=b),Z.initialY||(Z.initialY=c),Z.initialZ||(Z.initialZ=d),Z.initialR||(Z.initialR=e),Z.minZ||(Z.minZ=g),Z.maxZ||(Z.maxZ=a)):"IIIFImageServer"==Z.tileSource?Z.iiifRegion&&(a=Z.iiifRegion.split(","),b=Z.iiifSize.split(","),Z.initialX=Math.round(parseFloat(a[0])+parseFloat(a[2])/2),Z.initialY=Math.round(parseFloat(a[1])+parseFloat(a[3])/2),Z.initialZ=Math.round(parseFloat(b[0])/ 166parseFloat(a[2])*100)/100,Z.initialR=parseInt(Z.iiifRotation,10)):Z.parameters?(Z.parameters.zInitialX||(Z.initialX=b),Z.parameters.zInitialY||(Z.initialY=c),Z.parameters.zInitialZoom||(Z.initialZ=d),Z.parameters.zInitialRotation||(Z.initialR=e),Z.parameters.zMinZoom||(Z.minZ=g),Z.parameters.zMaxZoom||(Z.maxZ=a)):(Z.initialX=b,Z.initialY=c,Z.initialZ=d,Z.initialR=e,Z.minZ=g,Z.maxZ=a);null===Z.initialX&&(Z.initialX=Z.imageW/2);null===Z.initialY&&(Z.initialY=Z.imageH/2);Z.fitZ=k.z468(null,null,0);Z.fillZ= 167k.calculateZoomToFill(null,null,0);b=k.getStatus("initializedViewport")?k.getRotation():Z.initialR;a=k.z468(null,null,b);b=k.calculateZoomToFill(null,null,b);1<Z.fitZ&&(null!==Z.maxZ?Z.fitZ>Z.maxZ&&(Z.fitZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fitZ=1));1<Z.fillZ&&(null!==Z.maxZ?Z.fillZ>Z.maxZ&&(Z.fillZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fillZ=1));null===Z.minZ||-1==Z.minZ?Z.minZ=Z.fitZ:0==Z.minZ&&(Z.minZ=Z.fillZ);if(null===Z.maxZ||-1==Z.maxZ)Z.maxZ=1;null===Z.initialZ||-1==Z.initialZ?Z.initialZ= 168a:0==Z.initialZ&&(Z.initialZ=b);Z.initialZ<Z.minZ&&(Z.initialZ=Z.minZ);Z.initialZ>Z.maxZ&&(Z.initialZ=Z.maxZ)};this.getViewW=function(){return W};this.getViewH=function(){return T};this.getDisplayW=function(){return ia};this.getDisplayH=function(){return ja};this.getImagePath=function(){return mb};this.setImagePath=function(a){mb=a};this.getViewportID=function(){return Lb};this.getTierCount=function(){return Aa};this.getTileW=function(){return Ha};this.getTileH=function(){return Ia};this.getTierCurrent= 169function(){return O};this.getTierBackfill=function(){return oa};this.getTierBackfillDynamic=function(){return la};this.getTierBackfillOversize=function(){return Ta};this.getTierScale=function(){return X};this.getX=function(a){var b=parseFloat(C.left)-ta;a=k.getZoom(a);return aa-b/a};this.getY=function(a){var b=parseFloat(C.top)-ua;a=k.getZoom(a);return L-b/a};this.getZoom=function(a){var b=X;a&&(b=X*parseFloat(ga.width)/ia);return E(O,b)};this.getRotation=function(a){return Z.imageR};this.getCoordinates= 170function(){new Z.Utils.Point(k.getX(),k.getY())};this.getCoordinatesBookmark=function(a,b){var c="";return c=b?"?"+k.getViewCoordinatesIIIFString(a,null,"bookmark"):"?"+k.getViewCoordinatesString(a)};this.getViewCoordinatesString=function(a){var b="x="+Math.round(k.getX(a)).toString(),c="&y="+Math.round(k.getY(a)).toString(),d="&z="+Math.round(100*k.getZoom(a)).toString();a=Math.round(k.getRotation(a));return b+c+d+(0==a?"":"&r="+a.toString())};this.getCoordinatesFull=function(a){return new Z.Utils.Coordinates(k.getX(a), 171k.getY(a),k.getZoom(a),k.getRotation(a))};this.getCoordinatesDisplayFull=function(){return new Z.Utils.CoordinatesDisplayStyle(C.left,C.top,ga.width,ga.height,ga.left,ga.top,I.width,I.height,I.left,I.top,C.rotation)};this.getTiersScaleUpMax=function(){return ed};this.getTiersScaleDownMax=function(){return Td};this.getTilesCacheMax=function(){return Rb};this.getTierWs=function(){return Ea.join(",")};this.getTierHs=function(){return Ma.join(", ")};this.getTierTileCounts=function(){return Na.join(", ")}; 172this.getTilesToLoad=function(){return kc};this.getTilesLoadingNames=function(){return""==U.join(", ")?"Current view loading complete":U.join(", ")};this.getTilesToDraw=function(){return Jb};this.getConstrainPan=function(a){return Z.constrainPan};this.setConstrainPan=function(a){Z.constrainPan="0"!=a;Z.constrainPanLimit=parseInt(a,10);Z.constrainPanStrict="3"==a;Z.constrainPan&&k.toggleConstrainPan(!0)};
172this.getSmoothPan=function(){return Z.smoothPan};this.setSmoothPan=function(a){Z.smoothPan=a};this.getSmoothPanEasing= 173function(){return Z.smoothPanEasing};this.setSmoothPanEasing=function(a){Z.smoothPanEasing=a};this.getSmoothPanGlide=function(){return Z.smoothPanGlide};this.setSmoothPanGlide=function(a){Z.smoothPanGlide=a};this.getSmoothZoom=function(){return Z.smoothZoom};this.setSmoothZoom=function(a){Z.smoothZoom=a};this.getSmoothZoomEasing=function(){return Z.smoothZoomEasing};this.setSmoothZoomEasing=function(a){Z.smoothZoomEasing=a};this.setCoordinatesDisplayVisibility=function(a){a?(Z.Utils.addEventListener(document, 174"mousemove",Bc),Z.Utils.addEventListener(document,"mousedown",Bc)):(Z.coordinatesVisible=!1,Z.Utils.removeEventListener(document,"mousemove",Bc),Z.Utils.removeEventListener(document,"mousedown",Bc))};this.setTourPath=function(a,b){k.setHotspotPath(a,b)};this.setHotspotPath=function(a,b){"undefined"===typeof a||Z.Utils.stringValidate(a)?(Z.hotspotPath=Z.Utils.stringRemoveTrailingSlashCharacters(a),Z.hotspotFolder=Z.hotspotPath,".xml"==Z.hotspotPath.toLowerCase().substring(Z.hotspotPath.length-4,Z.hotspotPath.length)&& 175(Z.hotspotFolder=Z.hotspotFolder.substring(0,Z.hotspotFolder.lastIndexOf("/"))),b||(k.deleteAllHotspots(),z572(Lb))):(Z.hotspotPath=null,Z.hotspotFolder=null,k.deleteAllHotspots())};this.getHotspotCurrentID=function(){return hotspotCurrentID};this.getHotspots=function(){return hotspots};this.setHotspots=function(a){hotspots=a.slice(0)};this.setXMLCallbackFunction=function(a){Z.xmlCallbackFunction=a};this.setVisibility=function(a){a=a?"inline-block":"none";gc&&!$a&&($a=gc.style);$a&&($a.display=a); 176ib&&!C&&(C=ib.style);C&&(C.display=a)};this.setOpacity=function(a){Z.Utils.setOpacity(ib,2<=a?a/100:0>a?0:1<a?1:a)};this.showLists=function(a){};this.z619=function(b){b||(u(uc,Ba),Kc=!0);(!Z.imageSet||Z.comparison||a==Z.imageSetStart||b)&&Aa>zd&&(u(vc,Ba),Jc=!0,Aa>yd&&(u(ic,Ba),Ic=!0),k.setStatus("backfillPrecachedViewport",!0));Ba.sort();Ba=Z.Utils.arrayUnique(Ba);wb=Ba.slice(0);k.traceDebugValues("tilesBackfillToPrecache",null,wb.length);F(Ba,ma,"simple","image-backfill")};this.prez581s=function(a){if(Z.imageSet)Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADINGIMAGESET-LOADINGTILES"), 177!1,Z.messageDurationLong,"center"),k.updateView(!0,!0);else{Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADINGONEIMAGE-LOADINGTILES"),!1,Z.messageDurationLong,"center");Z.Utils.arrayClear(U);a=0;for(var b=Aa;a<b;a++)for(var c=k.z542(a,null,!0,!0),d=c.l,e=c.r;d<=e;d++)for(var g=c.t,m=c.b;g<=m;g++){var l=a+"-"+d+"-"+g;U[U.length]=l}if(0<U.length)for(c=(new Date).getTime(),a=0,b=U.length;a<b;a++)if(l=U[a])l=new ka(l,"image-display"),Y(l,c,qa)}};this.updateView=function(b,c){if("undefined"===typeof a|| 178null===a)a=0;if(a!=Z.viewportCurrentID&&!b){var d=Z["Viewport"+a.toString()];Z.imageX=d.getX(!0);Z.imageY=d.getY(!0);Z.imageZ=d.getZoom(!0);Z.imageR=d.getRotation(!0)}var e=Z.mouseIsDown||Z.buttonIsDown||Z.keyIsDown||Z.mouseWheelIsDown,d=X!=vb||k.getZoom()!=Z.imageZ||Z.imageZ!=Z.priorZ,m=parseFloat(C.left)!=ta||parseFloat(C.top)!=ua||k.getX()!=Z.imageX||k.getY()!=Z.imageY,g=Z.fullViewPrior;if(d||m||g||"undefined"!==typeof b&&b&&(!e||Z.animation)||"undefined"!==typeof c&&c){Tb();if(Z.comparison||Z.overlays|| 179!Z.imageSet||!Z.Viewer.getStatus("readyViewer")||a>Z.viewportCurrentID-1&&a<Z.viewportCurrentID+1||c){var l=!1;if(b||parseFloat(ga.width)!=fa.width){if(Z.useCanvas){ga.width=fa.width+"px";ga.height=fa.height+"px";ga.left="0px";ga.top="0px";sa.restore();sa.save();try{sa.scale(X,X)}catch(f){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE")),console.log("In function z630 scaling canvas: "+f)}Qb&&(Ya.width=Qb.width+"px",Ya.height=Qb.height+"px",Ya.left="0px",Ya.top="0px"); 180jb&&(Za.width=jb.width+"px",Za.height=jb.height+"px",Za.left="0px",Za.top="0px");da&&(la?(I.width=da.width+"px",I.height=da.height+"px",I.left=bb+"px",I.top=cb+"px",Gb.restore(),Gb.save(),Gb.scale(fb,fb)):(I.width=qb+"px",I.height=rb+"px",I.left=bb+"px",I.top=cb+"px"))}l=!0}if(b||parseFloat(C.left)!=ta||parseFloat(C.top)!=ua)l=parseFloat(C.left)-ta,e=parseFloat(C.top)-ua,0!=Z.imageR&&(e=Z.Utils.rotatePoint(l,e,Z.imageR),l=e.x,e=e.y),C.left=ta+"px",C.top=ua+"px",la||(bb=parseFloat(I.left)+l,cb=parseFloat(I.top)+ 181e,I.left=bb+"px",I.top=cb+"px"),g=k.getZoom(),Z.imageX=aa=Z.imageX-l/g,Z.imageY=L=Z.imageY-e/g,l=!0;l&&(v(fa,O,Ka,"centerOut",!1,"1a. Updating view: resetting display positions"),Z.maskingSelection&&tc&&displayMask(),la&&v(da,oa,Fa,"simple",!1,"1b. Updating view: resetting backfill positions"));l=!1;if("undefined"!==typeof b&&b||X!=vb||k.getZoom()!=Z.imageZ||!k.getStatus("initializedViewport")||c){X!=vb&&(Z.imageZ=k.getZoom());Z.imageZ<Z.minZ&&(Z.imageZ=Z.minZ);Z.imageZ>Z.maxZ&&(Z.imageZ=Z.maxZ); 182g=ed;for(e=Aa;0<e&&g/2>=Z.imageZ;)e--,g/=2;e=0>e-1?0:e-1;
182g=ca(e,Z.imageZ);if(e!=O||g!=X)Z.useCanvas&&(sa.restore(),sa.save(),sa.scale(g,g)),O!=e&&(Qc=!0),O=e,X=g;vb=X;if("unconverted"!=Z.tileSource){la=!1;O>Hc?(oa=O-Ud,la=!0):oa=O>yd?ic:O>zd?vc:uc;tierBackfillScalePrior=fb=ca(oa,Z.imageZ);var e=Ea[oa],g=Ma[oa],h=Z.imageX*Z.imageZ,t=Z.imageY*Z.imageZ;la?(e=td,qb=ia*e,rb=ja*e,bb=-(ia/e),cb=-(ja/e),Xc=Va*e,Yc=Wa*e,da.width=qb,da.height=rb,I.width=da.width+"px",I.height=da.height+"px",I.left=bb+"px", 183I.top=cb+"px",Z.useCanvas&&(S&&(Da=ca(Ta,Z.imageZ),na.restore(),na.save(),na.scale(Da,Da),0!=Z.imageR&&na.rotate(Z.imageR*Math.PI/180)),Gb.restore(),Gb.translate(Xc,Yc),Gb.save(),Gb.scale(fb,fb))):(qb=e*fb,rb=g*fb,bb=Va-h,cb=Wa-t,da.width=e,da.height=g,Z.useCanvas&&(I.width=qb+"px",I.height=rb+"px"),I.left=bb+"px",I.top=cb+"px");v(da,oa,Fa,"simple",!1,"2. Updating view: changing tier - backfill")}!b&&0<Rb&&(l=!0)}else k.traceDebugValues("updateView-noChange");"unconverted"!=Z.tileSource&&la?J(!0): 184S&&Z.Utils.clearDisplay(S)}a==Z.viewportCurrentID||Z.comparison||Z.overlays||!Z.imageSet||c?("unconverted"!=Z.tileSource?(J(),v(fa,O,null,"centerOut",l,"3. Updating view: prior to loading of any new tiles")):"undefined"!==typeof Pa&&(l=-Z.imageX,e=-Z.imageY,Z.Utils.clearDisplay(fa),sa.drawImage(Pa,l,e),k.setStatus("displayLoadedViewport",!0),k.setStatus("displayDrawnViewport",!0),Z.Utils.validateCallback("viewUpdateComplete"),Z.Utils.validateCallback("viewUpdateCompleteGetLabelIDs")),Z.maskingSelection&& 185setMask(),0<U.length&&F(U,qa,"centerOut","image-display"),k.syncViewportRelated(!0,!0,!0,!0,!0,!0,Z.comparison&&a==Z.viewportCurrentID,Z.overlays&&a==Z.viewportCurrentID,Z.bookmarksSet,Z.tracking)):(k.setStatus("displayLoadedViewport",!0),k.setStatus("displayDrawnViewport",!0));c&&(l=(k.getViewportID()+1).toString()+" of "+Z.imageSetLength.toString(),Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADINGIMAGESET-UPDATINGVIEW")+" "+l,!1,Z.messageDurationLong,"center"));m&&Z.Utils.validateCallback("viewPanned"); 186d&&Z.Utils.validateCallback("viewZoomed");(m||d)&&Z.Utils.validateCallback("viewChanged")}};syncTransitionCanvas=function(){Oa&&Fb&&Pb&&(Oa.width=fa.width,Oa.height=fa.height,Fb.width=ga.width,Fb.height=ga.height,Fb.left=ga.left,Fb.top=ga.top,Pb.restore(),Pb.save(),Pb.translate(Va,Wa),Pb.scale(X,X))};this.loadUnconvertedImage=function(a){Pa=null;Pa=new Image;Pa.onload=K;Pa.onerror=wa;Pa.src=a};this.getUnconvertedImage=function(){return Pa};this.createUnconvertedImageThumbnail=function(){if(Z.useCanvas){if("undefined"!== 187typeof Pa){var a=null,a=150/Z.imageW,b=Z.Utils.createContainerElement("canvas","tempCanvas","inline-block","absolute","visible",Z.imageW*a+"px",Z.imageH*a+"px","0px","0px","none","0px","transparent none","0px","0px","normal"),c=b.getContext("2d");try{c.scale(a,a),c.drawImage(Pa,0,0)}catch(d){console.log("In function initializeViewportContinue scaling canvas: "+d)}a=new Image;a.src=b.toDataURL("image/jpeg",Z.saveImageCompression);return a}window.setTimeout(function(){createUnconvertedImageThumbnail()}, 188100)}};this.formatTilePath=function(a,b,c,d){var e;if("ZoomifyImageFile"==Z.tileSource){e="offsetLoading";var g="loading",l="loading",m;if(1==tierTileOffsetsCount[a])g=Ob[a];else{var f=new ya(a,b,c),h=f.chunkID+","+a+","+b+","+c+","+d+",offset";m=Z.Utils.arrayIndexOfObjectValue(tierTileOffsetChunks,"chunkID",f.chunkID);-1==m?(k.traceDebugValues("z532",f.chunkID+","+a+","+b+","+c+","+d),-1==Z.Utils.arrayIndexOf(ha,h)&&(ha[ha.length]=h),tierTileOffsetChunks[tierTileOffsetChunks.length]={chunkID:f.chunkID, 189chunk:"loading"},m=new Z.NetConnector,m.loadByteRange(mb,f.chunkStart,f.chunkEnd,"offset",null,f.chunkID)):"loading"==tierTileOffsetChunks[m].chunk?-1==Z.Utils.arrayIndexOf(ha,h)&&(ha[ha.length]=h):"loading"!=tierTileOffsetChunks[m].chunk&&(m=tierTileOffsetChunks[m].chunk,g=Z.Utils.longValue(m,f.offsetStartInChunk))}1==tierTileByteCountsCount[a]?l=Eb[a]:(m=b+c*xa[a],2==tierTileByteCountsCount[a]?(a=Eb[a],l=0==m?a.substring(0,a.indexOf(",")):a.substring(a.indexOf(",")+1,a.length)):(f=new gb(a,b,c), 190a=f.chunkID+","+a+","+b+","+c+","+d+",byteCount",m=Z.Utils.arrayIndexOfObjectValue(tierTileByteCountChunks,"chunkID",f.chunkID),-1==m?(-1==Z.Utils.arrayIndexOf(ha,a)&&(ha[ha.length]=a),tierTileByteCountChunks[tierTileByteCountChunks.length]={chunkID:f.chunkID,chunk:"loading"},m=new Z.NetConnector,m.loadByteRange(mb,f.chunkStart,f.chunkEnd,"byteCount",null,f.chunkID)):"loading"==tierTileByteCountChunks[m].chunk?-1==Z.Utils.arrayIndexOf(ha,a)&&(ha[ha.length]=a):"loading"!=tierTileByteCountChunks[m].chunk&& 191(m=tierTileByteCountChunks[m].chunk,l=Z.Utils.intValue(m,f.bcStartInChunk))
191));"loading"==g||isNaN(g)||"loading"==l||isNaN(l)||(e=mb+"?"+g.toString()+","+l.toString())}else if("ZoomifyImageFolder"==Z.tileSource){d=c*xa[a]+b;for(e=0;e<a;e++)d+=Na[e];a=mb+"/TileGroup"+Math.floor(d/256)+"/"+a+"-"+b+"-"+c+"."+Z.tileType;if(Z.browser==Z.browsers.IE&&9>Z.browserVersion||0==Rb)a=Z.Utils.cacheProofPath(a);e=a}else if("ZoomifyPFFFile"==Z.tileSource){l="offsetLoading";f=e=0;for(g=Aa-1;g>a;g--)e+=Na[g];e+=c* 192xa[a]+b;g=Math.floor(e/Ga);f=-1==e-1?0:e-1;m=Math.floor(f/Ga);void 0==Ja[g]||"offsetLoading"==Ja[g]||void 0==Ja[m]||"offsetLoading"==Ja[m]?(e=g+","+a+","+b+","+c+","+d,-1==Z.Utils.arrayIndexOf(ha,e)&&(ha[ha.length]=e),k.traceDebugValues("z531",g+","+a+","+b+","+c+","+d),void 0==Ja[g]&&(Ja[g]="offsetLoading",a=Wb+Ga*g*8,b=a+8*Ga,va(a,b,g)),void 0==Ja[m]&&(Ja[m]="offsetLoading",a=Wb+Ga*m*8,b=a+8*Ga,va(a,b,g))):(d=Math.floor(Ja[g][0]),l=Math.floor(Ja[m][0]),m=Ja[m][1],g=Ja[g][1],f=f%Ga*9,m=Math.floor(parseFloat(m.substring(f, 193f+9))),f=e%Ga*9,g=Math.floor(parseFloat(g.substring(f,f+9))),e=0==e?Wb+8*dc:l+m,d+=g,l=0<d-e?Z.tileHandlerPathFull+"?file="+mb+"&requestType=0&begin="+e.toString()+"&end="+d.toString()+"&vers="+Ec.toString()+"&head="+Fc.toString():"z647:"+a+"-"+b+"-"+c);e=l}else"IIIFImageServer"==Z.tileSource?e=formatTilePathIIIFImageServer(a,b,c,d):"ImageServer"==Z.tileSource&&(e=z530(a,b,c,d));return e};this.parseOffsetChunk=function(a){var b=parseInt(a.documentElement.getAttribute("BEGIN"),10),c=a.documentElement.getAttribute("REPLYDATA"); 194a=sc[b];b=Math.floor((b-Wb)/8/Ga);Ja[b]=[];Ja[b]=c.split(",",2);b=0;for(c=ha.length;b<c;b++){var d=ha[b].split(",");d[0]==a&&(void 0!==d[4]&&"image-display"==d[4]?pa[pa.length]=d[1]+"-"+d[2]+"-"+d[3]:"image-backfill"==d[4]&&(za[za.length]=d[1]+"-"+d[2]+"-"+d[3]),ha=Z.Utils.arraySplice(ha,b,1),b--,c--)}0<pa.length&&(pa.sort(),pa=Z.Utils.arrayUnique(pa),k.traceDebugValues("z636",pa),a=k.getStatus("imageSaving")?zb:qa,R(pa,a,"simple","image-display"));0<za.length&&(za.sort(),za=Z.Utils.arrayUnique(za), 195a=k.getStatus("imageSaving")?z599ToSave:ma,R(za,a,"simple","image-backfill"))};this.getClickCoordsAtZoom=function(a,b){var c=this.getClickCoordsInImage(a,b);return new Z.Utils.Point(c.x*b,c.y*b)};this.getClickCoordsInImage=function(a,b,c){a=Z.Utils.event(a);var d=null;if(a){var e=a.type;if("undefined"===typeof b||null==b)b=k.getZoom();if("undefined"===typeof c||null===c)"touchstart"==e||"touchend"==e||"touchcancel"==e?(touch=Z.Utils.getFirstTouch(a),"undefined"!==typeof touch&&(target=touch.target, 196c=new Z.Utils.Point(touch.pageX,touch.pageY))):(target=Z.Utils.target(a),relatedTarget=Z.Utils.relatedTarget(a),c=Z.Utils.getMousePosition(a));"undefined"!==typeof c&&null!==c&&(a=k.z479(c.x,c.y),d=k.z485(a.x,a.y,b))}return d};this.getClickZoomCoords3D=function(a,b,c,d,e){var g=parseFloat(Z.Utils.getResource("z93TIERSKIPTHRESHOLD"));b=k.z479(b.x,b.y);b=k.z485(b.x,b.y,Z.imageZ);var m=E(c,d);a=a.altKey;e?a?m=Z.fitZ:(e=ca(c,Z.fitZ),d-e<g?m=Z.fitZ:d>1+g?m=E(c,1):0<c?m=E(c-1,1):"unconverted"==Z.tileSource&& 197(m=Z.fitZ)):a?m=Z.maxZ:d<1-g?m=E(c,1):c<Aa-1?m=E(c+1,1):1<Z.maxZ&&(m=Z.maxZ);return new Z.Utils.Point3D(b.x,b.y,m)};this.calculateCurrentCenterCoordinates=function(a,b,c){if("undefined"===typeof a||null===a)a=new Z.Utils.Point(parseFloat(C.left),parseFloat(C.top));if("undefined"===typeof c||null===c)c=k.getRotation();0>c&&(c+=360);if("undefined"===typeof b||null===b)b=k.getZoom();var d=Math.round(Z.imageX-(a.x-ta)/b);a=Math.round(Z.imageY-(a.y-ua)/b);c=Z.Utils.getPositionRotated(d,a,Z.imageX,Z.imageY, 198-c);return new Z.Utils.Point(c.x,c.y)};this.z542=function(a,b,c,d){if("undefined"===typeof a||null===a)a=O;if("undefined"===typeof b||null===b)b=!1;return new G(k.z541(b,c?a:null,d),a)};this.z541=function(a,b,c){var d=parseFloat(C.left)-ta,e=parseFloat(C.top)-ua;if(Z.useCanvas)var g=parseFloat(C.width)/ba.width,d=d/g,e=e/g;g=k.getZoom();0!=d&&(d/=g);0!=e&&(e/=g);var d=Z.imageX-d,e=Z.imageY-e,m,f,h;a?(a=-(W/2),f=W/2,m=-(T/2),h=T/2):(a=-(ia/2),f=ia/2,m=-(ja/2),h=ja/2);return new l(d,e,a,f,m,h,g,b,c)}; 199this.z480=function(a,b){var c=k.z479(a,b);return new Z.Utils.Point(c.x-ta,c.y-ua)};this.convertViewportDisplayCoordsToPageCoords=function(a,b){var c=k.convertViewportCoordsToPageCoords(a+ta,b+ua);return new Z.Utils.Point(c.x,c.y)};this.z479=function(a,b){var c=Z.Utils.getElementPosition(hc);return new Z.Utils.Point(a-c.x+ta,b-c.y+ua)};this.convertViewportCoordsToPageCoords=function(a,b){var c=Z.Utils.getElementPosition(hc);return new Z.Utils.Point(a+c.x-ta,b+c.y-ua)};this.convertPageCoordsToImageCoords= 200function(a,b){var c=k.z479(a,b),c=k.z485(c.x,c.y,Z.imageZ);return new Z.Utils.Point(c.x,c.y)};this.convertImageCoordsToPageCoords=function(a,b,c,d){a=k.z478(a,b,c,d);a=k.convertViewportCoordsToPageCoords(a.x,a.y,Z.imageZ);return new Z.Utils.Point(a.x,a.y)};this.z485=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);var e=parseFloat(C.left)+Va,g=parseFloat(C.top)+Wa;a-=e;b-=g;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a, 201b,d),a=viewportClickPt.x,b=viewportClickPt.y);
201return new Z.Utils.Point(a/c+Z.imageX,b/c+Z.imageY)};this.z478=function(a,b,c,d){if("center"==a||isNaN(parseFloat(a)))a=Z.imageCtrX;if("center"==b||isNaN(parseFloat(b)))b=Z.imageCtrY;if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);a=(a-Z.imageX)*c;b=(b-Z.imageY)*c;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);d=parseFloat(C.left)+Va;c=parseFloat(C.top)+ 202Wa;return new Z.Utils.Point(a+d,b+c)};this.convertImageCoordsToViewportEdgeCoords=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);a=(Z.imageX-a)*c;b=(Z.imageY-b)*c;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(ta+a,ua+b)};this.convertViewportEdgeCoordsToImageCoords=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"=== 203typeof d||null===d)d=Z.imageR;0>d&&(d+=360);a-=ta;b-=ua;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(Z.imageX-a/c,Z.imageY-b/c)};this.z468=function(a,b,c){if("undefined"===typeof a||null===a)a=Z.imageW;if("undefined"===typeof b||null===b)b=Z.imageH;var d=a/b>W/T?W/a:T/b;if(90==c||270==c)d=a/b>W/T?W/b:T/a;return d};this.calculateZoomToFill=function(a,b,c){if("undefined"===typeof a||null===a)a=Z.imageW;if("undefined"===typeof b|| 204null===b)b=Z.imageH;var d=a/b>W/T?T/b:W/a;if(90==c||270==c)d=a/b>W/T?T/a:W/b;return d};this.calculateZoomForResize=function(a,b,c,d,e){var g=a,m=Z.imageW*a,l=Z.imageH*a;b=d/b;c=e/c;m<d&&l<e?g=a:m==d&&l<e?g=-1:m<d&&l==e?g=-1:m>d&&l<=e?g=a*b:m<=d&&l>e?g=a*c:m>d&&l>e&&(d=1,1<=b&&1<=c?d=b>c?b:c:1>=b&&1>=c&&(d=b<c?b:c),g=a*d);g<Z.minZ&&(g=Z.minZ);g>Z.maxZ&&(g=Z.maxZ);return g};this.z482=function(a,b){return E(a,b)};this.syncViewportToNavigator=function(a){var b=Z.imageR;0>b&&(b+=360);var c=hb(a.x,a.y, 205Z.imageZ,b,"image");a=Z.imageY;var d=c.y,c=dX=Z.imageX-c.x;a=dY=a-d;0!=b&&(270<=b?(c=dY,a=-dX):180<=b?(c=-dX,a=-dY):90<=b&&(c=-dY,a=dX));b=c*Z.imageZ;a*=Z.imageZ;d=a+ua;C.left=b+ta+"px";C.top=d+"px";S&&la&&(Z.mobileDevice||Math.abs(b)>W/2||Math.abs(a)>T/2)&&v(S,Ta,Fa,"simple",!1,"Updating backfill oversize display")};this.getStatus=function(a){a=Z.Utils.arrayIndexOfObjectValue(Vb,"state",a);return-1==a?!1:Vb[a].status};this.setStatus=function(a,b){var c=!1,d=Z.Utils.arrayIndexOfObjectValue(Vb,"state", 206a);-1==d?(c=b,Vb[Vb.length]={state:a,status:b}):(!Vb[d].status&&b&&(c=!0),Vb[d].status=b);c&&(Z.Utils.validateCallback(a),Z.Viewer.validateViewerStatus(a))};this.traceDebugValues=function(a,b,c,d){c="undefined"!==typeof c&&null!==c?c:null;b=null!==b?b:"";switch(a){case "tilesToDisplay":xc=c;lc=Hb=mc=yc=0;Jb=c;Sb=0;tilesTimeStart=(new Date).getTime();zc=0;window.clearTimeout(Yb);Yb=null;Yb=window.setTimeout(pb,rd);break;case "tilesInCache":yc=c;break;case "z581-image-display":mc+=1;break;case "onTileLoad":Hb+= 2071;Sb=((new Date).getTime()-c)/1E3;zc=Hb/Sb;break;case "z507":c=Z.Utils.arrayIndexOf(xb,b);-1!=c&&(xb.splice(c,1),lc+=1,--Jb);break;case "tilesBackfillToPrecache":qd=c;break;case "onTileBackfillPrecache":Rc+=1;break;case "tilesBackfillToDisplay":xd=Sc=c;break;case "z599":Tc+=1;break;case "displayBackfillTile":c=Z.Utils.arrayIndexOf(wb,b),-1!=c&&(wb.splice(c,1),Vc+=1,--xd)}2!=Z.debug&&3!=Z.debug||Z.Utils.traceTileStatus(xc,yc,mc,Hb,lc,Jb);if(2==Z.debug){var e="undefined"!==typeof d&&null!==d&&0<d.length? 208d.join(", "):"none";c=!0;var g="";switch(a){case "updateView-noChange":g="Updating view: no change of tier.";break;case "tilesToDisplay":g="Tiles to display: "+e;break;case "tilesInCache":g="Tiles in cache: "+e;break;case "tilesToLoad":g="Tiles to load: "+e;break;case "tilesToLoad-backfill":g="Tiles to load-backfill: "+e;break;case "z622-viewportDisplay":a=[];e=0;for(g=d.length;e<g;e++)a[a.length]=d[e].name;g="Tiles from cache-"+b+": "+a.join(", ");break;case "z622-backfillDisplay":a=[];e=0;for(g= 209d.length;e<g;e++)a[a.length]=d[e].name;g="Tiles from cache-"+b+": "+a.join(", ");break;case "z577-image-display":g="Tile requests for display: "+b+e;break;case "z577-image-backfill":g="Tile requests for backfill: "+b+e;break;case "imageRequestTimeout":g="Image request for "+b;break;case "z581-image-display":g="Tile request-display: "+b;c=!1;break;case "z581-image-backfill":g="Tile request-backfill: "+b;c=!1;break;case "z581DelayForOffset":g="Tile not yet being loaded - offset chunk loading in progress: "+ 210b;break;case "onTileLoad":g="Tiles received-display: "+b;c=!1;break;case "z599":g="Tiles received-backfill: "+b;0==Ba.length&&(g+="\n\nTile loading complete for backfill: all requested tiles received.");c=!1;break;case "z532":g="Tile request recorded for after load offset chunk: "+b;break;case "z637":g="Requesting tiles after offset chunk received: "+e;break;case "z531":g="Tile request recorded for after load offset chunk: "+b;c=!1;break;case "z636":g="Requesting tiles after offset chunk received: "+ 211e;c=!1;break;case "z577Retry":g=b;break;case "z507":g="Tile displaying: "+b;c=!1;break;case "blankLine":g=" "}""!=g&&Z.Utils.trace(g,!1,c)}};this.updateProgress=function(a,b){var c=Z,d;0==a&&0==b?(Z.Utils.validateCallback("loadingTilesComplete"),Z.Utils.validateCallback("loadingTilesCompleteGetLabelIDs"),d=void 0):(d=Math.round(100-b/a*100),d=Math.round(d/10));c.updateViewPercent=d;Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&Z.Toolbar.updateProgress(a,b)};
211k.parseGeoCoordinatesXML=function(a){if(a= 212a.getElementsByTagName("SETUP")[0]){geoTop=a.getAttribute("GEOTOP");geoBottom=a.getAttribute("GEOBOTTOM");geoLeft=a.getAttribute("GEOLEFT");geoRight=a.getAttribute("GEORIGHT");var b=geoLeft,c=geoRight,d=geoTop;a=geoBottom;var e=b.substring(0,b.indexOf(",",0)),g=b.substring(b.indexOf(",",0)+1,b.indexOf(",",e.length+1)),m=1;"W"==b.substring(b.indexOf(",",e.length+1+g.length)+1,b.length)&&(m=-1);geoLeftDec=(parseFloat(e)+parseFloat(g)/60)*m;b=c.substring(0,c.indexOf(",",0));e=c.substring(c.indexOf(",", 2130)+1,c.indexOf(",",b.length+1));g=1;"W"==c.substring(c.indexOf(",",b.length+1+e.length)+1,c.length)&&(g=-1);c=(parseFloat(b)+parseFloat(e)/60)*g;b=d.substring(0,d.indexOf(",",0));e=d.substring(d.indexOf(",",0)+1,d.indexOf(",",b.length+1));g=1;"S"==d.substring(d.indexOf(",",b.length+1+e.length)+1,d.length)&&(g=-1);geoTopDec=(parseFloat(b)+parseFloat(e)/60)*g;d=a.substring(0,a.indexOf(",",0));b=a.substring(a.indexOf(",",0)+1,a.indexOf(",",d.length+1));e=1;"S"==a.substring(a.indexOf(",",d.length+1+b.length)+ 2141,a.length)&&(e=-1);a=(parseFloat(d)+parseFloat(b)/60)*e;geoXSpan=c<geoLeftDec?180-geoLeftDec+(180+c):c-geoLeftDec;geoYSpan=geoTopDec-a}};this.setViewNoUpdate=function(a,b,c,d,e,g,m,l,f,h,k){C.left=a;C.top=b;ga.width=c;ga.height=d;ga.left=e;ga.top=g;I.width=m;I.height=l;I.left=f;I.top=h;C.rotation=k};this.setView=function(a,b,c,d,e,g){Xb(a,b,c,d,e,g)};this.zoom=function(a){if("stop"!=a||"stop"!=Z.zooming){switch(a){case "out":0<=Xa&&(Xa-=bc);break;case "in":0>
214=Xa&&(Xa+=bc);break;case "stop":Xa=0}Z.zooming= 2150==Xa?"stop":0<Xa?"in":"out";0!=Xa?Bb||(Z.useCanvas||Z.Utils.clearDisplay(fc),Bb=window.setTimeout(db,Wc)):(La(),k.updateView())}};this.pan=function(a){if("horizontalStop"!=a||"stop"!=Z.panningX)if("verticalStop"!=a||"stop"!=Z.panningY){if(!Z.tracking)switch(a){case "left":0>=Ra&&(Ra+=Cc);break;case "up":0>=Sa&&(Sa+=Cc);break;case "down":0<=Sa&&(Sa-=Cc);break;case "right":0<=Ra&&(Ra-=Cc);break;case "horizontalStop":Ra=0;break;case "verticalStop":Sa=0;break;case "stop":Sa=Ra=0}Z.panningX=0==Ra?"stop": 2160<Ra?"left":"right";Z.panningY=0==Sa?"stop":0<Sa?"up":"down";E(O,1);E(O,1);0!=Ra||0!=Sa?Bb||(Z.useCanvas||Z.Utils.clearDisplay(fc),Bb=window.setTimeout(db,Wc)):(La(),k.updateView())}};this.zoomAndPanToView=function(a,b,c,d,e,g,m){k.zoomAndPanAllStop();if(Z.clickZoomAndPanBlock)Z.clickZoomAndPanBlock=!1;else{if("undefined"===typeof a||null===a)a=Z.imageX;if("undefined"===typeof b||null===b)b=Z.imageY;if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;if("undefined"=== 217typeof e||null===e)e=Xd;if("undefined"===typeof g||null===g)g=fd;if("center"==a||isNaN(parseFloat(a)))a=Z.imageCtrX;if("center"==b||isNaN(parseFloat(b)))b=Z.imageCtrY;if(-1==c||isNaN(parseFloat(c)))c=Z.fitZ;Z.useCanvas||Z.Utils.clearDisplay(fc);if("undefined"===typeof a||null===a)a=Z.initialX;if("undefined"===typeof b||null===b)b=Z.initialY;if("undefined"===typeof d||null===d)d=Z.imageR;"undefined"===typeof c||null===c?c=Z.initialZ:100<c?c/=100:c>Z.maxZ?c=Z.maxZ:c<Z.maxZ&&c>Z.maxZ-.01&&(c=Z.maxZ); 218b=hb(a,b,c,d,"image");a=b.x;b=b.y;c=Ib(c);if(Math.round(a)!=Math.round(Z.imageX)||Math.round(b)!=Math.round(Z.imageY)||Math.round(1E5*c)!=Math.round(1E5*Z.imageZ)||Math.round(d)!=Math.round(Z.imageR))Z.interactive=!1,nc=0,t(a,b,c,d,e,g,m)}};this.zoomAndPanAllStop=function(a,b){Z.interactive&&(Kb&&Kb&&(window.clearTimeout(Kb),Kb=null),Z.tourPlaying&&b&&(k.tourStop(),a=!1),Z.slideshowPlaying&&b&&(k.slideshowStop(),a=!1),Z.smoothPan&&null!==sb&&(Z.mouseIsDown||$c(!0),a=!0),a||k.updateView())};this.syncViewportRelated= 219function(a,b,c,d,e,m,l,f,h,t){Z.sliderZoomVisible&&("undefined"===typeof c||null===c||c)&&(Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&(a=k.getZoom(),Z.Toolbar.syncSliderToViewportZoom(a)),Z.Utils.validateCallback("viewZoomingGetCurrentZoom"));Z.Navigator&&("undefined"===typeof d||null===d||d)&&(Z.comparison&&0!=Lb?Z.Navigator2&&Z.Navigator2.syncToViewport():Z.Navigator&&Z.Navigator.syncToViewport());Z.Utils.validateCallback("viewChanging")};this.z633=function(a,b){B(a,b)&&k.syncViewportRelated()}; 220this.reset=function(a){Z.maskingSelection&&Z.maskClearOnUserAction&&k.clearMask();a?(Z.Utils.setButtonDefaults(buttonReset),k.zoomAndPanToView(Z.priorX,Z.priorY,Z.priorZ,Z.priorR)):k.zoomAndPanToView(Z.initialX,Z.initialY,Z.initialZ,Z.initialR);Tb(!0)};this.toggleDisplaysOther=function(a){a=a?"inline-block":"none";$a&&($a.display=a);I&&(I.display=a);Fb&&(Fb.display=a);Ya&&(Ya.display=a);Za&&(Za.display=a);Zb&&(Zb.display=a)};this.toggleFullViewModeExternal=function(){kd=!0;k.toggleFullViewMode()}; 221this.toggleFullViewMode=function(a,b){Z.maskingSelection&&Z.maskClearOnUserAction&&k.clearMask();Z.ToolbarDisplay&&Z.Toolbar.show(!1);var c=null,d=null;Z.fullViewPrior=Z.fullView;Z.fullView="undefined"!==typeof a&&null!==a?a:!Z.fullView;var e=document.body.style,m=document.documentElement.style,l=Z.ViewerDisplay.style,c=Z.Utils.getElementStyle(Z.pageContainer);Z.fullView?(d=Z.Utils.getContainerSize(Z.pageContainer,Z.ViewerDisplay),gd=d.x,hd=d.y,Ad=e.overflow,Bd=m.overflow,jd=Z.Utils.stringValidate(c.backgroundColor)&& 222"transparent"!=c.backgroundColor?c.backgroundColor:Z.Utils.stringValidate(e.backgroundColor)&&"transparent"!=e.backgroundColor?e.backgroundColor:Z.Utils.getResource("z120"),Cd=l.zIndex,Z.fullScreenSupported&&!Z.fullPageVisible?(d=Z.Utils.getScreenSize(),Z.fullScreenEntering=!0,Z.Utils.fullScreenView(Z.ViewerDisplay,!0)):(d=Z.Utils.getWindowSize(),Z.mobileDevice?(e.width=d.x,e.height=d.y):(e.width="100%",e.height="100%")),c=d.x,d=d.y,e.overflow="hidden",m.overflow="hidden",l.backgroundColor=jd,l.position= 223"fixed",l.zIndex="99999999",Z.autoResize&&Z.Utils.removeEventListener(window,"resize",Z.Viewer.viewerEventsHandler)):(e.overflow=Ad,m.overflow=Bd,l.backgroundColor=jd,l.position="relative",l.zIndex=Cd,Z.fullScreenSupported&&!Z.fullPageVisible&&Z.Utils.fullScreenView(Z.ViewerDisplay,!1,b),e.width=gd,e.height=hd,c=gd,d=hd,isNaN(c)&&(c=Z.ViewerDisplay.clientWidth),isNaN(d)&&(d=Z.ViewerDisplay.clientHeight),kd=!1,Z.autoResize&&Z.Utils.addEventListener(window,"resize",Z.Viewer.viewerEventsHandler));Z.initialFullPage&& 224k.setSizeAndPosition(c,d);e=Z.viewportCurrent.calculateZoomForResize(Z.viewportCurrent.getZoom(),Z.viewerW,Z.viewerH,c,d);Z.Viewer.resizeViewer(c,d,e);e=Z.fullView;m=document.getElementById("buttonFullView");l=document.getElementById("buttonFullViewExit");m&&l&&(m.style.display=e?"none":"inline-block",l.style.display=e?"inline-block":"none");kd?(cc||(e=Z.Utils.getResource("z420"),m=parseFloat(Z.viewerW)-54,l=parseFloat(Z.viewerH)-54,c=Z.Utils.getResource("DEFAULT_FULLVIEWEXITEXTERNALBUTTONCOLOR"), 225cc=new Z.Utils.Button("buttonFullViewExitExternal",e,null,null,null,null,"34px","34px",m+"px",l+"px","mousedown",Cb,"z391EXITEXTERNAL","solid","1px",c,"0px","0px"),Z.ViewerDisplay.appendChild(cc.elmt)),cc.elmt.style.display="inline-block"):cc&&(cc.elmt.style.display="none");Z.fullViewPrior=!1};
225this.getSmoothPanGliding=function(){return eb};this.setSmoothPanGliding=function(a){eb=a};this.fullScreenEscapeHandler=function(a){Z.fullScreenEntering?Z.fullScreenEntering=!1:k.toggleFullViewMode(!1,!0)};this.mouseWheelHandler= 226function(a,b){Z.mouseWheelIsDown=!0;Z.mouseWheelCompleteTimer&&window.clearTimeout(Z.mouseWheelCompleteTimer);Z.mouseWheelCompleteTimer=window.setTimeout(Z.Viewer.z586,Z.mouseWheelCompleteDuration);if(!("zoom"!=Z.sliderFocus||Z.imageSet&&b)){var c=k.z482(O,X*(1+(0<a?bc:-bc)));constrainedZ=Ib(c);constrainedZ!=Z.imageZ&&(Z.zooming=0<a?"in":0>a?"out":"stop",k.z633(constrainedZ))}else if("imageSet"==Z.sliderFocus||b)0<a?Z.Viewer.viewportNext():0>a&&Z.Viewer.viewportPrior()}}; 227Z.ZoomifyToolbar=function(a){function b(){window.clearInterval(va);va=null;var a=document.getElementById("progressTextBoxCenteredDiv");a&&(a=a.firstChild)&&(a.nodeValue="")}function c(a){4>Z.toolbarVisible&&!Z.mobileDevice||8==Z.toolbarVisible||Z.toolbarInternal?d(a):e(!a)}function d(a){J&&(J.display=a?"inline-block":"none")}function e(a){Z.ToolbarMinimized=a;if(J){var b=document.getElementById("buttonContainer"),c=document.getElementById("toolbarBackground"),d=document.getElementById("buttonMinimize"), 228e=document.getElementById("buttonExpand"),f=document.getElementById("logoDivider"),h=0;e&&!qa&&(h=parseFloat(e.style.left)+parseFloat(e.style.width)+4);if(Z.imageFilters)var u=document.getElementById("imageFilterPanelBackground"),n=document.getElementById("buttonContainerImageFilter");var v=Z.toolbarCurrentW;a?(b&&(b.style.display="none"),d&&e&&!qa&&(f&&(f.style.display="none"),d.style.display="none",e.style.display="inline-block"),J.width=h+"px",c&&(c.style.width=h+"px"),u&&n&&(u.style.width="0px", 229n.style.display="none")):(b&&(b.style.display="inline-block"),d&&e&&!qa&&(f&&(f.style.display="inline-block"),d.style.display="inline-block",e.style.display="none"),J.width=v+"px",c&&(c.style.width=v+"px"))}}function h(a){if("undefined"!==typeof trszS&&"undefined"!==typeof btszS){a=(a-Z.minZ)/(Z.maxZ-Z.minZ);var b=parseFloat(trszS.left),c=parseFloat(trszS.left)+parseFloat(trszS.width)-parseFloat(btszS.width)-b;btszS.left=a*c+b+"px"}}function f(a){"undefined"!==typeof btsZ&&(F=!0,a=Z.Utils.getMousePosition(a), 230btsZ.mouseXPrior=a.x,btsZ.mouseYPrior=a.y)}function q(){if("undefined"!==typeof trszS&&"undefined"!==typeof btsZ&&"undefined"!==typeof btszS){var b=parseFloat(trszS.left),c=parseFloat(trszS.left)+parseFloat(trszS.width)-parseFloat(btszS.width),d=parseFloat(btszS.left)+(gb.x-btsZ.mouseXPrior);d<b?d=b:d>c?d=c:btsZ.mouseXPrior=gb.x;btszS.left=d+"px";b=Z.minZ+(d-b)/(c-b)*(Z.maxZ-Z.minZ);c=b-a.getZoom();Z.zooming=0<c?"in":0>c?"out":"stop";a.z633(b)}}function n(b){if(b=Z.Utils.event(b)){var c=b.type,d= 231Z.Utils.target(b);if(d){var e=d.parentNode;if(e){var h=e;tbID=e.id}}d=Z.Utils.relatedTarget(b)}"mousedown"==c&&a&&"buttonAudioOn"!=tbID&&"buttonAudioMuted"!=tbID&&(a.zoomAndPanAllStop(!1,!0),Z.maskingSelection&&Z.maskClearOnUserAction&&a.clearMask());if((Z.interactive||"mousedown"!=c&&"mouseup"!=c||"buttonRotateClockwise"==tbID||"buttonRotateCounterwise"==tbID)&&(!d||"[object HTMLSelectElement]"!=d&&"[object HTMLOptionElement]"!=d)&&!Z.Utils.isRightMouseButton(b)){Z.touchSupport&&b.preventDefault(); 232if(tbID&&-1!=tbID.indexOf("viewportContainer")||F||ka||ea)F?e=document.getElementById("buttonSliderZoom"):ea&&(e=document.getElementById("buttonSliderImageSet")),e&&(tbID=e.id);P(e,c);if(tbID&&"buttonBackground"!=tbID&&c)switch(c){case "click":c=-1!=tbID.toLowerCase().indexOf("checkbox");a&&c&&A(b,tbID);break;case "mouseover":if("trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID)if(Z.Utils.removeEventListener(e.childNodes[0],"mouseover",n),Z.Utils.addEventListener(e.childNodes[1],"mousedown",n), 233Z.Utils.addEventListener(e.childNodes[1],"mouseout",n),F&&h&&Z.Utils.addEventListener(h.childNodes[0],"mouseup",n),ea&&h&&Z.Utils.addEventListener(h.childNodes[0],"mouseup",n),"buttonZoomIn"==tbID||"buttonSliderZoom"==tbID||"buttonZoomOut"==tbID)Z.sliderFocus="zoom";else{if("buttonImageSetPrior"==tbID||"buttonSliderImageSet"==tbID||"buttonImageSetNext"==tbID)Z.sliderFocus="imageSet"}else Z.Utils.addEventListener(e.childNodes[0],"mouseout",n),Z.sliderFocus="trackSli
233derImageSet"==tbID?"imageSet":"zoom"; 234break;case "mousedown":Z.buttonIsDown=!0;!Z.fullView&&document.activeElement&&document.activeElement.blur();"trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID&&-1==tbID.indexOf("trackSliderFilter")?(Z.Utils.removeEventListener(e.childNodes[1],"mousedown",n),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",n),Z.Utils.addEventListener(e.childNodes[2],"mouseup",n),Z.Utils.addEventListener(e.childNodes[2],"mouseout",n),"buttonSliderZoom"==tbID?(f(b),p(b),Z.Utils.addEventListener(document,"mousemove", 235p),ya||(ya=window.setInterval(q,wa)),Z.Utils.addEventListener(document,"mouseup",n)):-1!=tbID.indexOf("buttonSliderFilter")?(imageFilterEventsManager(b,tbID,"sliderStart"),z650Filter(b,tbID),Z.Utils.addEventListener(document,"mousemove",z650Filter),sliderIntervalFilter||(sliderIntervalFilter=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},SLIDERTESTDURATION_FILTER)),Z.Utils.addEventListener(document,"mouseup",n)):"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z650ImageSet(b), 236Z.Utils.addEventListener(document,"mousemove",z650ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet,SLIDERTESTDURATION_IMAGESET)),Z.Utils.addEventListener(document,"mouseup",n))):Z.Utils.addEventListener(document,"mouseup",n);a&&A(b,tbID);break;case "mouseup":Z.buttonIsDown=!1;"trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID&&-1==tbID.indexOf("trackSliderFilter")?(Z.Utils.removeEventListener(e.childNodes[2],"mouseup",n),Z.Utils.removeEventListener(e.childNodes[2], 237"mouseout",n),Z.Utils.addEventListener(e.childNodes[1],"mousedown",n),Z.Utils.addEventListener(e.childNodes[1],"mouseout",n),h&&(F||ka||ea)&&Z.Utils.removeEventListener(h.childNodes[0],"mouseup",n)):Z.Utils.addEventListener(document,"mouseup",n);a&&A(b,tbID);break;case "mouseout":if("trackSliderZoom"!=tbID&&-1==tbID.indexOf("trackSliderFilter")&&"trackSliderImageSet"!=tbID){if(Z.Utils.removeEventListener(e.childNodes[1],"mousedown",n),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",n),Z.Utils.addEventListener(e.childNodes[0], 238"mouseover",n),a&&A(b,tbID),"buttonImageSetPrior"==tbID||"buttonSliderImageSet"==tbID||"trackSliderImageSet"==tbID||"buttonImageSetNext"==tbID||"buttonZoomIn"==tbID||"buttonSliderZoom"==tbID||"buttonZoomOut"==tbID)Z.sliderFocus=2==Z.mouseWheel?"imageSet":"zoom"}else Z.Utils.removeEventListener(e.childNodes[0],"mouseout",n),Z.sliderFocus=2==Z.mouseWheel?"imageSet":"zoom";break;case "touchstart":"buttonSliderZoom"==tbID?(f(b),H(b),Z.Utils.addEventListener(document,"touchmove",H),ya||(ya=window.setInterval(q, 239wa))):-1!=tbID.indexOf("buttonSliderFilter")?(imageFilterEventsManager(b,tbID,"sliderStart"),z654Filter(b,tbID),Z.Utils.addEventListener(document,"touchmove",z654Filter),sliderIntervalFilter||(sliderIntervalFilter=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},SLIDERTESTDURATION_FILTER))):"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z654ImageSet(b),Z.Utils.addEventListener(document,"touchmove",z654ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet, 240SLIDERTESTDURATION_IMAGESET)));Z.Utils.addEventListener(e,"touchend",n);Z.Utils.addEventListener(e,"touchcancel",n);a&&A(b,tbID);break;case "touchend":Z.Utils.addEventListener(e,"touchstart",n);a&&A(b,tbID);break;case "touchcancel":Z.Utils.addEventListener(e,"touchstart",n);a&&A(b,tbID);break;case "MSPointerDown":"buttonSliderZoom"==tbID?(f(b),H(b),Z.Utils.addEventListener(document,"MSPointerMove",H),ya||(ya=window.setInterval(q,wa))):-1!=tbID.indexOf("SliderFilter")?(imageFilterEventsManager(b,tbID, 241"sliderStart"),z654Filter(b,tbID),Z.Utils.addEventListener(document,"MSPointerMove",z654Filter),sliderIntervalFilter||(sliderIntervalFilter=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},SLIDERTESTDURATION_FILTER))):"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z654ImageSet(b),Z.Utils.addEventListener(document,"MSPointerMove",z654ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet,SLIDERTESTDURATION_IMAGESET)));Z.Utils.addEventListener(e, 242"MSPointerUp",n);a&&A(b,tbID);break;case "MSPointerUp":Z.Utils.addEventListener(e,"MSPointerDown",n),a&&A(b,tbID)}}}function A(b,c){var d=b.type,e=b.altKey;if("mousedown"==d||"touchstart"==d)switch(c){case "buttonMinimize":Q.minimize(!0);Z.Navigator&&Z.Navigator.setVisibility(!1);break;case "buttonExpand":Q.minimize(!1);Z.Navigator&&Z.Navigator.setVisibility(!0);break;case "buttonZoomOut":e||a.zoom("out");break;case "buttonZoomIn":e||a.zoom("in");break;case "buttonPanLeft":a.pan("left");break;case "buttonPanUp":a.pan("up"); 243break;case "buttonPanDown":a.pan("down");break;case "buttonPanRight":a.pan("right");break;case "buttonReset":a.reset(e);break;case "buttonHelp":Z.annotations&&null===Z.editMode?Z.Utils.showHelp(Z.Utils.getResource("z32")+Z.Utils.getResource("z30")+Z.Utils.getResource("z29")):Z.Utils.showHelp(Z.Utils.getResource("z32"))}else if("mouseup"==d||"touchend"==d||"touchcancel"==d)if("buttonSliderZoom"==c||F){ya&&(window.clearInterval(ya),ya=null);F&&(Z.Utils.removeEventListener(document,"mousemove",p),Z.Utils.removeEventListener(document, 244"mouseup",n),Z.Utils.removeEventListener(document,"touchmove",H));for(var d=Z.ToolbarDisplay.childNodes,e=0,f=d.length;e<f;e++){var h=d[e],u=h.id;if(u&&-1!=u.indexOf("button"))if("buttonContainer"!=u&&"buttonContainerImageFilter"!=u)Z.Utils.setButtonDefaults(h);else for(var h=h.childNodes,u=0,v=h.length;u<v;u++){var w=h[u],J=w.id;J&&-1!=J.indexOf("button")&&Z.Utils.setButtonDefaults(w)}}F=!1;Z.zooming="stop";a.updateView()}
244else"trackSliderZoom"==c?"undefined"!==typeof trsZ&&"undefined"!==typeof trszS&& 245(d=Z.Utils.getElementPosition(trsZ),d=Z.Utils.getMousePosition(b).x-d.x,e=parseFloat(trszS.width),d=Z.minZ+(d-0)/(e-0)*(Z.maxZ-Z.minZ),d<Z.minZ+.1&&(d=Z.minZ),d>Z.maxZ-.1&&(d=Z.maxZ),e=d-a.getZoom(),Z.zooming=0<e?"in":0>e?"out":"stop",a.z633(d),Z.zooming="stop",a.updateView()):"buttonZoomOut"==c||"buttonZoomIn"==c?(a.zoom("stop"),"buttonZoomOut"==c&&e&&a.toggleSmoothZoom(),"buttonZoomIn"==c&&e&&a.toggleEditMode()):"buttonPanLeft"==c||"buttonPanRight"==c?a.pan("horizontalStop"):"buttonPanUp"==c||"buttonPanDown"== 246c?a.pan("verticalStop"):"buttonHelp"==c?0==Z.debug&&e&&Z.Utils.showGlobals():"buttonFullView"==c?a.toggleFullViewMode(!0):"buttonFullViewExit"==c&&a.toggleFullViewMode(!1);else"mouseout"==d&&("buttonZoomOut"==c||"buttonZoomIn"==c?a.zoom("stop"):"buttonPanLeft"==c||"buttonPanRight"==c?a.pan("horizontalStop"):"buttonPanUp"!=c&&"buttonPanDown"!=c||a.pan("verticalStop"))}function p(a){gb=new Z.Utils.Point(a.clientX,a.clientY)}function H(a){(a=Z.Utils.getFirstTouch(a))&&(gb=new Z.Utils.Point(a.pageX,a.pageY))} 247function P(a,b){if(-1!=a.id.indexOf("button")&&-1==a.id.indexOf("buttonContainer")){var c=a.firstChild,d=a.childNodes[1],e=a.childNodes[2];if(c&&d&&e)if(c=c.style,d=d.style,e=e.style,c.visibility=d.visibility=e.visibility="hidden","mouseover"==b&&"buttonSliderZoom"==a.id&&F)e.visibility="visible";else if("mouseover"==b||"mouseup"==b)d.visibility="visible";else if("mousedown"==b||"mousemove"==b||"touchstart"==b||"MSPointerDown"==b)e.visibility="visible";else if("mouseout"==b||"touchend"==b||"touchcancel"== 248b||"MSPointerUp"==b)c.visibility="visible"}}var Q=this,V=!1;a.getViewportID();if(Z.toolbarInternal)Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONOVERCOLOR"),Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONDOWNCOLOR"),Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONUPCOLOR"),z558Simple();else{Z.skinPath=Z.Utils.stringRemoveTrailingSlashCharacters(Z.skinPath);(new Z.NetConnector).loadXML(Z.skinPath+"/"+Z.Utils.getResource("z200"));var u,J,v=[],w=[],K=[],wa=parseInt(Z.Utils.getResource("z205ZOOM"),10),F=!1, 249ka=!1,ea=!1,ya=null,gb=null,va=null,D=null,R,Y,qa,ma,Qa}this.getInitialized=function(){return V};this.getSkinArray=function(){return v};this.getSkinSizes=function(){return K};this.show=function(a){c(a)};this.setVisibility=function(a){d(a)};this.minimize=function(a){e(a)};this.showProgress=function(){var a=document.getElementById("progressTextBox");a&&(a=a.style)&&(a.display="inline-block")};this.hideProgress=function(){var a=document.getElementById("progressTextBox");a&&(a=a.style)&&(a.display="none")}; 250this.updateProgress=function(a,c){if(Z.progressVisible){va&&window.clearInterval(va);var d,e=document.getElementById("progressTextBoxCenteredDiv");e&&(e=e.firstChild)&&(0==a||0==c?(e.nodeValue="llllllllll",va=window.setInterval(b,parseInt(Z.Utils.getResource("z182")),10)):(d=Math.round(100-c/a*100),d=Math.round(d/10),e.nodeValue=Z.Utils.stringMultiply("l",d)))}};this.setViewport=function(b){a=b;a.getViewportID()};this.parseSkinXML=function(b){Z.skinMode=b.getElementsByTagName("SETUP")[0].attributes.getNamedItem("SKINMODE").nodeValue; 251var d,e;1==Z.skinMode||0==Z.skinMode&&!Z.mobileDevice?(d=b.getElementsByTagName("SETUP")[0].attributes.getNamedItem("FOLDERSTANDARD").nodeValue,e="SIZESSTANDARD"):(d=b.getElementsByTagName("SETUP")[0].attributes.getNamedItem("FOLDERLARGE").nodeValue,e="SIZESLARGE");var f=b.getElementsByTagName("SETUP")[0].attributes.getNamedItem("PROGRESSCOLOR");"undefined"!==typeof f&&null!==f&&(D=b.getElementsByTagName("SETUP")[0].attributes.getNamedItem("PROGRESSCOLOR").nodeValue);f=[];f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("TOOLBARW").nodeValue); 252f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("TOOLBARH").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("LOGOW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("LOGOH").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("DIVIDERW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("DIVIDERH").nodeValue);f[f.length]=
253parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("BUTTONW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("BUTTONH").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("BUTTONSPAN").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("SLIDERBUTTONW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("SLIDERBUTTONH").nodeValue);f[f.length]= 254parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("SLIDERTRACKW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("SLIDERTRACKH").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("SLIDERSPAN").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("PROGRESSW").nodeValue);f[f.length]=parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("PROGRESSH").nodeValue);f[f.length]= 255parseFloat(b.getElementsByTagName(e)[0].attributes.getNamedItem("PROGRESSFONTSIZE").nodeValue);var q,p,A;e="edit"==Z.trackingEditMode?176:Z.tracking?164:"edit"==Z.editMode||"edit"==Z.trackingEditMode?161:"markup"==Z.editMode?152:Z.imageFilters?100:Z.screensaver||Z.preloadVisible||Z.tourPath||Z.slidePath||Z.imageSetPath?77:Z.rotationVisible?58:Z.measureVisible?51:0<Z.helpVisible?45:Z.fullScreenVisible||Z.fullPageVisible?45:Z.resetVisible?35:Z.panButtonsVisible?32:Z.sliderZoomVisible?19:Z.minimizeVisible? 25614:Z.logoVisible?8:6;q=b.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN0");null!==q&&(p=q.nodeValue);q=b.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN"+e.toString());null!==q&&(A=q.nodeValue);if("undefined"!==typeof p&&Z.Utils.stringValidate(p)&&"undefined"!==typeof A&&Z.Utils.stringValidate(A)){p=!1;A=0;for(e+=1;A<e;A++)q=b.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN"+A).nodeValue,Z.Utils.stringValidate(q)?w[A]=d+"/"+q:(w[A]="null",p=!0);p&&Z.Utils.showMessage(Z.Utils.getResource("z279")); 257v=b=w;Z.ToolbarDisplay=Z.Utils.createContainerElement("div","ToolbarDisplay","inline-block","absolute","visible","1px","1px","0px","1px","none","0px","transparent none","0px","0px","normal");J=Z.ToolbarDisplay.style;J.textAlign="left";J.zIndex=(Z.baseZIndex+2).toString();d=new Z.Utils.Graphic("toolbarBackground",Z.skinPath,b[0],"1px","1px","0px","0px");parseFloat(Z.Utils.getResource("z82"));Z.Utils.getResource("z83NOALPHA");Z.ToolbarDisplay.appendChild(d.elmt);K=f;Z.logoVisible&&(Z.Utils.stringValidate(Z.logoCustomPath)? 258(f=Z.Utils.cacheProofPath(Z.logoCustomPath),f=new Z.Utils.Graphic("toolbarLogo",f,null,"1px","1px","1px","1px")):f=new Z.Utils.Graphic("toolbarLogo",Z.skinPath,b[7],"1px","1px","1px","1px"),Z.Utils.stringValidate(Z.logoLinkURL)?(d=document.createElement("a"),d.setAttribute("href",Z.logoLinkURL),d.setAttribute("target",Z.Utils.getResource("z427TARGET")),d.setAttribute("title",Z.Utils.getResource("z360")),d.setAttribute("outline","none"),d.appendChild(f.elmt),Z.ToolbarDisplay.appendChild(d)):(f.elmt.setAttribute("title", 259Z.Utils.getResource("z427DISPLAY")),Z.ToolbarDisplay.appendChild(f.elmt)),0==Z.toolbarVisible||1==Z.toolbarVisible)&&(f=new Z.Utils.Graphic("logoDivider",Z.skinPath,b[8],"1px","1px","1px","1px"),Z.ToolbarDisplay.appendChild(f.elmt));f=Z.Utils.createContainerElement("div","buttonContainer","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal","default");Z.ToolbarDisplay.appendChild(f);Z.Utils.addEventListener(f,"mousedown",Z.Utils.preventDefault); 260Z.Utils.addEventListener(f,"mouseover",Q.backgroundEventsHandler);Z.Utils.addEventListener(f,"touchstart",Z.Utils.preventDefault);d=new Z.Utils.Graphic("buttonBackground",Z.skinPath,b[0],"1px","1px","0px","0px");f.appendChild(d.elmt);Z.Utils.setOpacity(d.elmt,"0","#FBFAFA");(0!=Z.toolbarVisible&&1!=Z.toolbarVisible||Z.mobileDevice)&&Z.minimizeVisible&&(d=new Z.Utils.Button("buttonMinimize",null,Z.skinPath,b[9],b[10],b[11],"1px","1px","1px","1px","mouseover",n,"z363"),Z.ToolbarDisplay.appendChild(d.elmt), 261d=new Z.Utils.Button("buttonExpand",null,Z.skinPath,b[12],b[13],b[14],"1px","1px","1px","1px","mouseover",n,"z341"),Z.ToolbarDisplay.appendChild(d.elmt));Z.zoomButtonsVisible&&(d=new Z.Utils.Button("buttonZoomOut",null,Z.skinPath,b[1],b[2],b[3],"1px","1px","1px","1px","mouseover",n,"z400"),f.appendChild(d.elmt));
261Z.sliderZoomVisible&&(d=new Z.Utils.Graphic("trackSliderZoom",Z.skinPath,b[15],"1px","1px","0px","0px","z385ZOOM"),f.appendChild(d.elmt),Z.Utils.addEventListener(d.elmt,"mousedown",n),Z.Utils.addEventListener(d.elmt, 262"touchstart",n),Z.Utils.addEventListener(d.elmt,"mouseover",n),d=new Z.Utils.Button("buttonSliderZoom",null,Z.skinPath,b[17],b[18],b[19],"1px","1px","1px","1px","mouseover",n,"z385ZOOM"),f.appendChild(d.elmt));Z.zoomButtonsVisible&&(d=new Z.Utils.Button("buttonZoomIn",null,Z.skinPath,b[4],b[5],b[6],"1px","1px","1px","1px","mouseover",n,"z399"),f.appendChild(d.elmt));if(Z.panButtonsVisible){if(Z.zoomButtonsVisible||Z.sliderZoomVisible)d=new Z.Utils.Graphic("panDivider",Z.skinPath,b[20],"1px","1px", 263"1px","1px"),f.appendChild(d.elmt);d=new Z.Utils.Button("buttonPanLeft",null,Z.skinPath,b[21],b[22],b[23],"1px","1px","1px","1px","mouseover",n,"z370");f.appendChild(d.elmt);d=new Z.Utils.Button("buttonPanUp",null,Z.skinPath,b[24],b[25],b[26],"1px","1px","1px","1px","mouseover",n,"z372");f.appendChild(d.elmt);d=new Z.Utils.Button("buttonPanDown",null,Z.skinPath,b[27],b[28],b[29],"1px","1px","1px","1px","mouseover",n,"z369");f.appendChild(d.elmt);d=new Z.Utils.Button("buttonPanRight",null,Z.skinPath, 264b[30],b[31],b[32],"1px","1px","1px","1px","mouseover",n,"z371");f.appendChild(d.elmt)}Z.resetVisible&&(d=new Z.Utils.Button("buttonReset",null,Z.skinPath,b[33],b[34],b[35],"1px","1px","1px","1px","mouseover",n,"z378"),f.appendChild(d.elmt));if(Z.fullScreenVisible||Z.fullPageVisible)null===Z.editMode&&(d=new Z.Utils.Graphic("fullViewDivider",Z.skinPath,b[36],"1px","1px","1px","1px"),f.appendChild(d.elmt)),d=new Z.Utils.Button("buttonFullViewExit",null,Z.skinPath,b[40],b[41],b[42],"1px","1px","1px", 265"1px","mouseover",n,"z391EXIT"),f.appendChild(d.elmt),d=new Z.Utils.Button("buttonFullView",null,Z.skinPath,b[37],b[38],b[39],"1px","1px","1px","1px","mouseover",n,"z391"),f.appendChild(d.elmt);if(1==Z.helpVisible||3==Z.helpVisible)b=new Z.Utils.Button("buttonHelp",null,Z.skinPath,b[43],b[44],b[45],"1px","1px","1px","1px","mouseover",n,"z342"),f.appendChild(b.elmt);Z.progressVisible&&(b=Z.Utils.createContainerElement("div","progressTextBox","inline-block","absolute","hidden","1px","1px","1px","1px", 266"none","0px","transparent none","0px","0px","normal",null,!0),d=K[16],f.appendChild(b),f=document.createTextNode(Z.Utils.getResource("z183")),b.appendChild(Z.Utils.createCenteredElement(f,"progressTextBoxCenteredDiv")),null===D&&(D=Z.Utils.getResource("z183COLOR")),Z.Utils.setTextNodeStyle(f,D,"verdana",d+"px","none","normal","normal","normal","normal","1em","left","none"),Z.Utils.disableTextInteraction(f));Z.ViewerDisplay.appendChild(Z.ToolbarDisplay);Z.toolbarW=K[0];Z.toolbarCurrentW=-1==Z.toolbarW? 267Z.viewerW:Z.toolbarW;Z.toolbarH=u=K[1];Q.setSizeAndPosition(Z.toolbarCurrentW,Z.toolbarH,0,1==Z.toolbarPosition?Z.viewerH-Z.toolbarH:0);a&&a.getStatus("initializedViewport")&&(1==Z.toolbarVisible&&(a.setSizeAndPosition(Z.viewerW,Z.viewerH-Z.toolbarH,0,0),a.validateXYZDefaults(!0)),b=a.getZoom(),h(b));c(1==Z.toolbarVisible||2==Z.toolbarVisible||4==Z.toolbarVisible||7==Z.toolbarVisible);Z.Utils.addEventListener(Z.ToolbarDisplay,"mouseover",Z.Utils.stopPropagation);V||(V=!0,Z.Utils.validateCallback("toolbarInitialized"), 268Z.Viewer.validateViewerReady("toolbarInitialized"))}else Z.Utils.showMessage(Z.Utils.getResource("z278"))};this.setSizeAndPosition=function(a,b,c,d){"undefined"===typeof a||null===a?a=0<Z.toolbarVisible?Z.toolbarCurrentW:0:Z.toolbarCurrentW=a;if("undefined"===typeof b||null===b)b=0<Z.toolbarVisible&&8!=Z.toolbarVisible?u:0;if("undefined"===typeof c||null===c)c=0;if("undefined"===typeof d||null===d)d=1==Z.toolbarPosition?Z.viewerH-u:0;J=Z.ToolbarDisplay.style;J.width=a+"px";J.height=b+"px";J.left= 269c+"px";J.top=d+"px";var e=K[2],f=K[3],h=K[4],n=K[5],v=K[6],w=K[7],q=K[8],p=K[9],A=K[10],ka=K[11],t=K[12],La=K[13];c=K[14];d=K[15];var B=0,Cb=(b-f)/2+1,M=(b-n)/2,F=(b-w)/2,D=1.3*F,H=F+4,P=F+2,Q=1==Z.logoVisible?0:q/2,V=1==Z.logoVisible?0:q/2,wa=q-(v-h),aa=0,L=0;Z.zoomButtonsVisible&&(aa+=2);Z.panButtonsVisible&&(aa+=4,L+=1);Z.resetVisible&&(aa+=1);if(Z.fullScreenVisible||Z.fullPageVisible)aa+=1,L+=1;Z.helpVisible&&(aa+=1,Z.fullScreenVisible||Z.fullPageVisible||(L+=1));Z.progressVisible||(c=0);L=aa* 270q+L*wa;Z.sliderZoomVisible&&(L+=La);Z.imageSet&&Z.sliderImageSetVisible&&(L+=sldrStackSpan);R=Y=qa=ma=overrideZoom=!1;var aa=(1==Z.logoVisible?e+2:0)+(0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&0!=Z.minimizeVisible?q:0),ea=1==Z.panButtonsVisible?4*q+wa:0,ya=1==Z.zoomButtonsVisible?2*q:0,k=1==Z.resetVisible?q:0,va=aa+20+L+20+c;va>a&&(R=!0,va-La>a&&(Y=!0,va-La-c>a&&(qa=!0,va-La-c-aa>a&&(Qa=!0,va-La-c-aa-k>a&&(ma=!0,L-=ea,va-La-c-aa-k-ea>
270a&&(overrideZoom=!0,L-=ya)),L-=k)),c=0),L-=La);ea=(a-L)/2-20+3; 271if(aa=document.getElementById("toolbarBackground"))aa.style.width=a+"px",aa.style.height=b+"px",aa.firstChild.style.width=a+"px",aa.firstChild.style.height=b+"px";if(aa=document.getElementById("buttonContainer"))aa.style.width=L+40+"px",aa.style.height=b+"px",aa.style.left=ea+"px";if(L=document.getElementById("buttonBackground"))L.style.width=a+"px",Z.Utils.graphicSize(L,parseFloat(aa.style.width),parseFloat(aa.style.height)),L.style.left="0px";if(L=document.getElementById("toolbarLogo"))if(ea=L.style)if(qa)ea.display= 272"none";else if(ea.display="inline-block",Z.Utils.graphicSize(L,e,f),ea.left=B+"px",ea.top=Cb+"px",B+=e+2,e=document.getElementById("logoDivider"))Z.Utils.graphicSize(e,h,n),e=e.style,e.left=B+"px",e.top=M+"px";0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&(e=document.getElementById("buttonMinimize"),f=document.getElementById("buttonExpand"),e&&f&&(Cb=e.style,L=f.style,Cb&&L&&(qa?(Cb.display="none",L.display="none"):(Cb.display="inline-block",L.display="inline-block",Z.Utils.buttonSize(e,v,w),Z.Utils.buttonSize(f, 273v,w),Cb.left=B+Q+"px",Cb.top=D+"px",L.left=B+V+"px",L.top=D+"px"))));B=20;if(!overrideZoom){if(D=document.getElementById("buttonZoomOut"))Z.Utils.buttonSize(D,v,w),D=D.style,D.left=B+"px",D.top=F+"px",B+=q;trsZ=document.getElementById("trackSliderZoom");btsZ=document.getElementById("buttonSliderZoom");trsZ&&btsZ&&(trszS=trsZ.style,btszS=btsZ.style,trszS&&btszS&&(R?(trszS.display="none",btszS.display="none"):(trszS.display="inline-block",btszS.display="inline-block",Z.Utils.graphicSize(trsZ,ka,t), 274trszS.left=B-2+"px",trszS.top=H+"px",Z.Utils.buttonSize(btsZ,p,A),btszS.left=parseFloat(trszS.left)+"px",btszS.top=P+"px",B+=La)));if(p=document.getElementById("buttonZoomIn"))Z.Utils.buttonSize(p,v,w),p=p.style,p.left=B+"px",p.top=
274F+"px",B+=q+1}if(!ma){if(p=document.getElementById("panDivider"))Z.Utils.graphicSize(p,h,n),p=p.style,p.left=B+"px",p.top=M+"px",B+=wa;if(p=document.getElementById("buttonPanLeft"))Z.Utils.buttonSize(p,v,w),p=p.style,p.left=B+"px",p.top=F+"px",B+=q;if(p=document.getElementById("buttonPanUp"))Z.Utils.buttonSize(p, 275v,w),p=p.style,p.left=B+"px",p.top=F+"px",B+=q;if(p=document.getElementById("buttonPanDown"))Z.Utils.buttonSize(p,v,w),p=p.style,p.left=B+"px",p.top=F+"px",B+=q;if(p=document.getElementById("buttonPanRight"))Z.Utils.buttonSize(p,v,w),p=p.style,p.left=B+"px",p.top=F+"px",B+=q}!Qa&&(p=document.getElementById("buttonReset"))&&(Z.Utils.buttonSize(p,v,w),p=p.style,p.left=B+"px",p.top=F+"px",B+=q+1);if(p=document.getElementById("fullViewDivider"))Z.Utils.graphicSize(p,h,n),h=p.style,h.left=B+"px",h.top= 276M+"px",B+=wa;if(M=document.getElementById("buttonFullViewExit"))Z.Utils.buttonSize(M,v,w),M=M.style,M.left=B+"px",M.top=F+"px",M.display=Z.fullView?"inline-block":"none";if(M=document.getElementById("buttonFullView"))Z.Utils.buttonSize(M,v,w),M=M.style,M.left=B+"px",M.top=F+"px",B+=q+1,M.display=Z.fullView?"none":"inline-block";if(1==Z.helpVisible||3==Z.helpVisible)if(q=document.getElementById("buttonHelp"))Z.Utils.buttonSize(q,v,w),v=q.style,v.left=B+"px",v.top=F+"px";if(B=document.getElementById("progressTextBox"))if(B= 277B.style)Y?B.display="none":(B.display="inline-block",B.width=c+"px",B.height=d+"px",B.left=a-parseFloat(aa.style.left)-parseFloat(B.width)+"px",B.top=(b-parseFloat(B.height))/2+"px")};this.syncSliderToViewportZoom=function(a){h(a)};this.z457=function(a){n(a)};this.backgroundEventsHandler=function(a){a=Z.Utils.event(a);if(a=Z.Utils.relatedTarget(a)){var b=a.parentNode;b&&(b=b.id)&&(F||ka||ea||-1==b.indexOf("button")||-1!=b.indexOf("buttonContainer")||Z.Utils.setButtonDefaults(a.parentNode))}}}; 278Z.ZoomifyNavigator=function(a){function b(c,d){var e="undefined"!==typeof d&&null!==d?!1:!0,f=e?a:d;if("unconverted"!=Z.tileSource)"ZoomifyImageFile"==Z.tileSource?db=f.formatTilePath(0,0,0):"ZoomifyImageFolder"==Z.tileSource?db=Z.Utils.cacheProofPath(f.getImagePath()+"/TileGroup0/0-0-0."+Z.tileType):"ZoomifyPFFFile"==Z.tileSource?db=f.formatTilePath(0,0,0):"IIIFImageServer"==Z.tileSource?db=f.formatTilePath(0,0,0):"ImageServer"==Z.tileSource&&(db=f.formatTilePath(0,0,0)),E=null,E=new Image,E.onload= 279c,E.onerror=J,"offsetLoading"!=db?(e||(ca[ca.length]={id:d.getViewportID().toString(),image:E}),"ZoomifyImageFile"==Z.tileSource?(new Z.NetConnector).loadImage(db,Z.Utils.createCallback(null,c),"navigator",null):E.src=db):window.setTimeout(function(){b(c)},100);else{var h=f.getUnconvertedImage();"undefined"!==typeof h&&null!==h?(E=f.createUnconvertedImageThumbnail(h),e&&"function"===typeof c?c():ca[ca.length]="undefined"!==typeof d?{id:d.getViewportID().toString(),image:E}:{id:null,image:null}):window.setTimeout(function(){b(c, 280d)},100)}}function c(a){for(var c=0,d=Z.imageSetLength;c<d;c++)b(null,Z["Viewport"+c.toString()]);a()}function d(a,b){"ZoomifyImageFile"==Z.tileSource&&(E=b);var c=Z.Utils.createContainerElement("div","testImageContainer","inline-block","absolute","hidden",nb+"px",pb+"px","0px","0px","none","0px","transparent none","0px","0px","normal",null,!0);c.appendChild(E);c.removeChild(E);c=null;c=E.height;if(0!=E.width&&0!=c){D=Z.Utils.createContainerElement("div","navigatorDisplay"+gb,"inline-block","absolute", 281"hidden",nb+"px",pb+"px",zb+"px",Tb+"px","solid","1px","transparent none","0px","0px","normal",null,!0);R=Z.NavigatorDisplay=D;Y=R.style;Z.slideshow&&Z.Utils.setOpacity(Z.NavigatorDisplay,0);Y.zIndex=(Z.baseZIndex+4).toString();var c=parseFloat(Z.Utils.getResource("z82")),e=Z.Utils.getResource("z83"),f=Z.Utils.getResource("z83NOALPHA"),e=Z.Utils.createContainerElement("div","navigatorBackground","inline-block","absolute","hidden",nb+"px",pb+"px","0px","0px","none","0px",e,"0px","0px","normal",null, 282!0);Z.Utils.setOpacity(e,c,f);D.appendChild(e);qa=e;ma=qa.style;c=Z.Utils.createContainerElement("div","navigatorImageContainer","inline-block","absolute","hidden",nb+"px",pb+"px","0px","0px","none","0px","transparent none","0px","0px","normal",null,!0);c.appendChild(E);E.alt=Z.Utils.getResource("z439");D.appendChild(c);Qa=c;m=Qa.style;r=E;c=r.width;f=r.height;e=Z.Utils.createContainerElement("div","navigatorRectangle","inline-block","absolute","hidden",nb+1+"px",pb+1+"px",zb+"px",Tb+"px","solid", 283"1px","transparent none","0px","0px","normal",null,!0);e.style.borderColor=Z.Utils.stringValidateColorValue(Z.navigatorRectangleColor);D.appendChild(e);G=e;l=G.style;Z.ViewerDisplay.appendChild(D);q(nb,pb,zb,Tb,Xb,c,f);p(1==Z.navigatorVisible||2==Z.navigatorVisible);Z.Utils.addEventListener(R,"mouseover",Z.Utils.stopPropagation);Z.Utils.addEventListener(R,"mousedown",v);Z.Utils.addEventListener(R,"touchstart",wa);Z.Utils.addEventListener(R,"touchmove",F);Z.Utils.addEventListener(R,"touchend",ka); 284Z.Utils.addEventListener(R,"touchcancel",ea);ya||(ya=!0,Z.Utils.validateCallback("navigatorInitialized"),Z.Viewer.validateViewerReady("navigatorInitialized"));H()}else window.setTimeout(function(){d(a,b)},100)}function e(){if(ca&&0<ca.length&&null!==ca[0]&&0<ca[0].image.width){var a=Z.Utils.arrayIndexOfObjectValue(ca,"id","0");if(-1!=a){a=ca[a].image;E=a.cloneNode(!1);a=null;if("undefined"===typeof b)var b=null;d(b,E)}else window.setTimeout(function(){e()},100)}else window.setTimeout(function(){e()}, 285100)}
285function h(a){if(D)if(Z.slideshow&&Z.Utils.setOpacity(D,0),"ZoomifyImageFile"==Z.tileSource&&(E=a),Qa&&E&&0<E.width&&0<E.height){a=E.width;var b=E.height;Qa.appendChild(E);r=D.childNodes[1].firstChild;q(nb,pb,zb,Tb,Xb,a,b);a=Z.ToolbarDisplay&&"inline-block"==Z.ToolbarDisplay.style.display&&!Z.ToolbarMinimized||"undefined"!==typeof slideList&&null!==slideList&&"visible"==slideList.style.visibility;p((1==Z.navigatorVisible||2==Z.navigatorVisible)&&a);D.style.zIndex=(Z.baseZIndex+4).toString(); 286H()}else window.setTimeout(function(){h()},100)}function f(){ya&&(va&&(window.clearInterval(va),va=null),R&&Y&&qa&&ma&&Qa&&m&&r&&G&&l||(R=D,Y=R.style,qa=D.firstChild,ma=qa.style,Qa=D.childNodes[1],m=Qa.style,r=D.childNodes[1].firstChild,G=D.childNodes[2],l=G.style))}function q(a,b,c,d,e,f,h){e||(e=Xb);if("undefined"===typeof a||null===a)a=Z.navigatorW;if("undefined"===typeof b||null===b)b=Z.navigatorH;if("undefined"===typeof c||null===c)c=0;if("undefined"===typeof d||null===d)d=0;R||(R=D);Y||(Y=R.style); 287r=R.childNodes[1].firstChild;0==r.width&&"undefined"!==f&&null!==f&&(r.width=f);0==r.height&&"undefined"!==h&&null!==h&&(r.height=h);R&&Y&&r&&(Z.tracking&&(e=0),"undefined"!==typeof e&&null!==e&&(f=r.width/r.height,h=Z.viewerW/Z.viewerH,e=0==e?h:f,1<f?b=a/e:(a=b,a*=e)),Y.width=a+"px",Y.height=b+"px",Y.left=c+"px",Y.top=d+"px",n(a,b));Z.navigatorW=a;Z.navigatorH=b}function n(a,b){r||(r=D.childNodes[1].firstChild);r&&0!=r.width&&0!=r.height?(ma||(ma=D.firstChild.style),m||(m=D.childNodes[1].style), 288ma&&m&&(ma.width=a+"px",ma.height=b+"px",A(a,b),m.width=r.width+"px",m.height=r.height+"px",m.left=(a-r.width)/2+"px",m.top=(b-r.height)/2+"px",H())):window.setTimeout(function(){n(a,b)},100)}function A(a,b){r||(r=D.childNodes[1].firstChild);if(r){var c=r.width,d=r.height,e=c/d,f=a/c,h=b/d;f<=h?(c=a,d=a/e,navImageT=(b-a/c*d)/2):h<f&&(d=b,c=b*e,navImageL=(a-b/d
288*c)/2);r.width=c;r.height=d}}function p(a){!Y&&D&&(Y=D.style);Y&&(Y.display=a?"inline-block":"none")}function H(){if(a&&a.getStatus("initializedViewport")){Q(); 289P();var b=a.calculateCurrentCenterCoordinates();V(b)}}function P(){if(r&&l){var b=r.width/Z.imageW,c=r.height/Z.imageH,d=a.getZoom(Z.comparison&&gb!=Z.viewportCurrentID),c=Z.viewerH*c/d;l.width=Z.viewerW*b/d+"px";l.height=c+"px"}}function Q(){!m&&D&&(m=D.childNodes[1].style);if(m){var b=a.getRotation();Z.Utils.rotateElement(m,b,!0)}}function V(a){if(r&&l&&m){if("undefined"===typeof a||null===a||0==a.x&&0==a.y)a=new Z.Utils.Point(Z.imageX,Z.imageY);if("undefined"===typeof z||null===z)z=Z.imageZ;var b= 290Z.imageR;0>b&&(b+=360);var c=parseFloat(r.width),d=parseFloat(r.height),b=Z.Utils.rotatePoint(c/Z.imageW*a.x-c/2,d/Z.imageH*a.y-d/2,-b);a=b.x-parseFloat(l.width)/2;c=b.y-parseFloat(l.height)/2;b=parseFloat(Y.width)/2;c=parseFloat(Y.height)/2+c-1;l.left=b+a+(Z.comparison?-1:0)+"px";l.top=c+"px"}}function u(b){if(r&&l&&m){var c=Z.imageZ,d=Z.imageR;0>d&&(d+=360);var e=parseFloat(r.width),f=parseFloat(r.height),h=e/Z.imageW,u=f/Z.imageH,v=Z.imageX*h,n=Z.imageY*u,w=Z.Utils.getPageScroll(),q=b?w.x:0,w= 291b?w.y:0,q=parseFloat(l.left)+q,w=parseFloat(l.top)+w,e=q-parseFloat(Y.width)/2+parseFloat(l.width)/2+e/2,f=w-parseFloat(Y.height)/2+parseFloat(l.height)/2+f/2,v=Z.Utils.getPositionRotated(e,f,v,n,-d),h=Math.round(v.x/h),u=Math.round(v.y/u);b?a.zoomAndPanToView(h,u,c,d):(b=new Z.Utils.Point(h,u),a.syncViewportToNavigator(b));Z.tracking&&a.syncTrackingToViewport()}}function J(){Z.Utils.showMessage(Z.Utils.getResource("z271"))}function v(b){Z.interactive&&(a.zoomAndPanAllStop(!1,!0),Z.mouseIsDown=!0, 292R&&G&&l&&(b=Z.Utils.event(b),G.mouseXPrior=b.clientX,G.mouseYPrior=b.clientY,dragPtStart=new Z.Utils.Point(b.clientX,b.clientY),Z.Utils.addEventListener(R,"mousemove",w),Z.Utils.addEventListener(R,"mouseup",K),Z.Utils.addEventListener(document,"mouseup",K)))}function w(a){if(Z.interactive&&G&&l){var b=parseFloat(l.left),c=parseFloat(l.top);l.left=b+(a.clientX-G.mouseXPrior)+"px";l.top=c+(a.clientY-G.mouseYPrior)+"px";G.mouseXPrior=a.clientX;G.mouseYPrior=a.clientY;u(!1);return!1}}function K(b){if(Z.interactive&& 293(Z.mouseIsDown=!1,R&&G&&l)){document.mousemove=null;document.mouseup=null;Z.Utils.removeEventListener(R,"mousemove",w);Z.Utils.removeEventListener(R,"mouseup",K);Z.Utils.removeEventListener(document,"mouseup",K);b=Z.Utils.event(b);var c=new Z.Utils.Point(b.clientX,b.clientY);if(c=Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)<hb){var d=Z.Utils.getElementPosition(D);l.left=b.clientX-d.x-parseFloat(l.width)/2+"px";l.top=b.clientY-d.y-parseFloat(l.height)/2+"px"}u(c);Z.comparison&& 294c||a.updateView()}}function wa(a){Z.interactive&&(Z.mouseIsDown=!0,a.preventDefault(),R&&G&&l&&(a=Z.Utils.getFirstTouch(a)))&&(a=new Z.Utils.Point(a.pageX,a.pageY),dragPtStart=new Z.Utils.Point(a.x,a.y),G.mouseXPrior=a.x,G.mouseYPrior=a.y)}function F(a){if(Z.interactive&&(a.preventDefault(),Z.mousePan)){if(G&&l&&(a=Z.Utils.getFirstTouch(a))){a=new Z.Utils.Point(a.pageX,a.pageY);var b=parseFloat(l.left),c=parseFloat(l.top);l.left=b+(a.x-G.mouseXPrior)+"px";l.top=c+(a.y-G.mouseYPrior)+"px";G.mouseXPrior= 295a.x;G.mouseYPrior=a.y;u(!1)}return!1}}function ka(b){if(Z.interactive&&(Z.mouseIsDown=!1,R&&G&&l)){if(b=Z.Utils.getFirstTouch(b)){b=new Z.Utils.Point(b.pageX,b.pageY);var c=new Z.Utils.Point(b.x,b.y);if(c=Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)<Ib){var d=Z.Utils.getElementPosition(D);l.left=b.x-d.x-parseFloat(l.width)/2+"px";l.top=b.y-d.y-parseFloat(l.height)/2+"px"}}u(c);a.updateView()}}function ea(b){if(Z.interactive&&(Z.mouseIsDown=!1,R&&G&&l)){if(b=Z.Utils.getFirstTouch(b)){b= 296new Z.Utils.Point(b.pageX,b.pageY);var c=new Z.Utils.Point(b.x,b.y);if(c=Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)<Ib){var d=Z.Utils.getElementPosition(D);l.left=b.x-d.x-parseFloat(l.width)/2+"px";l.top=b.y-d.y-parseFloat(l.height)/2+"px"}}u(c);a.updateView()}}var ya=!1,gb=a.getViewportID().toString(),va,D,R,Y,qa,ma,Qa,m,r,G,l,E,ca=[],hb=parseInt(Z.Utils.getResource("DEFAULT_MOUSECLICKTHRESHOLDNAVIGATOR"),10),Ib=parseInt(Z.Utils.getResource("DEFAULT_TOUCHTAPTHRESHOLDNAVIGATOR"), 29710),nb=Z.navigatorW,pb=Z.navigatorH,zb=Z.navigatorL,Tb=Z.navigatorT,Xb=Z.navigatorFit,db;"multiple"!=Z.imagePath||Z.comparison||Z.overlays&&"0"==a.getViewportID()?b(d):c(e);this.z556=function(a,b){d(a,b)};this.setImage=function(a){Qa&&E&&0<Qa.childNodes.length&&(Z.tracking&&D.removeChild(navigatorTrackingOverlay),Qa.innerHTML="");"undefined"===typeof ca||null===ca||0==ca.length?b(h):(a=Z.Utils.arrayIndexOfObjectValue(ca,"id",gb),-1!=a&&(E=ca[a].image,h(E)))};this.getInitialized=function(){return ya}; 298this.setVisibility=function(a){p(a)};
298this.setSelected=function(a){if(!b)var b=document.getElementById("navigatorBorder"+gb);b&&(b.style.display=a?"inline-block":"none")};this.syncToViewport=function(){H()};this.z657=function(){P()};this.z659=function(){Q()};this.z658=function(a){V(a)};this.z682=function(){ya?f():va=window.setInterval(f,300)};this.setSizeAndPosition=function(a,b,c,d,e,f,h){q(a,b,c,d,e,f,h)};this.getSizeAndPositionNavigatorImage=function(){r||(r=D.childNodes[1].firstChild);var a=null; 299"undefined"!==typeof r.parentNode&&null!==r.parentNode&&(a=r.parentNode.style,a={width:r.width,height:r.height,left:parseFloat(a.left)-1,top:parseFloat(a.top)-1});return a}}; 300Z.NetConnector=function(){function a(a,c,d){var f=a.substring(0,a.indexOf("?")),h=parseFloat(a.substring(a.indexOf("?")+1,a.indexOf(",")));a=parseFloat(a.substring(a.indexOf(",")+1,a.length));h=new Z.Utils.Range(h,h+a);b(f,e,h,c,d)}function b(a,b,e,f,h,n,q){var p=c();if(null===p)Z.Utils.showMessage(Z.Utils.getResource("z295"));else{var A="function"===typeof b;if(A){var H=b;b=function(){window.setTimeout(Z.Utils.createCallback(null,H,p),1)};p.onreadystatechange=function(){4==p.readyState&&(p.onreadystatechange= 301new Function,b())}}try{if("undefined"===typeof e||null===e)p.open("GET",a,A),"loadHTML"==f&&p.setRequestHeader("Content-Type","text/html"),p.send(null);else if("undefined"!==typeof f&&null!==f)if(!Z.localUse||"postXML"!=f&&"postImage"!=f)if("postXML"==f)if(h=null,"annotation"!=q||"undefined"!==typeof Z.annotationPath&&Z.Utils.stringValidate(Z.annotationPath)?"tracking"!=q||"undefined"!==typeof Z.trackingPath&&Z.Utils.stringValidate(Z.trackingPath)||(h=Z.Utils.getResource("ERROR_TRACKINGPATHMISSING")): 302h=Z.Utils.getResource("ERROR_ANNOTATIONPATHMISSING"),null!==h)Z.Utils.showMessage(h,!1,Z.messageDurationStandard,"center");else{var P,Q,D,R,Y;"annotation"==q?(P=Z.annotationPath,D=P.toLowerCase(),Y=Z.Utils.getResource("z69")):"tracking"==q&&(P=Z.trackingPath,D=P.toLowerCase(),Y=Z.Utils.getResource("DEFAULT_TRACKINGXMLFILE"));Q=D.length;".json"!=D.substring(Q-5,Q)&&".xml"!=D.substring(Q-4,Q)&&(R="/"+Y);q=P+R;Z.postingXML=!0;p.open("POST",a+"?file="+q,!0);Z.Utils.defineObjectProperty(p,"file",{value:q, 303writable:!1,enumerable:!1,configurable:!1});p.setRequestHeader("Content-Type","application/xml");p.send(e)}else if("postImage"==f){Z.Utils.showMessage(Z.Utils.getResource("ALERT_IMAGESAVEUPLOADING"),!1,"none","center");Z.postingImage=!0;var V=new FormData;V.append("fileToUpload",e);Z.Utils.addEventListener(p.upload,"progress",Z.Utils.uploadProgress);p.open("POST",a,!0);Z.Utils.defineObjectProperty(p,"zType",{value:"postingImage",writable:!1,enumerable:!1,configurable:!1});p.setRequestHeader("Content-Type", 304"application/upload");p.send(V)}else"ZoomifyImageFile"==Z.tileSource&&("tile"!=f&&(a=Z.Utils.cacheProofPath(a)),p.open("GET",a,!0),p.responseType="arraybuffer",Z.Utils.defineObjectProperty(p,"zType",{value:f,writable:!1,enumerable:!1,configurable:!1}),Z.Utils.defineObjectProperty(p,"zTile",{value:h,writable:!1,enumerable:!1,configurable:!1}),Z.Utils.defineObjectProperty(p,"zChunkNumber",{value:n,writable:!1,enumerable:!1,configurable:!1}),Z.browser==Z.browsers.SAFARI&&p.setRequestHeader("If-Modified-Since", 305"Thu, 01 Dec 1994 16:00:00 GMT"),p.setRequestHeader("Range","bytes="+e.start.toString()+"-"+e.end.toString()),p.send(null));else Z.Utils.showMessage(Z.Utils.getResource("ERROR_UNSUPPORTEDLOCALSAVING"),!1,Z.messageDurationStandard,"center",!0)}catch(ma){d(ma,a,f),p=null,console.log(ma)}}}function c(){var a=null;switch(Z.xmlHttpRequestSupport){case "XMLHttpRequest":a=new XMLHttpRequest;break;case "Msxml2.XMLHTTP.6.0":a=new ActiveXObject("Msxml2.XMLHTTP.6.0");break;case "Msxml2.XMLHTTP.3.0":a=new ActiveXObject("Msxml2.XMLHTTP.3.0"); 306break;case "Microsoft.XMLHTTP":a=new ActiveXObject("Microsoft.XMLHTTP")}return a}function d(a,b,c){1==Z.localUse&&(Z.browser==Z.browsers.CHROME||Z.browser==Z.browsers.OPERA||Z.browser==Z.browsers.IE&&11==Z.browserVersion||Z.browser==Z.browsers.SAFARI&&7<=Z.browserVersion)?Z.Utils.showMessage(Z.Utils.getResource("z288"),!1,Z.messageDurationStandard,"center"):1==Z.localUse&&"ZoomifyImageFile"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z290"),!1,Z.messageDurationShort,"center"):1==Z.localUse&& 307"ZoomifyPFFFile"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z289"),!1,Z.messageDurationShort,"center"):-1!=b.toLowerCase().indexOf(".zif")?Z.Utils.showMessage(Z.Utils.getResource("z256-ZIFBYTERANGE")+c+".",!1,Z.messageDurationShort,"center"):-1!=b.indexOf("ImageProperties.xml")?Z.Utils.showMessage(Z.Utils.getResource("z256-IMAGEXML"),!0,null,"left"):-1!=b.toLowerCase().indexOf(".pff")?Z.Utils.showMessage(Z.Utils.getResource("z256-IMAGEHEADER"),!1,Z.messageDurationShort,"center"):-1!=b.toLowerCase().indexOf("reply_data")? 308Z.Utils.showMessage(Z.Utils.getResource("z256-IMAGEOFFSET"),!1,Z.messageDurationShort,"center"):-1!=b.indexOf(Z.Utils.getResource("z200"))?Z.Utils.showMessage(Z.Utils.getResource("z256-TOOLBARSKINSXML"),!0,null,"left"):Z.Utils.showMessage(Z.Utils.getResource("z256"),!1,Z.messageDurationShort,"center")}function e(a,b){if(a)if(200!==a.status&&0!==a.status&&206!==a.status){var c=a.status,d=404==c?"Not Found":a.statusText;Z.xmlParametersParsing?Z.Utils.showMessage(Z.Utils.getResource("z256-PARAMETERSXML"), 309!0,null,"left"):Z.Toolbar&&!Z.Toolbar.getInitialized()?Z.Utils.showMessage(Z.Utils.getResource("z256-TOOLBARSKINSXML"),!0,null,"left"):"Zoomify
309ImageFile"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z273RANGEREQUESTS")+c+" - "+d,!0,null,"left"):Z.Utils.showMessage(Z.Utils.getResource("z273")+c+" - "+d,!1,Z.messageDurationShort,"center")}else if(c=null,c="undefined"!==typeof Z.annotationPath&&Z.Utils.stringValidate(Z.annotationPath)&&".json"==Z.annotationPath.toLowerCase().substring(Z.annotationPath.length- 3105,Z.annotationPath.length),Z.postingImage&&a.zType&&"postingImage"==a.zType)Z.postingImage=!1,Z.Utils.showMessage(Z.Utils.getResource("ALERT_IMAGESAVESUCCESSFUL"),!1,Z.messageDurationShort,"center");else if(a.response&&a.zType&&"ZoomifyImageFile"==Z.tileSource){if(Z.Viewport)if(c=new Z.Utils.createUint8Array(a.response,0),"header"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFHeader(c);else for(var d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFHeader(c); 311else if("offset"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFOffsetChunk(c,a.zChunkNumber);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFOffsetChunk(c,a.zChunkNumber);else if("byteCount"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFByteCountChunk(c,a.zChunkNumber);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFByteCountChunk(c,a.zChunkNumber);else if("image"==a.zType.substring(0,5))A--,Z.Viewport.parseZIFImage(c, 312a.zTile,a.zType);else if("navigator"==a.zType)if("undefined"===typeof b||null===b)Z.viewportCurrent.parseZIFImage(c,a.zTile,a.zType);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFImage(c,a.zTile,a.zType);else if("gallery"==a.zType)if("undefined"===typeof b||null===b)Z.viewportCurrent.parseZIFImage(c,a.zTile,a.zType);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFImage(c,a.zTile,a.zType);else Z.Utils.showMessage(Z.Utils.getResource("z256-ZIFBYTES"), 313!1,Z.messageDurationShort,"center")}else a.responseXML&&a.responseXML.documentElement&&!c?(c=a.responseXML,h(c,b)):a.responseText&&(d=a.responseText,-1!=d.indexOf("ZAS")&&c?z680(d,b):"ZoomifyImageFolder"==Z.tileSource?(c=Z.Utils.xmlConvertTextToDoc(d),h(c,b)):"ZoomifyImageFile"==Z.tileSource&&(c=Z.Utils.xmlConvertTextToDoc(d),h(c,b)));else Z.Utils.showMessage(Z.Utils.getResource("z272"),!1,Z.messageDurationShort,"center")}function h(a,b){if(a&&a.documentElement){var c=a.documentElement.tagName;if(Z.xmlParametersParsing)Z.Utils.parseParametersXML(a); 314else if("IMAGE_PROPERTIES"==c||"ZIFHEADER"==c||"PFFHEADER"==c){if("ZoomifyImageFile"==Z.tileSource||"ZoomifyImageFolder"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource||"ImageServer"==Z.tileSource)if("multiple"!=Z.imagePath)c="undefined"===typeof b||null===b||0==b?Z.Viewport:Z["Viewport"+b.toString()],c.z602(a);else for(var c=0,d=Z.imageSetLength;c<d;c++)b==c&&Z["Viewport"+c.toString()].z602(a)}else if("PFFOFFSET"==c)if("multiple"!=Z.imagePath)c="undefined"===typeof b||null===b||0==b?Z.Viewport:Z["Viewport"+ 315b.toString()],c.parseOffsetChunk(a);else for(c=0,d=Z.imageSetLength;c<d;c++)b==c&&Z["Viewport"+c.toString()].parseOffsetChunk(a);else"SKINDATA"==c?"function"===typeof Z.xmlCallbackFunction?Z.xmlCallbackFunction(a):Z.Toolbar&&Z.Toolbar.parseSkinXML(a):Z.Utils.showMessage(Z.Utils.getResource("z296"),!0)}else Z.Utils.showMessage(Z.Utils.getResource("z293"),!0)}function f(b,c,d,e){if(A<p)return A++,"ZoomifyImageFile"==Z.tileSource&&("undefined"!==typeof e&&null!==e||"navigator"==d)?a(b,d,e):(c=Z.Utils.createCallback(null, 316q,c),(new n(b,c,d)).start()),!0;-1==Z.Utils.arrayIndexOfObjectValue(V,"sc",b)&&(V[V.length]={sc:b,cb:c,ct:d,t:e},Q||(Q=window.setInterval(function(){var a=V[0];f(a.sc,a.cb,a.ct,a.t)&&(V=Z.Utils.arraySplice(V,0,1));0==V.length&&Q&&(window.clearInterval(Q),Q=null)},P)));return!1}function q(a,b,c){A--;if("function"===typeof a)try{a(c)}catch(d){Z.Utils.showMessage(d.name+Z.Utils.getResource("z245")+b+" "+d.message,!0)}}function n(a,b,c){function d(c){e.onload=null;e.onabort=null;e.onerror=null;f&&window.clearTimeout(f); 317window.setTimeout(function(){b(a,c?e:null)},1)}var e=null,f=null;this.start=function(){e=new Image;var b=function(){d(!1)};e.onload=function(){d(!0)};e.onabort=b;e.onerror=b;f=window.setTimeout(function(){console.log(Z.Utils.getResource("z253"));d(!1);Z.Viewport.traceDebugValues("imageRequestTimeout",c+" timeout: "+a)},H);e.src=a}}var A=0,p=parseInt(Z.Utils.getResource("z140"),10),H=parseFloat(Z.Utils.getResource("z139")),P=Z.Utils.getResource("DEFAULT_IMAGELOADQUEUEDELAY"),Q,V=[];this.loadHTML=function(a, 318c){b(a,c,null)};this.loadXML=function(a,c){"undefined"===typeof c||null===c?b(a,e,null):b(a,function(a){e(a,c)},null)};this.loadJSON=function(a){b(a,e,null)};this.loadByteRange=function(a,c,d,f,h,n){c=new Z.Utils.Range(c,d);b(a,e,c,f,h,n)};this.postXML=function(a,c,d){b(a,e,c,"postXML",null,null,d)};this.postImage=function(a,c){b(a,e,c,"postImage")};this.loadImage=function(a,b,c,d){f(a,b,c,d)}}; 319Z.Utils={addCrossBrowserMethods:function(){document.addEventListener?(this.disableTextInteraction=function(a){if
319(a){var b=a.parentNode.style;b&&(a.parentNode.unselectable="on",b.userSelect="none",b.MozUserSelect="none",b.webkitUserSelect="none",b.webkitTouchCallout="none",b.webkitTapHighlightColor="transparent")}},this.renderQuality=function(a,b){b&&a.style.setProperty("image-rendering","high"==b?"optimizeQuality":"optimizeSpeed",null)},this.setOpacity=function(a,b,c){Z.alphaSupported?a.style.opacity= 320b:c&&(a.style.backgroundColor=c)}):document.attachEvent&&(this.disableTextInteraction=function(a){a&&(a.parentNode.unselectable="on",a.parentNode.onselectstart=function(){return!1})},this.renderQuality=function(a,b){b&&(a.style.msInterpolationMode="high"==b?"bicubic":"nearest-neighbor")},this.setOpacity=function(a,b,c){Z.alphaSupported?(b*=100,a.style.zoom=1,a.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+b+")",a.style.filter="alpha(opacity="+b+")",100==b&&(a.style.filter="")):c&& 321(a.style.backgroundColor=c)})},addCrossBrowserEvents:function(){document.addEventListener?(this.addEventListener=function(a,b,c){a&&("mousewheel"==b&&a.addEventListener("DOMMouseScroll",c,!1),a.addEventListener(b,c,!1))},this.removeEventListener=function(a,b,c){a&&("mousewheel"==b&&a.removeEventListener("DOMMouseScroll",c,!1),a.removeEventListener(b,c,!1))},this.event=function(a){return a},this.target=function(a){return a.target},this.relatedTarget=function(a){return a.relatedTarget},this.isRightMouseButton= 322function(a){var b=!1;if(2==a.which||3==a.which)b=!0;return b},this.preventDefault=function(a){a.preventDefault()},this.stopPropagation=function(a){a.stopPropagation()}):document.attachEvent&&(this.addEventListener=function(a,b,c){if(-1==this._findListener(a,b,c)){var d=function(){var b=window.event;Function.prototype.call?c.call(a,b):(a._currentListener=c,a._currentListener(b),a._currentListener=null)};a.attachEvent("on"+b,d);b={target:a,eventName:b,handler:c,handler2:d};var d=(a.document||a).parentWindow, 323e="l"+this._listenerCounter++;d._allListeners||(d._allListeners={});d._allListeners[e]=b;a._listeners||(a._listeners=[]);a._listeners[a._listeners.length]=e;d._unloadListenerAdded||(d._unloadListenerAdded=!0,d.attachEvent("onunload",this._removeAllListeners))}},this.removeEventListener=function(a,b,c){if(a&&(c=this._findListener(a,b,c),-1!=c)){var d=(a.document||a).parentWindow,e=a._listeners[c];a.detachEvent("on"+b,d._allListeners[e].handler2);a._listeners=Z.Utils.arraySplice(a._listeners,c,1);delete d._allListeners[e]}}, 324this.event=function(a){return window.event},this.target=function(a){return a.srcElement},this.relatedTarget=function(a){var b=null;"mouseover"==a.type?b=a.fromElement:"mouseout"==a.type&&(b=a.toElement);return b},this.isRightMouseButton=function(a){var b=!1;2==a.button&&(b=!0);return b},this.preventDefault=function(a){a&&(a.returnValue=!1)},this.stopPropagation=function(a){a.cancelBubble=!0},this._findListener=function(a,b,c){var d=a._listeners;if(!d)return-1;a=(a.document||a).parentWindow;for(var e= 325d.length-1;0<=e;e--){var h=a._allListeners[d[e]];if(h&&h.eventName==b&&h.handler==c)return e}return-1},this._removeAllListeners=function(){for(id in this._allListeners){var a=this._allListeners[id];a.target.detachEvent("on"+a.eventName,a.handler2);delete this._allListeners[id]}},this._listenerCounter=0)},declareGlobals:function(){Z.pageContainerID=null;Z.imagePath=null;Z.imagePath2=null;Z.parameters=null;Z.xmlParametersPath=null;Z.xMLParametersPath=null;Z.xmlParametersParsing=null;Z.xMLParametersParsing= 326null;Z.skinPath=null;Z.skinMode=null;Z.cacheProofCounter=0;Z.timerCounter=0;Z.browsers=null;Z.browser=null;Z.browserVersion=null;Z.scaleThreshold=null;Z.canvasSupported=null;Z.cssTransformsSupported=null;Z.cssTransformProperty=null;Z.cssTransformNoUnits=null;Z.alphaSupported=null;Z.renderQuality=null;Z.rotationSupported=null;Z.fullScreenSupported=null;Z.arrayMapSupported=null;Z.arraySpliceSupported=null;Z.float32ArraySupported=null;Z.uInt8ArraySupported=null;Z.xmlHttpRequestSupport=null;Z.definePropertySupported= 327null;Z.responseArraySupported=null;Z.responseArrayPrototyped=!1;Z.touchSupport=null;Z.mobileDevice=null;Z.localUse=null;Z.zifSupported=null;Z.onReady=null;Z.onAnnotationReady=null;Z.initialX=null;Z.initialY=null;Z.initialZ=null;Z.initialZoom=null;Z.minZ=null;Z.minZoom=null;Z.maxZ=null;Z.maxZoom=null;Z.zoomSpeed=null;Z.panSpeed=null;Z.smoothPan=null;Z.smoothPanEasing=null;Z.smoothZoom=null;Z.smoothZoomEasing=null;Z.smoothPanGlide=null;Z.autoResize=null;Z.fadeIn=null;Z.fadeInSpeed=null;Z.toolbarInternal= 328null;Z.toolbarVisible=null;Z.toolbarAutoShowHide=null;Z.toolbarW=null;Z.toolbarH=null;Z.toolbarPosition=null;Z.navigatorVisible=null;Z.navigatorW=null;Z.navigatorWidth=null;Z.navigatorH=null;Z.navigatorHeight=null;Z.navigatorL=null;Z.navigatorLeft=null;Z.navigatorT=null;Z.navigatorTop=null;Z.navigatorFit=null;Z.navigatorRectangleColor=null;Z.GalleryScrollPanel=null;Z.galleryVisible=null;Z.galleryAutoShowHide=null;Z.galleryW=null;Z.galleryH=null;Z.galleryL=null;Z.galleryT=null;Z.galleryPosition=null; 329Z.galleryRectangleColor=null;Z.mouseIsDownGallery=null;Z.clickZoom=null;Z.doubleClickZoom=null;Z.doubleClickDelay=null;Z.clickPan=null;Z.clickZoomAndPanBlock=!1;Z.mousePan=null;Z.keys=null;Z.constrainPan=null;Z.constrainPanLimit=null;Z.constrainPanStrict=null;Z.panBuffer=null;Z.tooltipsVisible=null;Z.helpVisible=0;Z.helpPath=null;Z.helpCustom=!1;Z.helpContent=null;Z.helpW=null;Z.helpWidth=null;Z.helpH=null;Z.helpHeight=null;Z.helpL=null;Z.helpLeft=null;Z.helpT=null;Z.helpTop=null;Z.minimizeVisible= 330null;Z.sliderZoomVisible=null;Z.sliderVisible=null;Z.panButtonsVisible=null;Z.resetVisible=null;Z.fullViewVisible=null;Z.fullScreenVisible=null;Z.fullPageVisible=null;Z.initialFullPage=null;Z.fullPageInitial=null;Z.fullScreenEntering=null;Z.progressVisible=null;Z.messagesVisible=null;Z.logoVisible=null;Z.logoLink=null;Z.logoLinkURL=null;Z.logoCustomPath=null;Z.bookmarksGet=null;Z.bookmarksSet=null;Z.copyrightPath=null;Z.watermarkPath=null;Z.watermarks=null;Z.virtualPointerVisible=null;Z.crosshairsVisible= 331null;Z.zoomRectangle=null;Z.rulerVisible=null;Z.units=null;Z.unitsPerImage=null;Z.pixelsPerUnit=null;Z.sourceMagnification=null;Z.magnification=null;Z.rulerListType=null;Z.rulerW=null;Z.rulerWidth=null;Z.rulerH=null;Z.rulerHeight=null;Z.rulerL=null;Z.rulerLeft=null;Z.rulerT=null;Z.rulerTop=null;Z.measureVisible=!1;Z.rotationVisible=null;Z.rotationFree=null;Z.initialR=null;Z.initialRotation=null;Z.imageListPath=null;Z.imageList=null;Z.imageListTitle=null;Z.imageListFolder=null;Z.imageListFileShared= 332!1;Z.imageSetImageListPath=null;Z.imageListTimeout=null;Z.screensaver=!1;Z.screensaverSpeed=null;Z.tour=!1;Z.tourPath=null;Z.tourListTitle=null;Z.tourPlaying=null;Z.tourStop=!1;Z.comparison=!1;Z.comparisonPath=null;Z.syncVisible=null;Z.initialSync=null;Z.syncComparison=null;Z.slideshow=!1;Z.slidePath=null;Z.slideListTitle=null;Z.slideshowPlaying=null;Z.slideTransitionTimeout=null;Z.slideTransitionSpeed=null;Z.slideOpacity=0;Z.audioContent=!1;Z.audioMuted=!1;Z.hotspots=!1;Z.hotspotPath=null;Z.hotspotFolder= 333null;Z.hotspotListTitle=null;Z.hotspotsDrawOnlyInView=!0;Z.captionBoxes=!1;Z.captionsColorsDefault=!0;Z.annotations=!1;Z.annotationPath=null;Z.annotationFolder=null;Z.annotationXMLText=null;Z.annotationJSONObject=null;Z.annotationsAddMultiple=null;Z.annotationsAutoSave=null;Z.annotationPanelVisible=null;Z.annotationPanelVisibleState=!1;Z.saveButtonVisible=null;Z.labelClickSelect=null;Z.simplePath=!1;Z.noPost=!1;Z.noPostDefaults=!1;Z.unsavedEditsTest=!0;Z.maskVisible=null;Z.maskingSelection=!1;Z.maskFadeTimeout= 334null;Z.maskFadeSpeed=null;Z.maskOpacity=0;Z.maskClearOnUserAction=null;Z.externalEditPermissionFunction=null;Z.annotationSort="none";Z.saveHandlerPath=null;Z.saveImageHandlerPath=null;Z.saveImageFull=null;Z.postingXML=!1;Z.postingImage=!1;Z.coordinatesVisible=null;Z.geoCoordinatesPath=null;Z.geoCoordinatesVisible=null;Z.geoCoordinatesFolder=null;Z.preloadVisible=null;Z.imageFilters=null;Z.imageFiltersVisible=null;Z.initialImageFilters=null;Z.brightnessVisible=null;Z.contrastVisible=null;Z.sharpnessVisible= 335null;Z.blurrinessVisible=null;Z.colorRedVisible=null;Z.colorGreenVisible=null;Z.colorBlueVisible=null;Z.colorRedRangeVisible=null;Z.colorGreenRangeVisible=null;Z.colorBlueRangeVisible=null;Z.colorRedRangeMin=null;Z.colorRedRangeMax=null;Z.colorGreenRangeMin=null;Z.colorGreenRangeMax=null;Z.colorBlueRangeMin=null;Z.colorBlueRangeMax=null;Z.saveImageFull=null;Z.saveImageFilename=null;Z.saveImageFormat=null;Z.saveImageCompression=null;Z.saveImageBackColor=null;Z.tracking=!1;Z.trackingPath=null;Z.trackingFolder= 336null;Z.trackingPathProvided=!1;Z.trackingEditMode=!1;Z.trackingFileShared=!1;Z.imageSetTrackingPath=null;Z.trackingPanelPosition=null;Z.trackingCounts=[];Z.trackingTypeCurrent="0";Z.trackingOverlayVisible=!1;Z.initialTrackingOverlayVisible=null;Z.trackingCellCurrent=null;Z.trackingPanelVisible=null;Z.trackingPanelVisibleState=!1;Z.userName=null;Z.userInitials=null;Z.userLogin=null;Z.userNamePrompt=null;Z.userNamePromptRetry=null;Z.userPath=null;Z.userFolder=null;Z.userPathProvided=!1;Z.userList=[]; 337Z.userLogging=!1;Z.UserPanel=null;Z.userPanelVisible=null;Z.userPanelVisibleState=!1;Z.canvas=null;Z.baseZIndex=null;Z.debug=null;Z.imageProperties=null;Z.serverIP=null;Z.serverPort=null;Z.tileHandlerPath=null;Z.tileHandlerPathFull=null;Z.iiifInfoJSONObject=null;Z.iiifScheme=null;Z.iIIFScheme=null;Z.iiifServer=null;Z.iIIFServer=null;Z.iiifPrefix=null;Z.iIIFPrefix=null;Z.iiifIdentifier=null;Z.iIIFIdentifier=null;Z.iiifRegion=null;Z.iIIFRegion=null;Z.iiifSize=null;Z.iIIFSize=null;Z.iiifRotation=null; 338Z.iIIFRotation=null;Z.iiifQuality=null;Z.iIIFQuality=null;Z.iiifFormat=null;Z.iIIFFormat=null;Z.tileW=null;Z.tileH=null;Z.tileType="jpg";Z.tilesPNG=null;Z.freehandVisible=null;Z.textVisible=null;Z.iconVisible=null;Z.rectangleVisible=null;Z.polygonVisible=null;Z.captionTextColor=null;Z.captionBackColor=null;Z.polygonLineColor=null;Z.polygonFillColor=null;Z.captionTextVisible=!0;Z.captionBackVisible=!0;Z.polygonFillVisible=!1;Z.polygonLineVisible=!0;Z.annotationPathProvided=!1;Z.saveHandlerProvided= 339!1;Z.imageSetPathProvided=!1;Z.slidePathProvided=!1;Z.saveImageHandlerProvided=!1;Z.tileSource=null;Z.tileSourceMultiple=null;Z.focal=null;
339Z.quality=null;Z.markupMode=null;Z.editMode=null;Z.editAdmin=!1;Z.editing=null;Z.labelMode="view";Z.editModePrior=Z.editMode;Z.xmlCallbackFunction=null;Z.labelsClickDrag=!1;Z.sliderFocus="zoom";Z.overlayPath=null;Z.overlays=!1;Z.overlayJSONObject=null;Z.overlaysInitialVisibility=null;Z.animation=!1;Z.animationPath=null;Z.animationCount=0;Z.animationAxis=null;Z.animator= 340null;Z.animationFlip=null;Z.slidestack=!1;Z.slidestackPath=null;Z.imageSet=!1;Z.imageSetPath=null;Z.imageSetLength=null;Z.imageSetListPosition=null;Z.imageSetListTitle=null;Z.imageSetStart=null;Z.imageSetLoop=null;Z.sliderImageSetVisible=null;Z.mouseWheelParmeterProvided=null;Z.mouseWheel=null;Z.imageSetHotspotPath=null;Z.hotspotFileShared=!1;Z.imageSetAnnotationPath=null;Z.annotationFileShared=!1;Z.messageDurationLong=parseInt(Z.Utils.getResource("DEFAULT_MESSAGEDURATIONLONG"),10);Z.messageDurationStandard= 341parseInt(Z.Utils.getResource("DEFAULT_MESSAGEDURATIONSTANDARD"),10);Z.messageDurationShort=parseInt(Z.Utils.getResource("DEFAULT_MESSAGEDURATIONSHORT"),10);Z.messageDurationVeryShort=parseInt(Z.Utils.getResource("DEFAULT_MESSAGEDURATIONVERYSHORT"),10);Z.Viewer=null;Z.ViewerDisplay=null;Z.Viewport=null;Z.Toolbar=null;Z.ToolbarDisplay=null;Z.ToolbarMinimized=!1;Z.TooltipDisplay=null;Z.Navigator=null;Z.Navigator2=null;Z.NavigatorDisplay=null;Z.MessageDisplay=null;Z.messages=null;Z.messageDisplayList= 342[];Z.overlayMessage=null;Z.CoordinatesDisplay=null;Z.coordinates=null;Z.coordinatesSave=null;Z.CopyrightDisplay=null;Z.AnnotationPanelDisplay=null;Z.imageW=null;Z.imageH=null;Z.imageD=null;Z.imageCtrX=null;Z.imageCtrY=null;Z.imageX=0;Z.imageY=0;Z.imageZ=0;Z.imageR=0;Z.priorX=0;Z.priorY=0;Z.priorZ=0;Z.priorR=0;Z.preventDupCall=!1;Z.fitZ=null;Z.fillZ=null;Z.zooming="stop";Z.panningX="stop";Z.panningY="stop";Z.rotating="stop";Z.fullView=!1;Z.fullViewPrior=!1;Z.interactive=!0;Z.useCanvas=!0;Z.expressParamsEnabled= 343null;Z.proParamsEnabled=null;Z.specialStorageEnabled=null;Z.enterpriseParamsEnabled=null;Z.updateViewPercent=0;Z.TraceDisplay=null;Z.traces=null;Z.mouseIsDown=!1;Z.buttonIsDown=!1;Z.keyIsDown=!1;Z.mouseWheelIsDown=!1;Z.mouseWheelCompleteDuration=null;Z.mouseWheelCompleteTimer=null;Z.mouseOutDownPoint=null;Z.viewportCurrentID=0;Z.viewportCurrent=null;Z.viewportChangeTimeout=null},detectBrowserFeatures:function(){Z.browsers={UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5,EDGE:6};var a=Z.browsers.UNKNOWN, 344b=0,c=1E4,d=navigator.appName,e=navigator.appVersion,h=!1,f=!1,q=navigator.userAgent.toLowerCase();if(-1!=q.indexOf("edge"))a=Z.browsers.EDGE,b=e;else if("Microsoft Internet Explorer"==d&&window.attachEvent&&window.ActiveXObject)b=q.indexOf("msie"),a=Z.browsers.IE,b=parseFloat(q.substring(b+5,q.indexOf(";",b))),h="undefined"!==typeof document.documentMode;else if("Netscape"==d&&-1!=q.indexOf("trident"))a=Z.browsers.IE,b=11;else if("Netscape"==d&&window.addEventListener){var n=q.indexOf("firefox"), 345d=q.indexOf("safari"),e=q.indexOf("chrome");0<=n?(a=Z.browsers.FIREFOX,b=parseFloat(q.substring(n+8)),c=1E4):0<=d&&(c=q.substring(0,d).lastIndexOf("/"),a=0<=e?Z.browsers.CHROME:Z.browsers.SAFARI,b=parseFloat(q.substring(c+1,d)),c=1E4);d=new Image;d.style.getPropertyValue&&(f=d.style.getPropertyValue("image-rendering"))}else"Opera"==d&&window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera)&&(a=Z.browsers.OPERA,b=parseFloat(e));var A;if(window.XMLHttpRequest)netReq=new XMLHttpRequest, 346A="XMLHttpRequest";else if(window.ActiveXObject)for(d=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0,n=d.length;e<n;e++)try{netReq=new ActiveXObject(d[e]);A=d[e];break}catch(p){}var d="response"in XMLHttpRequest.prototype||"mozResponseArrayBuffer"in XMLHttpRequest.prototype||"mozResponse"in XMLHttpRequest.prototype||"responseArrayBuffer"in XMLHttpRequest.prototype,e=document.createElement("canvas"),e=!(!e.getContext||!e.getContext("2d")),n=!(a==Z.browsers.SAFARI&&4>b||a==Z.browsers.CHROME&& 3472>b),e=e&&n,n=!(a==Z.browsers.CHROME&&2>b),f=h||f?"high":null,H=(document.documentElement||{}).style||{},h=!1,P=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],Q,V;for(;Q=P.shift();)if("undefined"!==typeof H[Q]){h=!0;V=/webkit/i.test(Q);break}var H=h,P="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,u=-1<q.indexOf("iphone")||-1<q.indexOf("ipad")||-1<q.indexOf("ipod"),q=-1<q.indexOf("android")|| 348u,u=!1;if("undefined"!==typeof document.cancelFullScreen||"undefined"!==typeof document.webkitCancelFullScreen||"undefined"!==typeof document.mozCancelFullScreen||"undefined"!==typeof document.oCancelFullScreen||"undefined"!==typeof document.msCancelFullScreen||"undefined"!==typeof document.msExitFullscreen)u=!0;var J=Array.prototype.map,v=Array.prototype.splice,w=!1;try{new Float32Array(1),w=!0}catch(p){}var K=!1;try{new Uint8Array(1),K=!0}catch(p){}var wa=!1;if("function"==typeof Object.defineProperty)try{Object.defineProperty({}, 349"x",{}),wa=!0}catch(p){}var F;switch(window.location.protocol){case "http:":F=!1;break;case "https:":F=!1;break;case "file:":F=!0;break;default:F=null}var ka=!(Z.browser==Z.browsers.IE&&9>Z.browserVersion||Z.browser==Z.browsers.OPERA&&15>Z.browserVersion||Z.browser==Z.browsers.CHROME&&25>Z.browserVersion&&Z.browser==Z.browsers.FIREFOX&&20>Z.browserVersion&&Z.browser==Z.browsers.SAFARI&&5>Z.browserVersion);Z.browser=a;Z.browserVersion=b;Z.scaleThreshold=c;Z.xmlHttpRequestSupport=A;Z.responseArraySupported= 350d;Z.canvasSupported=e;Z.useCanvas=Z.canvasSupported;Z.imageFilters=!Z.useCanvas&&Z.imageFilters?!1:Z.imageFilters;Z.cssTransformsSupported=h;Z.cssTransformProperty=Q;Z.cssTransformNoUnits=V;Z.alphaSupported=n;Z.renderQuality=f;Z.rotationSupported=H;Z.fullScreenSupported=u;Z.arrayMapSupported=J;Z.arraySpliceSupported=v;Z.float32ArraySupported=w;Z.uInt8ArraySupported=K;Z.definePropertySupported=wa;Z.touchSupport=P;Z.mobileDevice=q;Z.localUse=F;Z.zifSupported=ka},parseParametersXML:function(a){Z.xmlParametersParsing= 351!1;var b="";a=a.getElementsByTagName("ZOOMIFY")[0];zImagePath=a.getAttribute("IMAGEPATH");zImagePath2=a.getAttribute("IMAGEPATH2");"undefined"!==typeof zImagePath&&Z.Utils.stringValidate(zImagePath)&&(Z.imagePath=zImagePath);"undefined"!==typeof zImagePath2&&Z.Utils.stringValidate(zImagePath2)&&(Z.imagePath2=zImagePath2);for(var c=Z.Utils.getResource("DEFAULT_PARAMETERLISTTEXT").split(","),d=0,e=c.length;d<e;d++){var h=c[d],f=Z.Utils.stringLowerCaseFirstLetter(h.substr(1)).toUpperCase(),f=a.getAttribute(f); 352"undefined"!==typeof f&&Z.Utils.stringValidate(f)&&(b+=h+"="+f+"&")}c=a.getAttribute("FULLPAGEINITIAL");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zInitialFullPage="+c+"&");c=a.getAttribute("TOOLBARSKINXMLPATH");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zSkinPath="+c+"&");c=a.getAttribute("TOOLBARTOOLTIPS");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zTooltipsVisible="+c+"&");c=a.getAttribute("SHOWTOOLTIPS");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&& 353(b+="zTooltipsVisible="+c+"&");c=a.getAttribute("WATERMARKMEDIA");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zWatermarkPath="+c+"&");c=a.getAttribute("SLIDESXMLPATH");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zSlidePath="+c+"&");c=a.getAttribute("HOTSPOTSXMLPATH");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zHotspotPath="+c+"&");c=a.getAttribute("ANNOTATIONSXMLPATH");"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zAnnotationPath="+c+"&");c=a.getAttribute("SAVETOFILE"); 354"undefined"!==typeof c&&Z.Utils.stringValidate(c)&&(b+="zSaveImageHandlerPath="+c+"&");b="&"==b.slice(-1,b.length)?b.slice(0,b.length-1):b;b=unescape(b);b=Z.Utils.stringUnescapeAmpersandCharacters(b);Z.Utils.arrayClear(Z.parameters);Z.parameters=Z.Utils.parseParameters(b);Z.initialize()},parseParameters:function(a){var b=[];if("object"===typeof a)b=a;else if("string"===typeof a){a=a.split("&");for(var c=0,d=a.length;c<d;c++){var e=a[c],h=e.indexOf("=");if(0<h){var f=e.substring(0,h),e=e.substring(h+ 3551);b[f]=e}}}return b},parametersToDelimitedString:function(a,b){var c="",d;for(d in a)c+=d+"="+a[d].toString()+b;return c=c.slice(0,-1)},setParameters:function(a){var b=this.getResource("z110"),c=this.getResource("z109"),d=this.getResource("z108");Z.expressParamsEnabled=b!=c?!0:!1;Z.expressParamsEnabled||(Z.toolbarInternal=!0,Z.logoLinkURL=Z.Utils.getResource("z427"));var c=this.getResource("z187"),e=this.getResource("z186"),b=this.getResource("z185");Z.proParamsEnabled=c!=e?!0:!1;c=this.getResource("z215"); 356e=this.getResource("z214");this.getResource("z213");Z.specialStorageEnabled=c!=e?!0:!1;var e=this.getResource("z107"),h=this.getResource("z106"),c=this.getResource("z105");Z.enterpriseParamsEnabled=e!=h?!0:!1;Z.skinPath=this.getResource("z201");Z.skinMode=this.getResource("z199");isNaN(parseFloat(this.getResource("z143")))||(Z.initialX=parseFloat(this.getResource("z143")));isNaN(parseFloat(this.getResource("z144")))||(Z.initialY=parseFloat(this.getResource("z144")));isNaN(parseFloat(this.getResource("z145")))|| 357(Z.initialZ=parseFloat(this.getResource("z145")));isNaN(parseFloat(this.getResource("z163")))||(Z.minZ=parseFloat(this.getResource("z163")));isNaN(parseFloat(this.getResource("z153")))||(Z.maxZ=parseFloat(this.getResource("z153")));
357isNaN(parseFloat(this.getResource("z241")))||(Z.zoomSpeed=parseFloat(this.getResource("z241")));isNaN(parseFloat(this.getResource("z175")))||(Z.panSpeed=parseFloat(this.getResource("z175")));isNaN(parseFloat(this.getResource("z111")))||(Z.fadeInSpeed=parseFloat(this.getResource("z111"))); 358Z.fadeIn=0<Z.fadeInSpeed;Z.navigatorVisible=parseInt(this.getResource("z171"),10);null===Z.navigatorW&&(Z.navigatorW=parseInt(this.getResource("z172"),10));null===Z.navigatorH&&(Z.navigatorH=parseInt(this.getResource("z167"),10));null===Z.navigatorL&&(Z.navigatorL=parseInt(this.getResource("z168"),10));null===Z.navigatorT&&(Z.navigatorT=parseInt(this.getResource("z170"),10));null===Z.navigatorFit&&(Z.navigatorFit=this.getResource("z166"));null===Z.navigatorRectangleColor&&(Z.navigatorRectangleColor= 359this.getResource("z169"));Z.galleryVisible=parseInt(this.getResource("DEFAULT_GALLERYVISIBLE"),10);Z.galleryAutoShowHide=2==Z.galleryVisible;Z.galleryW=parseInt(this.getResource("DEFAULT_GALLERYWIDTH"),10);Z.galleryH=parseInt(this.getResource("DEFAULT_GALLERYHEIGHT"),10);Z.galleryM=parseInt(this.getResource("DEFAULT_GALLERYMARGIN"),10);Z.galleryL=parseInt(this.getResource("DEFAULT_GALLERYLEFT"),10);Z.galleryT=parseInt(this.getResource("DEFAULT_GALLERYTOP"),10);Z.galleryPosition=parseFloat(this.getResource("DEFAULT_GALLERYPOSITION")); 360Z.galleryRectangleColor=this.getResource("DEFAULT_GALLERYRECTANGLECOLOR");Z.clickZoom="0"!=this.getResource("z93");Z.doubleClickZoom="0"!=this.getResource("DEFAULT_DOUBLECLICKZOOM");Z.doubleClickDelay=parseFloat(this.getResource("DEFAULT_DOUBLECLICKDELAY"));Z.clickPan="0"!=this.getResource("z92");Z.mousePan="0"!=this.getResource("z164");Z.constrainPan="0"!=this.getResource("z95");Z.constrainPanLimit=parseInt(this.getResource("z95LIMIT"),10);Z.constrainPanStrict="0"!=this.getResource("z95STRICT"); 361Z.panBuffer=parseFloat(this.getResource("z173"));Z.smoothPan=Z.useCanvas&&!Z.comparison&&"0"!=this.getResource("DEFAULT_SMOOTHPAN");Z.smoothPanEasing=parseInt(this.getResource("DEFAULT_SMOOTHPANEASING"),10);Z.smoothPanGlide=parseInt(this.getResource("DEFAULT_SMOOTHPANGLIDE"),10);Z.smoothZoom="0"!=this.getResource("DEFAULT_SMOOTHZOOM");Z.smoothZoomEasing=parseInt(this.getResource("DEFAULT_SMOOTHZOOMEASING"),10);Z.keys="0"!=this.getResource("z146");Z.canvas="0"!=this.getResource("z88");Z.baseZIndex= 362parseInt(this.getResource("DEFAULT_BASEZINDEX"),10);Z.debug=parseInt(this.getResource("z104"),10);Z.toolbarVisible=parseInt(this.getResource("z223"),10);Z.toolbarAutoShowHide=0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&6!=Z.toolbarVisible&&7!=Z.toolbarVisible&&8!=Z.toolbarVisible;Z.toolbarPosition=parseFloat(this.getResource("z222"));Z.logoVisible="0"!=this.getResource("z150");Z.logoCustomPath=this.getResource("z149");Z.minimizeVisible="0"!=this.getResource("z162");Z.sliderZoomVisible="0"!=this.getResource("DEFAULT_SLIDERZOOMVISIBLE"); 363Z.mouseWheel=parseInt(this.getResource("DEFAULT_MOUSEWHEEL"),10);Z.zoomButtonsVisible="0"!=this.getResource("DEFAULT_ZOOMBUTTONSVISIBLE");Z.panButtonsVisible="0"!=this.getResource("z174");Z.resetVisible="0"!=this.getResource("DEFAULT_RESETVISIBLE");Z.tooltipsVisible="0"!=this.getResource("z224");Z.helpVisible=parseInt(this.getResource("z128"),10);Z.helpW=parseInt(this.getResource("z422"),10);Z.helpH=parseInt(this.getResource("z421"),10);Z.progressVisible="0"!=this.getResource("z184");Z.messagesVisible= 364"0"!=this.getResource("DEFAULT_MESSAGESVISIBLE");Z.fullViewVisible="0"!=this.getResource("z121");Z.fullScreenVisible="0"!=this.getResource("z119");Z.fullPageVisible="0"!=this.getResource("z118");Z.initialFullPage="0"!=this.getResource("z141");isNaN(parseFloat(this.getResource("DEFAULT_SCREENSAVERSPEED")))||(Z.screensaverSpeed=parseFloat(this.getResource("DEFAULT_SCREENSAVERSPEED")));
364isNaN(parseFloat(this.getResource("DEFAULT_MASKFADESPEED")))||(Z.maskFadeSpeed=parseFloat(this.getResource("DEFAULT_MASKFADESPEED"))); 365Z.maskClearOnUserAction="0"!=this.getResource("DEFAULT_MASKCLEARONUSERACTION");isNaN(parseFloat(this.getResource("z210")))||(Z.slideTransitionSpeed=parseFloat(this.getResource("z210")));(e=document.getElementById(Z.pageContainerID))&&Z.Utils.getElementStyle(e);if("object"===typeof a&&null!==a){e=this.getResource("z287");Z.annotationPathProvided=void 0!==a.zHotspotPath||void 0!==a.zAnnotationPath||void 0!==a.zAnnotationXMLText||void 0!==a.zAnnotationJSONObject;Z.saveHandlerProvided=void 0!==a.zSaveHandlerPath|| 366void 0!==a.zNoPost&&"1"==a.zNoPost;Z.imageSetPathProvided=void 0!==a.zAnimationPath||void 0!==a.zSlidestackPath;Z.saveImageHandlerProvided=void 0!==a.zSaveImageHandlerPath;Z.mouseWheelParmeterProvided=void 0!==a.zMouseWheel;Z.trackingPathProvided=void 0!==a.zTrackingPath||void 0!==a.zTrackingXMLText||void 0!==a.zTrackingJSONObject;Z.userPathProvided=void 0!==a.zUserPath||void 0!==a.zUserXMLText||void 0!==a.zUserJSONObject;Z.slidePathProvided=Z.imagePath&&-1!=Z.imagePath.indexOf("zSlidePath")||void 0!== 367a.zSlidePath;var h=Z.slidePathProvided||Z.comparison||Z.overlays||Z.slideshow||Z.imageSetPathProvided||Z.animation||Z.slidestack,f;for(f in a)if(!("function"===typeof a[f]&&"zOnAnnotationReady"!==f&&"zOnReady"!==f||h&&("each"==f||"eachSlice"==f||"all"==f||"any"==f||"collect"==f||"detect"==f||"findAll"==f||"select"==f||"grep"==f||"include"==f||"member"==f||"inGroupsOf"==f||"inject"==f||"invoke"==f||"max"==f||"min"==f||"partition"==f||"pluck"==f||"reject"==f||"sortBy"==f||"toArray"==f||"zip"==f||"size"== 368f||"inspect"==f||"_reverse"==f||"_each"==f||"clear"==f||"first"==f||"last"==f||"compact"==f||"flatten"==f||"without"==f||"uniq"==f||"intersect"==f||"clone"==f)||-1!=f.indexOf("this.indexOf")))if("undefined"===typeof Z[Z.Utils.stringLowerCaseFirstLetter(f.substr(1))])h?console.log(e+" "+f):alert(e+" "+f);else if(pValue=a[f],Z.expressParamsEnabled||"zNavigatorVisible"==f)switch(f){case "zOnAnnotationReady":"function"===typeof pValue&&Z.setCallback("annotationPanelInitializedViewer",pValue);break;case "zOnReady":"function"=== 369typeof pValue&&Z.setCallback("readyViewer",pValue);break;case "zInitialX":isNaN(parseFloat(pValue))||(Z.initialX=parseFloat(pValue));break;case "zInitialY":isNaN(parseFloat(pValue))||(Z.initialY=parseFloat(pValue));break;case "zInitialZoom":"fit"==pValue&&(pValue="-1");"fill"==pValue&&(pValue="0");isNaN(parseFloat(pValue))||(Z.initialZ=parseFloat(pValue),Z.initialZ&&0<Z.initialZ&&100>=Z.initialZ&&(Z.initialZ/=100));break;case "zMinZoom":"fit"==pValue&&(pValue="-1");"fill"==pValue&&(pValue="0");isNaN(parseFloat(pValue))|| 370(Z.minZ=parseFloat(pValue),Z.minZ&&0<Z.minZ&&100>=Z.minZ&&(Z.minZ/=100));break;case "zMaxZoom":isNaN(parseFloat(pValue))||(Z.maxZ=parseFloat(pValue),Z.maxZ&&-1!=Z.maxZ&&(Z.maxZ/=100));break;case "zNavigatorVisible":Z.navigatorVisible=parseInt(pValue,10);break;case "zNavigatorRectangleColor":Z.navigatorRectangleColor=pValue;break;case "zToolbarInternal":Z.toolbarInternal=pValue;break;case "zToolbarVisible":Z.toolbarVisible=parseInt(pValue,10);Z.toolbarAutoShowHide=0!=Z.toolbarVisible&&1!=Z.toolbarVisible&& 3716!=Z.toolbarVisible&&7!=Z.toolbarVisible&&8!=Z.toolbarVisible;break;case "zLogoVisible":"0"==pValue&&(Z.logoVisible=!1);break;case "zMinimizeVisible":"0"==pValue&&(Z.minimizeVisible=!1);break;case "zSliderVisible":"0"==pValue&&(Z.sliderZoomVisible=!1);break;case "zZoomButtonsVisible":"0"==pValue&&(Z.zoomButtonsVisible=!1);break;case "zPanButtonsVisible":"0"==pValue&&(Z.panButtonsVisible=!1);break;case "zResetVisible":"0"==pValue&&(Z.resetVisible=!1);break;case "zFullViewVisible":"1"==pValue?(Z.fullScreenVisible= 372!0,Z.fullPageVisible=!1):"0"==pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!1);break;case "zFullScreenVisible":"0"==pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!1);break;case "zFullPageVisible":"1"==pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!0);break;case "zInitialFullPage":"1"==pValue&&(Z.initialFullPage=!0);break;case "zFullPageInitial":alert(Z.Utils.getResource("z275")+" zFullPageInitial is now zInitialFullPage");break;case "zSkinPath":Z.skinPath=pValue;break;case "zTooltipsVisible":"0"== 373pValue&&(Z.tooltipsVisible=!1);break;case "zHelpVisible":Z.helpVisible=parseInt(pValue,10);break;case "zHelpPath":Z.helpPath=pValue;Z.helpCustom=!0;break;case "zHelpWidth":isNaN(parseInt(pValue,10))||(Z.helpW=parseInt(pValue,10));break;case "zHelpHeight":isNaN(parseInt(pValue,10))||(Z.helpH=parseInt(pValue,10));break;case "zHelpLeft":isNaN(parseInt(pValue,10))||(Z.helpL=parseInt(pValue,10));break;case "zHelpTop":isNaN(parseInt(pValue,10))||(Z.helpT=parseInt(pValue,10));break;case "zProgressVisible":"0"== 374pValue&&(Z.progressVisible=!1);break;case "zMessagesVisible":"0"==pValue&&(Z.messagesVisible=!1);break;default:if(Z.proParamsEnabled)switch(f){default:Z.enterpriseParamsEnabled||alert(c+" "+f)}else alert(b+" "+f)}else alert(d+" "+f)}Z.Utils.validateImagePath()},resetParametersXYZ:function(a){isNaN(parseFloat(this.getResource("z143")))||(Z.initialX=parseFloat(this.getResource("z143")));isNaN(parseFloat(this.getResource("z144")))||(Z.initialY=parseFloat(this.getResource("z144")));isNaN(parseFloat(this.getResource("z145")))|| 375(Z.initialZ=parseFloat(this.getResource("z145")));isNaN(parseFloat(this.getResource("z163")))||(Z.minZ=parseFloat(this.getResource("z163")));isNaN(parseFloat(this.getResource("z153")))||(Z.maxZ=parseFloat(this.getResource("z153")));
375if(this.stringValidate(a))for(var b=0,c=a.length;b<c;b++){var d=a[b],e=d.indexOf("=");if(0<e){var h=d.substring(0,e),d=d.substring(e+1);if(this.stringValidate(d))switch(h){case "zInitialX":isNaN(parseFloat(d))||(Z.initialX=parseFloat(d));break;case "zInitialY":isNaN(parseFloat(d))|| 376(Z.initialY=parseFloat(d));break;case "zInitialZoom":"fit"==d&&(d="-1");"fill"==d&&(d="0");isNaN(parseFloat(d))||(Z.initialZ=parseFloat(d),Z.initialZ&&0<Z.initialZ&&100>=Z.initialZ&&(Z.initialZ/=100));break;case "zMinZoom":"fit"==d&&(d="-1");"fill"==d&&(d="0");isNaN(parseFloat(d))||(Z.minZ=parseFloat(d),Z.minZ&&0<Z.minZ&&100>=Z.minZ&&(Z.minZ/=100));break;case "zMaxZoom":isNaN(parseFloat(d))||(Z.maxZ=parseFloat(d),Z.maxZ&&-1!=Z.maxZ&&(Z.maxZ/=100))}}}},validateImagePath:function(a){a="undefined"!== 377typeof a&&Z.Utils.stringValidate(a)?a:Z.imagePath;if(null!==a){var b=this.getResource("z213");if(-1!=a.toLowerCase().indexOf(".zif"))Z.zifSupported?(Z.tileSource="ZoomifyImageFile",Z.Utils.validateResponseArrayFunctionality()):alert(this.getResource("z16"));else if(-1!=a.toLowerCase().indexOf(".jpg")||-1!=a.toLowerCase().indexOf(".png"))Z.tileSource="unconverted";else if(-1!=a.toLowerCase().indexOf(".pff"))Z.specialStorageEnabled?(Z.tileSource="ZoomifyPFFFile",a=Z.tileHandlerPath,Z.tileHandlerPathFull= 378a):alert(b);else if(Z.Utils.stringValidate(Z.iiifServer)){Z.tileSource="IIIFImageServer";a="undefined"!=typeof Z.iiifScheme&&Z.Utils.stringValidate(Z.iiifScheme)?Z.iiifScheme+"://":"https://";var b="undefined"!=typeof Z.iiifServer&&Z.Utils.stringValidate(Z.iiifServer)?Z.iiifServer+"/":null,c="undefined"!=typeof Z.iiifPrefix&&Z.Utils.stringValidate(Z.iiifPrefix)?Z.iiifPrefix+"/":null,d="undefined"!=typeof Z.iiifIdentifier&&Z.Utils.stringValidate(Z.iiifIdentifier)?Z.iiifIdentifier:null;Z.imagePath= 379a&&b&&d?a+b+c+d:Z.Utils.getResource("ERROR_SETTINGIIIFIMAGEPATH")}else Z.Utils.stringValidate(Z.tileHandlerPath)?Z.Utils.stringValidate(Z.tileHandlerPath)&&(Z.specialStorageEnabled?(Z.tileSource="ImageServer",a=Z.tileHandlerPath,Z.tileHandlerPathFull=a):alert(b)):Z.tileSource="ZoomifyImageFolder"}else if(Z.imageSet||Z.slideshow)Z.tileSourceMultiple=!0},clearImageParameters:function(){Z.imagePath=null;Z.imagePath2=null;Z.parameters=null;Z.xmlParametersPath=null;Z.xmlParametersParsing=null;Z.initialX= 380null;Z.initialY=null;Z.initialZ=null;Z.minZ=null;Z.maxZ=null;Z.geoCoordinatesPath=null;Z.geoCoordinatesVisible=null;Z.geoCoordinatesFolder=null;Z.tour=!1;Z.tourPath=null;Z.tourPlaying=null;Z.tourStop=!1;Z.hotspots=!1;Z.hotspotPath=null;Z.hotspotFolder=null;Z.annotations=!1;Z.annotationPath=null;Z.annotationPanelVisible=null;Z.annotationFolder=null;Z.annotationJSONObject=null;Z.annotationXMLText=null;Z.labelIconsInternal=null;Z.annotationsAddMultiple=null;Z.annotationsAutoSave=null;Z.postingXML=!1; 381Z.postingImage=!1;Z.initialR=null;Z.unitsPerImage=null;Z.pixelsPerUnit=null;Z.sourceMagnification=null;Z.imageProperties=null;Z.annotationPathProvided=!1;Z.imageSetPathProvided=!1;Z.slidePathProvided=!1;Z.tileSource=null;Z.tileSourceMultiple=null;Z.focal=null;Z.quality=null;Z.tracking||(Z.markupMode=null,Z.editMode=null,Z.editAdmin=!1,Z.editing=null,Z.labelMode="view",Z.editModePrior=Z.editMode);Z.sliderFocus="zoom";Z.animation=!1;Z.animationPath=null;Z.animationCount=0;Z.animationAxis=null;Z.animator= 382null;Z.animationFlip=null;Z.slidestack=!1;Z.slidestackPath=null;Z.brightnessVisible=null;Z.contrastVisible=null;Z.sharpnessVisible=null;Z.blurrinessVisible=null;Z.colorRedVisible=null;Z.colorGreenVisible=null;Z.colorBlueVisible=null;Z.colorRedRangeVisible=null;Z.colorGreenRangeVisible=null;Z.colorBlueRangeVisible=null;Z.colorRedRangeMin=null;Z.colorRedRangeMax=null;Z.colorGreenRangeMin=null;Z.colorGreenRangeMax=null;Z.colorBlueRangeMin=null;Z.colorBlueRangeMax=null;Z.gammaVisible=null;Z.gammaRedVisible= 383null;Z.gammaGreenVisible=null;Z.gammaBlueVisible=null;Z.hueVisible=null;Z.saturationVisible=null;Z.lightnessVisible=null;Z.whiteBalanceVisible=null;Z.grayscaleVisible=null;Z.thresholdVisible=null;Z.inversionVisible=null;Z.normalizeVisible=null;Z.equalizeVisible=null;Z.edgesVisible=null;Z.sepiaVisible=null;Z.mouseWheelParmeterProvided=null;Z.mouseWheel=null;Z.imageSetHotspotPath=null;Z.hotspotFileShared=!1;Z.imageSetAnnotationPath=null;Z.annotationFileShared=!1;Z.imageW=null;Z.imageH=null;Z.imageD= 384null;Z.imageCtrX=null;Z.imageCtrY=null;Z.imageX=0;Z.imageY=0;Z.imageZ=0;Z.imageR=0;Z.fitZ=null;Z.fillZ=null;Z.zooming="stop";Z.panningX="stop";Z.panningY="stop";Z.rotating="stop";Z.fullView=!1;Z.fullViewPrior=!1;Z.iiifInfoJSONObject=null;Z.iiifIdentifier=null;Z.iiifRegion=null;Z.iiifSize=null;Z.iiifRotation=null;Z.iiifQuality=null;Z.iiifFormat=null},getResource:function(a){var b="";switch(a){case "z110":b="Enable Express parameters";break;case "z109":b="Changing This Violates License Agreement";break; 385case "z108":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Express, Pro, and Enterprise editions: ";break;case "z187":b="Changing This Violates License Agreement";break;case "z186":b="Changing This Violates License Agreement";break;case "z185":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Pro and Enterprise editions: ";break;case "z215":b="Changing this violates License Agreement";break; 386case "z214":b="Changing this violates License Agreement";break;case "z213":b="Support for Zoomify Image File (PFF) storage and other special storage options is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Enterprise edition.";break;case "z107":b="Changing this violates License Agreement";break;case "z106":b="Changing this violates License Agreement";break;case "z105":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Enterprise edition: "; 387break;case "DEFAULT_PARAMETERLISTTEXT":b="zImagePath,zImagePath2,zOnAnnotationReady,zOnReady,zInitialX,zInitialY,zInitialZoom,zMinZoom,zMaxZoom,zNavigatorVisible,zToolbarInternal,zToolbarVisible,zLogoVisible,zMinim
387izeVisible,zSliderVisible,zZoomButtonsVisible,zPanButtonsVisible,zResetVisible,zFullViewVisible,zFullScreenVisible,zFullPageVisible,zInitialFullPage,zSkinPath,zTooltipsVisible,zHelpVisible,zHelpPath,zHelpWidth,zHelpHeight,zHelpLeft,zHelpTop,zProgressVisible,zMessagesVisible,zZoomSpeed,zPanSpeed,zFadeInSpeed,zInteractive,zClickZoom,zDoubleClickZoom,zDoubleClickDelay,zClickPan,zMousePan,zKeys,zConstrainPan,zPanBuffer,zSmoothPan,zSmoothPanEasing,zSmoothPanGlide,zSmoothZoom,zSmoothZoomEasing,zAutoResize,zCanvas,zBaseZIndex,zDebug,zImageProperties,zNavigatorWidth,zNavigatorHeight,zNavigatorLeft,zNavigatorTop,zNavigatorFit,zNavigatorRectangleColor,zGalleryVisible,zGalleryWidth,zGalleryHeight,zGalleryLeft,zGalleryTop,zGalleryPosition,zToolbarPosition,zLogoCustomPath,zBookmarksGet,zBookmarksSet,zCopyrightPath,zWatermarkPath,zVirtualPointerVisible,zCrosshairsVisible,zZoomRectangle,zRulerVisible,zRulerListType,zRulerWidth,zRulerHeight,zRulerLeft,zRulerTop,zUnits,zUnitsPerImage,zPixelsPerUnit,zSourceMagnification,zMagnification,zMeasureVisible,zRotationVisible,zInitialRotation,zImageListPath,zScreensaver,zScreensaverSpeed,zTourPath,zTourListTitle,zComparisonPath,zSyncVisible,zInitialSync,zSlidePath,zSlideListTitle,zHotspotPath,zHotspotListTitle,zHotspotsDrawOnlyInView,zCaptionBoxes,zCaptionTextColor,zCaptionBackColor,zPolygonLineColor,zPolygonFillColor,zCaptionTextVisible,zCaptionBackVisible,zPolygonLineVisible,zPolygonFillVisible,zCoordinatesVisible,zGeoCoordinatesPath,zPreloadVisible,zOverlayPath,zOverlayJSONObject,zAnimationPath,zAnimationAxis,zAnimator,zAnimationFlip,zImageSetSliderVisible,zMouseWheel,zTilesPNG,zTileW,zTileH,zImageFiltersVisible,zInitialImageFilters,zBrightnessVisible,zContrastVisible,zSharpnessVisible,zBlurrinessVisible,zColorRedVisible,zColorGreenVisible,zColorBlueVisible,zColorRedRangeVisible,zColorGreenRangeVisible,zColorBlueRangeVisible,zGammaVisible,zGammaRedVisible,zGammaGreenVisible,zGammaBlueVisible,zHueVisible,zSaturationVisible,zLightnessVisible,zWhiteBalanceVisible,zNormalizeVisible,zEqualizeVisible,zNoiseVisible,zGrayscaleVisible,zThresholdVisible,zInversionVisible,zEdgesVisible,zSepiaVisible,zAnnotationPath,zAnnotationPanelVisible,zAnnotationXMLText,zLabelIconsInternal,zAnnotationJSONObject,zAnnotationsAddMultiple,zAnnotationsAutoSave,zSaveButtonVisible,zLabelClickSelect,zSimplePath,zNoPost,zNoPostDefaults,zUnsavedEditsTest,zAnnotationSort,zMaskVisible,zMaskFadeSpeed,zMaskClearOnUserAction,zFreehandVisible,zTextVisible,zIconVisible,zRectangleVisible,zPolygonVisible,zMarkupMode,zEditMode,zSlidestackPath,zSaveHandlerPath,zSaveImageHandlerPath,zSaveImageFull,zSaveImageFilename,zSaveImageFormat,zSaveImageCompression,zSaveImageBackColor,zTrackingPath,zTrackingEditMode,zTrackingAuto,zTrackingPanelVisible,zInitialTrackingOverlayVisible,zUserLogin,zUserNamePrompt,zUserPath,zUserPanelVisible,zServerIP,zServerPort,zTileHandlerPath,zIIIFScheme,zIIIFServer,zIIIFPrefix,zIIIFIdentifier,zIIIFRegion,zIIIFSize,zIIIFRotation,zIIIFQuality,zIIIFFormat,zImageW,zImageH,zFocal,zQuality"; 388break;case "z125":b="0";break;case "z124":b="8192";break;case "z123":b="1060";break;case "z90":b="ZoomifyImageFile"==Z.tileSource?"1024":"256";break;case "z90-PFF":b="256";break;case "z221":b="IIIFImageServer"!=Z.tileSource?"256":"512";break;case "z219":b="IIIFImageServer"!=Z.tileSource?"256":"512";break;case "z140":b="300";break;case "z139":b="60000";break;case "DEFAULT_IMAGELOADQUEUEDELAY":b="100";break;case "z218":b="1.15";break;case "z220":b="300";break;case "z81":b="6";break;case "z78":b="3"; 389break;case "z80":b="5";break;case "z77":b="3";break;case "z79":b="3";break;case "z76":b="2";break;case "z75":b="0";break;case "z173":b=Z.mobileDevice?"1":"1.5";Z.rotationVisible&&(b="2");break;case "z173UNCONVERTED":b=Z.mobileDevice?Z.rotationVisible?"2":"1":"10";break;case "DEFAULT_z310SIZEMAXBROWSER":b="10000";break;case "DEFAULT_z310SIZEMAXFIREFOX":b="4000";break;case "DEFAULT_z310SIZEMAXMOBILE":b="3000";break;case "DEFAULT_z310SIZEMAXIMAGESET":b="1000";break;case "z74":reTxt=Z.mobileDevice?"1": 390"2";break;case "z88":b="1";break;case "DEFAULT_BASEZINDEX":b="2000";break;case "DEFAULT_VALIDATEVIEWRETRYLIMIT":b="2";break;case "DEFAULT_VALIDATEVIEWRETRYDELAY":b="1000";break;case "z104":b="0";break;case "DEFAULT_MOUSECLICKTHRESHOLDVIEWPORT":b=4;break;case "DEFAULT_MOUSECLICKTHRESHOLDTIMEVIEWPORT":b=500;break;case "DEFAULT_MOUSECLICKTHRESHOLDHOTSPOT":b=4;break;case "DEFAULT_TOUCHTAPTHRESHOLDVIEWPORT":b=Z.mobileDevice?6:4;break;case "DEFAULT_TOUCHTAPTHRESHOLDTIMEVIEWPORT":b=500;break;case "DEFAULT_MOUSECLICKTHRESHOLDNAVIGATOR":b= 3914;break;case "DEFAULT_TOUCHTAPTHRESHOLDNAVIGATOR":b=Z.mobileDevice?6:3;break;case "z175":b="5";break;case "z176":b="10";break;case "z241":b="5";break;case "z242":b="0.02";break;case "z238":b="30";break;case "z240":b="20";break;case "z239":b="800";break;case "z93TIERSKIPTHRESHOLD":b="0.2";break;case "DEFAULT_ROTATIONSTEPDEGREES":b="1";break;case "DEFAULT_ROTATIONSTEPDURATION":b="1";break;case "z122":b="10";break;case "DEFAULT_AUTORESIZESKIPDURATION":b="10";break;case "DEFAULT_MOUSEWHEEL":b="1";break; 392case "DEFAULT_MOUSEWHEELANIMATION":b="1";break;case "DEFAULT_MOUSEWHEELSLIDESTACK":b="1";break;case "z165":b="300";break;case "z111":b="5";break;case "z112":b="0.067";break;case "z146":b="1";break;case "z164":b="1";break;case "z92":b="1";break;case "z93":b="1";break;case "DEFAULT_DOUBLECLICKZOOM":b="1";break;case "DEFAULT_DOUBLECLICKDELAY":b="250";break;case "z95":b="1";break;case "z95LIMIT":b="2";break;case "z95STRICT":b="0";break;case "DEFAULT_SMOOTHPAN":b="1";break;case "DEFAULT_SMOOTHPANEASING":b= 393"2";break;case "DEFAULT_SMOOTHPANGLIDE":b="2";break;case "DEFAULT_SMOOTHZOOM":b="1";break;case "DEFAULT_SMOOTHZOOMEASING":b="2";break;case "z143":b=null;break;case "z144":b=null;break;case "z145":b=null;break;case "z163":b=null;break;case "z153":b="1";break;case "z83":b="#FBFAFA";break;case "z83NOALPHA":b="#FBFAFA";break;case "z83LIGHT":b="#FEFEFE";break;case "z82":b="0.75";break;case "DEFAULT_BACKGROUNDSMALLDALPHA":b="0.75";break;case "z87":b="#C0C0C0";break;case "z200":b="skinFiles.xml";break;case "z201":b= 394"Assets/Skins/Default";break;case "z199":b="0";break;case "z171":b="2";break;case "z172":b="150";break;case "z167":b="100";break;case "z168":b="-1";break;case "z170":b="-1";break;case "z166":b=null;break;case "z169":b="#0000FF";break;case "DEFAULT_NAVIGATORBORDERCOLOR":b="#FFFFFF";break;case "z223":b="4";break;
394case "z222":b="1";break;case "z224":b="1";break;case "z128":b="1";break;case "z150":b="1";break;case "z149":b=null;break;case "z162":b="1";break;case "DEFAULT_SLIDERZOOMVISIBLE":b="1";break; 395case "z205ZOOM":b="10";break;case "DEFAULT_ZOOMBUTTONSVISIBLE":b="1";break;case "z174":b="1";break;case "DEFAULT_RESETVISIBLE":b="1";break;case "z121":b="1";break;case "z119":b="1";break;case "z120":b="white";break;case "z118":b="0";break;case "z141":b="0";break;case "DEFAULT_FULLVIEWEXITEXTERNALBUTTONCOLOR":b="\t#F8F8F8";break;case "z184":b="1";break;case "z182":b="500";break;case "z183":b=" ";break;case "z183COLOR":b="#000000";break;case "DEFAULT_MESSAGESVISIBLE":b="1";break;case "z159":b="lightgray"; 396break;case "z158":b="white";break;case "DEFAULT_MESSAGEDURATIONLONG":b="5000";break;case "DEFAULT_MESSAGEDURATIONSTANDARD":b="3000";break;case "DEFAULT_MESSAGEDURATIONSHORT":b="1500";break;case "DEFAULT_MESSAGEDURATIONVERYSHORT":b="750";break;case "DEFAULT_TRACEDISPLAYTEXTFONTSIZE":b="11";break;case "DEFAULT_TRACEDISPLAYTEXTPADDINGSMALL":b="2";break;case "z229":b="#D3D3D3";break;case "z228":b="#FFFFFF";break;case "z16":b="Viewing Zoomify Images stored in the ZIF format requires a newer browser version. Please consider upgrading to the current release of your browser."; 397break;case "z8":b="\nClick the '?' button for help.";break;case "ERROR_ERROR":b="error";break;case "z287":b="Parameter unrecognized or deprecated - see the Parameters List documentation: ";break;case "z275":b="Parameter deprecated - please replace: ";break;case "z288":b="Use Firefox for local viewing or see READ ME FIRST\nfile for optional settings for other browsers.";break;case "z290":b="Browsers allow ZIF file viewing only from a web server.\nPlease use Zoomify Image folders for local viewing."; 398break;case "z289":b="Browsers allow PFF file viewing only from a web server.\nPlease use Zoomify Image folders for local viewing.";break;case "z249":b="Image failed to load: possible invalid path, missing image, or network error.";break;case "z280":b="Sorry! Part of this view is not refreshing. The network may be slow, or the website may be missing a file: ";break;case "ERROR_VALIDATEVIEW":b="Sorry! Part of this view is not refreshing. The network\nmay be slow, or the website may be missing a file. "; 399break;case "z280-ZIF":b="Sorry! Part of this view is not refreshing. The network may be slow, or the ZIF file may be faulty: ";break;case "z256-ZIFBYTERANGE":b="Error loading image: ZIF file data request failed. Request content type: ";break;case "z256-ZIFBYTES":b="Error loading image: ZIF file invalid.";break;case "z295":b="Browser does not support XMLHttpRequest.";break;case "z256-IMAGEXML":b="Error loading image: please make sure image path in web page matches image folder location on webserver."; 400break;case "z256-PFFIMAGEHEADER":b="Error loading image: image header request invalid.";break;case "z256-PFFIMAGEOFFSET":b="Error loading image: image offset request invalid.";break;case "z256-PARAMETERSXML":b="Error loading parameters XML: please make sure the zXMLParametersPath value is correct.";break;case "z256-TOOLBARSKINSXML":b="Error loading toolbar - skin files not found: please verify that the folders 'Assets/Skins/Default' are in same folder as the web page displaying the Viewer, or add zSkinPath parameter to web page. The zSkinPath parameter may be required if using a content management system such as Drupal, Joomla, or WordPress."; 401break;case "z256":b="Error making network request:\npossible invalid path or network error.";break;case "z272":b="Error related to network security: ";break;case "z273":b="Error related to network status: ";break;case "z273RANGEREQUESTS":b="Network error. If using ZIF storage, setting MIME type on web server may be necessary. See READ ME FIRST file in ZIF Storage folder or contact Support: ";break;case "z294":b="Browser does not support XML DOM.";break;case "z293":b="XML Doc invalid.";break;case "z296":b= 402"XML invalid.";break;case "z255":b="Image XML invalid.";break;case "z252":b="Image properties XML invalid.";break;case "z250":b="Image properties invalid.";break;case "z251":b="Image properties parameter invalid.";break;case "z254":b="Image tile count does not match value in image XML. If the count is invali
402d display problems can result.";break;case "z245":b=" while executing callback: ";break;case "z253":b="\nImage tile request not fulfilled within time period expected";break;case "z271":b="Navigator image failed to load: possible invalid path, missing image, or network error."; 403break;case "z278":b="Skin XML invalid.";break;case "z279":b="The skin XML file has one or more faulty name lines.";break;case "z283":b="Unknown element style - no known method to identify.";break;case "z284":b="Unknown mouse position - no known method to calculate.";break;case "z285":b="Unknown mouse scroll - no known method to calculate.";break;case "z286":b="Unknown window size - no known method to calculate.";break;case "z360":b="Launch Zoomify Website";break;case "z363":a=Z.hotspots?"\nAlt-Click: Toggle Hotspot Visibility": 404Z.annotations?"\nAlt-Click: Toggle Label Visibility":"";b="Minimize Toolbar"+a;break;case "z341":a=Z.hotspots?"\nAlt-Click: Toggle Hotspot Visibility":Z.annotations?"\nAlt-Click: Toggle Label Visibility":"";b="Expand Toolbar"+a;break;case "z400":b="Zoom Out";break;case "z385ZOOM":b="Zoom In And Out";break;case "z399":b="Zoom In";break;case "z370":b="Pan Left";break;case "z372":b="Pan Up";break;case "z369":b="Pan Down";break;case "z371":b="Pan Right";break;case "z378":b="Reset Initial View\nAlt-Click: Prior View"; 405break;case "z391":b="Enter Full View";break;case "z391EXIT":b="Exit Full View";break;case "z391EXITEXTERNAL":b="Exit Full View";break;case "z342":b="Show Help";break;case "z342OK":b="Close Help Display";break;case "z362":b="Accept And Close Message";break;case "z361":b="Decline And Close Message";break;case "z332":b="Agree To Copyright And View Images";break;case "z427DISPLAY":b="www.zoomify.com";break;case "z427":b="http://www.zoomify.com";break;case "z427TARGET":b="_blank";break;case "z439":b="Navigator Bird's Eye View"; 406break;case "z420":b="X";break;case "UI_TOOLBARLABELSYNC":b="Sync";break;case "z422":b="430";break;case "z421":b="300";break;case "z423":b="OK";break;case "UI_HELPSCREENCOLOR":b="lightgray";break;case "UI_HELPBUTTONCOLOR":b="white";break;case "z437":b="430";break;case "z436":b="84";break;case "z435":b="Cancel";break;case "z438":b="OK";break;case "UI_TRACEDISPLAYTITLE":b="Trace Values\n\n";break;case "z445":b="This panel is enabled using the HTML parameter 'zDebug=1' (basic) or 'zDebug=2' (adds tile tracing). It can be called in JavaScript as follows:\n\n Z.Utils.trace('value to display'); \n\nThe buttons below display or modify important state values. Web designers new to JavaScript will also benefit from the console, trace, profiling, and other debugging features of leading browsers."; 407break;case "UI_TRACEDISPLAYTILESTATUSTEXT":b="Required Cached Requested Loaded Displayed Waiting";break;case "UI_TRACEDISPLAYELAPSEDTIMETEXT":b="Seconds";break;case "UI_TRACEDISPLAYTILESPERSECONDTEXT":b="Loads / Second";break;case "z446":b="Show Globals";break;case "z449":b="Toggle Display";break;case "z447":b="Toggle Backfill";break;case "z448":b="Toggle Constrain Pan";break;case "z32":b="<p align=%22center%22><font face=%22Arial,Helvetica,sans-serif%22><strong>Viewer Help</strong></font></p><p align=%22justify%22><font face=%22Arial,Helvetica,sans-serif%22>To explore this image, simply <strong>click</strong> the image to zoom, <strong>double-click</strong> to zoom out, or <strong>click-drag</strong> to pan.<br><br>Shortcuts:<br> <strong>Alt-click-drag</strong> to create a <i>zoom-rectangle</i>.<br> <strong>Alt-click</strong> / <strong>Alt-double-click</strong> to zoom fully in / out.<br> <strong>Alt-click-Reset</strong> button to return to the prior view.<br> (Alt is Option on Macintosh).<br><br>The Navigator thumbnail overview can also be clicked or click-dragged to pan.<br><br>Use the Toolbar for exact navigation - if using a mouse, hold it over any button to see a helpful tip.<br><br>Keyboard shortcuts:<br> <strong>a</strong> or <strong>Shift</strong> to zoom in.<br> <strong>z</strong> or <strong>Ctrl</strong> to zoom out.<br> <strong>Arrows</strong> change image in slideshow/animation.<br> <strong>Escape</strong> to reset initial view or exits fullscreen.<br> <strong><</strong> or <strong>></strong> to rotate image if rotation buttons visible.<br> <strong>Page Up/Down</strong> change image in slidestack.</font></p>"; 408break;default:b="Unexpected resource request"}return b}
408,clearDisplay:function(a){if(a)if(Z.useCanvas&&"CANVAS"==a.tagName)Z.Utils.clearCanvas(a);else for(;a.hasChildNodes();)a.removeChild(a.lastChild)},clearCanvas:function(a){a=a.getContext("2d");a.save();try{a.setTransform(1,0,0,1,0,0)}catch(b){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SETTINGTRANSFORMONCANVASFORUNCONVERTEDIMAGE")),console.log("In function clearCanvas setting transform on canvas: "+b)}a.clearRect(0,0,a.canvas.width,a.canvas.height); 409a.restore()},colorCanvas:function(a,b){var c=a.getContext("2d");c.save();c.setTransform(1,0,0,1,0,0);c.fillStyle=b;c.fillRect(0,0,c.canvas.width,c.canvas.height);c.restore()},deleteDiv:function(a){if(a=document.getElementById(a)){for(;a.hasChildNodes();)a.removeChild(a.lastChild);a.parentNode.removeChild(a)}},createCallback:function(a,b){for(var c=[],d=2,e=arguments.length;d<e;d++)c[c.length]=arguments[d];return function(){for(var d=c.concat([]),e=0,q=arguments.length;e<q;e++)d[d.length]=arguments[e]; 410return b.apply(a,d)}},validateCallback:function(a){"undefined"===typeof Z.callbacks&&(Z.callbacks=[]);var b=Z.callbacks.slice(0);Z.Utils.functionCallWithDelay(function(){Z.Utils.validateCallbackDelayed(a,b)},10)},validateCallbackDelayed:function(a,b){for(var c=0,d=b.length;c<d;c++){var e=b[c];if(e&&e.callbackEvent==a&&"object"===typeof e&&"function"===typeof e.callbackFunction)switch(a){case "viewChanging":e.callbackFunction();break;case "viewPanningGetCurrentCoordinates":var h=Z.Viewport.getCoordinates(); 411e.callbackFunction(h);break;case "viewZoomingGetCurrentZoom":h=Z.Viewport.getZoom();e.callbackFunction(h);break;case "viewChangingGetCurrentCoordinatesFull":h=Z.Viewport.getCoordinatesFull();e.callbackFunction(h);break;default:e.callbackFunction()}}Z.Utils.arrayClear(b)},getContainerSize:function(a,b){var c=Z.Utils.getElementStyle(a),d=parseFloat(c.width),e=parseFloat(c.height);Z.Utils.stringValidate(c.width)&&-1!=c.width.indexOf("%")&&(d=parseFloat(Z.Utils.getElementStyleProperty(a,"width")));Z.Utils.stringValidate(c.height)&& 412-1!=c.height.indexOf("%")&&(e=parseFloat(Z.Utils.getElementStyleProperty(a,"height")));isNaN(d)&&(d=b.clientWidth);isNaN(e)&&(e=b.clientHeight);if(0==d||0==e)winDimensions=Z.Utils.getWindowSize(),0==d&&(a.parentNode.style.width=winDimensions.x+"px",d=a.clientWidth),0==e&&(a.parentNode.style.height=winDimensions.y+"px",e=a.clientHeight);if(isNaN(d)||0==d)d=800;if(isNaN(e)||0==e)e=400;return new Z.Utils.Point(d,e)},createContainerElement:function(a,b,c,d,e,h,f,q,n,A,p,H,P,Q,V,u,J){var v=document.createElement(a); 413this.stringValidate(b)&&(v.id=b);b=v.style;b.display=this.stringValidate(c)?c:"inline-block";b.position=this.stringValidate(d)?d:"static";b.overflow=this.stringValidate(e)?e:"hidden";"canvas"==a?(this.stringValidate(h)&&v.setAttribute("width",h),this.stringValidate(f)&&v.setAttribute("height",f)):(this.stringValidate(h)&&(b.width=h),this.stringValidate(f)&&(b.height=f));this.stringValidate(q)&&(b.left=q);this.stringValidate(n)&&(b.top=n);b.borderStyle=this.stringValidate(A)?A:"none";b.borderWidth= 414this.stringValidate(p)?p:"0px";b.borderColor="#696969";b.background=this.stringValidate(H)?H:"transparent none";b.margin=this.stringValidate(P)?P:"0px";b.padding=this.stringValidate(Q)?Q:"0px";b.whiteSpace=this.stringValidate(V)?V:"normal";this.stringValidate(u)&&(b.cursor=u);"undefined"!==J&&J&&(Z.Utils.addEventListener(v,"touchstart",Z.Utils.preventDefault),Z.Utils.addEventListener(v,"mousedown",Z.Utils.preventDefault),Z.Utils.addEventListener(v,"contextmenu",Z.Utils.preventDefault));return v}, 415createCenteredElement:function(a,b){var c=this.createContainerElement("div"),d=[];d[d.length]='<div style="#position:relative; display:table; height:100%; width:100%; border:none; margin:0px; padding:0px; overflow:hidden; text-align:left;">';d[d.length]='<div style="#position:absolute; display:table-cell; #top:50%; width:100%; border:none; margin:0px; padding:0px; vertical-align:middle;">';d[d.length]='<div id="'+b+'"; style="#position:relative; width:100%; #top:-50%; border:none; margin:0px; padding:0px; text-align:center;"></div></div></div>'; 416c.innerHTML=d.join("");for(var d=c=c.firstChild,e=c.getElementsByTagName("div");0<e.length;)d=e[0],e=d.getElementsByTagName("div");d.appendChild(a);return c},createTextElement:function(a,b,c,d,e,h,f,q,n,A,p,H,P,Q,V,u,J,v){c=Z.Utils.createContainerElement("div","textBoxFor-"+a,"inline-block","absolute","hidden",c,d,e,h,q,n,"white","0p
416x",f,"normal");d=document.createElement("textarea");c.appendChild(d);e=d.style;d.id=a;d.value=b;d.readOnly=A;e.width="100%";e.height="100%";e.margin="0";e.border="0"; 417this.stringValidate(p)&&(e.fontFamily=p);this.stringValidate(H)&&(e.fontSize=H);this.stringValidate(P)&&(e.resize=P);this.stringValidate(Q)&&(d.columns=Q);this.stringValidate(V)&&(d.rows=V);this.stringValidate(u)&&(e.overflowX=u);this.stringValidate(J)&&(e.overflowY=J);this.stringValidate(v)&&(d.wrap=v,"off"==v&&(e.whiteSpace="nowrap"));return c},createSelectElement:function(a,b,c,d,e,h,f,q,n,A){var p=document.createElement("select");p.id=a;Z.Utils.stringValidate(b)&&"none"!=b&&(p.options[0]=new Option(b, 418null));a=0;for(b=c.length;a<b;a++)p.options[p.options.length]=new Option(c[a].text,c[a].value);Z.Utils.addEventListener(p,"undefined"!==typeof A&&null!==A?A:"change",n);c=p.style;c.width=d+"px";c.position="absolute";c.left=e+"px";c.top=h+"px";c.fontSize=null==f?"11px":f+"px";c.fontFamily="verdana";c.visibility=q;return p},updateSelectElement:function(a,b,c){if(a){var d=-1!=a.selectedIndex?a.selectedIndex:0;a.innerHTML="";for(var e=0,h=b.length;e<h;e++)a.options[a.options.length]=new Option(b[e].text, 419b[e].value.toString());"undefined"!==typeof c&&null!==c&&(b=parseInt(Z.Utils.arrayIndexOfObjectValue(b,"value",c),10),-1!=b&&(d=b));b=a.options.length-1;a.selectedIndex=d<=b?d:b}},getChildElementByID:function(a,b){for(var c=null,d=0,e=a.childNodes.length;d<e&&(c=a.childNodes[d],c.id!=b)&&(c=Z.Utils.getChildElementByID(c,b),null===c);d++);return c},getElementPosition:function(a){for(var b=0,c=0,d="fixed"==this.getElementStyle(a).position,e=this.getOffsetParent(a,d);e;)b+=a.offsetLeft,c+=a.offsetTop, 420d&&(a=this.getPageScroll(),b+=a.x,c+=a.y),a=e,d="fixed"==this.getElementStyle(a).position,e=this.getOffsetParent(a,d);return new this.Point(b,c)},getOffsetParent:function(a,b){return b&&a!=document.body?document.body:a.offsetParent},getElementSize:function(a){return new this.Point(a.clientWidth,a.clientHeight)},getElementStyle:function(a){if(a.currentStyle)return a.currentStyle;if(window.getComputedStyle)return window.getComputedStyle(a,"");this.showMessage(this.getResource("z283"))},getElementStyleProperty:function(a, 421b){if(window.getComputedStyle)return window.getComputedStyle(a,null).getPropertyValue(b);if(a.currentStyle)return a.currentStyle[b];this.showMessage(this.getResource("z283"))},getElementStylePropertyZIndex:function(a){var b=0;window.document.defaultView.getComputedStyle?b=window.document.defaultView.getComputedStyle(a,null).getPropertyValue("z-index"):a.currentStyle?b=a.currentStyle["z-index"]:this.showMessage(this.getResource("z283"));return b},isElementFluid:function(a){var b=null,c=a.cloneNode(!1), 422d=!1,e=!1,h=null,f=null,q=0,n=0,A=Z.Utils.getElementStyle(a);A&&(q=A.width,n=A.height,b=-1!=q.indexOf("px")&&-1!=n.indexOf("px"));if(Z.browser!=Z.browsers.IE||9<=Z.browserVersion&&!b)window.getComputedStyle?value=window.getComputedStyle(c,null).width:c.currentStyle&&(value=c.currentStyle.width),"undefined"!==typeof value&&null!==value&&""!==value&&(d=-1!=value.toString().indexOf("%")||"auto"==value),d||(window.getComputedStyle?value=window.getComputedStyle(c,null).height:c.currentStyle&&(value=c.currentStyle.height), 423"undefined"!==typeof value&&null!==value&&""!=value&&(e=-1!=value.toString().indexOf("%")||"auto"==value)),d||e||(h=Z.Utils.isElementFluidNew(a)),d||e||(f=0!=parseFloat(q)%1||0!=parseFloat(n)%1);return d||e||h||f},isElementFluidNew:function(a){var b=a.cloneNode(!1),c,d,e,h,f;e=d=!1;b.style.margin="0";b.style.padding="0";b.style.maxWidth="none";b.style.minWidth="none";c=document.createElement("testContainer");c.style.display="block";c.style.width="800px";c.style.padding="0";c.style.margin="0";c.appendChild(b); 424a.parentNode.insertBefore(c,a);d=b.offsetWidth;c.style.width="900px";b.offsetWidth==d?(a.parentNode.removeChild(c),d=!1):(h=Math.floor(.125*d),f=Math.floor(100/900*b.offsetWidth),a.parentNode.removeChild(c),d=h==f?!0:!1);d||(b.style.margin="0",b.style.padding="0",b.style.maxHeight="none",b.style.minHeight="none",c=document.createElement("testContainer"),c.style.display="block",c.style.height="800px",c.style.padding="0",c.style.margin="0",c.appendChild(b),a.parentNode.insertBefore(c,a),e=b.offsetHeight, 425c.style.height="900px",b.offsetHeight==e?(a.parentNode.removeChild(c),e=!1):(h=Math.floor(.125*e),f=Math.floor(100/900*b.offsetHeight),a.parentNode.removeChild(c),e=h==f?!0:!1));return d||e},getEventTargetCoords:function(a){return getElementPosition(Z.Utils.target(a))},getFirstTouch:function(a){var b=null,c=a.touches;a=a.changedTouches;"undefined"!==typeof c?b=c[0]:"undefined"!==typeof a&&(b=a[0]);return b},getMousePosition:function(a){var b=0,c=0;"DOMMouseScroll"==a.type&&Z.browser==Z.browsers.FIREFOX&& 4263>Z.browserVersion?(b=a.screenX,c=a.screenY):"number"===typeof a.pageX?(b=a.pageX,c=a.pageY):"number"===typeof a.clientX?(b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=a.clientY+document.body.scrollTop+document.documentElement.scrollTop):console.log(this.getResource("z284"));return new this.Point(b,c)},getMouseScroll:function(a){var b=0;"number"===typeof a.wheelDelta?b=a.wheelDelta:"number"===typeof a.detail?b=-1*a.detail:this.showMessage(this.getResource("z285"));return b? 427b/Math.abs(b):0},getPageScroll:function(){var a=0,b=0,c=document.documentElement||{},d=document.body||{};if("number"===typeof window.pageXOffset)a=window.pageXOffset,b=window.pageYOffset;else if(d.scrollLeft||d.scrollTop)a=d.scrollLeft,b=d.scrollTop;else if(c.scrollLeft||c.scrollTop)a=c.scrollLeft,b=c.scrollTop;return new this.Point(a,b)},getScreenSize:function(){return new this.Point(screen.width,screen.height)},getWindowSize:function(){var a=0,b=0,c=document.documentElement||{},d=document.body|| 428{};"number"===typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):c.clientWidth||c.clientHeight?(a=c.clientWidth,b=c.clientHeight):d.clientWidth||d.clientHeight?(a=d.clientWidth,b=d.clientHeight):this.showMessage(this.getResource("z286"));return new this.Point(a,b)},Button:function(a,b,c,d,e,h,f,q,n,A,p,H,P,Q,V,u,J,v,w,K){a=Z.Utils.createContainerElement("span",a,"inline-block","absolute","hidden",f,q,n,A,Q,V,u,J,v,w,K);if(Z.Utils.stringValidate(b)){var wa=document.createTextNode(b); 429a.appendChild(Z.Utils.createCenteredElement(wa));Z.Utils.setTextNodeStyle(wa,"black","verdana","13px","none","normal","normal","normal","normal","1em","center","none")}else{c=Z.Utils.stringRemoveTrailingSlashCharacters(c);var F=Z.Utils.createGraphicElement(c+"/"+d),ka=Z.Utils.createGraphicElement(c+"/"+e),ea=Z.Utils.createGraphicElement(c+"/"+h);F.style.width=ka.style.width=ea.style.width=f;F.style.height=ka.style.height=ea.style.height=q;F.style.position=ka.style.position=ea.style.position="absolute"; 430Z.browser==Z.browsers.FIREFOX&&3>Z.browserVersion&&(F.style.top=ka.style.top=ea.style.top="");ka.style.visibility=ea.style.visibility="hidden";F.alt=ka.alt=ea.alt="";"undefined"!==typeof P&&Z.Utils.stringValidate(P)&&(F.alt=Z.Utils.getResource(P));a.appendChild(F);a.appendChild(ka);a.appendChild(ea)}Z.Utils.addEventListener(a,"mousedown",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"mouseover",Z.Utils.stopPropagation);Z.Utils.addEventListener(a,"mousedown",Z.Utils.stopPropagation);Z.Utils.addEventListener(a, 431"mouseup",Z.Utils.stopPropagation);Z.Utils.addEventListener(a,"mouseout",Z.Utils.stopPropagation);"undefined"!==typeof imageUp&&(Z.Utils.addEventListener(F,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(ka,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(ea,"contextmenu",Z.Utils.preventDefault));Z.Utils.addEventListener(a,"touchstart",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"touchend",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"touchcancel",Z.Utils.preventDefault); 432Z.Utils.stringValidate(b)||(Z.Utils.disableTextInteraction(wa),Z.Utils.addEventListener(a,"contextmenu",Z.Utils.preventDefault));Z.tooltipsVisible&&Z.Utils.stringValidate(P)&&(a.title=Z.Utils.getResource(P));Z.Utils.setButtonHandler(a,p,H);this.elmt=a},buttonSize:function(a,b,c){var d=a.style;d.width=b+"px";d.height=c+"px";c=a.firstChild;d=a.childNodes[1];a=a.childNodes[2];c&&d&&a&&(c.style.width=d.style.width=a.style.width=b+"px",c.style.height=d.style.height=a.style.height=b+"px")},setButtonDefaults:function(a){Z.Utils.clearButtonSettings(a); 433Z.Utils.setButtonState(a,"up");Z.Utils.setButtonHandler(a,"mouseover",Z.Toolbar.z457)},clearButtonSettings:function(a){var b=a.firstChild,c=a.childNodes[1],d=a.childNodes[2];b&&c&&d&&(b.style.visibility=c.style.visibility=d.style.visibility="hidden",Z.Utils.removeEventListener(b,"mouseover",Z.Toolbar.z457),Z.Utils.removeEventListener(c,"mousedown",Z.Toolbar.z457),Z.Utils.removeEventListener(c,"mouseout",Z.Toolbar.z457),Z.Utils.removeEventListener(d,"mouseup",Z.Toolbar.z457),Z.Utils.removeEventListener(a, 434"touchstart",Z.Toolbar.z457),Z.Utils.removeEventListener(a,"touchend",Z.Toolbar.z457),Z.Utils.removeEventListener(a,"touchcancel",Z.Toolbar.z457));Z.Utils.removeEventListener(a,"mouseover",Z.Toolbar.z457);Z.Utils.removeEventListener(a,"mousedown",Z.Toolbar.z457);Z.Utils.removeEventListener(a,"mouseout",Z.Toolbar.z457);Z.Utils.removeEventListener(a,"mouseup",Z.Toolbar.z457)},setButtonState:function(a,b){var c="up"==b?a.firstChild:"down"==b?a.childNodes[1]:a.childNodes[2];c&&(c.style.visibility="visible")}, 435setButtonHandler:function(a,b,c){c="undefined"!==c?c:Z.Toolbar.z457;var d="undefined"!==b?b:"mouseover";if("mouseover"==b&&"undefined"!==typeof a.firstChild)a=a.firstChild;else if("mousedown"!=b||"undefined"===typeof a.childNodes[1])"mouseup"==b&&"undefined"!==typeof a.childNodes[2]?a=a.childNodes[2]:"mouseout"==b&&"undefined"!==typeof a.childNodes[1]&&(a=a.childNodes[1]);Z.Utils.addEventListener(a,"mousedown"==b?"touchstart":"touchend",c);Z.Utils.addEventListener(a,d,c)},Checkbox:function(a,b,c, 436d,e,h,f,q,n){var A=Z.Utils.createContainerElement("div","containerFor-"+a,"inline-block","absolute","hidden",c,d,e,h,"none","0px","transparent none","0px","0px","normal"),p=document.createElement("input");A.appendChild(p);p.type="checkbox";p.id=a;p.value=b;p.width=c;p.height=d;a=A.style;a.width=c+"px";a.height=d+"px";a.left=e+"px";a.top=h+"px";Z.Utils.addEventListener(p,f,q);Z.Utils.addEventListener(p,"touchstart",q);Z.tooltipsVisible&&Z.Utils.stringValidate(n)&&(p.title=Z.Utils.getResource(n));return A}, 437Graphic:function(a,b,c,d,e,h,f,q){b=Z.Utils.stringRemoveTrailingSlashCharacters(b);b=Z.Utils.createGraphicElement(c?b+"/"+c:b);c=b.style;c.width=d;c.height=e;"undefined"!==typeof q&&Z.Utils.stringValidate(q)?b.alt=Z.Utils.getResource(q):b.alt="";
437c=Z.Utils.createContainerElement("span",a,"inline-block","absolute","hidden",d,e,h,f,"none","0px","transparent none","0px","0px","normal");c.appendChild(b);this.elmt=c;Z.Utils.addEventListener(b,"mousedown",Z.Utils.preventDefault);Z.Utils.addEventListener(b, 438"touchstart",Z.Utils.preventDefault);Z.Utils.addEventListener(b,"contextmenu",Z.Utils.preventDefault)},createGraphicElement:function(a){var b=this.createContainerElement("img"),c=null;Z.browser==Z.browsers.IE&&7>Z.browserVersion?(c=this.createContainerElement("span",null,"inline-block"),b.onload=function(){c.style.width=c.style.width||b.width+"px";c.style.height=c.style.height||b.height+"px";b=b.onload=null},c.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+a+'", sizingMethod="scale")'): 439(c=b,c.src=a);return c},graphicSize:function(a,b,c){var d=a.style;d.width=b+"px";d.height=c+"px";a=a.firstChild.style;a.width=b+"px";a.height=c+"px"},Point:function(a,b){this.x="number"===typeof a?a:0;this.y="number"===typeof b?b:0},Point3D:function(a,b,c){this.x="number"===typeof a?a:0;this.y="number"===typeof b?b:0;this.z="number"===typeof c?c:0},Coordinates:function(a,b,c,d){this.x="number"===typeof a?a:0;this.y="number"===typeof b?b:0;this.z="number"===typeof c?c:0;this.r="number"===typeof d? 440d:0},CoordinatesDisplayStyle:function(a,b,c,d,e,h,f,q,n,A,p){this.cLeft=a;this.cTop=b;this.vWidth=c;this.vHeight=d;this.vLeft=e;this.vTop=h;this.bWidth=f;this.bHeight=q;this.bLeft=n;this.bTop=A;this.cRotation=p},Pair:function(a,b){this.a=a;this.b=b},Trio:function(a,b,c){this.a=a;this.b=b;this.c=c},Range:function(a,b){this.start="number"===typeof a?a:0;this.end="number"===typeof b?b:0},RangeScale:function(a,b){this.min="number"===typeof a?a:0;this.max="number"===typeof b?b:0},swapZIndices:function(a, 441b){var c=Z.Utils.getElementStylePropertyZIndex(a),d=Z.Utils.getElementStylePropertyZIndex(b);if("auto"==c||"auto"==d)c=(Z.baseZIndex-101).toString(),d=(Z.baseZIndex-100).toString();a.style.zIndex=d;b.style.zIndex=c},stringValidate:function(a){return"undefined"!==typeof a&&null!==a&&""!==a&&"null"!==a},stringReadable:function(a){return a.replace(RegExp("%20","g")," ")},stringGetInitials:function(a){var b="";a&&(b=a.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g).join("").toUpperCase());return b},stringLowerCaseFirstLetter:function(a){return a.charAt(0).toLowerCase()+ 442a.slice(1)},stringUpperCaseFirstLetter:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},stringMultiply:function(a,b){var c=Math.ceil(Math.log(b)/Math.LN2),d=a;do d+=d;while(0<--c);return d.slice(0,a.length*b)},stringPadFront:function(a,b,c){return a=Z.Utils.stringMultiply(c,b-a.length)+a},stringRemoveTrailingSlashCharacters:function(a){return"/"==a.slice(-1,a.length)?a.slice(0,a.length-1):a},stringRemoveFileExtension:function(a){var b=a.length;"."==a.slice(b-4,b-3)&&(a=a.slice(0,b-4));return a}, 443stringRemoveTabAndLineWrapCharacters:function(a){a=a.replace(/\n/g,"");a=a.replace(/\r/g,"");return a=a.replace(/\t/g,"")},stringUnescapeAmpersandCharacters:function(a){a=a.replace(/\n/g,"");a=a.replace(/&/g,"&");a=a.replace(/&/g,"&");return a=a.replace(/&/g,"&")},setHTMLTextDefaultCaptionStyle:function(a,b,c,d,e,h,f,q,n,A,p,H,P){a=a.style;-1==b.indexOf("color=")&&(a.color=c);-1==b.indexOf("font-family=")&&(a.fontFamily=d);-1==b.indexOf("font-size=")&&(a.fontSize=e);-1==b.indexOf("font-size-adjust=")&& 444(a.fontSizeAdjust=h);-1==b.indexOf("font-style=")&&(a.fontStyle=f);-1==b.indexOf("font-stretch=")&&(a.fontStretch=q);-1==b.indexOf("font-variant=")&&(a.fontVariant=n);-1==b.indexOf("font-weight=")&&(a.fontWeight=A);-1==b.indexOf("line-height=")&&(a.lineHeight=p);-1==b.indexOf("text-align=")&&(a.textAlign=H);-1==b.indexOf("text-decoration=")&&(a.textDecoration=P)},setHTMLTextStyle:function(a,b,c,d,e,h,f,q,n,A,p,H){a=a.style;a.color=b;a.fontFamily=c;a.fontSize=d;a.fontSizeAdjust=e;a.fontStyle=h;a.fontStretch= 445f;a.fontVariant=q;a.fontWeight=n;a.lineHeight=A;a.textAlign=p;a.textDecoration=H},setTextAreaStyle:function(a,b,c,d,e,h,f,q,n,A,p,H,P){a=a.firstChild.style;a.color=b;a.fontFamily=c;a.fontSize=d;a.fontSizeAdjust=e;a.fontStyle=h;a.fontStretch=f;a.fontVariant=q;a.fontWeight=n;a.lineHeight=A;a.textAlign=p;a.textDecoration=H;a.padding=P},setTextNodeStyle:function(a,b,c,d,e,h,f,q,n,A,p,H){a=a.parentNode.style;a.color=b;a.fontFamily=c;a.fontSize=d;a.fontSizeAdjust=e;a.fontStyle=h;a.fontStretch=f;a.fontVariant= 446q;a.fontWeight=n;a.lineHeight=A;a.textAlign=p;a.textDecoration=H}
446,stringValidateColorValue:function(a){Z.Utils.stringValidate(a)||(a="#000000");0!=a.indexOf("#")&&(a="#"+a);return a},hexToRGB:function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,d,e){return c+c+d+d+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null},xmlConvertTextToDoc:function(a){var b=null;if(window.ActiveXObject)try{b=new ActiveXObject("Microsoft.XMLDOM"), 447b.async=!1,b.loadXML(a)}catch(c){this.showMessage(c.name+this.getResource("z244")+c.message)}else if(window.DOMParser)try{b=(new DOMParser).parseFromString(a,"text/xml")}catch(c){this.showMessage(c.name+this.getResource("z244")+c.message)}else this.showMessage(this.getResource("z294"));return b},xmlConvertDocToText:function(a){var b=null;if(window.ActiveXObject)try{b=a.xml}catch(c){this.showMessage(c.name+this.getResource("z243")+c.message)}else if(window.DOMParser)try{b=(new XMLSerializer).serializeToString(a)}catch(c){this.showMessage(c.name+ 448this.getResource("z243")+c.message)}else this.showMessage(this.getResource("z294"));return b},xmlEscapeMinimal:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\r?\n/g,"%0A"));return b},xmlUnescapeMinimal:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/%0A/g,"\n").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g, 449"<").replace(/&/g,"&"));return b},arrayClear:function(a){if(a)for(;0<a.length;)a.pop()},arrayClearObjectValue:function(a,b){for(var c=0,d=a.length;c<d;c++)a[c][b]=null},arrayClone:function(a,b,c){c=[];switch(a){case "pois":a=0;for(var d=b.length;a<d;a++)c[c.length]={text:b[a].text,value:b[a].value,id:b[a].id,x:b[a].x,y:b[a].y,z:b[a].z,user:b[a].user,date:b[a].date,editable:b[a].editable};break;case "labels":a=0;for(d=b.length;a<d;a++)c[c.length]={text:b[a].text,value:b[a].value,poiID:b[a].poiID, 450editable:b[a].editable};break;case "hotspots":a=0;for(d=b.length;a<d;a++)c[c.length]={id:b[a].id,name:b[a].name,mediaType:b[a].mediaType,media:b[a].media,audio:b[a].audio,x:b[a].x,y:b[a].y,z:b[a].z,xScale:b[a].xScale,yScale:b[a].yScale,radius:b[a].radius,zMin:b[a].zMin,zMax:b[a].zMax,clickURL:b[a].clickURL,urlTarget:b[a].urlTarget,rollover:b[a].rollover,caption:b[a].caption,tooltip:b[a].tooltip,textColor:b[a].textColor,backColor:b[a].backColor,lineColor:b[a].lineColor,fillColor:b[a].fillColor,textVisible:b[a].textVisible, 451backVisible:b[a].backVisible,lineVisible:b[a].lineVisible,fillVisible:b[a].fillVisible,captionPosition:b[a].captionPosition,saved:b[a].saved,visibility:b[a].visibility,internalID:b[a].internalID,poiID:b[a].poiID,captionHTML:b[a].captionHTML,tooltipHTML:b[a].tooltipHTML,polyClosed:b[a].polyClosed,polygonPts:b[a].polygonPts,showFor:b[a].showFor,transition:b[a].transition,changeFor:b[a].changeFor,rotation:b[a].rotation,editable:b[a].editable,popup:b[a].popup,popupOffsetX:b[a].popupOffsetX,popupOffsetY:b[a].popupOffsetY, 452comment:b[a].comment,user:b[a].user,date:b[a].date,iW:b[a].iW,iH:b[a].iH,image:b[a].image};break;case "polygon":a=0;for(d=b.length;a<d;a++)c[c.length]={x:b[a].x,y:b[a].y};break;case "notes":a=0;for(d=b.length;a<d;a++)c[c.length]={text:b[a].text,value:b[a].value,noteText:b[a].noteText,poiID:b[a].poiID,id:b[a].id,user:b[a].user,date:b[a].date,editable:b[a].editable};break;case "magnifications":for(a=0,d=b.length;a<d;a++)c[c.length]={text:b[a].text,value:b[a].value}}return c},arrayImageLoadingValidate:function(a){var b= 453!1;if(a&&0<a.length)for(var b=!0,c=0,d=a.length;c<d;c++)if(null===a[c]||0==a[c].image.width||0==a[c].image.height)b=!1;return b},arrayIndexOf:function(a,b,c){c?0>c&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;c<d;c++)if(a[c]===b)return c;return-1},arrayIndexOfObjectValue:function(a,b,c,d){if("undefined"!==typeof a){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var e=a.length;d<e;d++)if(a[d][b]===c)return d}return-1},arrayIndexOfObjectTwoValues:function(a,b,c,d,e,h){if("undefined"!==typeof a){d? 4540>d&&(d=Math.max(0,a.length+d)):d=0;for(var f=a.length;d<f;d++)if(a[d][b]===c&&a[d][e].toString()===h.toString())return d}return-1},arrayIndexOfSubstring:function(a,b,c){c?0>c&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;c<d;c++)if(-1!=a[c].indexOf(b))return c;return-1},arrayIndexOfObjectValueSubstring:function(a,b,c,d,e){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var h=a.length;d<h;d++)if(e){if(-1!=a[d][b].toLowerCase().indexOf(c))return d}else if(-1!=a[d][b].indexOf(c))return d;return-1},arrayIntersect:function(a, 455b){for(var c,d,e,h=[],f=0,q=a.length;f<q;f++){c=a[f];e=!1;for(var n=0,A=b.length;n<A&&c>=(d=b[n]);n++)if(d==c){e=!0;break}e&&(h[h.length]=a[f])}return h},arrayMap:function(a,b){var c=[];if(Z.arrayMapSupported)c=a.map(b);else for(var d=0,e=a.length;d<e;d++)c[d]=b(a[d]);return c},arraySplice:function(a,b,c){if(Z.arraySpliceSupported)if(3<arguments.length)for(var d=3,e=arguments.length;d<e;d++)a.splice(b,c,arguments[d]);else a.splice(b,c);else{0>c&&(c=0);var h=[];if(3<arguments.length)for(d=3,e=arguments.length;d< 456e;d++)h[h.length]=arguments[d];for(var d=Z.Utils.arraySubarray(a,0,b),f=Z.Utils.arraySubarrayLen(a,b,c),e=Z.Utils.arraySubarray(a,b+c),h=d.concat(h,e),d=a.length=0,e=h.length;d<e;d++)a[a.length]=h[d];a=f}return a},arraySubarraySimple:function(a,b){return this.slice(a,b)},arraySortNumericAscending:function(a,b,c){a.sort(function(a,b){return a-b});return a},arraySortNumericDescending:function(a,b,c){a.sort(function(a,b){return b-
456a});return a},arraySortByObjectValue:function(a,b,c,d){a.sort(function(a, 457c){return a[b]>c[b]});return a},arraySubarray:function(a,b,c){0>b&&(b=0);if(!c||c>a.length)c=a.length;if(b==c)return[];for(var d=[];b<c;b++)d[d.length]=a[b];return d},arraySubarrayLen:function(a,b,c){if(b>=a.length||c&&0>=c)return[];0>b&&(b=Math.abs(b)>a.length?0:a.length+b);if(!c||c+b>a.length)c=a.length-b;for(var d=[],e=b;e<b+c;e++)d[d.length]=a[e];return d},arraySubtract:function(a,b){for(var c=a.slice(0),d=0,e=c.length;d<e;d++){for(var h=c[d],f=!1,q=0,n=b.length;q<n&&h>=(elmt2=b[q]);q++)if(elmt2== 458h){f=!0;break}f&&(c=Z.Utils.arraySplice(c,d--,1))}return c},arrayToArrayOfStrings:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b[c]="undefined"!==typeof a[c]&&"undefined"!=a[c]&&null!==a[c]?a[c].toString():"";return b},arrayUnique:function(a){for(var b=1;b<a.length;)a[b-1]==a[b]?a=Z.Utils.arraySplice(a,b,1):b++;return a},arrayUniqueByObjectValue:function(a,b){if("undefined"!==typeof a)for(var c=1;c<a.length;)a[c-1][b]==a[c][b]?a=Z.Utils.arraySplice(a,c,1):c++;return a},calculatePointsDistance:function(a, 459b,c,d){return Math.sqrt((a-=c)*a+(b-=d)*b)},fullScreenView:function(a,b,c){if("undefined"===typeof c||null===c)c=!1;if(b){b=document.documentElement;var d=null;b.requestFullScreen?(a.requestFullScreen(),d="fullscreenchange"):b.mozRequestFullScreen?(a.mozRequestFullScreen(),d="mozfullscreenchange"):b.webkitRequestFullScreen?(a.webkitRequestFullScreen(),d="webkitfullscreenchange"):b.msRequestFullscreen&&(a.msRequestFullscreen(),d="MSFullscreenChange");d&&Z.Utils.addEventListener(document,d,Z.Viewport.fullScreenEscapeHandler)}else document.cancelFullScreen? 460(c||document.cancelFullScreen(),d="fullscreenchange"):document.mozCancelFullScreen?(c||document.mozCancelFullScreen(),d="mozfullscreenchange"):document.webkitCancelFullScreen?(c||document.webkitCancelFullScreen(),d="webkitfullscreenchange"):document.msExitFullscreen&&(c||document.msExitFullscreen(),d="MSFullscreenChange"),d&&Z.Utils.removeEventListener(document,d,Z.Viewport.fullScreenEscapeHandler)},rotatePoint:function(a,b,c){var d=Math.PI/180*-c;c=a*Math.cos(d)-b*Math.sin(d);a=a*Math.sin(d)+b*Math.cos(d); 461return new Z.Utils.Point(c,a)},rotateElement:function(a,b,c){if(b!=Z.imageR||c)b="rotate("+b.toString()+"deg)",a.transform=b,a.msTransform=b,a.mozTransform=b,a.webkitTransform=b,a.oTransform=b},getPositionRotated:function(a,b,c,d,e){if("undefined"===typeof e||null===e)e=Z.imageR;0>e&&(e+=360);e=e*Math.PI/180;a-=c;var h=b-d;b=a*Math.cos(e)-h*Math.sin(e);e=a*Math.sin(e)+h*Math.cos(e);c=Math.round(b+c);d=Math.round(e+d);return new Z.Utils.Point(c,d)},getDisplayPositionRotated:function(a,b){if("undefined"=== 462typeof b||null===b)b=Z.imageR;0>b&&(b+=360);var c=parseFloat(a.left),d=parseFloat(a.top),e=parseFloat(a.width),h=parseFloat(a.height);return Z.Utils.getPositionRotated(c,d,c+e/2,d+h/2,b)},translateElement:function(a,b,c){b="translate("+b.toString()+"px,"+c.toString()+"px)";a.transform=b;a.msTransform=b;a.mozTransform=b;a.webkitTransform=b;a.oTransform=b},scaleElement:function(a,b){var c="scale("+b.toString()+")";a.transform=c;a.msTransform=c;a.mozTransform=c;a.webkitTransform=c;a.oTransform=c},intValue:function(a, 463b){return(a[b]+(a[b+1]<<8)|a[b+2]<<16)+16777216*a[b+3]},longValue:function(a,b){var c=(a[b]+(a[b+1]<<8)|a[b+2]<<16)+16777216*a[b+3];0!=a[b+4]&&(c+=4294967296*a[b+4]);return c},shortValue:function(a,b){return a[b]+(a[b+1]<<8)},createUint8Array:function(a,b){return Z.uInt8ArraySupported?new Uint8Array(a,b):new Z.Utils.TypedArray(a,b)},TypedArray:function(a){var b;if("number"===typeof a){b=Array(a);for(var c=0;c<a;++c)b[c]=0}else b=a.slice(0);b.subarray=Z.Utils.arraySubarraySimple;b.buffer=b;b.byteLength= 464b.length;b.set=Z.Utils.setSimple;"object"===typeof a&&a.buffer&&(b.buffer=a.buffer);return b},setSimple:function(a,b){2>arguments.length&&(b=0);for(var c=0,d=a.length;c<d;++c,++b)this[b]=a[c]&255},encodeBase64:function(a){var b,c,d,e,h=0,f=0,q="",q=[];if(!a)return a;do b=a[h++],c=a[h++],d=a[h++],e=b<<16|c<<8|d,b=e>>18&63,c=e>>12&63,d=e>>6&63,e&=63,q[f++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
464+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+ 465"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e);while(h<a.length);q=q.join("");a=a.length%3;return(a?q.slice(0,a-3):q)+"===".slice(a||3)},validateResponseArrayFunctionality:function(){"ZoomifyImageFile"!=Z.tileSource||Z.responseArraySupported||Z.responseArrayPrototyped||(Z.Utils.defineObjectProperty(XMLHttpRequest.prototype,"response",{get:function(){return(new VBArray(this.responseBody)).toArray()}}), 466Z.responseArrayPrototyped=!0)},defineObjectProperty:function(a,b,c){Z.definePropertySupported?Object.defineProperty(a,b,c):(delete a[b],"get"in c&&a.__defineGetter__(b,c.get),"set"in c&&a.__defineSetter__(b,c.set),"value"in c&&(a.__defineSetter__(b,function(a){this.__defineGetter__(b,function(){return a});return a}),a[b]=c.value))},createImageElementFromBytes:function(a,b){function c(a){d.onload=null;d.onabort=null;d.onerror=null;e&&window.clearTimeout(e);window.setTimeout(function(){b(d)},1)}var d= 467new Image,e=null,h=parseFloat(this.getResource("z139")),f=function(){c(!1)};d.onload=function(){c(!0)};d.onabort=f;d.onerror=f;e=window.setTimeout(function(){console.log(Z.Utils.getResource("z253"));c(!1)},h);d.src=a},getCurrentUTCDateAsString:function(){var a=new Date,b=(10>a.getUTCMonth()+1?"0":"")+(a.getUTCMonth()+1),c=(10>a.getUTCDate()?"0":"")+a.getUTCDate(),d=(10>a.getUTCHours()?"0":"")+a.getUTCHours(),e=(10>a.getUTCMinutes()?"0":"")+a.getUTCMinutes(),h=(10>a.getUTCSeconds()?"0":"")+a.getUTCSeconds(); 468return a.getUTCFullYear()+b+c+d+e+h},cacheProofPath:function(a){a+="?t"+(new Date).getTime().toString()+"n"+Z.cacheProofCounter.toString();Z.cacheProofCounter+=1;return a},easing:function(a,b,c,d,e){if("undefined"===typeof e||null===e)e=Z.smoothZoomEasing;var h=b;if(Z.smoothZoom&&1<e)switch(e){case 2:c/=d;c--;h=(b-a)*(c*c*c*c*c+1)+a;break;case 3:h=(b-a)*(-Math.pow(2,-10*c/d)+1)+a;break;case 4:b-=a,h=1>(c/=d/2)?b/2*c*c*c*c*c+a:b/2*((c-=2)*c*c*c*c+2)+a}return h},functionCallWithDelay:function(a,b){window.setTimeout(a, 469b)},nodeIsInViewer:function(a){for(var b=!1;0==b;)if(a)a.id?"ViewerDisplay"==a.id?b=!0:a=a.parentNode:a=a.parentNode;else break;return b},roundToFixed:function(a,b){var c=Math.round(a).toString().length,c=b-c,c=Math.pow(10,0>c?0:c);return a=Math.round(a*c)/c},getRandomInt:function(a,b){return Math.floor(Math.random()*(b-a+1))+a},getSign:function(a){return a?0>a?-1:1:0},configureHelpDisplay:function(){var a=Z.helpW,b=Z.helpH;a>=Z.viewerW&&(a=Z.viewerW-80);b>=Z.viewerH&&(b=Z.viewerH-80);var c=Z.helpL? 470Z.helpL:(Z.viewerW-a)/2,d=Z.helpT?Z.helpT:(Z.viewerH-b)/2,e=this.getResource("UI_HELPSCREENCOLOR"),h=this.getResource("UI_HELPBUTTONCOLOR");Z.HelpDisplay=this.createContainerElement("div","HelpDisplay","inline-block","absolute","hidden",a+"px",b+"px",c+"px",d+"px","solid","1px",e,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.HelpDisplay);c=Z.Utils.createContainerElement("div","helpTextBox","inline-block","absolute","auto",a-50+"px",b-74+"px","4px","4px","solid","1px","white","0px","20px", 471null);c.style.overflowY="auto";Z.HelpDisplay.appendChild(c);Z.help=document.getElementById("helpTextBox");Z.HelpDisplay.style.zIndex=(Z.baseZIndex+26).toString();b=b-18-5;a-=66;c=this.getResource("z423");h=new Z.Utils.Button("buttonHelpOk",c,null,null,null,null,"56px","18px",a+"px",b+"px","mousedown",this.helpOkButtonHandler,"z342OK","solid","1px",h,"0px","0px");Z.HelpDisplay.appendChild(h.elmt)},helpOkButtonHandler:function(a){Z.Utils.hideHelp();return!0},showHelp:function(a){Z.HelpDisplay||Z.Utils.configureHelpDisplay(); 472Z.help&&(Z.help.innerHTML=Z.helpCustom?Z.helpContent:unescape(a),Z.HelpDisplay.style.display="inline-block",document.getElementById("buttonHelpOk").style.display="inline-block")},hideHelp:function(){Z.HelpDisplay.style.display="none"},configureMessageDisplay:function(){var a=parseInt(this.getResource("z437"),10),b=parseInt(this.getResource("z436"),10),c=Z.Utils.getMessageDisplayCoords("6",a,Z.viewerW,Z.viewerH),d=this.getResource("z159"),e=this.getResource("z158");Z.MessageDisplay=this.createContainerElement("div", 473"MessageDisplay","inline-block","absolute","auto",a+"px",b+"px",c.x+"px",c.y+"px","solid","1px",d,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.MessageDisplay);Z.MessageDisplay.style.zIndex=(Z.baseZIndex+30).toString();c=Z.Utils.createTextElement("messageBox","",a-18+"px",b-40+"px","4px","4px","4px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto",null);Z.MessageDisplay.appendChild(c);Z.messages=document.getElementById("messageBox");b=b-18-5;a-=66;c=this.getResource("z438"); 474e=new Z.Utils.Button("buttonMessageOk",c,null,null,null,null,"56px","18px",a+"px",b+"px","mousedown",this.messageOkButtonHandler,"z362","solid","1px",e,"0px","0px");Z.MessageDisplay.appendChild(e.elmt)},getMessageDisplayCoords:function(a,b,c,d){switch(a){case "1":d=a=40;break;case "2":a=c/2-b/2;d=40;break;case "3":a=c-b-80;d=40;break;case "4":a=c-b-40;d=0<Z.toolbarVisible&&8!=Z.toolbarVisible?d-120:d-80;break;case "5":a=c/2-b/2;d=0<Z.toolbarVisible&&8!=Z.toolbarVisible?d-120:d-80;break;case "6":a= 47540;d=0<Z.toolbarVisible&&8!=Z.toolbarVisible?d-120:d-80;break;default:a=c-b,d=40}return new Z.Utils.Point(a,d)},messageOkButtonHandler:function(a){Z.Utils.hideMessage();Z.Viewport&&Z.coordinatesVisible&&Z.Viewport.setCoordinatesDisplayVisibility(!1);return!0},messageCancelButtonHandler:function(a){Z.Utils.hideMessage();return!1},showMessage:function(a,b,c,d,e,h){if(Z.messagesVisible){Z.MessageDisplay||Z.Utils.configureMessageDisplay();if("undefined"===typeof h||null===h)h="6";var f=parseInt(this.getResource("z437"), 47610);h=Z.Utils.getMessageDisplayCoords(h,f,Z.viewerW,Z.viewerH);Z.MessageDisplay.style.left=h.x+"px";Z.MessageDisplay.style.top=h.y+"px";
476Z.MessageDisplay.messageTimer&&window.clearTimeout(MessageDisplay.messageTimer);h=!0;e&&(-1!=Z.Utils.arrayIndexOf(Z.messageDisplayList,a)?h=!1:Z.messageDisplayList[Z.messageDisplayList.length]=a);if(h&&(Z.messages&&(Z.messages.value=a),Z.MessageDisplay.style.display="inline-block","undefined"!==typeof d&&null!==d&&(a=document.getElementById("textBoxFor-messageBox"))&& 477(a.firstChild.style.textAlign=d),d=document.getElementById("buttonMessageOk"),a=parseInt(this.getResource("z436"),10),"undefined"!==typeof b&&null!==b&&b?(d.style.display="inline-block",Z.MessageDisplay.style.height=a+"px"):(d.style.display="none",Z.MessageDisplay.style.height=a-22+"px"),"undefined"!==typeof c&&null!==c&&!isNaN(c))){"undefined"!==typeof Z.MessageDisplay.messageTimer&&null!==Z.MessageDisplay.messageTimer&&window.clearTimeout(Z.MessageDisplay.messageTimer);if("undefined"===typeof c|| 478null===c)c=3E3;Z.MessageDisplay.messageTimer=window.setTimeout(Z.Utils.hideMessageTimerHandler,c)}}},getMessage:function(){var a="";Z.messages&&Z.Utils.stringValidate(Z.messages.value)&&(a=Z.messages.value);return a},hideMessage:function(){Z.MessageDisplay&&(Z.MessageDisplay.style.display="none")},hideMessageTimerHandler:function(){Z.MessageDisplay.messageTimer&&(window.clearTimeout(Z.MessageDisplay.messageTimer),Z.MessageDisplay.messageTimer=null);Z.Utils.hideMessage()},uploadProgress:function(a){var b= 479Z.saveImageMessage;a.lengthComputable?(a=Math.round(100*a.loaded/a.total),b+=a.toString()+"%"):b+=Z.Utils.getResource("ERROR_IMAGESAVEUNABLETOCOMPUTEPROGRESS");Z.Utils.showMessage(b,!1,"none","center")},configureCoordinatesDisplay:function(){var a=parseInt(this.getResource("z417"),10),b=parseInt(this.getResource("z415"),10),c=Z.viewerW-a-20,d=Z.viewerH-b-30,e=this.getResource("z99");Z.CoordinatesDisplay=this.createContainerElement("div","CoordinatesDisplay","inline-block","absolute","auto",a+"px", 480b+"px",c+"px",d+"px","solid","1px",e,"0px","0px","normal");Z.ViewerDisplay.appendChild(Z.CoordinatesDisplay);Z.CoordinatesDisplay.style.zIndex=(Z.baseZIndex+12).toString();c=Z.geoCoordinatesVisible?Z.Utils.getResource("UI_GEOCOORDINATESDISPLAYTEXT"):"IIIFImageServer"==Z.tileSource?Z.Utils.getResource("UI_IIIFCOORDINATESDISPLAYTEXT"):Z.Utils.getResource("z416");c=Z.Utils.createTextElement("coordsLabelBox",c,a-18+"px","28px","4px","4px","4px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto", 481null);Z.CoordinatesDisplay.appendChild(c);if(c=document.getElementById("textBoxFor-coordsLabelBox"))c.firstChild.style.textAlign="center";c=Z.Utils.createTextElement("coordsDisplayBox","",a-18+"px","18px","4px","46px","4px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto",null);Z.CoordinatesDisplay.appendChild(c);Z.coordinates=document.getElementById("coordsDisplayBox");if(c=document.getElementById("textBoxFor-coordsDisplayBox"))c.firstChild.style.textAlign="center";a=Z.Utils.createTextElement("coordsSaveBox", 482"",a-18+"px",b-92+"px","4px","78px","4px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto",null);Z.CoordinatesDisplay.appendChild(a);Z.coordinatesSave=document.getElementById("coordsSaveBox");if(a=document.getElementById("textBoxFor-coordsSaveBox"))a.firstChild.style.textAlign="center"},showCoordinates:function(a){Z.CoordinatesDisplay||Z.Utils.configureCoordinatesDisplay();Z.coordinates&&(Z.coordinates.value=a)},saveCoordinates:function(a){Z.CoordinatesDisplay||Z.Utils.configureCoordinatesDisplay(); 483Z.coordinatesSave&&(Z.coordinatesSave.value+=a+"\n")},configureTraceDisplay:function(){if("undefined"!==typeof Z.Viewport&&null!==Z.Viewport){var a=Z.viewerH-330,b=this.getResource("z229");Z.TraceDisplay=this.createContainerElement("div","TraceDisplay","inline-block","absolute","auto","280px","280px","10px",a+"px","solid","1px",b,"0px","10px","normal");Z.ViewerDisplay.appendChild(Z.TraceDisplay);Z.TraceDisplay.style.zIndex=(Z.baseZIndex+28).toString();a=Z.Utils.getResource("UI_TRACEDISPLAYTITLE"); 484a=Z.Utils.createTextElement("debugTraces",a,"265px","155px","10px","10px","5px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto",null);Z.TraceDisplay.appendChild(a);Z.traces=document.getElementById("debugTraces");var a=parseInt(Z.Utils.getResource("DEFAULT_TRACEDISPLAYTEXTFONTSIZE"),10),b=parseInt(Z.Utils.getResource("DEFAULT_TRACEDISPLAYTEXTPADDINGSMALL"),10),c=textH=16,d=a-2,e=Z.Utils.createContainerElement("div","labelTileStatusTextBox","inline-block","absolute","hidden","1px","1px", 485"0px","0px","none","0px","transparent none","0px","0px","nowrap",null,!0),h=document.createTextNode(Z.Utils.getResource("UI_TRACEDISPLAYTILESTATUSTEXT"));e.appendChild(h);Z.TraceDisplay.appendChild(e);if(e=document.getElementById("labelTileStatusTextBox"))h=e.style,h.width="275px",h.height=c+"px",h.left
485="10px",h.top="183px",Z.Utils.setTextNodeStyle(e,"black","verdana",d+"px","none","normal","normal","normal","normal","1em","center","none");e=17;h=Z.Utils.createTextElement("tilesRequiredTextElement", 486"","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(h);if(h=document.getElementById("textBoxFor-tilesRequiredTextElement")){var f=h.style;f.width="37px";f.height=textH+"px";f.left=e+"px";f.top="198px";Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px");e+=45}h=Z.Utils.createTextElement("tilesCachedTextElement","","1px","1px","1px","1px","0px","solid", 487"1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(h);if(h=document.getElementById("textBoxFor-tilesCachedTextElement"))f=h.style,f.width="37px",f.height=textH+"px",f.left=e+"px",f.top="198px",Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px"),e+=45;h=Z.Utils.createTextElement("tilesRequestedTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden", 488"hidden","off");Z.TraceDisplay.appendChild(h);if(h=document.getElementById("textBoxFor-tilesRequestedTextElement"))f=h.style,f.width="37px",f.height=textH+"px",f.left=e+"px",f.top="198px",Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px"),e+=45;h=Z.Utils.createTextElement("tilesLoadedTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(h); 489if(h=document.getElementById("textBoxFor-tilesLoadedTextElement"))f=h.style,f.width="37px",f.height=textH+"px",f.left=e+"px",f.top="198px",Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px"),e+=45;
489h=Z.Utils.createTextElement("tilesDisplayedTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(h);if(h=document.getElementById("textBoxFor-tilesDisplayedTextElement"))f= 490h.style,f.width="37px",f.height=textH+"px",f.left=e+"px",f.top="198px",Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px"),e+=45;h=Z.Utils.createTextElement("tilesWaitingTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(h);if(h=document.getElementById("textBoxFor-tilesWaitingTextElement"))f=h.style,f.width="37px",f.height=textH+"px", 491f.left=e+"px",f.top="198px",Z.Utils.setTextAreaStyle(h,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px");e=Z.Utils.createContainerElement("div","labelElapsedTimeTextBox","inline-block","absolute","hidden","1px","1px","0px","0px","none","0px","transparent none","0px","0px","nowrap",null,!0);h=document.createTextNode(Z.Utils.getResource("UI_TRACEDISPLAYELAPSEDTIMETEXT"));e.appendChild(h);Z.TraceDisplay.appendChild(e);if(e=document.getElementById("labelElapsedTimeTextBox"))h= 492e.style,h.width="85px",h.height=c+"px",h.left="15px",h.top="224px",Z.Utils.setTextNodeStyle(e,"black","verdana",d+"px","none","normal","normal","normal","normal","1em","left","none");e=Z.Utils.createTextElement("tilesTimeElapsedTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(e);if(e=document.getElementById("textBoxFor-tilesTimeElapsedTextElement"))h=e.style,h.width="50px",h.height=textH+"px",h.left="67.5px", 493h.top="220px",Z.Utils.setTextAreaStyle(e,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px");e=Z.Utils.createContainerElement("div","labelTilesPerSecondTextBox","inline-block","absolute","hidden","1px","1px","0px","0px","none","0px","transparent none","0px","0px","nowrap",null,!0);h=document.createTextNode(Z.Utils.getResource("UI_TRACEDISPLAYTILESPERSECONDTEXT"));e.appendChild(h);Z.TraceDisplay.appendChild(e);if(e=document.getElementById("labelTilesPerSecondTextBox"))h= 494e.style,h.width="85px",h.height=c+"px",h.left="130px",h.top="224px",Z.Utils.setTextNodeStyle(e,"black","verdana",d+"px","none","normal","normal","normal","normal","1em","left","none");c=Z.Utils.createTextElement("tilesPerSecondTextElement","","1px","1px","1px","1px","0px","solid","1px",!1,"verdana","1px","none",null,1,"hidden","hidden","off");Z.TraceDisplay.appendChild(c);if(c=document.getElementById("textBoxFor-tilesPerSecondTextElement"))d=c.style,d.width="50px",d.height=textH+"px",d.left="215px", 495d.top="220px",Z.Utils.setTextAreaStyle(c,"black","verdana",a+"px","none","normal","normal","normal","normal","1em","center","none",b+"px");a=58;b=10;c=this.getResource("z228");d=this.getResource("z446");d=new this.Button("buttonShowGlobals",d,null,null,null,null,a+"px","42px",b+"px","249px","mousedown",this.showGlobals,"z382","solid","1px",c,"0px","0px");Z.TraceDisplay.appendChild(d.elmt);b+=a+10;d=this.getResource("z449");d=new this.Button("buttonToggleDisplay",d,null,null,null,null,a+"px","42px", 496b+"px","249px","mousedown",Z.Viewport.buttonToggleDisplayHandler,"z390","solid","1px",c,"0px","0px");Z.TraceDisplay.appendChild(d.elmt);b+=a+10;d=this.getResource("z447");d=new this.Button("buttonToggleBackfill",d,null,null,null,null,a+"px","42px",b+"px","249px","mousedown",Z.Viewport.buttonToggleBackfillHandler,"z388","solid","1px",c,"0px","0px");Z.TraceDisplay.appendChild(d.elmt);b+=a+10;a+=12;d=this.getResource("z448");a=new this.Button("buttonToggleConstrainPan",d,null,null,null,null,a+"px","42px", 497b+"px","249px","mousedown",Z.Viewport.toggleConstrainPan,"z389","solid","1px",c,"0px","0px");Z.TraceDisplay.appendChild(a.elmt)}else window.setTimeout(function(){Z.Utils.configureTraceDisplay()},100)},showTraces:function(){Z.TraceDisplay?Z.TraceDisplay.style.display="inline-block":Z.Utils.configureTraceDisplay()},hideTraces:function(){Z.TraceDisplay.style.display="none"},trace:function(a,b,c){b=b?"\n":"";c=c?"\n\n":"\n";Z.TraceDisplay||Z.Utils.configureTraceDisplay();Z.traces&&(Z.traces.value+=b+ 498a+c,2==Z.debug&&(Z.traces.scrollTop=Z.traces.scrollHeight))},traceTileStatus:function(a,b,c,d,e,h){if(!(f&&q&&n&&A&&p&&H))var f=document.getElementById("tilesRequiredTextElement"),q=document.getElementById("tilesCachedTextElement"),n=document.getElementById("tilesRequestedTextElement"),A=document.getElementById("tilesLoadedTextElement"),p=document.getElementById("tilesDisplayedTextElement"),H=document.getElementById("tilesWaitingTextElement");f&&q&&n&&A&&p&&H&&("undefined"!==typeof a&&null!==a&&(f.value= 499a.toString()),"undefined"!==typeof b&&null!==b&&(q.value=b.toString()),"undefined"!==typeof c&&null!==c&&(n.value=c.toString()),"undefined"!==typeof d&&null!==d&&(A.value=d.toString()),"undefined"!==typeof e&&null!==e&&(p.value=e.toString()),"undefined"!==typeof h&&null!==h&&(H.value=h.toString()))},traceTileSpeed:function(a,b){if(!c||!d)var c=document.getElementById("tilesTimeElapsedTextElement"),d=document.getElementById("tilesPerSecondTextElement");c&&d&&("undefined"!==typeof a&&null!==a&&(c.value= 500a.toString()),"undefined"!==typeof b&&null!==b&&(d.value=Math.round(b).toString()))},showGlobals:function(){var a;a="\n ZOOMIFY IMAGE VIEWER - CURRENT VALUES\n";a+="\n";a+="VIEW: ";a+="Z.imageX="+Z.imageX+", ";a+="Z.imageY="+Z.imageY+", ";a+="Z.imageZ="+Z.imageZ+", ";a+="Z.imageR="+Z.imageR+", ";a+="Z.priorX="+Z.priorX+", ";a+="Z.priorY="+Z.priorY+", ";a+="Z.priorZ="+Z.priorZ+", ";a+="Z.priorR="+Z.priorR+", ";a+="\n";a+="IMAGE & SKIN: ";a+="Z.imagePath="+ 501Z.imagePath+", ";a+="Z.skinPath="+Z.skinPath+", ";a+="Z.skinMode="+Z.skinMode+", ";a+="Z.imageW="+Z.imageW+", ";a+="Z.imageH="+Z.imageH+", ";a+="tierCount="+Z.Viewport.getTierCount()+", ";a+="z320="+Z.Viewport.getTileW()+", ";a+="z319="+Z.Viewport.getTileH()+"\n";a+="\n";a+="PAGE & BROWSER: ";a+="Z.pageContainer="+Z.pageContainer+", ";a+="Z.browser="+Z.browser+", ";a+="Z.browserVersion="+Z.browserVersion+", ";a+="Z.canvasSupported="+Z.canvasSupported+", ";a+="Z.cssTransformsSupported="+ 502Z.cssTransformsSupported+", ";a+="Z.cssTransformProperty="+Z.cssTransformProperty+", ";a+="Z.cssTransformNoUnits="+Z.cssTransformNoUnits+", ";a+="Z.alphaSupported="+Z.alphaSupported+", ";a+="Z.renderQuality="+Z.renderQuality+", ";a+="Z.rotationSupported="+Z.rotationSupported+", ";a+="Z.fullScreenSupported="+Z.fullScreenSupported+", ";a+="Z.float32ArraySupported="+Z.float32ArraySupported+", ";a+="Z.uInt8ArraySupported="+Z.uInt8ArraySupported+", ";a+="Z.xmlHttpRequestSupport="+Z.xmlHttpRequestSupport+ 503", ";a+="Z.definePropertySupported="+Z.definePropertySupported+", ";a+="Z.responseArraySupported="+Z.responseArraySupported+", ";a+="Z.responseArrayPrototyped="+Z.responseArrayPrototyped+", ";a+="Z.mobileDevice="+Z.mobileDevice+", ";a+="Z.zifSupported="+Z.zifSupported+", ";a+="Z.localUse="+Z.localUse+"\n";a+="\n";a+="VIEWER OPTIONS & DEFAULTS: ";a+="Z.initialX="+Z.initialX+", ";a+="Z.initialY="+Z.initialY+", ";a+="Z.initialZ="+Z.initialZ+", ";a+="Z.minZ="+Z.minZ+", ";a+="Z.maxZ="+ 504Z.maxZ+", ";a+="Z.fitZ="+Z.fitZ+", ";a+="Z.zoomSpeed="+Z.zoomSpeed+", ";a+="Z.panSpeed="+Z.panSpeed+", ";a+="Z.fadeInSpeed="+Z.fadeInSpeed+", ";a+="Z.toolbarVisible="+Z.toolbarVisible+", ";a+="Z.toolbarW="+Z.toolbarW+", ";a+="Z.toolbarCurrentW="+Z.toolbarCurrentW+", ";a+="Z.toolbarH="+Z.toolbarH+", ";a+="Z.toolbarPosition="+Z.toolbarPosition+", ";a+="Z.tooltipsVisible="+Z.tooltipsVisible+", ";a+="Z.helpVisible="+Z.helpVisible+", ";a+="Z.navigatorVisible="+Z.navigatorVisible+ 505", ";a+="Z.navigatorW="+Z.navigatorW+", ";a+="Z.navigatorH="+Z.navigatorH+", ";a+="Z.navigatorL="+Z.navigatorL+", ";a+="Z.navigatorT="+Z.navigatorT+", ";a+="Z.navigatorFit="+Z.navigatorFit+", ";a+="Z.clickZoom="+Z.clickZoom+", ";a+="Z.clickPan="+Z.clickPan+", ";a+="Z.mousePan="+Z.mousePan+", ";a+="Z.keys="+Z.keys+", ";
505a+="Z.constrainPan="+Z.constrainPan+", ";a+="Z.constrainPanStrict="+Z.constrainPanStrict+", ";a+="Z.smoothPan="+Z.smoothPan+", ";a+="Z.smoothPanEasing="+Z.smoothPanEasing+ 506", ";a+="Z.minimizeVisible="+Z.minimizeVisible+", ";a+="Z.sliderZoomVisible="+Z.sliderZoomVisible+", ";a+="Z.zoomButtonsVisible="+Z.zoomButtonsVisible+", ";a+="Z.panButtonsVisible="+Z.panButtonsVisible+", ";a+="Z.resetVisible="+Z.resetVisible+", ";a+="Z.fullScreenVisible="+Z.fullScreenVisible+", ";a+="Z.fullPageVisible="+Z.fullPageVisible+", ";a+="Z.initialFullPage="+Z.initialFullPage+", ";a+="Z.rulerW="+Z.rulerW+", ";a+="Z.rulerH="+Z.rulerH+", ";a+="Z.rulerL="+Z.rulerL+", "; 507a+="Z.rulerT="+Z.rulerT+", ";a+="Z.progressVisible="+Z.progressVisible+", ";a+="Z.logoVisible="+Z.logoVisible+", ";a+="Z.logoLinkURL="+Z.logoLinkURL+", ";a+="Z.logoCustomPath="+Z.logoCustomPath+", ";a+="Z.canvas="+Z.canvas+", ";a+="Z.debug="+Z.debug+", ";a+="Z.imageProperties="+Z.imageProperties+", ";a+="Z.serverIP="+Z.serverIP+", ";a+="Z.serverPort="+Z.serverPort+", ";a+="Z.tileHandlerPath="+Z.tileHandlerPath+", ";a+="Z.tileHandlerPathFull="+Z.tileHandlerPathFull+", ";a+= 508"Z.tileSource="+Z.tileSource+", ";a+="Z.tileType="+Z.tileType+", ";a+="\n";a+="INTERNAL VALUES: ";a+="\n";a+="displayW="+Z.Viewport.getDisplayW()+", ";a+="displayH="+Z.Viewport.getDisplayH()+", ";a+="tierCurrent="+Z.Viewport.getTierCurrent()+", ";a+="tierBackfill="+Z.Viewport.getTierBackfill()+", ";a+="tierBackfillDynamic="+Z.Viewport.getTierBackfillDynamic()+", ";a+="tierBackfillOversize="+Z.Viewport.getTierBackfillOversize()+", ";a+="tierScale="+Z.Viewport.getTierScale()+", "; 509a+="z315="+Z.Viewport.getTiersScaleUpMax()+", ";a+="z314="+Z.Viewport.getTiersScaleDownMax()+", ";a+="z316="+Z.Viewport.getTilesCacheMax()+", ";a+="Z.useCanvas="+Z.useCanvas+"\n";a+="Z.specialStorageEnabled="+Z.specialStorageEnabled+"\n";a+="\n";a+="INTERNAL LISTS: ";a+="tierWs="+Z.Viewport.getTierWs()+", ";a+="tierHs="+Z.Viewport.getTierHs()+", ";a+="tierTileCounts="+Z.Viewport.getTierTileCounts()+", ";a+="tilesLoadingNames="+Z.Viewport.getTilesLoadingNames()+"\n";a+="\n";alert(a)}};
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.