From d1d313a276116e6b324b998af48ab75aa2fd5d41 Mon Sep 17 00:00:00 2001 From: John Hoffer Date: Tue, 30 Mar 2021 22:25:46 -0400 Subject: [PATCH] rely on viaWebGL to prevent cache of shaders --- ...fee2f149fee599f50d.js => bundle.f67ce8e2539d4a2f4b2c.js} | 6 +++--- static/index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename static/{bundle.d9fee2f149fee599f50d.js => bundle.f67ce8e2539d4a2f4b2c.js} (99%) diff --git a/static/bundle.d9fee2f149fee599f50d.js b/static/bundle.f67ce8e2539d4a2f4b2c.js similarity index 99% rename from static/bundle.d9fee2f149fee599f50d.js rename to static/bundle.f67ce8e2539d4a2f4b2c.js index 690a15f..e216a12 100644 --- a/static/bundle.d9fee2f149fee599f50d.js +++ b/static/bundle.f67ce8e2539d4a2f4b2c.js @@ -1,4 +1,4 @@ -!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,n){!function(e,t){if(!x[e]||!y[e])return;for(var n in y[e]=!1,t)Object.prototype.hasOwnProperty.call(t,n)&&(h[n]=t[n]);0==--b&&0===v&&E()}(e,n),t&&t(e,n)};var n,i=!0,r="d9fee2f149fee599f50d",o={},a=[],s=[];function l(e){var t=M[e];if(!t)return z;var i=function(i){return t.hot.active?(M[i]?-1===M[i].parents.indexOf(e)&&M[i].parents.push(e):(a=[e],n=i),-1===t.children.indexOf(i)&&t.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+e),a=[]),z(i)},r=function(e){return{configurable:!0,enumerable:!0,get:function(){return z[e]},set:function(t){z[e]=t}}};for(var o in z)Object.prototype.hasOwnProperty.call(z,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(i,o,r(o));return i.e=function(e){return"ready"===d&&f("prepare"),v++,z.e(e).then(t,(function(e){throw t(),e}));function t(){v--,"prepare"===d&&(w[e]||C(e),0===v&&0===b&&E())}},i.t=function(e,t){return 1&t&&(e=i(e)),z.t(e,-2&t)},i}function c(t){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:n!==t,active:!0,accept:function(e,t){if(void 0===e)i._selfAccepted=!0;else if("function"==typeof e)i._selfAccepted=e;else if("object"==typeof e)for(var n=0;n=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(h={})[t]=e[t],f("ready");break;case"ready":T(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:A,apply:S,status:function(e){if(!e)return d;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:o[t]};return n=void 0,i}var u=[],d="idle";function f(e){d=e;for(var t=0;t0;){var r=i.pop(),o=r.id,a=r.chain;if((u=M[o])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(u.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s ")),E.type){case"self-declined":i.onDeclined&&i.onDeclined(E),i.ignoreDeclined||(S=new Error("Aborted because of self decline: "+E.moduleId+P));break;case"declined":i.onDeclined&&i.onDeclined(E),i.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+E.moduleId+" in "+E.parentId+P));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(E),i.ignoreUnaccepted||(S=new Error("Aborted because "+d+" is not accepted"+P));break;case"accepted":i.onAccepted&&i.onAccepted(E),T=!0;break;case"disposed":i.onDisposed&&i.onDisposed(E),D=!0;break;default:throw new Error("Unexception type "+E.type)}if(S)return f("abort"),Promise.reject(S);if(T)for(d in y[d]=h[d],b(w,E.outdatedModules),E.outdatedDependencies)Object.prototype.hasOwnProperty.call(E.outdatedDependencies,d)&&(v[d]||(v[d]=[]),b(v[d],E.outdatedDependencies[d]));D&&(b(w,[E.moduleId]),y[d]=A)}var F,I=[];for(l=0;l0;)if(d=L.pop(),u=M[d]){var B={},R=u.hot._disposeHandlers;for(c=0;c=0&&H.parents.splice(F,1))}}for(d in v)if(Object.prototype.hasOwnProperty.call(v,d)&&(u=M[d]))for(O=v[d],c=0;c=0&&u.children.splice(F,1);f("apply"),void 0!==m&&(r=m,m=void 0);for(d in h=void 0,y)Object.prototype.hasOwnProperty.call(y,d)&&(e[d]=y[d]);var j=null;for(d in v)if(Object.prototype.hasOwnProperty.call(v,d)&&(u=M[d])){O=v[d];var V=[];for(l=0;l=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(h={})[t]=e[t],f("ready");break;case"ready":T(t);break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(t)}},check:A,apply:S,status:function(e){if(!e)return d;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:o[t]};return n=void 0,i}var u=[],d="idle";function f(e){d=e;for(var t=0;t0;){var r=i.pop(),o=r.id,a=r.chain;if((u=M[o])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(u.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s ")),E.type){case"self-declined":i.onDeclined&&i.onDeclined(E),i.ignoreDeclined||(S=new Error("Aborted because of self decline: "+E.moduleId+P));break;case"declined":i.onDeclined&&i.onDeclined(E),i.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+E.moduleId+" in "+E.parentId+P));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(E),i.ignoreUnaccepted||(S=new Error("Aborted because "+d+" is not accepted"+P));break;case"accepted":i.onAccepted&&i.onAccepted(E),T=!0;break;case"disposed":i.onDisposed&&i.onDisposed(E),D=!0;break;default:throw new Error("Unexception type "+E.type)}if(S)return f("abort"),Promise.reject(S);if(T)for(d in y[d]=h[d],b(w,E.outdatedModules),E.outdatedDependencies)Object.prototype.hasOwnProperty.call(E.outdatedDependencies,d)&&(v[d]||(v[d]=[]),b(v[d],E.outdatedDependencies[d]));D&&(b(w,[E.moduleId]),y[d]=A)}var F,I=[];for(l=0;l0;)if(d=L.pop(),u=M[d]){var B={},R=u.hot._disposeHandlers;for(c=0;c=0&&H.parents.splice(F,1))}}for(d in v)if(Object.prototype.hasOwnProperty.call(v,d)&&(u=M[d]))for(O=v[d],c=0;c=0&&u.children.splice(F,1);f("apply"),void 0!==m&&(r=m,m=void 0);for(d in h=void 0,y)Object.prototype.hasOwnProperty.call(y,d)&&(e[d]=y[d]);var j=null;for(d in v)if(Object.prototype.hasOwnProperty.call(v,d)&&(u=M[d])){O=v[d];var V=[];for(l=0;l-1?s[l?t[c]:c]:void 0}}},function(e,t,n){var i=n(412);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var i=n(406),r=n(224),o=n(210),a=i&&1/o(new i([,-0]))[1]==1/0?function(e){return new i(e)}:r;e.exports=a},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var i=n(817),r=n(89),o=Array.prototype.push;function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function l(e,t){return function(){var n=arguments.length;if(n){for(var i=Array(n);n--;)i[n]=arguments[n];var r=i[0]=t.apply(void 0,i);return e.apply(void 0,i),r}}}e.exports=function e(t,n,c,u){var d="function"==typeof n,f=n===Object(n);if(f&&(u=c,c=n,n=void 0),null==c)throw new TypeError;u||(u={});var p=!("cap"in u)||u.cap,h=!("curry"in u)||u.curry,m=!("fixed"in u)||u.fixed,g=!("immutable"in u)||u.immutable,b=!("rearg"in u)||u.rearg,v=d?c:r,w="curry"in u&&u.curry,y="fixed"in u&&u.fixed,x="rearg"in u&&u.rearg,k=d?c.runInContext():void 0,A=d?c:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},C=A.ary,E=A.assign,S=A.clone,_=A.curry,T=A.forEach,M=A.isArray,z=A.isError,D=A.isFunction,P=A.isWeakMap,F=A.keys,I=A.rearg,N=A.toInteger,O=A.toPath,L=F(i.aryMethod),B={castArray:function(e){return function(){var t=arguments[0];return M(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],i=e(t,n),r=i.length;return p&&"number"==typeof n?(n=n>2?n-2:1,r&&r<=n?i:a(i,n)):i}},mixin:function(e){return function(t){var n=this;if(!D(n))return e(n,Object(t));var i=[];return T(F(t),(function(e){D(t[e])&&i.push([e,n.prototype[e]])})),e(n,Object(t)),T(i,(function(e){var t=e[1];D(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t<0?1:N(t)+1;return _(e(t),n)}},rearg:function(e){return function(t,n){var i=n?n.length:0;return _(e(t,n),i)}},runInContext:function(n){return function(i){return e(t,n(i),u)}}};function R(e,t){if(p){var n=i.iterateeRearg[e];if(n)return function(e,t){return W(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(I(a(e,n),t),n)}))}(t,n);var r=!d&&i.iterateeAry[e];if(r)return function(e,t){return W(e,(function(e){return"function"==typeof e?a(e,t):e}))}(t,r)}return t}function H(e,t,n){if(m&&(y||!i.skipFixed[e])){var r=i.methodSpread[e],a=r&&r.start;return void 0===a?C(t,n):function(e,t){return function(){for(var n=arguments.length,i=n-1,r=Array(n);n--;)r[n]=arguments[n];var a=r[t],s=r.slice(0,t);return a&&o.apply(s,a),t!=i&&o.apply(s,r.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function j(e,t,n){return b&&n>1&&(x||!i.skipRearg[e])?I(t,i.methodRearg[e]||i.aryRearg[n]):t}function V(e,t){for(var n=-1,i=(t=O(t)).length,r=i-1,o=S(Object(e)),a=o;null!=a&&++n1?_(t,n):t}(0,r=R(o,r),e),!1}})),!r})),r||(r=a),r==t&&(r=w?_(r,1):function(){return t.apply(this,arguments)}),r.convert=U(o,t),r.placeholder=t.placeholder=n,r}if(!f)return G(n,c,v);var Y=c,q=[];return T(L,(function(e){T(i.aryMethod[e],(function(e){var t=Y[i.remap[e]||e];t&&q.push([e,G(e,t,Y)])}))})),T(F(Y),(function(e){var t=Y[e];if("function"==typeof t){for(var n=q.length;n--;)if(q[n][0]==e)return;t.convert=U(e,t),q.push([e,t])}})),T(q,(function(e){Y[e[0]]=e[1]})),Y.convert=function(e){return Y.runInContext.convert(e)(void 0)},Y.placeholder=Y,T(F(Y),(function(e){T(i.realToAlias[e]||[],(function(t){Y[t]=Y[e]}))})),Y}},function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,i={};for(var r in n){var o=n[r];e.call(i,o)?i[o].push(r):i[o]=[r]}return i}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(e,t,n){e.exports={ary:n(819),assign:n(425),clone:n(832),curry:n(847),forEach:n(212),isArray:n(28),isError:n(848),isFunction:n(90),isWeakMap:n(849),iteratee:n(850),keys:n(204),rearg:n(851),toInteger:n(97),toPath:n(852)}},function(e,t,n){var i=n(213);e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,i(e,128,void 0,void 0,void 0,void 0,t)}},function(e,t,n){var i=n(214),r=n(46);e.exports=function(e,t,n){var o=1&t,a=i(e);return function t(){var i=this&&this!==r&&this instanceof t?a:e;return i.apply(o?n:this,arguments)}}},function(e,t,n){var i=n(199),r=n(214),o=n(417),a=n(420),s=n(296),l=n(216),c=n(46);e.exports=function(e,t,n){var u=r(e);return function r(){for(var d=arguments.length,f=Array(d),p=d,h=s(r);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:l(f,h);if((d-=m.length)1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var i=n(212),r=n(211),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return i(o,(function(n){var i="_."+n[0];t&n[1]&&!r(e,i)&&e.push(i)})),e.sort()}},function(e,t,n){var i=n(138),r=n(161),o=Math.min;e.exports=function(e,t){for(var n=e.length,a=o(t.length,n),s=i(e);a--;){var l=t[a];e[a]=r(l,n)?s[l]:void 0}return e}},function(e,t,n){var i=n(199),r=n(214),o=n(46);e.exports=function(e,t,n,a){var s=1&t,l=r(e);return function t(){for(var r=-1,c=arguments.length,u=-1,d=a.length,f=Array(d+c),p=this&&this!==o&&this instanceof t?l:e;++u>>0)?(e=c(e))&&("string"==typeof t||null!=t&&!s(t))&&!(t=i(t))&&o(e)?r(l(e),0,n):e.split(t,n):[]}},function(e,t,n){var i=n(856),r=n(137),o=n(203),a=o&&o.isRegExp,s=a?r(a):i;e.exports=s},function(e,t,n){var i=n(72),r=n(47);e.exports=function(e){return r(e)&&"[object RegExp]"==i(e)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+i+"|"+r+")"+"?",c="[\\ufe0e\\ufe0f]?"+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+l+")*"),u="(?:"+[o+i+"?",i,a,s,n].join("|")+")",d=RegExp(r+"(?="+r+")|"+u+c,"g");e.exports=function(e){return e.match(d)||[]}},function(e,t,n){var i=n(201),r=n(15);e.exports=function(e,t){return i(r(e,t),1)}},function(e,t,n){var i=n(125),r=n(73);e.exports=function(e,t){var n=-1,o=r(e)?Array(e.length):[];return i(e,(function(e,i,r){o[++n]=t(e,i,r)})),o}},function(e,t,n){var i=n(120),r=n(138),o=n(98),a=n(73),s=n(141),l=n(862),c=n(401),u=n(210),d=n(300),f=n(126),p=i?i.iterator:void 0;e.exports=function(e){if(!e)return[];if(a(e))return s(e)?d(e):r(e);if(p&&e[p])return l(e[p]());var t=o(e);return("[object Map]"==t?c:"[object Set]"==t?u:f)(e)}},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t,n){var i=n(864)();e.exports=i},function(e,t,n){var i=n(295),r=n(283),o=n(294),a=n(422),s=n(28),l=n(421);e.exports=function(e){return r((function(t){var n=t.length,r=n,c=i.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new TypeError("Expected a function");if(c&&!d&&"wrapper"==a(u))var d=new i([],!0)}for(r=d?r:n;++r=120&&b.length>=120)?new i(p&&b):void 0}b=e[0];var v=-1,w=h[0];e:for(;++v1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&r(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++i0&&!r.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},function(e,t,n){"use strict";var i=n(169),r=n(899),o=n(437),a=n(438),s=n(904),l=r(a(),Object);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},function(e,t,n){"use strict";var i=n(170),r=n(901),o=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||i.call(a,o),l=r("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(i,a,arguments)};var c=function(){return s(i,o,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var i="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError(i+t);for(var n,a=r.call(arguments,1),s=function(){if(this instanceof n){var i=t.apply(this,a.concat(r.call(arguments)));return Object(i)===i?i:this}return t.apply(e,a.concat(r.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=E(e),i=n.length>0?n[0]:"",r=S("%"+i+"%",t),a=r.name,l=r.value,c=!1,u=r.alias;u&&(i=u[0],x(n,y([0,1],u)));for(var d=1,f=!0;d=n.length){var h=s(l,p);if(f=!!h,!t&&!(p in l))throw new o("base intrinsic for "+e+" exists, but the property is not available.");l=f&&"get"in h&&!("originalValue"in h.get)?h.get:l[p]}else f=w(l,p),l=l[p];f&&!c&&(g[a]=l)}}return l}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},function(e,t,n){"use strict";var i=n(170);e.exports=i.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var i=n(438),r=n(169);e.exports=function(){var e=i();return r(Object,{is:e},{is:function(){return Object.is!==e}}),e}},function(e,t,n){"use strict";var i,r,o,a,s=n(301)()&&"symbol"==typeof Symbol.toStringTag;if(s){i=Function.call.bind(Object.prototype.hasOwnProperty),r=Function.call.bind(RegExp.prototype.exec),o={};var l=function(){throw o};a={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=l)}var c=Object.prototype.toString,u=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=u(e,"lastIndex");if(!(t&&i(t,"value")))return!1;try{r(e,a)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===c.call(e)}},function(e,t,n){"use strict";var i=n(169),r=n(907),o=n(439),a=n(440),s=n(909),l=r(o);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},function(e,t,n){"use strict";var i=n(170),r=n(908),o=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||i.call(a,o),l=r("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(i,a,arguments)};var c=function(){return s(i,o,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var i=TypeError,r=Object.getOwnPropertyDescriptor;if(r)try{r({},"")}catch(e){r=null}var o=function(){throw new i},a=r?function(){try{return o}catch(e){try{return r(arguments,"callee").get}catch(e){return o}}}():o,s=n(301)(),l=Object.getPrototypeOf||function(e){return e.__proto__},c=void 0,u="undefined"==typeof Uint8Array?void 0:l(Uint8Array),d={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?l([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":c&&s&&Symbol.asyncIterator?c[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?l(l([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s?l((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s?l((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?l(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:void 0,"%SymbolPrototype%":s?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":a,"%TypedArray%":u,"%TypedArrayPrototype%":u?u.prototype:void 0,"%TypeError%":i,"%TypeErrorPrototype%":i.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},f=n(170).call(Function.call,String.prototype.replace),p=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h=/\\(\\)?/g,m=function(e){var t=[];return f(e,p,(function(e,n,i,r){t[t.length]=i?f(r,h,"$1"):n||e})),t},g=function(e,t){if(!(e in d))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===d[e]&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return d[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=m(e),o=g("%"+(n.length>0?n[0]:"")+"%",t),a=1;a=n.length){var s=r(o,n[a]);if(!t&&!(n[a]in o))throw new i("base intrinsic for "+e+" exists, but the property is not available.");o=s&&"get"in s&&!("originalValue"in s.get)?s.get:o[n[a]]}else o=o[n[a]];return o}},function(e,t,n){"use strict";var i=n(169).supportsDescriptors,r=n(440),o=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!i||!l)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=r(),t=l(c),n=o(t,"flags");return n&&n.get===e||a(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},function(e,t,n){"use strict";var i=Date.prototype.getDay,r=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return i.call(e),!0}catch(e){return!1}}(e):"[object Date]"===r.call(e))}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=(a(i),a(n(5))),o=a(n(912));a(n(913));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,i){e=n,t.forEach((function(t){return t(e,i)}))}}}t.default=function(e,t){var n,a,d="__create-react-context-"+(0,o.default)()+"__",f=function(e){function n(){var t,i;s(this,n);for(var r=arguments.length,o=Array(r),a=0;a1&&void 0!==arguments[1]&&arguments[1],n="path="+e;return t&&(n+="&parent=true"),fetch("http://127.0.0.1:2020/api/filebrowser?"+n,{headers:{pragma:"no-cache","cache-control":"no-cache"}}).then((function(e){return e.json()}))}},{key:"openItem",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isDir&&this.browse(e.path,n).then((function(n){e.children=n.entries;var i=new u;i.entries=t.sortEntries(n.entries),i.path=n.path,t.setState({activeFolder:i}),t.forceUpdate()}))}},{key:"sortEntries",value:function(e){return this._sortByType(this._sortByName(e))}},{key:"_sortByType",value:function(e){return e.sort((function(e,t){return e.isDir&&!t.isDir?-1:!e.isDir&&t.isDir?1:0}))}},{key:"_sortByName",value:function(e){return e.sort((function(e,t){return e.name.localeCompare(t.name)}))}},{key:"filter",value:function(e){var t=[],n=!0,i=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s.isDir)t.push(s);else{var l=this._getExtension(s.name);this.props.filter.includes(l)&&t.push(s)}}}catch(e){i=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw r}}return t}},{key:"_getExtension",value:function(e){return e.substr(e.lastIndexOf(".")+1)}},{key:"_formatSize",value:function(e){return e?e<1e3?e+" bytes":e<1e6?(e/1e3).toFixed(1)+" KB":e<1e9?(e/1e6).toFixed(1)+" MB":(e/1e9).toFixed(1)+" GB":""}},{key:"isImage",value:function(e){var t=this._getExtension(e.name);return["tif","tiff","dat"].includes(t)}},{key:"navigateBack",value:function(){this.openItem(this.state.activeFolder,!0)}},{key:"selectFile",value:function(e){this.props.onFileSelected(e,this.state.activeFolder.path)}},{key:"_getIconClass",value:function(e){var t="image filebrowser-icon-";return e.isDir?t+="dir":(t+="file",this.isImage(e)&&(t+="-selectable")),t}},{key:"render",value:function(){return a.default.createElement("div",null,a.default.createElement("div",{className:"filebrowser-location-bar"},a.default.createElement("button",{type:"button",onClick:this.navigateBack,className:"ui button basic",disabled:this.state.activeFolder.isRoot},a.default.createElement(s.FontAwesomeIcon,{icon:l.faAngleLeft,size:"lg"})),a.default.createElement("span",null,this.state.activeFolder.path)),a.default.createElement("div",{className:"filebrowser-content content scrolling"},this.renderDir(this.state.activeFolder)))}},{key:"renderDir",value:function(e){var t=this;if(!e||0===e.entries.length)return null;var n=e.entries.map((function(e,n){return a.default.createElement("div",{className:"ui item filebrowser-item",onClick:function(){return t.openItem(e)},key:n},a.default.createElement("div",{className:t._getIconClass(e)},t.renderIcon(e)),a.default.createElement("div",{className:"content ui grid"},a.default.createElement("div",{className:"seven wide column"},a.default.createElement("h5",null,e.name)),e.size?a.default.createElement("div",{className:"five wide column"},"Size: ",t._formatSize(e.size)):null,t.renderSelectButton(e)))}));return a.default.createElement("div",{className:"ui list"},n)}},{key:"renderIcon",value:function(e){var t=null;return t=e.isDir?e.isOpen?l.faFolderOpen:l.faFolder:this.isImage(e)?l.faImage:l.faFile,a.default.createElement(s.FontAwesomeIcon,{icon:t,size:"2x"})}},{key:"renderSelectButton",value:function(e){var t=this;if(e.isDir)return null;if(this.props.filter){var n=e.name.substr(e.name.lastIndexOf(".")+1);if(!this.props.filter.includes(n))return null}return a.default.createElement("div",{className:"four wide column"},a.default.createElement("button",{type:"button",onClick:function(){return t.selectFile(e)},className:"ui button primary"},a.default.createElement(s.FontAwesomeIcon,{icon:l.faCheck}),"  Select"))}}]),t}(a.default.Component);t.default=d},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAAfeCAMAAAANs6rnAAADAFBMVEUAAAD9/f319fX5+fry8vMAAQD49/fnAQHeAAH9AQH2LS31Nzb4QD/p6en6W1vi4+LvAQHt7+76SEj5UlL8enn4+D71AAH09Cgvpi/mQTzrTkroLzD1IiHuZl86rTr4cW/zFRRGskbDAAD6+VT52EPPzs4AhwD45XT7Z2X431tRt1EAA2HeW1fZ19fNAAG0AADXTEpIW6P56+gAAnv1zy1avFrWAQF+yHwAMADgbGvbNC0dnx7QPj0CBZAABagAdwDmfHlgf9tNb9XyzcwCCcP1h4LkHxwAPgAAIgC5xOL2paQBATn3urkyT5Nvw28AAU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zX1KO9kSYbxPiQi7cboa8eM6uMHNxSUsk6DUHDVOuVmO9EeqG3LVIKe4w/c7+FKDNEnIhLW8xt+FakMd9CVkPvR1wSjk4OL0tK2+1mNtAYk64BcHbJ7u7h4fH4Cc45t7zV5o+u+Yg+V1K/twB0QMHcuJ5LLcwf0d88n6IxX1E6TDkIqeduovmJfjBqoK4PRa6cwusgiZlAah5LAqFQqFQKBQKhUIRiz9saq7hLAJxTgAAAABJRU5ErkJggg=="},function(e,t,n){e.exports=n.p+"c752218ea53450b6ba82eecfcd6e00b9.woff2"},function(e,t,n){e.exports=n.p+"3fe5eb9d51984455571771f492ebb78b.woff"},function(e,t,n){e.exports=n.p+"f303602aa47452100523cab39c189a1a.ttf"},function(e,t,n){e.exports=n.p+"4d8475c4956ead1ded758675f0e6d184.svg"},function(e,t,n){e.exports=n.p+"7b12a966adcf1a0b8e3e0246365b92ce.woff2"},function(e,t,n){e.exports=n.p+"4fe7e256279e0762d4bfc04a58dabc51.woff"},function(e,t,n){e.exports=n.p+"45cbd94a4ac756bba55b18150e290cad.ttf"},function(e,t,n){e.exports=n.p+"39dc361a17b76733569d7ddb357c27e4.svg"},function(e,t,n){e.exports=n.p+"6611186a0f3a6511ff63aad9a27e4cae.woff2"},function(e,t,n){e.exports=n.p+"4e5ce754d6c3215a41c88b2f326c1065.woff"},function(e,t,n){e.exports=n.p+"dbef93d8a4ffdcd07f4ddefc3a86d8a0.ttf"},function(e,t,n){e.exports=n.p+"717c8a0c3865298b8b36a18be518e34f.svg"},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(931),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(76))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,a,s,l=1,c={},u=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0&&(o+="?map"),r+"/"+o},u32:r,many_channels_id:!0===r?a:e,many_channels_url:u,many_channels:[{unique_id:e,map_ids:o||[],color:s.map((function(e){return e/255})),range:[l.min/c,l.max/c]}],tileSize:n.tilesize,maxLevel:n.maxLevel,height:n.height,width:n.width,minLevel:0}}}},{key:"makeTileSources",value:function(e){return e.map(this.makeTileSource,this).filter((function(e){return void 0!==e}))}},{key:"getTiledImageIds",value:function(){var e=this.viewer.world,t=e.getItemCount();return[].concat(g(Array(t).keys())).reduce((function(t,n){return e.getItemAt(n).source.many_channels.reduce((function(e,t){return e.push(t.unique_id),e}),t)}),[])}},{key:"getTiledImageByMaskKey",value:function(e){var t=this.viewer.world,n=t.getItemCount();for(var i in[].concat(g(Array(n).keys()))){var r=t.getItemAt(i),o=r.source,a=o.many_channels;if(e==o.many_channels_id&&a[0].map_ids.length>0)return r}}},{key:"getTiledImageById",value:function(e){var t=this.viewer.world,n=t.getItemCount(),i=[];for(var r in[].concat(g(Array(n).keys()))){var o=t.getItemAt(r),a=o.source.many_channels;a.find((function(t){return e==t.unique_id}))&&i.push(o)}var s=i.shift();return i.forEach((function(e){return t.removeItem(e)})),s}},{key:"redrawChannels",value:function(e){this.viewer.world;var t=this.props.channels;[].concat(g(t)).reduce((function(t,n){var r=i(n,2),o=r[0],a=r[1];return e.includes(o)?t.concat([a]):t}),[]).map(this.setChannel,this)}},{key:"addChannel",value:function(e){var t=this;return new Promise((function(n,i){var r=!0,o=e.many_channels,a=e.many_channels_id;if(o[0].map_ids.length>0){var s=t.getTiledImageByMaskKey(a);if(s){var l=s.source;l.many_channels=l.many_channels.concat(o),n({item:s}),r=!1}}r&&t.viewer.addTiledImage({success:n,tileSource:e,width:t.props.img.width/t.props.img.height,compositeOperation:e.u32?"source-over":"lighter"})}))}},{key:"addTileSources",value:function(e){var t=this;return e.reduce((function(e,n){return e.then((function(){return t.addChannel(n)}))}),Promise.resolve())}},{key:"addChannels",value:function(e){return this.addTileSources(this.makeTileSources(e))}},{key:"setChannel",value:function(e){var t=e.id,n=e.color,i=e.range,r=e.maxRange,o=this.getTiledImageById(t);if(void 0!==o){var a=o.source;o._needsDraw=!0,a.many_channels.forEach((function(e){e.unique_id==t&&(e.color=n.map((function(e){return e/255})),e.range=[i.min/r,i.max/r])}))}}},{key:"getChannel",value:function(e){var t=this.getTiledImageById(e);if(void 0!==t){var n=t.source.many_channels.find((function(t){return t.unique_id==e}));if(void 0!==n)return{id:n.id,range:n.range,color:n.color.map((function(e){return Math.round(255*e)}))}}}},{key:"startOpenSeadragon",value:function(){var e=this;return new Promise((function(t){var n=e.props,r=n.channels,o=n.img,a=n.handleViewport,s=e.props.interactor,l=[].concat(g(r.keys())),c=e.makeTileSources(l);if(c.length<1)return!1;var u=c.shift();e.viewer=d.default.OpenSeadragon({collectionMode:!1,showZoomControl:!1,showHomeControl:!1,loadTilesWithAjax:!0,showFullPageControl:!1,preserveViewport:!0,id:"ImageView",prefixUrl:"image/openseadragon/",tileSources:[u],compositeOperation:"lighter",maxZoomPixelRatio:10,ajaxHeaders:{"Cache-Control":"no-store"}}),s(e.viewer);var f=!1;e.viewer.world.addHandler("add-item",(function(e){e.item.setWidth(o.width/o.height),f||(f=!0,t())})),e.viewer.addHandler("animation-finish",(function(e){var t=e.userData.viewer.viewport;a(t)}),e),e.viewer.uuid=o.uuid;var p=e.viewer;function h(){p.currentOverlays.forEach((function(e){var t="white-overlay"==e.element.className,n="green-overlay"==e.element.className;t||n||(e.element.style.transform="")}))}p.addHandler("update-viewport",(function(){setTimeout(h,1)})),p.addHandler("animation",h);var m=new d.default.openSeadragonGL(e.viewer);m.viaGL.loadArray=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"u16",r=this.gl;r.clear(this.gl.COLOR_BUFFER_BIT),b.call(this,r.TEXTURE0,this.texture),"u16"==i?r.texImage2D(r.TEXTURE_2D,0,r.RG8UI,e,t,0,r.RG_INTEGER,r.UNSIGNED_BYTE,n):"u32"==i&&r.texImage2D(r.TEXTURE_2D,0,r.RGBA8UI,e,t,0,r.RGBA_INTEGER,r.UNSIGNED_BYTE,n);for(var o=[this.all_color_3fv,this.all_range_2fv,this.all_ids_shape_2iv,this.all_ids_array].reduce((function(e,t){return e.length0&&(r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length+t,i=new ArrayBuffer(4*n),r=new DataView(i);return e.forEach((function(e,n){r.setUint32(4*t+4*n,e,!0)})),new Uint8Array(i)}(o,(t=i.gl.getParameter(i.gl.MAX_TEXTURE_SIZE))*(n=Math.ceil(o.length/t))-o.length)),d.push(r),f.push([t,n])})),i.fmt_1i=u,i.all_color_3fv=a,i.all_range_2fv=s,i.all_ids_array=d,i.all_ids_shape_2iv=f,32==u){var p=t.rendered.canvas.width,h=t.rendered.canvas.height;t.rendered.clearRect(0,0,p,h)}e(t)}}));var b=function(e,t){this.gl.activeTexture(e),this.gl.bindTexture(this.gl.TEXTURE_2D,t),this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,1),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST)};return m.addHandler("gl-drawing",(function(e){this.gl.uniform1i(this.u_tile_fmt,this.fmt_1i),this.gl.uniform3fv(this.u_tile_color,this.all_color_3fv[e]),this.gl.uniform2fv(this.u_tile_range,this.all_range_2fv[e]),this.gl.uniform2iv(this.u_ids_shape,this.all_ids_shape_2iv[e]);var t=i(this.all_ids_shape_2iv[e],2),n=t[0],r=t[1],o=this.all_ids_array[e];null!=o?(b.call(this,this.gl.TEXTURE1,this.texture_ids),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA8UI,n,r,0,this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,o)):(b.call(this,this.gl.TEXTURE1,this.texture_ids),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA8UI,1,1,0,this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,new Uint8Array(4)))})),m.addHandler("gl-loaded",(function(e){this.u_tile_color=this.gl.getUniformLocation(e,"u_tile_color"),this.u_tile_range=this.gl.getUniformLocation(e,"u_tile_range"),this.u_tile_fmt=this.gl.getUniformLocation(e,"u_tile_fmt"),this.u_ids_shape=this.gl.getUniformLocation(e,"u_ids_shape");var t=this.gl.getUniformLocation(e,"u_ids");this.texture_ids=this.gl.createTexture(),this.gl.uniform1i(t,1)})),m.addHandler("tile-loaded",(function(e,t){return e(t)})),m.init(),!0}))}},{key:"componentDidMount",value:function(){var e=this;this.props.channels.size>0&&!this.state.waiting&&(this.setState({waiting:!0}),this.startOpenSeadragon().then((function(){e.setState({waiting:!1,ready:!0})})))}},{key:"componentDidUpdate",value:function(){var e=this,t=this.viewer,n=this.props,i=n.channels,r=n.overlays,o=n.arrows;if(t&&this.state.ready){this.viewer.viewport.setRotation(this.props.rotation),o.forEach((function(e,n){var i=e.position,r="label-"+n,o="new-"+r,a=document.getElementById(r),s=document.getElementById(o);s?(s.className=a.className,s.innerText=a.innerText):(s=a.cloneNode(!0)).id=o;var l=t.getOverlayById(o),c=new OpenSeadragon.Point(i[0],i[1]);l?l.update({location:c}):t.addOverlay({x:i[0],y:i[1],element:s,placement:OpenSeadragon.Placement.CENTER})})),o.forEach((function(e,n){var i=e.position,r="arrow-"+n,o="new-"+r,a=document.getElementById(r),s=document.getElementById(o);s?s.className=a.className:(s=a.cloneNode(!0)).id=o;var l=t.getOverlayById(o),c=new OpenSeadragon.Point(i[0],i[1]);l?l.update({location:c}):t.addOverlay({x:i[0],y:i[1],element:s,placement:OpenSeadragon.Placement.CENTER})}));for(var a=o.length;a<100;a++){var s="new-arrow-"+a,l=t.getOverlayById(s),c=new OpenSeadragon.Point(-1,-1);l&&l.update({location:c})}for(a=o.length;a<100;a++){var u="new-label-"+a,d=t.getOverlayById(u),f=new OpenSeadragon.Point(-1,-1);d&&d.update({location:f})}r.forEach((function(e,n){var i="overlay-"+n,r=t.getOverlayById(i),o=new OpenSeadragon.Point(e[0],e[1]);r?r.update({location:o,width:e[2],height:e[3]}):t.addOverlay({x:e[0],y:e[1],width:e[2],height:e[3],element:i})}));for(a=r.length;a<100;a++){var p="overlay-"+a,h=t.getOverlayById(p),m=new OpenSeadragon.Point(-1,-1);h&&h.update({location:m,width:.001,height:.001})}}else i.size>0&&!this.state.waiting&&(this.setState({waiting:!0}),this.startOpenSeadragon().then((function(){e.setState({waiting:!1,ready:!0})})))}},{key:"updateChannels",value:function(e,t,n,i){var r,o=this,a=e.world,s=new Set(n.keys()),l=i.filter((function(e){return((n.get(e)||{}).map_ids||[]).length>0})).reverse();if(e.uuid!=t)a.removeAll(),e.uuid=t,this.addChannels([].concat(g(s)));else{var c=new Set(this.getTiledImageIds()),u=(r=c,[].concat(g(s)).filter(r.has.bind(r))),d=b(c,s),f=b(s,c);d.forEach((function(e){var t=o.getTiledImageById(e);if(null!=t){var n=t.source;n.many_channels.length<=1?a.removeItem(t):(n.many_channels=n.many_channels.filter((function(t){return t.unique_id!=e})),0==n.many_channels.length&&a.removeItem(t))}})),this.addChannels([].concat(g(f))).then((function(){if(l.length){var e=l[0],t=o.getTiledImageById(e),n=(t.source||{}).many_channels;if(n){var i=n.length==l.length,r=new Map(n.map((function(e,t){return i&&l[t]!=e.unique_id&&(i=!1),[e.unique_id,e]})));i||(t.source.many_channels=l.reduce((function(e,t){return r.has(t)&&e.push(r.get(t)),e}),[]),t._needsDraw=!0)}}})),this.redrawChannels(u.filter((function(e){var t=o.getChannel(e),i=n.get(e),r=i.color,a=i.range,s=i.maxRange;return t.range[0]!=a.min/s|t.range[1]!=a.max/s|t.color[0]!=r[0]|t.color[1]!=r[1]|t.color[2]!=r[2]})))}}},{key:"render",value:function(){var e=this.viewer,t=this.props.arrows;if(void 0!==e){var n=this.props.img.uuid,i=this.props,r=i.channels,c=i.maskOrder;this.updateChannels(e,n,r,c)}var d=[].concat(g(Array(100).keys())).map((function(e,t){var n="overlay-"+t;return u.default.createElement("div",{className:"white-overlay",key:n,id:n})})),h=[].concat(g(Array(t.length).keys())).map((function(e,n){var i="arrow-"+n,r="label-"+n,c=t.length>n?t[n]:void 0,d=c&&""!==c.angle?c.angle:60,h=61.4*Math.sin(d*Math.PI/180),m=61.4*Math.cos(d*Math.PI/180),g=2*m+200*Math.sign(Math.round(m))/2,b=2*h+50*Math.sign(Math.round(h))/2;c.hide&&(g=0,b=0);var v=p.default.div(o,m,h,d),w=p.default.div(a,g,b,200,50);return c.hide&&(v=p.default.div(s)),""===c.text&&(w=p.default.div(l)),u.default.createElement("div",{key:i},u.default.createElement(v,{id:i},u.default.createElement(f.default,null)),u.default.createElement(w,{id:r},c.text))}));return u.default.createElement("div",null,u.default.createElement("div",{id:"ImageView"}),u.default.createElement("div",{className:"d-none"},d,h))}}]),t}(c.Component);t.default=v},function(e,t,n){"use strict";window.OpenSeadragon=n(936),window.UPNG=n(937),n(947),n(948),e.exports={ViaWebGL:ViaWebGL,openSeadragonGL:openSeadragonGL,OpenSeadragon:window.OpenSeadragon}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;//! openseadragon 2.3.1 +*/!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(i=function(){return o}.call(t,n,t,e))||(e.exports=i)}()},function(e,t,n){var i=n(74),r=n(73),o=n(43);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!r(t)){var l=i(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[l?t[c]:c]:void 0}}},function(e,t,n){var i=n(412);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var i=n(406),r=n(224),o=n(210),a=i&&1/o(new i([,-0]))[1]==1/0?function(e){return new i(e)}:r;e.exports=a},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var i=n(817),r=n(89),o=Array.prototype.push;function a(e,t){return 2==t?function(t,n){return e(t,n)}:function(t){return e(t)}}function s(e){for(var t=e?e.length:0,n=Array(t);t--;)n[t]=e[t];return n}function l(e,t){return function(){var n=arguments.length;if(n){for(var i=Array(n);n--;)i[n]=arguments[n];var r=i[0]=t.apply(void 0,i);return e.apply(void 0,i),r}}}e.exports=function e(t,n,c,u){var d="function"==typeof n,f=n===Object(n);if(f&&(u=c,c=n,n=void 0),null==c)throw new TypeError;u||(u={});var p=!("cap"in u)||u.cap,h=!("curry"in u)||u.curry,m=!("fixed"in u)||u.fixed,g=!("immutable"in u)||u.immutable,b=!("rearg"in u)||u.rearg,v=d?c:r,w="curry"in u&&u.curry,y="fixed"in u&&u.fixed,x="rearg"in u&&u.rearg,k=d?c.runInContext():void 0,A=d?c:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},C=A.ary,E=A.assign,S=A.clone,_=A.curry,T=A.forEach,M=A.isArray,z=A.isError,D=A.isFunction,P=A.isWeakMap,F=A.keys,I=A.rearg,N=A.toInteger,O=A.toPath,L=F(i.aryMethod),B={castArray:function(e){return function(){var t=arguments[0];return M(t)?e(s(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],n=arguments[1],i=e(t,n),r=i.length;return p&&"number"==typeof n?(n=n>2?n-2:1,r&&r<=n?i:a(i,n)):i}},mixin:function(e){return function(t){var n=this;if(!D(n))return e(n,Object(t));var i=[];return T(F(t),(function(e){D(t[e])&&i.push([e,n.prototype[e]])})),e(n,Object(t)),T(i,(function(e){var t=e[1];D(t)?n.prototype[e[0]]=t:delete n.prototype[e[0]]})),n}},nthArg:function(e){return function(t){var n=t<0?1:N(t)+1;return _(e(t),n)}},rearg:function(e){return function(t,n){var i=n?n.length:0;return _(e(t,n),i)}},runInContext:function(n){return function(i){return e(t,n(i),u)}}};function R(e,t){if(p){var n=i.iterateeRearg[e];if(n)return function(e,t){return W(e,(function(e){var n=t.length;return function(e,t){return 2==t?function(t,n){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(I(a(e,n),t),n)}))}(t,n);var r=!d&&i.iterateeAry[e];if(r)return function(e,t){return W(e,(function(e){return"function"==typeof e?a(e,t):e}))}(t,r)}return t}function H(e,t,n){if(m&&(y||!i.skipFixed[e])){var r=i.methodSpread[e],a=r&&r.start;return void 0===a?C(t,n):function(e,t){return function(){for(var n=arguments.length,i=n-1,r=Array(n);n--;)r[n]=arguments[n];var a=r[t],s=r.slice(0,t);return a&&o.apply(s,a),t!=i&&o.apply(s,r.slice(t+1)),e.apply(this,s)}}(t,a)}return t}function j(e,t,n){return b&&n>1&&(x||!i.skipRearg[e])?I(t,i.methodRearg[e]||i.aryRearg[n]):t}function V(e,t){for(var n=-1,i=(t=O(t)).length,r=i-1,o=S(Object(e)),a=o;null!=a&&++n1?_(t,n):t}(0,r=R(o,r),e),!1}})),!r})),r||(r=a),r==t&&(r=w?_(r,1):function(){return t.apply(this,arguments)}),r.convert=U(o,t),r.placeholder=t.placeholder=n,r}if(!f)return G(n,c,v);var Y=c,q=[];return T(L,(function(e){T(i.aryMethod[e],(function(e){var t=Y[i.remap[e]||e];t&&q.push([e,G(e,t,Y)])}))})),T(F(Y),(function(e){var t=Y[e];if("function"==typeof t){for(var n=q.length;n--;)if(q[n][0]==e)return;t.convert=U(e,t),q.push([e,t])}})),T(q,(function(e){Y[e[0]]=e[1]})),Y.convert=function(e){return Y.runInContext.convert(e)(void 0)},Y.placeholder=Y,T(F(Y),(function(e){T(i.realToAlias[e]||[],(function(t){Y[t]=Y[e]}))})),Y}},function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,n=t.aliasToReal,i={};for(var r in n){var o=n[r];e.call(i,o)?i[o].push(r):i[o]=[r]}return i}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},function(e,t,n){e.exports={ary:n(819),assign:n(425),clone:n(832),curry:n(847),forEach:n(212),isArray:n(28),isError:n(848),isFunction:n(90),isWeakMap:n(849),iteratee:n(850),keys:n(204),rearg:n(851),toInteger:n(97),toPath:n(852)}},function(e,t,n){var i=n(213);e.exports=function(e,t,n){return t=n?void 0:t,t=e&&null==t?e.length:t,i(e,128,void 0,void 0,void 0,void 0,t)}},function(e,t,n){var i=n(214),r=n(46);e.exports=function(e,t,n){var o=1&t,a=i(e);return function t(){var i=this&&this!==r&&this instanceof t?a:e;return i.apply(o?n:this,arguments)}}},function(e,t,n){var i=n(199),r=n(214),o=n(417),a=n(420),s=n(296),l=n(216),c=n(46);e.exports=function(e,t,n){var u=r(e);return function r(){for(var d=arguments.length,f=Array(d),p=d,h=s(r);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:l(f,h);if((d-=m.length)1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var i=n(212),r=n(211),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return i(o,(function(n){var i="_."+n[0];t&n[1]&&!r(e,i)&&e.push(i)})),e.sort()}},function(e,t,n){var i=n(138),r=n(161),o=Math.min;e.exports=function(e,t){for(var n=e.length,a=o(t.length,n),s=i(e);a--;){var l=t[a];e[a]=r(l,n)?s[l]:void 0}return e}},function(e,t,n){var i=n(199),r=n(214),o=n(46);e.exports=function(e,t,n,a){var s=1&t,l=r(e);return function t(){for(var r=-1,c=arguments.length,u=-1,d=a.length,f=Array(d+c),p=this&&this!==o&&this instanceof t?l:e;++u>>0)?(e=c(e))&&("string"==typeof t||null!=t&&!s(t))&&!(t=i(t))&&o(e)?r(l(e),0,n):e.split(t,n):[]}},function(e,t,n){var i=n(856),r=n(137),o=n(203),a=o&&o.isRegExp,s=a?r(a):i;e.exports=s},function(e,t,n){var i=n(72),r=n(47);e.exports=function(e){return r(e)&&"[object RegExp]"==i(e)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",i="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+i+"|"+r+")"+"?",c="[\\ufe0e\\ufe0f]?"+l+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+l+")*"),u="(?:"+[o+i+"?",i,a,s,n].join("|")+")",d=RegExp(r+"(?="+r+")|"+u+c,"g");e.exports=function(e){return e.match(d)||[]}},function(e,t,n){var i=n(201),r=n(15);e.exports=function(e,t){return i(r(e,t),1)}},function(e,t,n){var i=n(125),r=n(73);e.exports=function(e,t){var n=-1,o=r(e)?Array(e.length):[];return i(e,(function(e,i,r){o[++n]=t(e,i,r)})),o}},function(e,t,n){var i=n(120),r=n(138),o=n(98),a=n(73),s=n(141),l=n(862),c=n(401),u=n(210),d=n(300),f=n(126),p=i?i.iterator:void 0;e.exports=function(e){if(!e)return[];if(a(e))return s(e)?d(e):r(e);if(p&&e[p])return l(e[p]());var t=o(e);return("[object Map]"==t?c:"[object Set]"==t?u:f)(e)}},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t,n){var i=n(864)();e.exports=i},function(e,t,n){var i=n(295),r=n(283),o=n(294),a=n(422),s=n(28),l=n(421);e.exports=function(e){return r((function(t){var n=t.length,r=n,c=i.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new TypeError("Expected a function");if(c&&!d&&"wrapper"==a(u))var d=new i([],!0)}for(r=d?r:n;++r=120&&b.length>=120)?new i(p&&b):void 0}b=e[0];var v=-1,w=h[0];e:for(;++v1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&r(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++i0&&!r.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Array]"!==r.call(e)&&"[object Function]"===r.call(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},function(e,t,n){"use strict";var i=n(169),r=n(899),o=n(437),a=n(438),s=n(904),l=r(a(),Object);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},function(e,t,n){"use strict";var i=n(170),r=n(901),o=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||i.call(a,o),l=r("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(i,a,arguments)};var c=function(){return s(i,o,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var i="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError(i+t);for(var n,a=r.call(arguments,1),s=function(){if(this instanceof n){var i=t.apply(this,a.concat(r.call(arguments)));return Object(i)===i?i:this}return t.apply(e,a.concat(r.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=E(e),i=n.length>0?n[0]:"",r=S("%"+i+"%",t),a=r.name,l=r.value,c=!1,u=r.alias;u&&(i=u[0],x(n,y([0,1],u)));for(var d=1,f=!0;d=n.length){var h=s(l,p);if(f=!!h,!t&&!(p in l))throw new o("base intrinsic for "+e+" exists, but the property is not available.");l=f&&"get"in h&&!("originalValue"in h.get)?h.get:l[p]}else f=w(l,p),l=l[p];f&&!c&&(g[a]=l)}}return l}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},function(e,t,n){"use strict";var i=n(170);e.exports=i.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var i=n(438),r=n(169);e.exports=function(){var e=i();return r(Object,{is:e},{is:function(){return Object.is!==e}}),e}},function(e,t,n){"use strict";var i,r,o,a,s=n(301)()&&"symbol"==typeof Symbol.toStringTag;if(s){i=Function.call.bind(Object.prototype.hasOwnProperty),r=Function.call.bind(RegExp.prototype.exec),o={};var l=function(){throw o};a={toString:l,valueOf:l},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=l)}var c=Object.prototype.toString,u=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=u(e,"lastIndex");if(!(t&&i(t,"value")))return!1;try{r(e,a)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===c.call(e)}},function(e,t,n){"use strict";var i=n(169),r=n(907),o=n(439),a=n(440),s=n(909),l=r(o);i(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},function(e,t,n){"use strict";var i=n(170),r=n(908),o=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||i.call(a,o),l=r("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(i,a,arguments)};var c=function(){return s(i,o,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var i=TypeError,r=Object.getOwnPropertyDescriptor;if(r)try{r({},"")}catch(e){r=null}var o=function(){throw new i},a=r?function(){try{return o}catch(e){try{return r(arguments,"callee").get}catch(e){return o}}}():o,s=n(301)(),l=Object.getPrototypeOf||function(e){return e.__proto__},c=void 0,u="undefined"==typeof Uint8Array?void 0:l(Uint8Array),d={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?l([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":c&&s&&Symbol.asyncIterator?c[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?l(l([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s?l((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s?l((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?l(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:void 0,"%SymbolPrototype%":s?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":a,"%TypedArray%":u,"%TypedArrayPrototype%":u?u.prototype:void 0,"%TypeError%":i,"%TypeErrorPrototype%":i.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},f=n(170).call(Function.call,String.prototype.replace),p=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h=/\\(\\)?/g,m=function(e){var t=[];return f(e,p,(function(e,n,i,r){t[t.length]=i?f(r,h,"$1"):n||e})),t},g=function(e,t){if(!(e in d))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===d[e]&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return d[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=m(e),o=g("%"+(n.length>0?n[0]:"")+"%",t),a=1;a=n.length){var s=r(o,n[a]);if(!t&&!(n[a]in o))throw new i("base intrinsic for "+e+" exists, but the property is not available.");o=s&&"get"in s&&!("originalValue"in s.get)?s.get:o[n[a]]}else o=o[n[a]];return o}},function(e,t,n){"use strict";var i=n(169).supportsDescriptors,r=n(440),o=Object.getOwnPropertyDescriptor,a=Object.defineProperty,s=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!i||!l)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=r(),t=l(c),n=o(t,"flags");return n&&n.get===e||a(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},function(e,t,n){"use strict";var i=Date.prototype.getDay,r=Object.prototype.toString,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return i.call(e),!0}catch(e){return!1}}(e):"[object Date]"===r.call(e))}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=(a(i),a(n(5))),o=a(n(912));a(n(913));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,i){e=n,t.forEach((function(t){return t(e,i)}))}}}t.default=function(e,t){var n,a,d="__create-react-context-"+(0,o.default)()+"__",f=function(e){function n(){var t,i;s(this,n);for(var r=arguments.length,o=Array(r),a=0;a1&&void 0!==arguments[1]&&arguments[1],n="path="+e;return t&&(n+="&parent=true"),fetch("http://127.0.0.1:2020/api/filebrowser?"+n,{headers:{pragma:"no-cache","cache-control":"no-cache"}}).then((function(e){return e.json()}))}},{key:"openItem",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.isDir&&this.browse(e.path,n).then((function(n){e.children=n.entries;var i=new u;i.entries=t.sortEntries(n.entries),i.path=n.path,t.setState({activeFolder:i}),t.forceUpdate()}))}},{key:"sortEntries",value:function(e){return this._sortByType(this._sortByName(e))}},{key:"_sortByType",value:function(e){return e.sort((function(e,t){return e.isDir&&!t.isDir?-1:!e.isDir&&t.isDir?1:0}))}},{key:"_sortByName",value:function(e){return e.sort((function(e,t){return e.name.localeCompare(t.name)}))}},{key:"filter",value:function(e){var t=[],n=!0,i=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s.isDir)t.push(s);else{var l=this._getExtension(s.name);this.props.filter.includes(l)&&t.push(s)}}}catch(e){i=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw r}}return t}},{key:"_getExtension",value:function(e){return e.substr(e.lastIndexOf(".")+1)}},{key:"_formatSize",value:function(e){return e?e<1e3?e+" bytes":e<1e6?(e/1e3).toFixed(1)+" KB":e<1e9?(e/1e6).toFixed(1)+" MB":(e/1e9).toFixed(1)+" GB":""}},{key:"isImage",value:function(e){var t=this._getExtension(e.name);return["tif","tiff","dat"].includes(t)}},{key:"navigateBack",value:function(){this.openItem(this.state.activeFolder,!0)}},{key:"selectFile",value:function(e){this.props.onFileSelected(e,this.state.activeFolder.path)}},{key:"_getIconClass",value:function(e){var t="image filebrowser-icon-";return e.isDir?t+="dir":(t+="file",this.isImage(e)&&(t+="-selectable")),t}},{key:"render",value:function(){return a.default.createElement("div",null,a.default.createElement("div",{className:"filebrowser-location-bar"},a.default.createElement("button",{type:"button",onClick:this.navigateBack,className:"ui button basic",disabled:this.state.activeFolder.isRoot},a.default.createElement(s.FontAwesomeIcon,{icon:l.faAngleLeft,size:"lg"})),a.default.createElement("span",null,this.state.activeFolder.path)),a.default.createElement("div",{className:"filebrowser-content content scrolling"},this.renderDir(this.state.activeFolder)))}},{key:"renderDir",value:function(e){var t=this;if(!e||0===e.entries.length)return null;var n=e.entries.map((function(e,n){return a.default.createElement("div",{className:"ui item filebrowser-item",onClick:function(){return t.openItem(e)},key:n},a.default.createElement("div",{className:t._getIconClass(e)},t.renderIcon(e)),a.default.createElement("div",{className:"content ui grid"},a.default.createElement("div",{className:"seven wide column"},a.default.createElement("h5",null,e.name)),e.size?a.default.createElement("div",{className:"five wide column"},"Size: ",t._formatSize(e.size)):null,t.renderSelectButton(e)))}));return a.default.createElement("div",{className:"ui list"},n)}},{key:"renderIcon",value:function(e){var t=null;return t=e.isDir?e.isOpen?l.faFolderOpen:l.faFolder:this.isImage(e)?l.faImage:l.faFile,a.default.createElement(s.FontAwesomeIcon,{icon:t,size:"2x"})}},{key:"renderSelectButton",value:function(e){var t=this;if(e.isDir)return null;if(this.props.filter){var n=e.name.substr(e.name.lastIndexOf(".")+1);if(!this.props.filter.includes(n))return null}return a.default.createElement("div",{className:"four wide column"},a.default.createElement("button",{type:"button",onClick:function(){return t.selectFile(e)},className:"ui button primary"},a.default.createElement(s.FontAwesomeIcon,{icon:l.faCheck}),"  Select"))}}]),t}(a.default.Component);t.default=d},function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHwAAAfeCAMAAAANs6rnAAADAFBMVEUAAAD9/f319fX5+fry8vMAAQD49/fnAQHeAAH9AQH2LS31Nzb4QD/p6en6W1vi4+LvAQHt7+76SEj5UlL8enn4+D71AAH09Cgvpi/mQTzrTkroLzD1IiHuZl86rTr4cW/zFRRGskbDAAD6+VT52EPPzs4AhwD45XT7Z2X431tRt1EAA2HeW1fZ19fNAAG0AADXTEpIW6P56+gAAnv1zy1avFrWAQF+yHwAMADgbGvbNC0dnx7QPj0CBZAABagAdwDmfHlgf9tNb9XyzcwCCcP1h4LkHxwAPgAAIgC5xOL2paQBATn3urkyT5Nvw28AAUw7OjhJSEQLmQsBZgFZf8dXVlT03dz3wwX5kpLm2EqoueJIVJBTbbXluQagAgNQbaNxks7w60lmrvr////36JF5eXfys0NkfrEAACbU2+4FCexcoVnzY0tlwGFtrGpnaGXg6fc1U6Z7uft3ieGGmuD5vWsAWwLAw8L8+3EvLS35+Aj21wXD0eyWqtkOM5NVo/dfYrw5fruyUlRQlkrgxTR4rokAUAGXyZs/Zrd0eMb0gTcBQ+zGLi1JVdZUktVLTLNmjfZpntszNaY/kDvikJE0PXv2k1IIyQcCYvdWosx1jbp7rOA/jcs2Usux3bFPe/SkPDcAKuJV2lQeHh7KvEgDK7GRpfh6nPjdsLUASAEAABWt2UPh4wWQwftAlPU1b/OTvuCUn8UxzTDi0nEHgfwharDCr3ffmwZpud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iTwVx5HCSUZkhDqVBQVIomBRdxiYTDwSEO2gMzGQvN0HSVYOlSsPQgEJzkHMxQCElXsZg9U+Zyk7i4+X/vLqDyXnhc1/ebsv3y3d0j35fvvfsupWfee8SDWjzz/kY458UuEJJKW1aJK596nucDu4CZLDXJyBchd73QrWkCeYoQUrSQIKIiEMkTnuab/leayOX1ppT89SfPg9z3x5SHD/hyMqCMBt1udyUritwHJ/30TTQkKm0p+dY2cV0W0l2AMkcsH43OIN/J5rjyhK/7yRNjyJ7chtw9L39A5JY/juBHbqfhPhtBLZZ/Rty/+sMeawJl2tIz7/3seHaaY5Uvt/6KfIUrN/6pWJ59k5aPs2Pmni/vDuAWyjOPMoVU2HjD2zoygfTMe6/ozY+cRM/EDljmy9fD5aIDs2EYRLqFUc6V11HiMLjVCF3f0UID3IfSLUa0QRAg8hiISqESmP0xs6BQKBQKheJ/XlAM9mvOtjxco/IxdTNKo4CcfB8ssSSkVqtUludsN7u6ij5w5Vq9riW+UD6CnqQc/R18X5CxiUD+EpzfCYLzoFoVHOk36/l8XYvyKFN/LC13zCTshk3ItkD+phpsTCxrcu/33h5fnoT8nTYFDoJ3+rJyxwnvFCHE3hLI4d7AaY/J+6cCub65trapHdFNdaBzX1KO9kSYbxPiQi7cboa8eM6uMHNxSUsk6DUHDVOuVmO9EeqG3LVIKe4w/c7+FKDNEnIhLW8xt+FakMd9CVkPvR1wSjk4OL0tK2+1mNtAYk64BcHbJ7u7h4fH4Cc45t7zV5o+u+Yg+V1K/twB0QMHcuJ5LLcwf0d88n6IxX1E6TDkIqeduovmJfjBqoK4PRa6cwusgiZlAah5LAqFQqFQKBQKhUIRiz9saq7hLAJxTgAAAABJRU5ErkJggg=="},function(e,t,n){e.exports=n.p+"c752218ea53450b6ba82eecfcd6e00b9.woff2"},function(e,t,n){e.exports=n.p+"3fe5eb9d51984455571771f492ebb78b.woff"},function(e,t,n){e.exports=n.p+"f303602aa47452100523cab39c189a1a.ttf"},function(e,t,n){e.exports=n.p+"4d8475c4956ead1ded758675f0e6d184.svg"},function(e,t,n){e.exports=n.p+"7b12a966adcf1a0b8e3e0246365b92ce.woff2"},function(e,t,n){e.exports=n.p+"4fe7e256279e0762d4bfc04a58dabc51.woff"},function(e,t,n){e.exports=n.p+"45cbd94a4ac756bba55b18150e290cad.ttf"},function(e,t,n){e.exports=n.p+"39dc361a17b76733569d7ddb357c27e4.svg"},function(e,t,n){e.exports=n.p+"6611186a0f3a6511ff63aad9a27e4cae.woff2"},function(e,t,n){e.exports=n.p+"4e5ce754d6c3215a41c88b2f326c1065.woff"},function(e,t,n){e.exports=n.p+"dbef93d8a4ffdcd07f4ddefc3a86d8a0.ttf"},function(e,t,n){e.exports=n.p+"717c8a0c3865298b8b36a18be518e34f.svg"},function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(931),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(76))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var i,r,o,a,s,l=1,c={},u=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?i=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},i=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,i=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):i=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),i=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0&&(o+="?map"),r+"/"+o},u32:r,many_channels_id:!0===r?a:e,many_channels_url:u,many_channels:[{unique_id:e,map_ids:o||[],color:s.map((function(e){return e/255})),range:[l.min/c,l.max/c]}],tileSize:n.tilesize,maxLevel:n.maxLevel,height:n.height,width:n.width,minLevel:0}}}},{key:"makeTileSources",value:function(e){return e.map(this.makeTileSource,this).filter((function(e){return void 0!==e}))}},{key:"getTiledImageIds",value:function(){var e=this.viewer.world,t=e.getItemCount();return[].concat(g(Array(t).keys())).reduce((function(t,n){return e.getItemAt(n).source.many_channels.reduce((function(e,t){return e.push(t.unique_id),e}),t)}),[])}},{key:"getTiledImageByMaskKey",value:function(e){var t=this.viewer.world,n=t.getItemCount();for(var i in[].concat(g(Array(n).keys()))){var r=t.getItemAt(i),o=r.source,a=o.many_channels;if(e==o.many_channels_id&&a[0].map_ids.length>0)return r}}},{key:"getTiledImageById",value:function(e){var t=this.viewer.world,n=t.getItemCount(),i=[];for(var r in[].concat(g(Array(n).keys()))){var o=t.getItemAt(r),a=o.source.many_channels;a.find((function(t){return e==t.unique_id}))&&i.push(o)}var s=i.shift();return i.forEach((function(e){return t.removeItem(e)})),s}},{key:"redrawChannels",value:function(e){this.viewer.world;var t=this.props.channels;[].concat(g(t)).reduce((function(t,n){var r=i(n,2),o=r[0],a=r[1];return e.includes(o)?t.concat([a]):t}),[]).map(this.setChannel,this)}},{key:"addChannel",value:function(e){var t=this;return new Promise((function(n,i){var r=!0,o=e.many_channels,a=e.many_channels_id;if(o[0].map_ids.length>0){var s=t.getTiledImageByMaskKey(a);if(s){var l=s.source;l.many_channels=l.many_channels.concat(o),n({item:s}),r=!1}}r&&t.viewer.addTiledImage({success:n,tileSource:e,width:t.props.img.width/t.props.img.height,compositeOperation:e.u32?"source-over":"lighter"})}))}},{key:"addTileSources",value:function(e){var t=this;return e.reduce((function(e,n){return e.then((function(){return t.addChannel(n)}))}),Promise.resolve())}},{key:"addChannels",value:function(e){return this.addTileSources(this.makeTileSources(e))}},{key:"setChannel",value:function(e){var t=e.id,n=e.color,i=e.range,r=e.maxRange,o=this.getTiledImageById(t);if(void 0!==o){var a=o.source;o._needsDraw=!0,a.many_channels.forEach((function(e){e.unique_id==t&&(e.color=n.map((function(e){return e/255})),e.range=[i.min/r,i.max/r])}))}}},{key:"getChannel",value:function(e){var t=this.getTiledImageById(e);if(void 0!==t){var n=t.source.many_channels.find((function(t){return t.unique_id==e}));if(void 0!==n)return{id:n.id,range:n.range,color:n.color.map((function(e){return Math.round(255*e)}))}}}},{key:"startOpenSeadragon",value:function(){var e=this;return new Promise((function(t){var n=e.props,r=n.channels,o=n.img,a=n.handleViewport,s=e.props.interactor,l=[].concat(g(r.keys())),c=e.makeTileSources(l);if(c.length<1)return!1;var u=c.shift();e.viewer=d.default.OpenSeadragon({collectionMode:!1,showZoomControl:!1,showHomeControl:!1,loadTilesWithAjax:!0,showFullPageControl:!1,preserveViewport:!0,id:"ImageView",prefixUrl:"image/openseadragon/",tileSources:[u],compositeOperation:"lighter",maxZoomPixelRatio:10,ajaxHeaders:{"Cache-Control":"no-store"}}),s(e.viewer);var f=!1;e.viewer.world.addHandler("add-item",(function(e){e.item.setWidth(o.width/o.height),f||(f=!0,t())})),e.viewer.addHandler("animation-finish",(function(e){var t=e.userData.viewer.viewport;a(t)}),e),e.viewer.uuid=o.uuid;var p=e.viewer;function h(){p.currentOverlays.forEach((function(e){var t="white-overlay"==e.element.className,n="green-overlay"==e.element.className;t||n||(e.element.style.transform="")}))}p.addHandler("update-viewport",(function(){setTimeout(h,1)})),p.addHandler("animation",h);var m=new d.default.openSeadragonGL(e.viewer);m.viaGL.loadArray=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"u16",r=this.gl;r.clear(this.gl.COLOR_BUFFER_BIT),b.call(this,r.TEXTURE0,this.texture),"u16"==i?r.texImage2D(r.TEXTURE_2D,0,r.RG8UI,e,t,0,r.RG_INTEGER,r.UNSIGNED_BYTE,n):"u32"==i&&r.texImage2D(r.TEXTURE_2D,0,r.RGBA8UI,e,t,0,r.RGBA_INTEGER,r.UNSIGNED_BYTE,n);for(var o=[this.all_color_3fv,this.all_range_2fv,this.all_ids_shape_2iv,this.all_ids_array].reduce((function(e,t){return e.length0&&(r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length+t,i=new ArrayBuffer(4*n),r=new DataView(i);return e.forEach((function(e,n){r.setUint32(4*t+4*n,e,!0)})),new Uint8Array(i)}(o,(t=i.gl.getParameter(i.gl.MAX_TEXTURE_SIZE))*(n=Math.ceil(o.length/t))-o.length)),d.push(r),f.push([t,n])})),i.fmt_1i=u,i.all_color_3fv=a,i.all_range_2fv=s,i.all_ids_array=d,i.all_ids_shape_2iv=f,32==u){var p=t.rendered.canvas.width,h=t.rendered.canvas.height;t.rendered.clearRect(0,0,p,h)}e(t)}}));var b=function(e,t){this.gl.activeTexture(e),this.gl.bindTexture(this.gl.TEXTURE_2D,t),this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,1),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST)};return m.addHandler("gl-drawing",(function(e){this.gl.uniform1i(this.u_tile_fmt,this.fmt_1i),this.gl.uniform3fv(this.u_tile_color,this.all_color_3fv[e]),this.gl.uniform2fv(this.u_tile_range,this.all_range_2fv[e]),this.gl.uniform2iv(this.u_ids_shape,this.all_ids_shape_2iv[e]);var t=i(this.all_ids_shape_2iv[e],2),n=t[0],r=t[1],o=this.all_ids_array[e];null!=o?(b.call(this,this.gl.TEXTURE1,this.texture_ids),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA8UI,n,r,0,this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,o)):(b.call(this,this.gl.TEXTURE1,this.texture_ids),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA8UI,1,1,0,this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,new Uint8Array(4)))})),m.addHandler("gl-loaded",(function(e){this.u_tile_color=this.gl.getUniformLocation(e,"u_tile_color"),this.u_tile_range=this.gl.getUniformLocation(e,"u_tile_range"),this.u_tile_fmt=this.gl.getUniformLocation(e,"u_tile_fmt"),this.u_ids_shape=this.gl.getUniformLocation(e,"u_ids_shape");var t=this.gl.getUniformLocation(e,"u_ids");this.texture_ids=this.gl.createTexture(),this.gl.uniform1i(t,1)})),m.addHandler("tile-loaded",(function(e,t){return e(t)})),m.init(),!0}))}},{key:"componentDidMount",value:function(){var e=this;this.props.channels.size>0&&!this.state.waiting&&(this.setState({waiting:!0}),this.startOpenSeadragon().then((function(){e.setState({waiting:!1,ready:!0})})))}},{key:"componentDidUpdate",value:function(){var e=this,t=this.viewer,n=this.props,i=n.channels,r=n.overlays,o=n.arrows;if(t&&this.state.ready){this.viewer.viewport.setRotation(this.props.rotation),o.forEach((function(e,n){var i=e.position,r="label-"+n,o="new-"+r,a=document.getElementById(r),s=document.getElementById(o);s?(s.className=a.className,s.innerText=a.innerText):(s=a.cloneNode(!0)).id=o;var l=t.getOverlayById(o),c=new OpenSeadragon.Point(i[0],i[1]);l?l.update({location:c}):t.addOverlay({x:i[0],y:i[1],element:s,placement:OpenSeadragon.Placement.CENTER})})),o.forEach((function(e,n){var i=e.position,r="arrow-"+n,o="new-"+r,a=document.getElementById(r),s=document.getElementById(o);s?s.className=a.className:(s=a.cloneNode(!0)).id=o;var l=t.getOverlayById(o),c=new OpenSeadragon.Point(i[0],i[1]);l?l.update({location:c}):t.addOverlay({x:i[0],y:i[1],element:s,placement:OpenSeadragon.Placement.CENTER})}));for(var a=o.length;a<100;a++){var s="new-arrow-"+a,l=t.getOverlayById(s),c=new OpenSeadragon.Point(-1,-1);l&&l.update({location:c})}for(a=o.length;a<100;a++){var u="new-label-"+a,d=t.getOverlayById(u),f=new OpenSeadragon.Point(-1,-1);d&&d.update({location:f})}r.forEach((function(e,n){var i="overlay-"+n,r=t.getOverlayById(i),o=new OpenSeadragon.Point(e[0],e[1]);r?r.update({location:o,width:e[2],height:e[3]}):t.addOverlay({x:e[0],y:e[1],width:e[2],height:e[3],element:i})}));for(a=r.length;a<100;a++){var p="overlay-"+a,h=t.getOverlayById(p),m=new OpenSeadragon.Point(-1,-1);h&&h.update({location:m,width:.001,height:.001})}}else i.size>0&&!this.state.waiting&&(this.setState({waiting:!0}),this.startOpenSeadragon().then((function(){e.setState({waiting:!1,ready:!0})})))}},{key:"updateChannels",value:function(e,t,n,i){var r,o=this,a=e.world,s=new Set(n.keys()),l=i.filter((function(e){return((n.get(e)||{}).map_ids||[]).length>0})).reverse();if(e.uuid!=t)a.removeAll(),e.uuid=t,this.addChannels([].concat(g(s)));else{var c=new Set(this.getTiledImageIds()),u=(r=c,[].concat(g(s)).filter(r.has.bind(r))),d=b(c,s),f=b(s,c);d.forEach((function(e){var t=o.getTiledImageById(e);if(null!=t){var n=t.source;n.many_channels.length<=1?a.removeItem(t):(n.many_channels=n.many_channels.filter((function(t){return t.unique_id!=e})),0==n.many_channels.length&&a.removeItem(t))}})),this.addChannels([].concat(g(f))).then((function(){if(l.length){var e=l[0],t=o.getTiledImageById(e),n=(t.source||{}).many_channels;if(n){var i=n.length==l.length,r=new Map(n.map((function(e,t){return i&&l[t]!=e.unique_id&&(i=!1),[e.unique_id,e]})));i||(t.source.many_channels=l.reduce((function(e,t){return r.has(t)&&e.push(r.get(t)),e}),[]),t._needsDraw=!0)}}})),this.redrawChannels(u.filter((function(e){var t=o.getChannel(e),i=n.get(e),r=i.color,a=i.range,s=i.maxRange;return t.range[0]!=a.min/s|t.range[1]!=a.max/s|t.color[0]!=r[0]|t.color[1]!=r[1]|t.color[2]!=r[2]})))}}},{key:"render",value:function(){var e=this.viewer,t=this.props.arrows;if(void 0!==e){var n=this.props.img.uuid,i=this.props,r=i.channels,c=i.maskOrder;this.updateChannels(e,n,r,c)}var d=[].concat(g(Array(100).keys())).map((function(e,t){var n="overlay-"+t;return u.default.createElement("div",{className:"white-overlay",key:n,id:n})})),h=[].concat(g(Array(t.length).keys())).map((function(e,n){var i="arrow-"+n,r="label-"+n,c=t.length>n?t[n]:void 0,d=c&&""!==c.angle?c.angle:60,h=61.4*Math.sin(d*Math.PI/180),m=61.4*Math.cos(d*Math.PI/180),g=2*m+200*Math.sign(Math.round(m))/2,b=2*h+50*Math.sign(Math.round(h))/2;c.hide&&(g=0,b=0);var v=p.default.div(o,m,h,d),w=p.default.div(a,g,b,200,50);return c.hide&&(v=p.default.div(s)),""===c.text&&(w=p.default.div(l)),u.default.createElement("div",{key:i},u.default.createElement(v,{id:i},u.default.createElement(f.default,null)),u.default.createElement(w,{id:r},c.text))}));return u.default.createElement("div",null,u.default.createElement("div",{id:"ImageView"}),u.default.createElement("div",{className:"d-none"},d,h))}}]),t}(c.Component);t.default=v},function(e,t,n){"use strict";window.OpenSeadragon=n(936),window.UPNG=n(937),n(947),n(948),e.exports={ViaWebGL:ViaWebGL,openSeadragonGL:openSeadragonGL,OpenSeadragon:window.OpenSeadragon}},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;//! openseadragon 2.3.1 //! Built on 2021-03-04 //! Git commit: --88a3858 //! http://openseadragon.github.io //! License: http://openseadragon.github.io/license/ -function OpenSeadragon(e){return new OpenSeadragon.Viewer(e)}!function(e){e.version={versionStr:"2.3.1",major:parseInt("2",10),minor:parseInt("3",10),revision:parseInt("1",10)};var t,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,r=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},e.type=function(e){return null==e?String(e):n[i.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==OpenSeadragon.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!r.call(t,"constructor")&&!r.call(t.constructor.prototype,"isPrototypeOf"))return!1;var n;for(var i in t)n=i;return void 0===n||r.call(t,n)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=(t=document.createElement("canvas"),!(!e.isFunction(t.getContext)||!t.getContext("2d"))),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},e.pixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,i=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(n,1)/i}return 1}()}(OpenSeadragon),function($){$.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=arguments.length,l=!1,c=1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},c=2),"object"==typeof a||OpenSeadragon.isFunction(a)||(a={}),s===c&&(a=this,--c);c=n.x&&t.x=n.y},getEvent:function(e){return $.getEvent=e?function(e){return e}:function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if("number"==typeof e.pageX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.pageX,t.y=e.pageY,t};else{if("number"!=typeof e.clientX)throw new Error("Unknown event mouse position, no known technique.");$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}}return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.pageXOffset)$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(t.scrollLeft||t.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!e.scrollLeft&&!e.scrollTop)return new $.Point(0,0);$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return $.getPageScroll()},setPageScroll:function(e){if(void 0!==window.scrollTo)$.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var t=$.getPageScroll();if(t.x===e.x&&t.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var n=$.getPageScroll();if(n.x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(n=$.getPageScroll()).x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});$.setPageScroll=function(e){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.innerWidth)$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!t.clientWidth&&!t.clientHeight)throw new Error("Unknown window size, no known technique.");$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)}}return $.getWindowSize()},makeCenteredNode:function(e){e=$.getElement(e);var t=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(t[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(t[1].style,{display:"table-row"}),$.extend(t[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),t[0].appendChild(t[1]),t[1].appendChild(t[2]),t[2].appendChild(e),t[0]},makeNeutralElement:function(e){var t=document.createElement(e),n=t.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return(new Date).getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(e){var t=$.makeNeutralElement("img");return t.src=e,t},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(e){var t=$.makeNeutralElement("img"),n=null;return(n=$.makeNeutralElement("span")).style.display="inline-block",t.onload=function(){n.style.width=n.style.width||t.width+"px",n.style.height=n.style.height||t.height+"px",t.onload=null,t=null},t.src=e,n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')",n}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,n){var i;e=$.getElement(e),n&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(i="alpha(opacity="+Math.round(100*t)+")",e.style.filter=i):e.style.filter=""},setElementTouchActionNone:function(e){void 0!==(e=$.getElement(e)).style.touchAction?e.style.touchAction="none":void 0!==e.style.msTouchAction&&(e.style.msTouchAction="none")},addClass:function(e,t){(e=$.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,n){return Array.prototype.indexOf?this.indexOf=function(e,t,n){return e.indexOf(t,n)}:this.indexOf=function(e,t,n){var i,r,o=n||0;if(!e)throw new TypeError;if(0===(r=e.length)||o>=r)return-1;for(o<0&&(o=r-Math.abs(o)),i=o;i=200&&s.status<300||0===s.status&&"http:"!==a&&"https:"!==a?t(s):($.console.log("AJAX request returned %d: %s",s.status,e),$.isFunction(n)&&n(s)))};try{if(s.open("GET",e,!0),o&&(s.responseType=o),r)for(var l in r)r.hasOwnProperty(l)&&r[l]&&s.setRequestHeader(l,r[l]);i&&(s.withCredentials=!0),s.send(null)}catch(i){var c=i.message;if($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10&&void 0!==i.number&&-2147024891==i.number&&(c+="\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"),$.console.log("%s while making AJAX request: %s",i.name,c),s.onreadystatechange=function(){},window.XDomainRequest){var u=new XDomainRequest;if(u){u.onload=function(e){$.isFunction(t)&&t({responseText:u.responseText,status:200,statusText:"OK"})},u.onerror=function(e){$.isFunction(n)&&n({responseText:u.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{u.open("GET",e),u.send()}catch(e){$.isFunction(n)&&n(s,i)}}}else $.isFunction(n)&&n(s,i)}return s},jsonp:function(e){var t,n=e.url,i=document.head||document.getElementsByTagName("head")[0]||document.documentElement,r=e.callbackName||"openseadragon"+$.now(),o=window[r],a="$1"+r+"$2",s=e.param||"callback",l=e.callback;n=n.replace(/(\=)\?(&|$)|\?\?/i,a),n+=(/\?/.test(n)?"&":"?")+s+"="+r,window[r]=function(e){if(o)window[r]=o;else try{delete window[r]}catch(e){}l&&$.isFunction(l)&&l(e)},t=document.createElement("script"),void 0===e.async&&!1===e.async||(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=n,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,i&&t.parentNode&&i.removeChild(t),t=void 0)},i.insertBefore(t,i.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");$.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}return $.parseXml(e)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(e){return!!FILEFORMATS[(e=e||"").toLowerCase()]}}),$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};!function(){var e=navigator.appVersion,t=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(t.substring(t.indexOf("MSIE")+5,t.indexOf(";",t.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(t.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(t.substring(t.indexOf("Firefox")+8))):t.indexOf("Safari")>=0?($.Browser.vendor=t.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(t.substring(t.substring(0,t.indexOf("Safari")).lastIndexOf("/")+1,t.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e)}var n,i,r,o=window.location.search.substring(1).split("&");for(r=0;r0&&(URLPARAMS[n.substring(0,i)]=decodeURIComponent(n.substring(i+1)));$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)}();var nullfunction=function(e){};function getOffsetParent(e,t){return t&&e!=document.body?document.body:e.offsetParent}$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,n=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&n)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return n.apply(e,arguments)};else{var i,r=[],o=[],a=0;$.requestAnimationFrame=function(e){return r.push([++a,e]),i||(i=setInterval((function(){if(r.length){var e=$.now(),t=o;for(o=r,r=t;o.length;)o.shift()[1](e)}else clearInterval(i),i=void 0}),20)),a},$.cancelAnimationFrame=function(e){var t,n;for(t=0,n=r.length;t0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",i.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",i.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",i.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",i.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",i.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",i.touchendcaptured,!0),i.activePointersLists[n].captureCount=0);for(n=0;n0){for(i=0;i0&&(ge(e,t,o,0),n.captureCount=1,p(e,n.type),he(e,t,o))}}function G(t,n){var i,r,o,a,l=n.changedTouches.length,c=[],u=t.getActivePointersListByType("touch");for(i=e.now(),u.getLength()>n.touches.length-l&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),W(t,n,u)),r=0;r8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=(a=document.createElement("div"),e.isFunction(a.setCapture)&&e.isFunction(a.releaseCapture)),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],"DOMMouseScroll"==e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||e.Browser.vendor!==e.BROWSERS.IE)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),e.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):(e.MouseTracker.havePointerEvents=!1,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?(e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),e.MouseTracker.haveMouseEnter=!0):(e.MouseTracker.subscribeEvents.push("mouseover","mouseout"),e.MouseTracker.haveMouseEnter=!1),e.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.maxTouchPoints=10),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,n=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};var ve=function(){try{return window.self!==window.top}catch(e){return!0}}();function we(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}}(OpenSeadragon),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,n,i){var r=t.parentNode;"number"==typeof n&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer=void 0===n.attachToViewer||n.attachToViewer,this.autoFade=void 0===n.autoFade||n.autoFade,this.element=t,this.anchor=n.anchor,this.container=i,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"==typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"==typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"==typeof n.width?n.width+"px":n.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),n.attachToViewer?this.anchor==e.ControlAnchor.TOP_RIGHT||this.anchor==e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):r.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!=this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor==e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor==e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(OpenSeadragon),function(e){function t(e,t){var n,i=e.controls;for(n=i.length-1;n>=0;n--)if(i[n].element==t)return n;return-1}e.ControlDock=function(t){var n,i,r=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),i=0;i=0)){switch(i.anchor){case e.ControlAnchor.TOP_RIGHT:r=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:r=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:r=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:r=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:r=this.container,n.style.margin="0px",n.style.padding="0px";break;default:case e.ControlAnchor.NONE:r=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new e.Control(n,i,r)),n.style.display="inline-block"}},removeControl:function(n){var i=t(this,n=e.getElement(n));return i>=0&&(this.controls[i].destroy(),this.controls.splice(i,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(OpenSeadragon),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(e){var t={},n=1;function i(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function r(t,n){if(n instanceof e.Overlay)return n;var i=null;if(n.element)i=e.getElement(n.element);else{var r=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(i=e.getElement(n.id))||((i=document.createElement("a")).href="#/overlay/"+r),i.id=r,e.addClass(i,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var l=n.x,c=n.y;if(void 0!==n.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(n.px,n.py,a||0,s||0));l=u.x,c=u.y,a=void 0!==a?u.width:void 0,s=void 0!==s?u.height:void 0}o=new e.Point(l,c)}var d=n.placement;return d&&"string"===e.type(d)&&(d=e.Placement[n.placement.toUpperCase()]),new e.Overlay({element:i,location:o,placement:d,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function o(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].element===t)return n;return-1}function a(t,n){return e.requestAnimationFrame((function(){n(t)}))}function s(t){e.requestAnimationFrame((function(){!function(t){var n,i,r,o;if(t.controlsShouldFade){for(n=e.now(),i=n-t.controlsFadeBeginTime,r=1-i/t.controlsFadeLength,r=Math.min(1,r),r=Math.max(0,r),o=t.controls.length-1;o>=0;o--)t.controls[o].autoFade&&t.controls[o].setOpacity(r);r>0&&s(t)}}(t)}))}function l(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){s(t)}),t.controlsFadeDelay))}function c(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function u(){c(this)}function d(){l(this)}function f(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 38:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}}function p(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(this.viewport.degrees-90):this.viewport.setRotation(this.viewport.degrees+90),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(this.viewport.degrees+90):this.viewport.setRotation(this.viewport.degrees-90),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}}function h(e){var t;document.activeElement==this.canvas||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType)).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function m(e){var t,n={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function g(e){var t,n={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.raiseEvent("canvas-drag",n),!n.preventDefaultAction&&this.viewport){if(t=this.gestureSettingsByDeviceType(e.pointerType),this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var i=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=i.x,this.viewport.centerSpringY.target.value+=i.y;var r=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=i.x,this.viewport.centerSpringY.target.value-=i.y,r.x!=o.x&&(e.delta.x=0),r.y!=o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function b(t){if(!t.preventDefaultAction&&this.viewport){var n=this.gestureSettingsByDeviceType(t.pointerType);if(n.flickEnabled&&t.speed>=n.flickMinSpeed){var i=0;this.panHorizontal&&(i=n.flickMomentum*t.speed*Math.cos(t.direction));var r=0;this.panVertical&&(r=n.flickMomentum*t.speed*Math.sin(t.direction));var o=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),a=this.viewport.pointFromPixel(new e.Point(o.x-i,o.y-r));this.viewport.panTo(a,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:t.eventSource,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent})}function v(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function w(t){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function y(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function x(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function k(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function A(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function C(e){var t,n,i;if(!e.preventDefaultAction&&this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(n=this.viewport.pointFromPixel(e.center,!0),i=this.viewport.pointFromPixel(e.lastCenter,!0).minus(n),this.panHorizontal||(i.x=0),this.panVertical||(i.y=0),this.viewport.zoomBy(e.distance/e.lastDistance,n,!0),t.zoomToRefPoint&&this.viewport.panBy(i,!0),this.viewport.applyConstraints()),t.pinchRotate)){var r=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),o=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(r-o)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:e.eventSource,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent}),!1}function E(t){var n,i,r;if((r=e.now())-this._lastScrollTime>this.minScrollDeltaTime){if(this._lastScrollTime=r,this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),!t.preventDefaultAction&&this.viewport&&(n=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(i=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(i,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints()),this.raiseEvent("canvas-scroll",{tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent}),n&&n.scrollToZoom)return!1}else if((n=this.gestureSettingsByDeviceType(t.pointerType))&&n.scrollToZoom)return!1}function S(e){t[this.hash].mouseInside=!0,c(this),this.raiseEvent("container-enter",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function _(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||l(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(e){!function(e){if(e._opening)return;if(e.autoResize){var n=i(e.container),r=t[e.hash].prevContainerSize;if(!n.equals(r)){var o=e.viewport;if(e.preserveImageSizeOnResize){var a=r.x/n.x,s=o.getZoom()*a,u=o.getCenter();o.resize(n,!1),o.zoomTo(s,null,!0),o.panTo(u,!0)}else{var d=o.getBounds();o.resize(n,!0),o.fitBoundsWithConstraints(d,!0)}t[e.hash].prevContainerSize=n,t[e.hash].forceRedraw=!0}}var f=e.viewport.update(),p=e.world.update()||f;f&&e.raiseEvent("viewport-change");e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p);!t[e.hash].animating&&p&&(e.raiseEvent("animation-start"),c(e));(p||t[e.hash].forceRedraw||e.world.needsDraw())&&(!function(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation"));t[e.hash].animating&&!p&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||l(e));t[e.hash].animating=p}(e),e.isOpen()?e._updateRequestId=a(e,T):e._updateRequestId=!1}function M(e,t){return e?e+t:t}function z(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function D(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function P(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,I))}function I(){var n,i,r;t[this.hash].zooming&&this.viewport&&(i=(n=e.now())-t[this.hash].lastZoomTime,r=Math.pow(t[this.hash].zoomFactor,i/1e3),this.viewport.zoomBy(r),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=n,F(this))}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function O(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function L(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function B(){this.viewport&&this.viewport.goHome()}function R(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function H(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+90,360):e.positiveModulo(t-90,360),this.viewport.setRotation(t)}}function j(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-90,360):e.positiveModulo(t+90,360),this.viewport.setRotation(t)}}function V(){this.viewport.toggleFlip()}function U(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)}function W(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}e.Viewer=function(r){var o,s,c=arguments,u=this;if(e.isPlainObject(r)||(r={id:c[0],xmlPath:c.length>1?c[1]:void 0,prefixUrl:c.length>2?c[2]:void 0,controls:c.length>3?c[3]:void 0,overlays:c.length>4?c[4]:void 0}),r.config&&(e.extend(!0,r,r.config),delete r.config),e.extend(!0,this,{id:r.id,hash:r.hash||n++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,r),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var n=e.getString("Errors.OpenFailed",t.eventSource,t.message);u._showMessage(n)})),e.ControlDock.call(this,r),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(s=this.canvas.style).width="100%",s.height="100%",s.overflow="hidden",s.position="absolute",s.top="0px",s.left="0px",e.setElementTouchActionNone(this.canvas),""!==r.tabIndex&&(this.canvas.tabIndex=void 0===r.tabIndex?0:r.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:e.delegate(this,f),keyHandler:e.delegate(this,p),clickHandler:e.delegate(this,h),dblClickHandler:e.delegate(this,m),dragHandler:e.delegate(this,g),dragEndHandler:e.delegate(this,b),enterHandler:e.delegate(this,v),exitHandler:e.delegate(this,w),pressHandler:e.delegate(this,y),releaseHandler:e.delegate(this,x),nonPrimaryPressHandler:e.delegate(this,k),nonPrimaryReleaseHandler:e.delegate(this,A),scrollHandler:e.delegate(this,E),pinchHandler:e.delegate(this,C)}),this.outerTracker=new e.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,S),exitHandler:e.delegate(this,_)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=i(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){u.source=u.world.getItemAt(0).source,t[u.hash].forceRedraw=!0,u._updateRequestId||(u._updateRequestId=a(u,T))})),this.world.addHandler("remove-item",(function(e){u.world.getItemCount()?u.source=u.world.getItemAt(0).source:u.source=null,t[u.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){u.viewport&&u.viewport._setContentBounds(u.world.getHomeBounds(),u.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){u.source=u.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:r.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(o,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(o,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o-1&&t.index\s*$/))n=e.parseXml(n);else if(n.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var s=e.parseJSON(n);n=s}catch(e){}function l(e,t){e.ready?r(e):(e.addHandler("ready",(function(){r(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"==e.type(n))(n=new e.TileSource({url:n,crossOriginPolicy:void 0!==i.crossOriginPolicy?i.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){r(e.tileSource)}})).addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(n)||n.nodeType)if(void 0!==n.crossOriginPolicy||void 0===i.crossOriginPolicy&&void 0===t.crossOriginPolicy||(n.crossOriginPolicy=void 0!==i.crossOriginPolicy?i.crossOriginPolicy:t.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=t.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=t.useCanvas),e.isFunction(n.getTileUrl)){var s=new e.TileSource(n);s.getTileUrl=n.getTileUrl,r(s)}else{var c=e.TileSource.determineType(a,n);if(!c)return void o({message:"Unable to load TileSource",source:n});var u=c.prototype.configure.apply(a,[n]);l(new c(u),n)}else l(n,n)}))}(this,t.tileSource,t,(function(e){i.tileSource=e,a()}),(function(e){e.options=t,r(e),a()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var n=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete n.url,this.addTiledImage(n)},addLayer:function(t){var n=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var i=e.extend({},t,{success:function(e){n.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){n.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(i),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,n){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,n)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var t=e.delegate(this,u),n=e.delegate(this,d),i=e.delegate(this,W),r=e.delegate(this,U),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:M(this.prefixUrl,o.previous.REST),srcGroup:M(this.prefixUrl,o.previous.GROUP),srcHover:M(this.prefixUrl,o.previous.HOVER),srcDown:M(this.prefixUrl,o.previous.DOWN),onRelease:r,onFocus:t,onBlur:n}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:M(this.prefixUrl,o.next.REST),srcGroup:M(this.prefixUrl,o.next.GROUP),srcHover:M(this.prefixUrl,o.next.HOVER),srcDown:M(this.prefixUrl,o.next.DOWN),onRelease:i,onFocus:t,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),a&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,z),n=e.delegate(this,P),i=e.delegate(this,N),r=e.delegate(this,D),o=e.delegate(this,O),a=e.delegate(this,B),s=e.delegate(this,R),l=e.delegate(this,H),c=e.delegate(this,j),f=e.delegate(this,V),p=e.delegate(this,u),h=e.delegate(this,d),m=this.navImages,g=[],b=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(b=!1),this.showZoomControl&&(g.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:M(this.prefixUrl,m.zoomIn.REST),srcGroup:M(this.prefixUrl,m.zoomIn.GROUP),srcHover:M(this.prefixUrl,m.zoomIn.HOVER),srcDown:M(this.prefixUrl,m.zoomIn.DOWN),onPress:t,onRelease:n,onClick:i,onEnter:t,onExit:n,onFocus:p,onBlur:h})),g.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:M(this.prefixUrl,m.zoomOut.REST),srcGroup:M(this.prefixUrl,m.zoomOut.GROUP),srcHover:M(this.prefixUrl,m.zoomOut.HOVER),srcDown:M(this.prefixUrl,m.zoomOut.DOWN),onPress:r,onRelease:n,onClick:o,onEnter:r,onExit:n,onFocus:p,onBlur:h}))),this.showHomeControl&&g.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:M(this.prefixUrl,m.home.REST),srcGroup:M(this.prefixUrl,m.home.GROUP),srcHover:M(this.prefixUrl,m.home.HOVER),srcDown:M(this.prefixUrl,m.home.DOWN),onRelease:a,onFocus:p,onBlur:h})),this.showFullPageControl&&g.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:M(this.prefixUrl,m.fullpage.REST),srcGroup:M(this.prefixUrl,m.fullpage.GROUP),srcHover:M(this.prefixUrl,m.fullpage.HOVER),srcDown:M(this.prefixUrl,m.fullpage.DOWN),onRelease:s,onFocus:p,onBlur:h})),this.showRotationControl&&(g.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:M(this.prefixUrl,m.rotateleft.REST),srcGroup:M(this.prefixUrl,m.rotateleft.GROUP),srcHover:M(this.prefixUrl,m.rotateleft.HOVER),srcDown:M(this.prefixUrl,m.rotateleft.DOWN),onRelease:l,onFocus:p,onBlur:h})),g.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:M(this.prefixUrl,m.rotateright.REST),srcGroup:M(this.prefixUrl,m.rotateright.GROUP),srcHover:M(this.prefixUrl,m.rotateright.HOVER),srcDown:M(this.prefixUrl,m.rotateright.DOWN),onRelease:c,onFocus:p,onBlur:h}))),this.showFlipControl&&g.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:M(this.prefixUrl,m.flip.REST),srcGroup:M(this.prefixUrl,m.flip.GROUP),srcHover:M(this.prefixUrl,m.flip.HOVER),srcDown:M(this.prefixUrl,m.flip.DOWN),onRelease:f,onFocus:p,onBlur:h})),b&&(this.buttons=new e.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttons.element,this.addHandler("open",e.delegate(this,L)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e=0)return this;var l=r(this,s);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:s.location,placement:s.placement}),this},updateOverlay:function(n,i,r){var a;return n=e.getElement(n),(a=o(this.currentOverlays,n))>=0&&(this.currentOverlays[a].update(i,r),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:i,placement:r})),this},removeOverlay:function(n){var i;return n=e.getElement(n),(i=o(this.currentOverlays,n))>=0&&(this.currentOverlays[i].destroy(),this.currentOverlays.splice(i,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var n;return t=e.getElement(t),(n=o(this.currentOverlays,t))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var n=e.makeNeutralElement("div");n.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(n),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}})}(OpenSeadragon),function(e){function t(e){e.quick&&this.viewer.viewport&&(this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x),this.viewer.viewport.panTo(this.viewport.pointFromPixel(e.position)),this.viewer.viewport.applyConstraints())}function n(e){this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function i(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function r(e){return this.viewer.raiseEvent("navigator-scroll",{tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent}),!1}function o(e,t){a(e,"rotate("+t+"deg)")}function a(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(a){var s,l,c,u,d=a.viewer,f=this;function p(e){o(f.displayRegionContainer,e),o(f.displayRegion,-e),f.viewport.setRotation(e)}(a.id?(this.element=document.getElementById(a.id),a.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),a.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"==a.position&&(a.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:a.autoResize,minZoomImageRatio:1})).minPixelRatio=this.minPixelRatio=d.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!=e.ControlAnchor.NONE&&(c=this.element.style,u=this.borderWidth,c.margin="0px",c.border=u+"px solid #555",c.padding="0px",c.background="#000",c.opacity=.8,c.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid #900",e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",d.addControl(this.element,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!=e.ControlAnchor.NONE,this._resizeWithViewer&&(a.width&&a.height?(this.element.style.height="number"==typeof a.height?a.height+"px":a.height,this.element.style.width="number"==typeof a.width?a.width+"px":a.width):(s=e.getElementSize(d.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s),l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate)&&(p(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0),a.viewer.addHandler("rotate",(function(e){p(e.degrees)})));this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,i),scrollHandler:e.delegate(this,r)}),this.addHandler("reset-size",(function(){f.viewport&&f.viewport.goHome(!0)})),d.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=f.world.getItemAt(e.previousIndex);f.world.setItemIndex(t,e.newIndex)}),1)})),d.world.addHandler("remove-item",(function(e){var t=e.item,n=f._getMatchingItem(t);n&&f.world.removeItem(n)})),this.update(d.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){a(this.displayRegion,e),a(this.canvas,e),a(this.element,e)},update:function(t){var n,i,r,o,a,s;if(n=e.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(i=n.x*this.sizeRatio,r=n.y*this.sizeRatio):(i=Math.sqrt(this.elementArea*(n.x/n.y)),r=this.elementArea/i),this.element.style.width=Math.round(i)+"px",this.element.style.height=Math.round(r)+"px",this.elementArea||(this.elementArea=i*r),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),s=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(a.y)+"px",l.left=Math.round(a.x)+"px";var c=Math.abs(a.x-s.x),u=Math.abs(a.y-s.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var n=this,i=t.originalTiledImage;delete t.original;var r=e.extend({},t,{success:function(e){var t=e.item;function r(){n._matchBounds(t,i)}t._originalForNavigator=i,n._matchBounds(t,i,!0),i.addHandler("bounds-change",r),i.addHandler("clip-change",r),i.addHandler("opacity-change",(function(){n._matchOpacity(t,i)})),i.addHandler("composite-operation-change",(function(){n._matchCompositeOperation(t,i)}))}});return e.Viewer.prototype.addTiledImage.apply(this,[r])},_getMatchingItem:function(e){for(var t,n=this.world.getItemCount(),i=0;i1||t.y>1);e++);return e-1},getTileAtPoint:function(t,n){var i=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(i,"[TileSource.getTileAtPoint] must be called with a valid point.");var r=this.dimensions.x*this.getLevelScale(t),o=n.x*r,a=n.y*r,s=Math.floor(o/this.getTileWidth(t)),l=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);return n.y>=1/this.aspectRatio-1e-15&&(l=this.getNumTiles(t).y-1),new e.Point(s,l)},getTileBounds:function(t,n,i,r){var o=this.dimensions.times(this.getLevelScale(t)),a=this.getTileWidth(t),s=this.getTileHeight(t),l=0===n?0:a*n-this.tileOverlap,c=0===i?0:s*i-this.tileOverlap,u=a+(0===n?1:2)*this.tileOverlap,d=s+(0===i?1:2)*this.tileOverlap,f=1/o.x;return u=Math.min(u,o.x-l),d=Math.min(d,o.y-c),r?new e.Rect(0,0,u,d):new e.Rect(l*f,c*f,u*f,d*f)},getImageInfo:function(t){var n,i,r,o,a,s,l,c=this;t&&(l=(s=(a=t.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=s.slice(0,l)),i=function(n){"string"==typeof n&&(n=e.parseXml(n));var i=e.TileSource.determineType(c,n,t);i?(void 0===(o=i.prototype.configure.apply(c,[n,t])).ajaxWithCredentials&&(o.ajaxWithCredentials=c.ajaxWithCredentials),r=new i(o),c.ready=!0,c.raiseEvent("ready",{tileSource:r})):c.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(n=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:n,callback:i})):e.makeAjaxRequest({url:t,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(t){var n=function(t){var n,i,r=t.responseText,o=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw o=t.status,n=404==o?"Not Found":t.statusText,new Error(e.getString("Errors.Status",o,n));if(r.match(/\s*<.*/))try{i=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(r)}catch(e){i=t.responseText}else if(r.match(/\s*[\{\[].*/))try{i=e.parseJSON(r)}catch(e){i=r}else i=r;return i}(t);i(n)},error:function(e,n){var i;try{i="HTTP "+e.status+" attempting to load TileSource"}catch(e){i=(void 0!==n&&n.toString?n.toString():"Unknown error")+" attempting to load TileSource"}c.raiseEvent("open-failed",{message:i,source:t})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,n){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,n){return{}},tileExists:function(e,t,n){var i=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&n>=0&&t=0;u--)for(f=(d=this.displayRects[u]).minLevel;f<=d.maxLevel;f++)this._levelRects[f]||(this._levelRects[f]=[]),this._levelRects[f].push(d);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var n;return e.Image?n=e.Image.xmlns:e.documentElement&&("Image"!=e.documentElement.localName&&"Image"!=e.documentElement.tagName||(n=e.documentElement.namespaceURI)),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,i){var r;return r=e.isPlainObject(n)?t(this,n):function(n,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,a,s,l,c=i.documentElement,u=c.localName||c.tagName,d=i.documentElement.namespaceURI,f=null,p=[];if("Image"==u)try{if(void 0===(s=c.getElementsByTagName("Size")[0])&&(s=c.getElementsByTagNameNS(d,"Size")[0]),f={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:c.getAttribute("Url"),Format:c.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(c.getAttribute("Overlap"),10),TileSize:parseInt(c.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!e.imageFormatSupported(f.Image.Format))throw new Error(e.getString("Errors.ImageFormat",f.Image.Format.toUpperCase()));for(void 0===(r=c.getElementsByTagName("DisplayRect"))&&(r=c.getElementsByTagNameNS(d,"DisplayRect")[0]),l=0;l=0;c--)if(!(e<(i=u[c]).minLevel||e>i.maxLevel)&&(r=this.getLevelScale(e),o=i.x*r,a=i.y*r,s=o+i.width*r,l=a+i.height*r,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t0?t.tileSize=Math.max.apply(null,s):t.tileSize=o}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,t.levels=function(e){for(var t=[],n=0;n0&&t>=this.minLevel&&t<=this.maxLevel&&(n=this.levels[t].width/this.levels[this.maxLevel].width),n}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,n){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,n)},getTileUrl:function(e,t,n){if(this.emulateLegacyImagePyramid){var i=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i}var r,o,a,s,l,c,u,d,f,p,h,m=Math.pow(.5,this.maxLevel-e),g=Math.ceil(this.width*m),b=Math.ceil(this.height*m);return r=this.getTileWidth(e),o=this.getTileHeight(e),a=Math.ceil(r/m),s=Math.ceil(o/m),h=this["@context"].indexOf("/1.0/context.json")>-1||this["@context"].indexOf("/1.1/context.json")>-1||this["@context"].indexOf("/1/context.json")>-1?"native.jpg":"default.jpg",gc?l/256:c/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=l,a.height=c,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var i=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(i-n)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(e){e.tileSize=256;var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,n){return{x:Math.ceil(e/n),y:Math.ceil(t/n)}},_calculateAbsoluteTileNumber:function(e,t,n){for(var i=0,r={},o=0;o");return r.sort((function(e,t){return e.height-t.height}))}(n.levels),n.levels.length>0?(i=n.levels[n.levels.length-1].width,r=n.levels[n.levels.length-1].height):(i=0,r=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:i,height:r,tileSize:Math.max(r,i),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"==e.type||e.documentElement&&"legacy-image-pyramid"==e.documentElement.getAttribute("type")},configure:function(n,i){return e.isPlainObject(n)?t(this,n):function(n,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,a=i.documentElement,s=a.tagName,l=null,c=[];if("image"==s)try{for(l={type:a.getAttribute("type"),levels:[]},c=a.getElementsByTagName("level"),o=0;o0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var i=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i}})}(OpenSeadragon),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var n=this._image=new Image,i=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",(function(){i.width=Object.prototype.hasOwnProperty.call(n,"naturalWidth")?n.naturalWidth:n.width,i.height=Object.prototype.hasOwnProperty.call(n,"naturalHeight")?n.naturalHeight:n.height,i.aspectRatio=i.width/i.height,i.dimensions=new e.Point(i.width,i.height),i._tileWidth=i.width,i._tileHeight=i.height,i.tileOverlap=0,i.minLevel=0,i.levels=i._buildLevels(),i.maxLevel=i.levels.length-1,i.ready=!0,i.raiseEvent("ready",{tileSource:i})})),e.addEvent(n,"error",(function(){i.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),n.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var i=null;return e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i},getContext2D:function(e,t,n){var i=null;return e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].context2D),i},_buildLevels:function(){var t=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var n=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,i=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,r=document.createElement("canvas"),o=r.getContext("2d");if(r.width=n,r.height=i,o.drawImage(this._image,0,0,n,i),t[0].context2D=o,delete this._image,e.isCanvasTainted(r))return t;for(;n>=2&&i>=2;){n=Math.floor(n/2),i=Math.floor(i/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=i,s.drawImage(r,0,0,n,i),t.splice(0,0,{context2D:s,width:n,height:i}),r=a,o=s}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,n,i,r){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){function t(n){e.requestAnimationFrame((function(){!function(n){var i,r,o;n.shouldFade&&(i=e.now(),r=i-n.fadeBeginTime,o=1-r/n.fadeLength,o=Math.min(1,o),o=Math.max(0,o),n.imgGroup&&e.setElementOpacity(n.imgGroup,o,!0),o>0&&t(n))}(n)}))}function n(t,n){t.element.disabled||(n>=e.ButtonState.GROUP&&t.currentState==e.ButtonState.REST&&(!function(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}(t),t.currentState=e.ButtonState.GROUP),n>=e.ButtonState.HOVER&&t.currentState==e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),n>=e.ButtonState.DOWN&&t.currentState==e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function i(n,i){n.element.disabled||(i<=e.ButtonState.HOVER&&n.currentState==e.ButtonState.DOWN&&(n.imgDown&&(n.imgDown.style.visibility="hidden"),n.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&n.currentState==e.ButtonState.HOVER&&(n.imgHover&&(n.imgHover.style.visibility="hidden"),n.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&n.currentState==e.ButtonState.GROUP&&(!function(n){n.shouldFade=!0,n.fadeBeginTime=e.now()+n.fadeDelay,window.setTimeout((function(){t(n)}),n.fadeDelay)}(n),n.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var r=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor==e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(n(r,e.ButtonState.DOWN),r.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||n(r,e.ButtonState.HOVER)},focusHandler:function(e){this.enterHandler(e),r.raiseEvent("focus",{originalEvent:e.originalEvent})},exitHandler:function(t){i(r,e.ButtonState.GROUP),t.insideElementPressed&&r.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){this.exitHandler(e),r.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){n(r,e.ButtonState.DOWN),r.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(i(r,e.ButtonState.HOVER),r.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?i(r,e.ButtonState.GROUP):n(r,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&r.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){return 13!==e.keyCode||(r.raiseEvent("click",{originalEvent:e.originalEvent}),r.raiseEvent("release",{originalEvent:e.originalEvent}),!1)}}),i(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){n(this,e.ButtonState.GROUP)},notifyGroupExit:function(){i(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}})}(OpenSeadragon),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var n,i=this.buttons.concat([]),r=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.label=e.makeNeutralElement("label"),this.element.style.display="inline-block",this.element.appendChild(this.label),n=0;n=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},e.Rect.fromSummits=function(t,n,i){var r=t.distanceTo(n),o=t.distanceTo(i),a=n.minus(t),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new e.Rect(t.x,t.y,r,o,s/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var n=this.getBoundingBox(),i=t.getBoundingBox(),r=Math.min(n.x,i.x),o=Math.min(n.y,i.y),a=Math.max(n.x+n.width,i.x+i.width),s=Math.max(n.y+n.height,i.y+i.height);return new e.Rect(r,o,a-r,s-o)},intersection:function(t){var n=[],i=this.getTopLeft();t.containsPoint(i,1e-10)&&n.push(i);var r=this.getTopRight();t.containsPoint(r,1e-10)&&n.push(r);var o=this.getBottomLeft();t.containsPoint(o,1e-10)&&n.push(o);var a=this.getBottomRight();t.containsPoint(a,1e-10)&&n.push(a);var s=t.getTopLeft();this.containsPoint(s,1e-10)&&n.push(s);var l=t.getTopRight();this.containsPoint(l,1e-10)&&n.push(l);var c=t.getBottomLeft();this.containsPoint(c,1e-10)&&n.push(c);var u=t.getBottomRight();this.containsPoint(u,1e-10)&&n.push(u);for(var d=this._getSegments(),f=t._getSegments(),p=0;py&&(y=C.x),C.yk&&(k=C.y)}return new e.Rect(w,x,y-w,k-x)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),n=this.getBottomLeft(),i=this.getBottomRight();return[[e,t],[t,i],[i,n],[n,e]]},rotate:function(t,n){if(0===(t=e.positiveModulo(t,360)))return this.clone();n=n||this.getCenter();var i=this.getTopLeft().rotate(t,n),r=this.getTopRight().rotate(t,n).minus(i);r=r.apply((function(e){return Math.abs(e)<1e-15?0:e}));var o=Math.atan(r.y/r.x);return r.x<0?o+=Math.PI:r.y<0&&(o+=2*Math.PI),new e.Rect(i.x,i.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),n=this.getTopRight(),i=this.getBottomLeft(),r=this.getBottomRight(),o=Math.min(t.x,n.x,i.x,r.x),a=Math.max(t.x,n.x,i.x,r.x),s=Math.min(t.y,n.y,i.y,r.y),l=Math.max(t.y,n.y,i.y,r.y);return new e.Rect(o,s,a-o,l-s)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),n=Math.floor(t.x),i=Math.floor(t.y),r=Math.ceil(t.width+t.x-n),o=Math.ceil(t.height+t.y-i);return new e.Rect(n,i,r,o)},containsPoint:function(e,t){t=t||0;var n=this.getTopLeft(),i=this.getTopRight(),r=this.getBottomLeft(),o=i.minus(n),a=r.minus(n);return(e.x-n.x)*o.x+(e.y-n.y)*o.y>=-t&&(e.x-i.x)*o.x+(e.y-i.y)*o.y<=t&&(e.x-n.x)*a.x+(e.y-n.y)*a.y>=-t&&(e.x-r.x)*a.x+(e.y-r.y)*a.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};function n(t){var n=Number(this.element.style.marginLeft.replace("px","")),i=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.dragging=!0,this.element&&("horizontal"==this.scroll?-t.delta.x>0?n>-(o-s.x)&&(this.element.style.marginLeft=n+2*t.delta.x+"px",r(this,s.x,n+2*t.delta.x)):-t.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*t.delta.x+"px",r(this,s.x,n+2*t.delta.x)):-t.delta.y>0?i>-(a-s.y)&&(this.element.style.marginTop=i+2*t.delta.y+"px",r(this,s.y,i+2*t.delta.y)):-t.delta.y<0&&i<0&&(this.element.style.marginTop=i+2*t.delta.y+"px",r(this,s.y,i+2*t.delta.y))),!1}function i(t){var n=Number(this.element.style.marginLeft.replace("px","")),i=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.element&&("horizontal"==this.scroll?t.scroll>0?n>-(o-s.x)&&(this.element.style.marginLeft=n-60*t.scroll+"px",r(this,s.x,n-60*t.scroll)):t.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*t.scroll+"px",r(this,s.x,n-60*t.scroll)):t.scroll<0?i>s.y-a&&(this.element.style.marginTop=i+60*t.scroll+"px",r(this,s.y,i+60*t.scroll)):t.scroll>0&&i<0&&(this.element.style.marginTop=i+60*t.scroll+"px",r(this,s.y,i+60*t.scroll))),!1}function r(t,n,i){var r,o,a,s,l,c,u;for(r="horizontal"==t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(n/r)+5,c=o=(o=(a=Math.ceil((Math.abs(i)+n)/r)+1)-o)<0?0:o;cc+a.x-this.panelWidth?(n=Math.min(n,s-a.x),this.element.style.marginLeft=-n+"px",r(this,a.x,-n)):nu+a.y-this.panelHeight?(n=Math.min(n,l-a.y),this.element.style.marginTop=-n+"px",r(this,a.y,-n)):n1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var t,n;this.current.time=e.now(),this._exponential?(t=this.start._logValue,n=this.target._logValue):(t=this.start.value,n=this.target.value);var i,r,o=this.current.time>=this.target.time?n:t+(n-t)*(i=this.springStiffness,r=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(i*-r))/(1-Math.exp(-i))),a=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,a!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(OpenSeadragon),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,makeAjaxRequest:e.makeAjaxRequest,jobId:null},t),this.image=null}t.prototype={errorMsg:null,start:function(){var e=this,t=this.abort;this.image=new Image,this.image.onload=function(){e.finish(!0)},this.image.onabort=this.image.onerror=function(){e.errorMsg="Image load aborted",e.finish(!1)},this.jobId=window.setTimeout((function(){e.errorMsg="Image load exceeded timeout",e.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(t){var n;try{e.image._array=t.response,n=new window.Blob([t.response])}catch(e){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===e.name&&i){var r=new i;r.append(t.response),n=r.getBlob()}}void 0!==n&&0!==n.size||(e.errorMsg="Empty image response.",e.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(n);e.image.src=o},error:function(t){e.errorMsg="Image load aborted - XHR error",e.finish(!1)}}),this.abort=function(){e.request.abort(),"function"==typeof t&&t()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,i=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,makeAjaxRequest:e.makeAjaxRequest,callback:function(t){!function(e,t,n){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(e.jobQueue.shift().start(),e.jobsInProgress++);n(t.image,t.errorMsg,t.request)}(n,t,e.callback)},abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgressn&&(n=r)}return n},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!=e.x||this.canvas.height!=e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y}this._clear()}},_clear:function(e,t){if(this.useCanvas){var n=this._getContext(e);if(t)n.clearRect(t.x,t.y,t.width,t.height);else{var i=n.canvas;n.clearRect(0,0,i.width,i.height)}}},viewportToDrawerRectangle:function(t){var n=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),i=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio,i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio)},drawTile:function(t,n,i,r,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(i);r=r||1,t.drawCanvas(a,n,r,o)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var i=this;this.viewer.addHandler("rotate",(function e(){if(0!==i.viewport.getRotation()){i.viewer.removeHandler("rotate",e);var t=i._calculateSketchCanvasSize();i.sketchCanvas.width=t.x,i.sketchCanvas.height=t.y}}))}}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),n.rect(e.x,e.y,e.width,e.height),n.clip()}},drawRectangle:function(e,t,n){if(this.useCanvas){var i=this._getContext(n);i.save(),i.fillStyle=t,i.fillRect(e.x,e.y,e.width,e.height),i.restore()}},blendSketch:function(t,n,i,r){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:n,translate:i,compositeOperation:r}),this.useCanvas&&this.sketchCanvas){t=o.opacity,r=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,r&&(this.context.globalCompositeOperation=r),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{n=o.scale||1;var s=(i=o.translate)instanceof e.Point?i:new e.Point(0,0),l=0,c=0;if(i){var u=this.sketchCanvas.width-this.canvas.width,d=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(d/2)}this.context.drawImage(this.sketchCanvas,s.x-l*n,s.y-c*n,(this.canvas.width+2*l)*n,(this.canvas.height+2*c)*n,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,n,i,r){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(r)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],0!==this.viewport.degrees?this._offsetForRotation({degrees:this.viewport.degrees}):this.viewer.viewport.flipped&&this._flip(),r.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:r.getRotation(!0),point:r.viewport.pixelFromPointNoRotate(r._getRotationPoint(!0),!0)}),a.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var s=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,l),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-s,-l),0===t.x&&0===t.y&&(a.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+i+" of "+n,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),r.getRotation(!0)%360!=0&&this._restoreRotationChanges(),a.restore()}},debugRect:function(t){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*e.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),n.restore()}},getCanvasSize:function(t){var n=this._getContext(t).canvas;return new e.Point(n.width,n.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var n=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(t.useSketch);i.save(),i.translate(n.x,n.y),this.viewer.viewport.flipped?(i.rotate(Math.PI/180*-t.degrees),i.scale(-1,1)):i.rotate(Math.PI/180*t.degrees),i.translate(-n.x,-n.y)},_flip:function(t){var n=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(t.useSketch);i.translate(n.x,0),i.scale(-1,1),i.translate(-n.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:n.x*t,y:n.y*t}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var n=arguments;n.length&&n[0]instanceof e.Point&&(t={containerSize:n[0],contentSize:n[1],config:n[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,n)},_setContentBounds:function(t,n){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),i=n/this.getAspectRatio();return new e.Rect(t.x-n/2,t.y-i/2,n,i)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var n=this.getCenter(t),i=1/this.getZoom(t),r=i/this.getAspectRatio();return new e.Rect(n.x-i/2,n.y-r/2,i,r)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),n=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/n,t.y-=this._margins.top/n,t.width+=(this._margins.left+this._margins.right)/n,t.height+=(this._margins.top+this._margins.bottom)/n,t},getCenter:function(t){var n,i,r,o,a,s,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),c=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(r=1/(i=this.getZoom()))/this.getAspectRatio(),a=new e.Rect(l.x-r/2,l.y-o/2,r,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).divide(this._containerInnerSize.x*i),c.plus(s)):c},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var n=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var i=this.visibilityRatio*n.width,r=n.x+n.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-r+i,s=o-n.x-i;i>this._contentBoundsNoRotate.width?n.x+=(a+s)/2:s<0?n.x+=s:a>0&&(n.x+=a)}if(this.wrapVertical);else{var l=this.visibilityRatio*n.height,c=n.y+n.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,d=this._contentBoundsNoRotate.y-c+l,f=u-n.y-l;l>this._contentBoundsNoRotate.height?n.y+=(d+f)/2:f<0?n.y+=f:d>0&&(n.y+=d)}return n},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),n=this._applyZoomConstraints(t);t!==n&&this.zoomTo(n,this.zoomPoint,e);var i=this.getBoundsNoRotate(),r=this._applyBoundaryConstraints(i);return this._raiseConstraintsEvent(e),(i.x!==r.x||i.y!==r.y||e)&&this.fitBounds(r.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,n){var i=(n=n||{}).immediately||!1,r=n.constraints||!1,o=this.getAspectRatio(),a=t.getCenter(),s=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var l=1/s.width;if(r){var c=s.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,s.width=1/l,s.x=a.x-s.width/2,s.height=s.width/c,s.y=a.y-s.height/2),a=(s=this._applyBoundaryConstraints(s)).getCenter(),this._raiseConstraintsEvent(i)}if(i)return this.panTo(a,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var d=this.getBounds(),f=this.getZoom();if(0===f||Math.abs(l/f-1)<1e-8)return this.zoomTo(l,!0),this.panTo(a,i);var p=(s=s.rotate(-this.getRotation())).getTopLeft().times(l).minus(d.getTopLeft().times(f)).divide(l-f);return this.zoomTo(l,p,i)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,t)},fitHorizontally:function(t){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,n){var i=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(i.plus(t),n)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,n){return this.zoomTo(this.zoomSpring.target.value*e,t,n)},zoomTo:function(t,n,i){var r=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,i?this._adjustCenterSpringsForZoomPoint((function(){r.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:n,immediately:i}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var n,i=this.getBoundsNoRotate(),r=i;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(n=e.x/this.containerSize.x,r.width=i.width*n,r.height=r.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(r,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(t),i=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(i.x),this.centerSpringY.shiftBy(i.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,n){return t.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,n){var i=this.getBoundsNoRotate(n);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/i.width).plus(i.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,n){var i=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/i,n*this._contentSizeNoRotate.x/i)},viewportToImageCoordinates:function(t,n){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===i){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,n,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,n){var i=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*i,n/this._contentSizeNoRotate.x*i)},imageToViewportCoordinates:function(t,n){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===i){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,n,!0)}}var r=this._imageToViewportDelta(t,n);return r.x+=this._contentBoundsNoRotate.x,r.y+=this._contentBoundsNoRotate.y,r},imageToViewportRectangle:function(t,n,i,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,i,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,n,i,r,!0)}}var s=this.imageToViewportCoordinates(o.x,o.y),l=this._imageToViewportDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewportToImageRectangle:function(t,n,i,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,i,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,n,i,r,!0)}}var s=this.viewportToImageCoordinates(o.x,o.y),l=this._viewportToImageDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}}var i=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/i*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(OpenSeadragon),function(e){function t(e,t,i,r,o,a,l,c,u){var d=l.getBoundingBox().getTopLeft(),f=l.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:r,opacity:o,visibility:a,drawArea:l,topleft:d,bottomright:f,currenttime:c,best:u}),s(e.coverage,r),s(e.loadingCoverage,r);for(var p=e._getCornerTiles(r,d,f),h=p.topLeft,m=p.bottomRight,g=e.source.getNumTiles(r),b=e.viewport.pixelFromPoint(e.viewport.getCenter()),v=h.x;v<=m.x;v++)for(var w=h.y;w<=m.y;w++){if(!e.wrapHorizontal&&!e.wrapVertical){var y=e.source.getTileBounds(r,v,w);if(null===l.intersection(y))continue}u=n(e,i,t,v,w,r,o,a,b,g,c,u)}return u}function n(t,n,r,s,l,c,u,d,f,p,h,m){var g=function(t,n,i,r,o,a,s,l,c,u){var d,f,p,h,m,g,b,v,w;a[i]||(a[i]={});a[i][t]||(a[i][t]={});a[i][t][n]||(d=(l.x+t%l.x)%l.x,f=(l.y+n%l.y)%l.y,p=o.getTileBounds(i,d,f),h=o.getTileBounds(i,d,f,!0),m=o.tileExists(i,d,f),g=o.getTileUrl(i,d,f),r.loadTilesWithAjax?(b=o.getTileAjaxHeaders(i,d,f),e.isPlainObject(r.ajaxHeaders)&&(b=e.extend({},r.ajaxHeaders,b))):b=null,v=o.getContext2D?o.getContext2D(i,d,f):void 0,p.x+=(t-d)/l.x,p.y+=u/c*((n-f)/l.y),w=new e.Tile(i,t,n,p,m,g,v,r.loadTilesWithAjax,b,h),d===l.x-1&&(w.isRightMost=!0),f===l.y-1&&(w.isBottomMost=!0),a[i][t][n]=w);return(w=a[i][t][n]).lastTouchTime=s,w}(s,l,c,t,t.source,t.tilesMatrix,h,p,t._worldWidthCurrent,t._worldHeightCurrent),b=r;t.viewer&&t.viewer.raiseEvent("update-tile",{tiledImage:t,tile:g}),a(t.coverage,c,s,l,!1);var v=g.loaded||g.loading||o(t.loadingCoverage,c,s,l);if(a(t.loadingCoverage,c,s,l,v),!g.exists)return m;if(n&&!b&&(o(t.coverage,c,s,l)?a(t.coverage,c,s,l,!0):b=!0),!b)return m;if(function(t,n,i,r,o,a){var s=t.bounds.getTopLeft();s.x*=a._scaleSpring.current.value,s.y*=a._scaleSpring.current.value,s.x+=a._xSpring.current.value,s.y+=a._ySpring.current.value;var l=t.bounds.getSize();l.x*=a._scaleSpring.current.value,l.y*=a._scaleSpring.current.value;var c=i.pixelFromPointNoRotate(s,!0),u=i.pixelFromPointNoRotate(s,!1),d=i.deltaPixelsFromPointsNoRotate(l,!0),f=i.deltaPixelsFromPointsNoRotate(l,!1),p=u.plus(f.divide(2)),h=r.squaredDistanceTo(p);n||(d=d.plus(new e.Point(1,1)));t.isRightMost&&a.wrapHorizontal&&(d.x+=.75);t.isBottomMost&&a.wrapVertical&&(d.y+=.75);t.position=c,t.size=d,t.squaredDistance=h,t.visibility=o}(g,t.source.tileOverlap,t.viewport,f,d,t),!g.loaded)if(g.context2D)i(t,g);else{var w=t._tileCache.getImageRecord(g.cacheKey);if(w)i(t,g,w.getImage())}g.loaded?function(e,t,n,i,r,o,s){var l,c,u=1e3*e.blendTime;t.blendStart||(t.blendStart=s);l=s-t.blendStart,c=u?Math.min(1,l/u):1,e.alwaysBlend&&(c*=o);if(t.opacity=c,e.lastDrawn.push(t),1==c)a(e.coverage,r,n,i,!0),e._hasOpaqueTile=!0;else if(le.visibility)return t;if(t.visibility==e.visibility&&t.squaredDistanceo?(a=this._clip.x/this._clip.height*t.height,s=this._clip.y/this._clip.height*t.height):(a=this._clip.x/this._clip.width*t.width,s=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,d=0;r.isHorizontallyCentered?d=(t.width-t.height*o)/2:r.isRight&&(d=t.width-t.height*o),this.setPosition(new e.Point(t.x-a+d,t.y-s),i),this.setHeight(u,i)}else{var f=t.width/l,p=0;r.isVerticallyCentered?p=(t.height-t.width/o)/2:r.isBottom&&(p=t.height-t.width/o),this.setPosition(new e.Point(t.x-a,t.y-s+p),i),this.setWidth(f,i)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var n=this._scaleSpring.target.value===e;if(t){if(n&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}n||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return{lowestLevel:e=Math.min(e,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var n=this.viewport,o=this._viewportToTiledImageRectangle(n.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var a=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(o=o.intersection(a)))return}for(var s=this._getLevelsInterval(),l=s.lowestLevel,c=s.highestLevel,u=null,d=!1,f=e.now(),p=c;p>=l;p--){var h=!1,m=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!0).x*this._scaleSpring.current.value;if(p===l||!d&&m>=this.minPixelRatio)h=!0,d=!0;else if(!d)continue;var g=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!1).x*this._scaleSpring.current.value,b=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,v=this.immediateRender?1:b;if(u=t(this,d,h,p,Math.min(1,(m-.5)/.5),v/Math.abs(v-g),o,f,u),r(this.coverage,p))break}!function(t,n){if(0===t.opacity||0===n.length&&!t.placeholderFillStyle)return;var i,r,o,a=n[0];a&&(i=t.opacity<1||t.compositeOperation&&"source-over"!==t.compositeOperation||!t._isBottomItem()&&a._hasTransparencyChannel());var s,l=t.viewport.getZoom(!0),c=t.viewportToImageZoom(l);n.length>1&&c>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(i=!0,r=a.getScaleForEdgeSmoothing(),o=a.getTranslationForEdgeSmoothing(r,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0)));i&&(r||(s=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox().times(e.pixelDensityRatio)),t._drawer._clear(!0,s));r||(0!==t.viewport.degrees?t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:i}):t._drawer.viewer.viewport.flipped&&t._drawer._flip({}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:i}));var u=!1;if(t._clip){t._drawer.saveContext(i);var d=t.imageToViewportRectangle(t._clip,!0);d=d.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var f=t._drawer.viewportToDrawerRectangle(d);r&&(f=f.times(r)),o&&(f=f.translate(o)),t._drawer.setClip(f,i),u=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var p=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));r&&(p=p.times(r)),o&&(p=p.translate(o));var h=null;h="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(p,h,i)}for(var m=n.length-1;m>=0;m--)a=n[m],t._drawer.drawTile(a,t._drawingHandler,i,r,o),a.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:a});u&&t._drawer.restoreContext(i);r||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(i),0!==t.viewport.degrees?t._drawer._restoreRotationChanges(i):t._drawer.viewer.viewport.flipped&&t._drawer._flip({}));i&&(r&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:r,translate:o,compositeOperation:t.compositeOperation,bounds:s}),r&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1)));!function(t,n){if(t.debugMode)for(var i=n.length-1;i>=0;i--){var r=n[i];try{t._drawer.drawDebugInfo(r,n.length,i,t)}catch(t){e.console.error(t)}}}(t,n)}(this,this.lastDrawn),u&&!u.context2D?(!function(t,n,r){var o;n.loading=!0,e.isFunction(t.makeAjaxRequest)&&(o=t.makeAjaxRequest);t._imageLoader.addJob({src:n.url,makeAjaxRequest:o,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.ajaxHeaders,crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,callback:function(o,a,s){!function(t,n,r,o,a,s){if(!o)return e.console.log("Tile %s failed to load: %s - error: %s",n,n.url,a),t.viewer.raiseEvent("tile-load-failed",{tile:n,tiledImage:t,time:r,message:a,tileRequest:s}),n.loading=!1,void(n.exists=!1);if(rthis._maxImageCacheCount){for(var s,l,c,u,d,f,p=null,h=-1,m=null,g=this._tilesLoaded.length-1;g>=0;g--)(s=(f=this._tilesLoaded[g]).tile).level<=r||s.beingDrawn||(p?(u=s.lastTouchTime,l=p.lastTouchTime,d=s.level,c=p.level,(uc)&&(p=s,h=g,m=f)):(p=s,h=g,m=f));p&&h>=0&&(this._unloadTile(m),o=h)}this._tilesLoaded[o]=new t({tile:i.tile,tiledImage:i.tiledImage})},clearTilesFor:function(t){var n;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var i=0;i=this._items.length)throw new Error("Index bigger than number of layers.");n!==i&&-1!==i&&(this._items.splice(i,1),this._items.splice(n,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:i,newIndex:n}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var n=e.indexOf(this._items,t);-1!==n&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;tu.height?s:s*(u.width/u.height))*(u.height/u.width),p=new e.Point(h+(s-d)/2,m+(s-f)/2),c.setPosition(p,i),c.setWidth(d,i),"horizontal"===r?h+=l:m+=l;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,i=this._contentFactor||0;if(this._items.length){var r=this._items[0],o=r.getBounds();this._contentFactor=r.getContentSize().x/o.width;for(var a=r.getClippedBounds().getBoundingBox(),s=a.x,l=a.y,c=a.x+a.width,u=a.y+a.height,d=1;d>3)]>>7-((7&h)<<0)&1);l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>2)]>>6-((3&h)<<1)&3),l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>1)]>>4-((1&h)<<2)&15),l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>3]>>7-(7&h)&1))==255*g?0:255;c[h]=D<<24|M<<16|M<<8|M}if(2==d)for(h=0;h>2]>>6-((3&h)<<1)&3))==85*g?0:255,c[h]=D<<24|M<<16|M<<8|M;if(4==d)for(h=0;h>1]>>4-((1&h)<<2)&15))==17*g?0:255,c[h]=D<<24|M<<16|M<<8|M;if(8==d)for(h=0;h>3,s=Math.ceil(i*o/8),l=new Uint8Array(r*s),c=0,u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],h=0;h<7;){for(var m=f[h],g=p[h],b=0,v=0,w=u[h];w>3])>>7-(7&E)&1,l[A*s+(C>>3)]|=S<<7-((3&C)<<0)),2==o&&(S=(S=t[E>>3])>>6-(7&E)&3,l[A*s+(C>>2)]|=S<<6-((3&C)<<1)),4==o&&(S=(S=t[E>>3])>>4-(7&E)&15,l[A*s+(C>>1)]|=S<<4-((1&C)<<2)),o>=8)for(var _=A*s+C*a,T=0;T>3)+T];E+=o,C+=g}k++,A+=m}b*v!=0&&(c+=v*(1+x)),h+=1}return l},e.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},e.decode._filterZero=function(t,n,i,r,o){var a=e.decode._getBPP(n),s=Math.ceil(r*a/8),l=e.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==f)for(p=a;p>1)&255;for(p=a;p>1)&255}if(4==f){for(p=0;p>8&255,e[t+1]=255&n},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII:function(e,t,n){for(var i="",r=0;r=0&&s>=0?(d=p*t+h<<2,f=(s+p)*r+a+h<<2):(d=(-s+p)*t-a+h<<2,f=p*r+h<<2),0==l)i[f]=e[d],i[f+1]=e[d+1],i[f+2]=e[d+2],i[f+3]=e[d+3];else if(1==l){var m=e[d+3]*(1/255),g=e[d]*m,b=e[d+1]*m,v=e[d+2]*m,w=i[f+3]*(1/255),y=i[f]*w,x=i[f+1]*w,k=i[f+2]*w,A=1-m,C=m+w*A,E=0==C?0:1/C;i[f+3]=255*C,i[f+0]=(g+y*A)*E,i[f+1]=(b+x*A)*E,i[f+2]=(v+k*A)*E}else if(2==l)m=e[d+3],g=e[d],b=e[d+1],v=e[d+2],w=i[f+3],y=i[f],x=i[f+1],k=i[f+2],m==w&&g==y&&b==x&&v==k?(i[f]=0,i[f+1]=0,i[f+2]=0,i[f+3]=0):(i[f]=g,i[f+1]=b,i[f+2]=v,i[f+3]=m);else if(3==l){if(m=e[d+3],g=e[d],b=e[d+1],v=e[d+2],w=i[f+3],y=i[f],x=i[f+1],k=i[f+2],m==w&&g==y&&b==x&&v==k)continue;if(m<220&&w>20)return!1}return!0},e.encode=function(t,n,i,r,o,a){null==r&&(r=0),null==a&&(a=!1);for(var s=new Uint8Array(t[0].byteLength*t.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var u=8,d=e._bin,f=e.crc.crc,p=d.writeUint,h=d.writeUshort,m=d.writeASCII,g=e.encode.compressPNG(t,n,i,r,a);p(s,u,13),m(s,u+=4,"IHDR"),p(s,u+=4,n),p(s,u+=4,i),s[u+=4]=g.depth,s[++u]=g.ctype,s[++u]=0,s[++u]=0,s[++u]=0,p(s,++u,f(s,u-17,17)),p(s,u+=4,1),m(s,u+=4,"sRGB"),s[u+=4]=1,p(s,++u,f(s,u-5,5)),u+=4;var b=t.length>1;if(b&&(p(s,u,8),m(s,u+=4,"acTL"),p(s,u+=4,t.length),p(s,u+=4,0),p(s,u+=4,f(s,u-12,12)),u+=4),3==g.ctype){for(p(s,u,3*(S=g.plte.length)),m(s,u+=4,"PLTE"),u+=4,c=0;c>8&255,k=w>>16&255;s[u+v+0]=y,s[u+v+1]=x,s[u+v+2]=k}if(p(s,u+=3*S,f(s,u-3*S-4,3*S+4)),u+=4,g.gotAlpha){for(p(s,u,S),m(s,u+=4,"tRNS"),u+=4,c=0;c>24&255;p(s,u+=S,f(s,u-S-4,S+4)),u+=4}}for(var A=0,C=0;C=300))break}}var x=!!m&&o,k=b.length;k<=256&&0==a&&(l=k<=2?1:k<=4?2:k<=16?4:8,o&&(l=8),m=!0);var A=[];for(d=0;dR&&(R=V),jH&&(H=j));var U=-1==R?1:(R-L+1)*(H-B+1);U>1)]|=g[E[Y+V]]<<4-4*(1&V);else if(2==l)for(V=0;V>2)]|=g[E[Y+V]]<<6-2*(3&V);else if(1==l)for(V=0;V>3)]|=g[E[Y+V]]<<7-1*(7&V)}C=W,s=3,c=1}else if(0==m&&1==t.length){W=new Uint8Array(T*M*3);var q=T*M;for(h=0;h5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(u=o;u>1)&255;for(u=o;u>1)&255}if(4==a){for(u=0;u>>1:n>>>=1;e[t]=n}return e}(),update:function(t,n,i,r){for(var o=0;o>>8;return t},crc:function(t,n,i){return 4294967295^e.crc.update(4294967295,t,n,i)}},e.quantize=function(t,n,i){for(var r=[],o=0,a=0;am&&(m=h[a].est.L,g=a);if(m<.001)break;var b=h[g],v=e.quantize.splitPixels(s,l,b.i0,b.i1,b.est.e,b.est.eMq255),w={i0:b.i0,i1:v,bst:null,est:null,tdst:0,left:null,right:null};w.bst=e.quantize.stats(s,w.i0,w.i1),w.est=e.quantize.estats(w.bst);var y={i0:v,i1:b.i1,bst:null,est:null,tdst:0,left:null,right:null};for(y.bst={R:[],m:[],N:b.bst.N-w.bst.N},a=0;a<16;a++)y.bst.R[a]=b.bst.R[a]-w.bst.R[a];for(a=0;a<4;a++)y.bst.m[a]=b.bst.m[a]-w.bst.m[a];y.est=e.quantize.estats(y.bst),b.left=w,b.right=y,h[g]=w,h.push(y)}h.sort((function(e,t){return t.bst.N-e.bst.N}));for(var x=0;x>2]=z.est.rgba}r[x]=C.buffer}return{bufs:r,plte:h}},e.quantize.getNearest=function(t,n,i,r,o){if(null==t.left)return t.tdst=e.quantize.dist(t.est.q,n,i,r,o),t;var a=e.quantize.planeDst(t.est,n,i,r,o),s=t.left,l=t.right;a>0&&(s=t.right,l=t.left);var c=e.quantize.getNearest(s,n,i,r,o);if(c.tdst<=a*a)return c;var u=e.quantize.getNearest(l,n,i,r,o);return u.tdsta;)r-=4;if(i>=r)break;var l=n[i>>2];n[i>>2]=n[r>>2],n[r>>2]=l,i+=4,r-=4}for(;s(t,i,o)>a;)i-=4;return i+4},e.quantize.vecDot=function(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]},e.quantize.stats=function(e,t,n){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-t>>2,a=t;a>>0}},e.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},e.encode.alphaMul=function(e,t){for(var n=new Uint8Array(e.length),i=e.length>>2,r=0;r0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=i.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new r.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=i.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(s.output,s.next_out))):this.onData(r.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},function(e,t,n){"use strict";var i,r=n(100),o=n(941),a=n(445),s=n(446),l=n(305);function c(e,t){return e.msg=l[t],t}function u(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function p(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function h(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=c[o+a-1],h=c[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===h&&c[n+a-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oa){if(e.match_start=t,a=i,i>=s)break;p=c[o+a-1],h=c[o+a]}}}while((t=d[t&u])>l&&0!=--r);return a<=e.lookahead?a:e.lookahead}function b(e){var t,n,i,o,l,c,u,d,f,p,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-262)){r.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{i=e.head[--t],e.head[t]=i>=h?i-h:0}while(--n);t=n=h;do{i=e.prev[--t],e.prev[t]=i>=h?i-h:0}while(--n);o+=h}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,f=o,p=void 0,(p=c.avail_in)>f&&(p=f),n=0===p?0:(c.avail_in-=p,r.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<15&&(s=2,i-=16),o<1||o>9||8!==n||i<8||i>15||t<0||t>9||a<0||a>4)return c(e,-2);8===i&&(i=9);var l=new x;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(b(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new y(4,4,8,4,v),new y(4,5,16,8,v),new y(4,6,32,32,v),new y(4,4,16,16,w),new y(8,16,32,32,w),new y(8,16,128,128,w),new y(8,32,128,256,w),new y(32,128,258,1024,w),new y(32,258,258,4096,w)],t.deflateInit=function(e,t){return C(e,t,8,15,8,0)},t.deflateInit2=C,t.deflateReset=A,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var n,r,a,l;if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,h(r,31),h(r,139),h(r,8),r.gzhead?(h(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),h(r,255&r.gzhead.time),h(r,r.gzhead.time>>8&255),h(r,r.gzhead.time>>16&255),h(r,r.gzhead.time>>24&255),h(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),h(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(h(r,255&r.gzhead.extra.length),h(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=s(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(h(r,0),h(r,0),h(r,0),h(r,0),h(r,0),h(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),h(r,3),r.status=113);else{var g=8+(r.w_bits-8<<4)<<8;g|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(g|=32),g+=31-g%31,r.status=113,m(r,g),0!==r.strstart&&(m(r,e.adler>>>16),m(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending!==r.pending_buf_size));)h(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&f(e),r.pending+2<=r.pending_buf_size&&(h(r,255&e.adler),h(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(f(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(n)&&4!==t)return c(e,-5);if(666===r.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var v=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(b(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,i,r,a,s=e.window;;){if(e.lookahead<=258){if(b(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=s[r=e.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=e.strstart+258;do{}while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(r,t):i[r.level].func(r,t);if(3!==v&&4!==v||(r.status=666),1===v||3===v)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===v&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(d(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),f(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(h(r,255&e.adler),h(r,e.adler>>8&255),h(r,e.adler>>16&255),h(r,e.adler>>24&255),h(r,255&e.total_in),h(r,e.total_in>>8&255),h(r,e.total_in>>16&255),h(r,e.total_in>>24&255)):(m(r,e.adler>>>16),m(r,65535&e.adler)),f(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var n,i,o,s,l,c,u,f,p=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(d(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new r.Buf8(n.w_size),r.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,b(n);n.lookahead>=3;){i=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<=0;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);r(c);var u=new Array(60);r(u);var d=new Array(512);r(d);var f=new Array(256);r(f);var p=new Array(29);r(p);var h,m,g,b=new Array(30);function v(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function y(e){return e<256?d[e]:d[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function E(e,t,n){var i,r,o=new Array(16),a=0;for(i=1;i<=15;i++)o[i]=a=a+n[i-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=C(o[s]++,s))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function _(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function T(e,t,n,i){var r=2*t,o=2*n;return e[r]>1;n>=1;n--)M(e,o,n);r=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,M(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(i=e.heap[n])+1]+1]+1)>h&&(o=h,m++),l[2*i+1]=o,i>c||(e.bl_count[o]++,a=0,i>=p&&(a=f[i-p]),s=l[2*i],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(u[2*i+1]+a)));if(0!==m){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(o=h;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>c||(l[2*r+1]!==o&&(e.opt_len+=(o-l[2*r+1])*l[2*r],l[2*r+1]=o),i--)}}(e,t),E(o,c,e.bl_count)}function P(e,t,n){var i,r,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s>=7;i<30;i++)for(b[i]=r<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),D(e,e.l_desc),D(e,e.d_desc),a=function(e){var t;for(P(e,e.dyn_ltree,e.l_desc.max_code),P(e,e.dyn_dtree,e.d_desc.max_code),D(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=r&&(r=o)):r=o=n+5,n+4<=r&&-1!==t?N(e,t,n,i):4===e.strategy||o===r?(k(e,2+(i?1:0),3),z(e,c,u)):(k(e,4+(i?1:0),3),function(e,t,n,i){var r;for(k(e,t-257,5),k(e,n-1,5),k(e,i-4,4),r=0;r>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*y(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),A(e,256,c),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,n){"use strict";var i=n(943),r=n(100),o=n(447),a=n(449),s=n(305),l=n(448),c=n(946),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,l,c,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(n=i.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=i.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),c=f.next_out-l,d=o.buf2string(f.output,l),f.next_out=c,f.avail_out=p-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(d)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},function(e,t,n){"use strict";var i=n(100),r=n(445),o=n(446),a=n(944),s=n(945);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function f(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,d(e))):-2}function p(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var h,m,g=!0;function b(e){if(g){var t;for(h=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,h,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),g=!1}e.lencode=h,e.lenbits=9,e.distcode=m,e.distbits=5}function v(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,N,2,0),m=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,z=8+(15&(m>>>=4)),0===n.wbits)n.wbits=z;else if(z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&m,N[1]=m>>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>8&255,N[2]=m>>>16&255,N[3]=m>>>24&255,n.check=o(n.check,N,4,0)),m=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>8),512&n.flags&&(N[0]=255&m,N[1]=m>>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((x=n.length)>p&&(x=p),x&&(n.head&&(z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,d,x,z)),512&n.flags&&(n.check=o(n.check,c,x,d)),p-=x,d+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break e;x=0;do{z=c[d+x++],n.head&&z&&n.length<65536&&(n.head.name+=String.fromCharCode(z))}while(z&&x>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===p)break e;p--,m+=c[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(b(n),n.mode=20,6===t){m>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,m+=c[d++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(x>p&&(x=p),x>h&&(x=h),0===x)break e;i.arraySet(u,c,d,x,f),p-=x,d+=x,h-=x,f+=x,n.length-=x;break}n.mode=12;break;case 17:for(;g<14;){if(0===p)break e;p--,m+=c[d++]<>>=5,g-=5,n.ndist=1+(31&m),m>>>=5,g-=5,n.ncode=4+(15&m),m>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,D){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=C,g-=C,n.lens[n.have++]=S;else{if(16===S){for(F=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}z=n.lens[n.have-1],x=3+(3&m),m>>>=2,g-=2}else if(17===S){for(F=C+3;g>>=C)),m>>>=3,g-=3}else{for(F=C+7;g>>=C)),m>>>=7,g-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,P={bits:n.lenbits},D=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,D){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},D=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,D){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(p>=6&&h>=258){e.next_out=f,e.avail_out=h,e.next_in=d,e.avail_in=p,n.hold=m,n.bits=g,a(e,y),f=e.next_out,u=e.output,h=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(I=n.lencode[m&(1<>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>_)])>>>16&255,S=65535&I,!(_+(C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=_,g-=_,n.back+=_}if(m>>>=C,g-=C,n.back+=C,n.length=S,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(F=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(I=n.distcode[m&(1<>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>_)])>>>16&255,S=65535&I,!(_+(C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=_,g-=_,n.back+=_}if(m>>>=C,g-=C,n.back+=C,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=S,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(F=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===h)break e;if(x=y-h,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}x>n.wnext?(x-=n.wnext,k=n.wsize-x):k=n.wnext-x,x>n.length&&(x=n.length),A=n.window}else A=u,k=f-n.offset,x=n.length;x>h&&(x=h),h-=x,n.length-=x;do{u[f++]=A[k++]}while(--x);0===n.length&&(n.mode=21);break;case 26:if(0===h)break e;u[f++]=n.length,h--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===p)break e;p--,m|=c[d++]<>>=y=w>>>24,h-=y,0===(y=w>>>16&255))S[o++]=65535&w;else{if(!(16&y)){if(0==(64&y)){w=m[(65535&w)+(p&(1<>>=y,h-=y),h<15&&(p+=E[i++]<>>=y=w>>>24,h-=y,!(16&(y=w>>>16&255))){if(0==(64&y)){w=g[(65535&w)+(p&(1<l){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=y,h-=y,k>(y=o-a)){if((y=k-y)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,C=f,0===d){if(A+=c-y,y2;)S[o++]=C[A++],S[o++]=C[A++],S[o++]=C[A++],x-=3;x&&(S[o++]=C[A++],x>1&&(S[o++]=C[A++]))}else{A=o-k;do{S[o++]=S[A++],S[o++]=S[A++],S[o++]=S[A++],x-=3}while(x>2);x&&(S[o++]=S[A++],x>1&&(S[o++]=S[A++]))}break}}break}}while(i>3,p&=(1<<(h-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i=1&&0===N[S];S--);if(_>S&&(_=S),0===S)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(E=1;E0&&(0===e||1!==S))return-1;for(O[1]=0,A=1;A<15;A++)O[A+1]=O[A]+N[A];for(C=0;C852||2===e&&D>592)return 1;for(;;){w=A-M,d[C]v?(y=L[B+d[C]],x=F[I+d[C]]):(y=96,x=0),p=1<>M)+(h-=p)]=w<<24|y<<16|x|0}while(0!==h);for(p=1<>=1;if(0!==p?(P&=p-1,P+=p):P=0,C++,0==--N[A]){if(A===S)break;A=t[n+d[C]]}if(A>_&&(P&g)!==m){for(0===M&&(M=_),b+=E,z=1<<(T=A-M);T+M852||2===e&&D>592)return 1;c[m=P&g]=_<<24|T<<16|b-u|0}}return 0!==P&&(c[b+P]=A-M<<24|64<<16|0),f.bits=_,0}},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t){openSeadragonGL=function(e){this.io={"tile-loaded":function(e){new Promise((function(t,n){e.image||n();var i=window.UPNG.decode(e.image._array);0==i.ctype&&16==i.depth?(i.data=i.data.slice(0,2*i.width*i.height),e.tile._array=i.data,e.tile._format="u16"):6==i.ctype&&8==i.depth&&(i.data=i.data.slice(0,4*i.width*i.height),e.tile._array=i.data,e.tile._format="u32"),t()})).then(e.getCompletionCallback())},"tile-drawing":function(e){var t=e.rendered.canvas.width,n=e.rendered.canvas.height,i=this.viaGL.width,r=this.viaGL.height,o=this.viaGL.loadArray(t,n,e.tile._array,e.tile._format);e.rendered.drawImage(o,0,0,i,r,0,0,t,n)}},this.defaults={"tile-loaded":function(e,t){e(t)},"tile-drawing":function(e,t){1!==t.tile.loaded&&(t.tile.loaded=1,e(t))}},this.openSD=e,this.viaGL=new ViaWebGL},openSeadragonGL.prototype={init:function(){var e=this.merger.bind(this);return this.openSD.addHandler("open",e),this},addHandler:function(e,t){e in this.defaults&&(this[e]=this.defaults[e]),"function"==typeof t&&(this[e]=t)},merger:function(e){for(var t of(this.width=this.width||this.openSD.source.getTileWidth(),this.height=this.height||this.openSD.source.getTileHeight(),this.and(this.viaGL)))this.viaGL[t]=this[t];this.viaGL.updateShape(this.width,this.height),this.viaGL.init().then(this.adder.bind(this))},adder:function(){var e=this;this.openSD.addHandler("tile-loaded",(function(t){var n=e.io["tile-loaded"].bind(e);e["tile-loaded"].call(e,n,t)})),this.openSD.addHandler("tile-drawing",(function(t){var n=e.io["tile-drawing"].bind(e);e["tile-drawing"].call(e,n,t)}));for(var t=this.openSD.world,n=0;n0?s.default.createElement("div",null,"Mask Color:",s.default.createElement(p.default,{color:_e.color,handleChange:function(e){return ce({color:e})}})):"",Le=i?"":s.default.createElement("div",{className:"ui form"},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("div",{className:"font-white"},"Mask .tif or ome.tif:"))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("input",{value:_e.path,onChange:function(e){be({path:e.target.value})},style:{width:"72%"},id:"maskpath",name:"maskpath",type:"text"}),s.default.createElement("button",{type:"button",onClick:ge,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:me,close:be,title:"Select a TIFF or OME-TIFF mask image",onFileSelected:be,filter:["tif","tiff"]}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("div",{className:"font-white"},"Mask (CellID, State) .csv:"))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("input",{value:_e.map_path,onChange:function(e){xe({path:e.target.value})},style:{width:"72%"},id:"mask_map_path",name:"mask_map_path",type:"text"}),s.default.createElement("button",{type:"button",onClick:ye,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:we,close:xe,title:"Select a CSV mask cell state file",onFileSelected:xe,filter:["csv"]}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-7"},s.default.createElement("div",{className:"font-white"},"Masks:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:_e,onChange:function(e){return fe(e.value)},options:Array.from(Ee.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-5"},s.default.createElement("button",{className:"ui button compact",title:"Previous mask",onClick:function(){fe(Math.max(0,le-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",title:"Next mask",onClick:function(){fe(Math.min(le+1,Ee.size-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete mask",onClick:pe},"X"))),s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-4"},Oe),s.default.createElement("div",{className:"col-4",style:{textAlign:"right",paddingRight:0}},"Mask Name:"),s.default.createElement("div",{className:"col-4"},s.default.createElement("input",{value:_e.name,onChange:function(e){return ce({name:e.target.value})},style:{width:"100%"},id:"maskname",name:"maskname",type:"text"}))),s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-12"},Ne))),Be="";if(R.id>=0){var Re=s.default.createElement("div",null,s.default.createElement("input",{value:R.data,onChange:function(e){return H(R,e.target.value)},style:{width:"72%"},id:"visdatapath",name:"visdatapath",type:"text"}),s.default.createElement("button",{type:"button",onClick:N,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:I,close:O,title:"Select a csv file",onFileSelected:O,filter:["csv"]}));if([0,1].includes(R.id)){var He="";Pe&&(He=s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-4"},"Cluster Color:",s.default.createElement(p.default,{color:Pe.color,handleChange:function(e){return H(R,null,null,null,null,new Map([[Pe.id,{name:Pe.name,color:e}]]))}})),s.default.createElement("div",{className:"col-8"},"Cluster Name:",s.default.createElement("input",{value:Pe.name,onChange:function(e){return H(R,null,null,null,null,new Map([[Pe.id,{name:e.target.value,color:Pe.color}]]))},style:{width:"50%"},id:"clustername",name:"clustername",type:"text"})))),Be=s.default.createElement("div",null,s.default.createElement("div",null,Re,s.default.createElement("div",{className:"font-white"},"X Axis:",s.default.createElement("input",{value:R.x,onChange:function(e){return H(R,null,e.target.value)},style:{width:"25%",marginRight:"2em"},id:"visxaxis",name:"visxaxis",type:"text"}),"Y Axis:",s.default.createElement("input",{value:R.y,onChange:function(e){return H(R,null,null,e.target.value)},style:{width:"25%"},id:"visyaxis",name:"visyaxis",type:"text"}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-5"},s.default.createElement("div",{className:"font-white"},"Clusters:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:Pe,onChange:function(e){return z(e.value)},options:Array.from(De.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-7"},s.default.createElement("button",{className:"ui button compact",title:"Previous cluster",onClick:function(){z(Math.max(0,R.cluster-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",onClick:D,title:"Add cluster"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faPlus})),s.default.createElement("button",{className:"ui button compact",title:"Next cluster",onClick:function(){z(R.cluster+1)}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete cluster",onClick:P},"X"))),He)}else if(2==R.id){var je=[{value:!1,id:0,label:"False"},{value:!0,id:1,label:"True"}],Ve=je[R.colormapInvert?1:0];Be=s.default.createElement("div",null,Re,s.default.createElement("div",{className:"font-white"},"Invert colormap:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:Ve,onChange:function(e){return H(R,null,null,null,e.value)},options:je})))}else Be=s.default.createElement("div",null,Re)}var Ue,We,Ge,Ye="",qe="";if(!i){var Xe=Array.from(Ee.values()),Qe=Array.from(Se.values()),Ze=Xe.filter((function(e){return e.map_ids.length>0})),Ke=Qe.filter((function(e){return e.map_ids.length>0})),Je=s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){d(!1)}},"Masks:"),$e=Ze.reduce((function(e,t){return e.includes(t.map_state)?e:e.concat([t.map_state])}),[]),et=Ke.reduce((function(e,t){return void 0===e||e===t.map_state?t.map_state:""}),void 0),tt=function(e){var t=$e[e]||"",n=Ze.filter((function(e){return e.map_state==t}));return $e.length<2?{ideal_group_masks:n}:{ideal_map_state:t,ideal_group_masks:n}},nt=$e.findIndex((function(e){return e===et})),it=(Ue=nt,We=0==Ke.length?0:Ue,(Ge=tt(We)).ideal_group_masks.length==Ke.length?$e.length<2?{ideal_group_masks:[]}:tt((We+1)%$e.length):Ge),rt=it.ideal_map_state,ot=it.ideal_group_masks,at=rt?" ("+rt+")":"";ot.length>0?Je=s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-6 font-white"},Je," "),s.default.createElement("div",{className:"col-6 font-white",style:{textAlign:"right"}},s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){T(ot)}}," Show all states",at))):Ke.length>0&&(Je=s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-6 font-white"},Je),s.default.createElement("div",{className:"col-6 font-white",style:{textAlign:"right"}},s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){T([])}},"Clear")))),Ye=n?"":s.default.createElement("div",null,Je,s.default.createElement("div",{className:"width-100"},s.default.createElement(y,{getHelperDimensions:function(e){return e.node.getBoundingClientRect()},onSortEnd:_,useDragHandle:!0,axis:"xy",isMulti:!0,styles:E,onChange:T,value:Qe,options:Xe,components:{MultiValue:x,MultiValueLabel:k}}),"/>")),qe=s.default.createElement("div",null,s.default.createElement("div",{className:"font-white"},"Visualization:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{onChange:function(e){return H(e)},value:R,options:Array.from(B.values())}),Be))}if(Y||n)return s.default.createElement("div",{className:"ui form"},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col no-right-padding"},s.default.createElement("div",{className:""},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-5"},s.default.createElement("div",{className:"font-white"},"Waypoints:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{onChange:C,value:Ie,options:Array.from(Fe.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-7"},s.default.createElement("button",{className:"ui button compact",title:"Previous waypoint",onClick:function(){$(Math.max(0,A-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",onClick:X,title:"Add waypoint"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faPlus})),s.default.createElement("button",{className:"ui button compact",title:"Next waypoint",onClick:function(){$(A+1)}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete waypoint",onClick:J},"X")))),s.default.createElement("input",{className:"width-100",type:"text",placeholder:"Waypoint Name",value:U,onChange:Q}),s.default.createElement("textarea",{className:"width-100 height-20vh",placeholder:"Waypoint Description",value:G,onChange:Z}),Ye,qe),s.default.createElement("div",{className:"col-1 p-0"},s.default.createElement("div",{className:"btn-group-vertical"},s.default.createElement("span",{id:"arrow-switch",className:"nav-item arrow-switch"},s.default.createElement("a",{className:"btn",onClick:ie,title:"Add arrow"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faLocationArrow,color:"arrow"==oe?"blue":"white"}))),s.default.createElement("span",{id:"draw-switch",className:"nav-item draw-switch"},s.default.createElement("a",{className:"btn",onClick:re,title:"Add rectangle"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faCrosshairs,color:"box"==oe?"blue":"white"})))))),s.default.createElement(f.default,{deleteOverlay:l,deleteArrow:u,addArrowText:t,overlays:ee,arrows:te}));var st=this.props,lt=st.handleSelect,ct=st.handleChange,ut=this.props,dt=ut.activeChanLabel,ft=ut.chanLabel,pt=this.props.activeChannels,ht=this.props.handleSortChannels;return s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col"},s.default.createElement(y,{getHelperDimensions:function(e){return e.node.getBoundingClientRect()},onSortEnd:ht,useDragHandle:!0,axis:"xy",isMulti:!0,onChange:lt,value:Array.from(dt.values()),options:Array.from(ft.values()),components:{MultiValue:x,MultiValueLabel:k}}),s.default.createElement("div",null,s.default.createElement(h.default,{className:"ChannelControls",channels:pt,handleChange:ct})),Le))}}]),t}(a.Component);t.default=S},function(e,t,n){"use strict";n.r(t),n.d(t,"NonceProvider",(function(){return d}));var i=n(0),r=n.n(i),o=n(143),a=n(16),s=(n(48),n(5),n(24));n.d(t,"components",(function(){return s.z}));var l=n(101);n.d(t,"createFilter",(function(){return l.c})),n.d(t,"defaultTheme",(function(){return l.b})),n.d(t,"mergeStyles",(function(){return l.d}));n(82),n(223);var c=n(231),u=n(235);var d=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).createEmotionCache=function(e){return Object(u.a)({nonce:e})},n.createEmotionCache=Object(o.a)(n.createEmotionCache),n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this.createEmotionCache(this.props.nonce);return r.a.createElement(a.CacheProvider,{value:e},this.props.children)},i}(i.Component),f=Object(c.a)(l.a);t.default=f},function(e,t,n){ +function OpenSeadragon(e){return new OpenSeadragon.Viewer(e)}!function(e){e.version={versionStr:"2.3.1",major:parseInt("2",10),minor:parseInt("3",10),revision:parseInt("1",10)};var t,n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,r=Object.prototype.hasOwnProperty;e.isFunction=function(t){return"function"===e.type(t)},e.isArray=Array.isArray||function(t){return"array"===e.type(t)},e.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},e.type=function(e){return null==e?String(e):n[i.call(e)]||"object"},e.isPlainObject=function(t){if(!t||"object"!==OpenSeadragon.type(t)||t.nodeType||e.isWindow(t))return!1;if(t.constructor&&!r.call(t,"constructor")&&!r.call(t.constructor.prototype,"isPrototypeOf"))return!1;var n;for(var i in t)n=i;return void 0===n||r.call(t,n)},e.isEmptyObject=function(e){for(var t in e)return!1;return!0},e.freezeObject=function(t){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(e){return e},e.freezeObject(t)},e.supportsCanvas=(t=document.createElement("canvas"),!(!e.isFunction(t.getContext)||!t.getContext("2d"))),e.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},e.pixelDensityRatio=function(){if(e.supportsCanvas){var t=document.createElement("canvas").getContext("2d"),n=window.devicePixelRatio||1,i=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return Math.max(n,1)/i}return 1}()}(OpenSeadragon),function($){$.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=arguments.length,l=!1,c=1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},c=2),"object"==typeof a||OpenSeadragon.isFunction(a)||(a={}),s===c&&(a=this,--c);c=n.x&&t.x=n.y},getEvent:function(e){return $.getEvent=e?function(e){return e}:function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if("number"==typeof e.pageX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.pageX,t.y=e.pageY,t};else{if("number"!=typeof e.clientX)throw new Error("Unknown event mouse position, no known technique.");$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t}}return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.pageXOffset)$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(t.scrollLeft||t.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!e.scrollLeft&&!e.scrollTop)return new $.Point(0,0);$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return $.getPageScroll()},setPageScroll:function(e){if(void 0!==window.scrollTo)$.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var t=$.getPageScroll();if(t.x===e.x&&t.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var n=$.getPageScroll();if(n.x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y});if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(n=$.getPageScroll()).x!==t.x&&n.y!==t.y)return void($.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y});$.setPageScroll=function(e){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.innerWidth)$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else{if(!t.clientWidth&&!t.clientHeight)throw new Error("Unknown window size, no known technique.");$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)}}return $.getWindowSize()},makeCenteredNode:function(e){e=$.getElement(e);var t=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(t[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(t[1].style,{display:"table-row"}),$.extend(t[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),t[0].appendChild(t[1]),t[1].appendChild(t[2]),t[2].appendChild(e),t[0]},makeNeutralElement:function(e){var t=document.createElement(e),n=t.style;return n.background="transparent none",n.border="none",n.margin="0px",n.padding="0px",n.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return(new Date).getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(e){var t=$.makeNeutralElement("img");return t.src=e,t},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(e){var t=$.makeNeutralElement("img"),n=null;return(n=$.makeNeutralElement("span")).style.display="inline-block",t.onload=function(){n.style.width=n.style.width||t.width+"px",n.style.height=n.style.height||t.height+"px",t.onload=null,t=null},t.src=e,n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')",n}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,n){var i;e=$.getElement(e),n&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(i="alpha(opacity="+Math.round(100*t)+")",e.style.filter=i):e.style.filter=""},setElementTouchActionNone:function(e){void 0!==(e=$.getElement(e)).style.touchAction?e.style.touchAction="none":void 0!==e.style.msTouchAction&&(e.style.msTouchAction="none")},addClass:function(e,t){(e=$.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,n){return Array.prototype.indexOf?this.indexOf=function(e,t,n){return e.indexOf(t,n)}:this.indexOf=function(e,t,n){var i,r,o=n||0;if(!e)throw new TypeError;if(0===(r=e.length)||o>=r)return-1;for(o<0&&(o=r-Math.abs(o)),i=o;i=200&&s.status<300||0===s.status&&"http:"!==a&&"https:"!==a?t(s):($.console.log("AJAX request returned %d: %s",s.status,e),$.isFunction(n)&&n(s)))};try{if(s.open("GET",e,!0),o&&(s.responseType=o),r)for(var l in r)r.hasOwnProperty(l)&&r[l]&&s.setRequestHeader(l,r[l]);i&&(s.withCredentials=!0),s.send(null)}catch(i){var c=i.message;if($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10&&void 0!==i.number&&-2147024891==i.number&&(c+="\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"),$.console.log("%s while making AJAX request: %s",i.name,c),s.onreadystatechange=function(){},window.XDomainRequest){var u=new XDomainRequest;if(u){u.onload=function(e){$.isFunction(t)&&t({responseText:u.responseText,status:200,statusText:"OK"})},u.onerror=function(e){$.isFunction(n)&&n({responseText:u.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{u.open("GET",e),u.send()}catch(e){$.isFunction(n)&&n(s,i)}}}else $.isFunction(n)&&n(s,i)}return s},jsonp:function(e){var t,n=e.url,i=document.head||document.getElementsByTagName("head")[0]||document.documentElement,r=e.callbackName||"openseadragon"+$.now(),o=window[r],a="$1"+r+"$2",s=e.param||"callback",l=e.callback;n=n.replace(/(\=)\?(&|$)|\?\?/i,a),n+=(/\?/.test(n)?"&":"?")+s+"="+r,window[r]=function(e){if(o)window[r]=o;else try{delete window[r]}catch(e){}l&&$.isFunction(l)&&l(e)},t=document.createElement("script"),void 0===e.async&&!1===e.async||(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=n,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,i&&t.parentNode&&i.removeChild(t),t=void 0)},i.insertBefore(t,i.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(e){return(new DOMParser).parseFromString(e,"text/xml")};else{if(!window.ActiveXObject)throw new Error("Browser doesn't support XML DOM.");$.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t}}return $.parseXml(e)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(e){return!!FILEFORMATS[(e=e||"").toLowerCase()]}}),$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};!function(){var e=navigator.appVersion,t=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(t.substring(t.indexOf("MSIE")+5,t.indexOf(";",t.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(t.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(t.substring(t.indexOf("Firefox")+8))):t.indexOf("Safari")>=0?($.Browser.vendor=t.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(t.substring(t.substring(0,t.indexOf("Safari")).lastIndexOf("/")+1,t.indexOf("Safari")))):null!==new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e)}var n,i,r,o=window.location.search.substring(1).split("&");for(r=0;r0&&(URLPARAMS[n.substring(0,i)]=decodeURIComponent(n.substring(i+1)));$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)}();var nullfunction=function(e){};function getOffsetParent(e,t){return t&&e!=document.body?document.body:e.offsetParent}$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,n=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&n)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return n.apply(e,arguments)};else{var i,r=[],o=[],a=0;$.requestAnimationFrame=function(e){return r.push([++a,e]),i||(i=setInterval((function(){if(r.length){var e=$.now(),t=o;for(o=r,r=t;o.length;)o.shift()[1](e)}else clearInterval(i),i=void 0}),20)),a},$.cancelAnimationFrame=function(e){var t,n;for(t=0,n=r.length;t0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",i.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",i.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",i.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",i.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",i.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",i.touchendcaptured,!0),i.activePointersLists[n].captureCount=0);for(n=0;n0){for(i=0;i0&&(ge(e,t,o,0),n.captureCount=1,p(e,n.type),he(e,t,o))}}function G(t,n){var i,r,o,a,l=n.changedTouches.length,c=[],u=t.getActivePointersListByType("touch");for(i=e.now(),u.getLength()>n.touches.length-l&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),W(t,n,u)),r=0;r8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=(a=document.createElement("div"),e.isFunction(a.setCapture)&&e.isFunction(a.releaseCapture)),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],"DOMMouseScroll"==e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||e.Browser.vendor!==e.BROWSERS.IE)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),e.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):(e.MouseTracker.havePointerEvents=!1,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?(e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),e.MouseTracker.haveMouseEnter=!0):(e.MouseTracker.subscribeEvents.push("mouseover","mouseout"),e.MouseTracker.haveMouseEnter=!1),e.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.maxTouchPoints=10),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,n=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};var ve=function(){try{return window.self!==window.top}catch(e){return!0}}();function we(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}}(OpenSeadragon),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,n,i){var r=t.parentNode;"number"==typeof n&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),n={anchor:n}),n.attachToViewer=void 0===n.attachToViewer||n.attachToViewer,this.autoFade=void 0===n.autoFade||n.autoFade,this.element=t,this.anchor=n.anchor,this.container=i,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof n.top?n.top+"px":n.top,this.wrapper.style.left="number"==typeof n.left?n.left+"px":n.left,this.wrapper.style.height="number"==typeof n.height?n.height+"px":n.height,this.wrapper.style.width="number"==typeof n.width?n.width+"px":n.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),n.attachToViewer?this.anchor==e.ControlAnchor.TOP_RIGHT||this.anchor==e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):r.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!=this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor==e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor==e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(OpenSeadragon),function(e){function t(e,t){var n,i=e.controls;for(n=i.length-1;n>=0;n--)if(i[n].element==t)return n;return-1}e.ControlDock=function(t){var n,i,r=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),i=0;i=0)){switch(i.anchor){case e.ControlAnchor.TOP_RIGHT:r=this.controls.topright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:r=this.controls.bottomright,n.style.position="relative",n.style.paddingRight="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:r=this.controls.bottomleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:r=this.controls.topleft,n.style.position="relative",n.style.paddingLeft="0px",n.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:r=this.container,n.style.margin="0px",n.style.padding="0px";break;default:case e.ControlAnchor.NONE:r=this.container,n.style.margin="0px",n.style.padding="0px"}this.controls.push(new e.Control(n,i,r)),n.style.display="inline-block"}},removeControl:function(n){var i=t(this,n=e.getElement(n));return i>=0&&(this.controls[i].destroy(),this.controls.splice(i,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(OpenSeadragon),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(e){var t={},n=1;function i(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function r(t,n){if(n instanceof e.Overlay)return n;var i=null;if(n.element)i=e.getElement(n.element);else{var r=n.id?n.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(i=e.getElement(n.id))||((i=document.createElement("a")).href="#/overlay/"+r),i.id=r,e.addClass(i,n.className?n.className:"openseadragon-overlay")}var o=n.location,a=n.width,s=n.height;if(!o){var l=n.x,c=n.y;if(void 0!==n.px){var u=t.viewport.imageToViewportRectangle(new e.Rect(n.px,n.py,a||0,s||0));l=u.x,c=u.y,a=void 0!==a?u.width:void 0,s=void 0!==s?u.height:void 0}o=new e.Point(l,c)}var d=n.placement;return d&&"string"===e.type(d)&&(d=e.Placement[n.placement.toUpperCase()]),new e.Overlay({element:i,location:o,placement:d,onDraw:n.onDraw,checkResize:n.checkResize,width:a,height:s,rotationMode:n.rotationMode})}function o(e,t){var n;for(n=e.length-1;n>=0;n--)if(e[n].element===t)return n;return-1}function a(t,n){return e.requestAnimationFrame((function(){n(t)}))}function s(t){e.requestAnimationFrame((function(){!function(t){var n,i,r,o;if(t.controlsShouldFade){for(n=e.now(),i=n-t.controlsFadeBeginTime,r=1-i/t.controlsFadeLength,r=Math.min(1,r),r=Math.max(0,r),o=t.controls.length-1;o>=0;o--)t.controls[o].autoFade&&t.controls[o].setOpacity(r);r>0&&s(t)}}(t)}))}function l(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout((function(){s(t)}),t.controlsFadeDelay))}function c(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function u(){c(this)}function d(){l(this)}function f(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 38:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}}function p(t){var n={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",n),n.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return n.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return n.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(this.viewport.degrees-90):this.viewport.setRotation(this.viewport.degrees+90),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(this.viewport.degrees+90):this.viewport.setRotation(this.viewport.degrees-90),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}}function h(e){var t;document.activeElement==this.canvas||this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var n={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-click",n),!n.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType)).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function m(e){var t,n={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-double-click",n),!n.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function g(e){var t,n={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.raiseEvent("canvas-drag",n),!n.preventDefaultAction&&this.viewport){if(t=this.gestureSettingsByDeviceType(e.pointerType),this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var i=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=i.x,this.viewport.centerSpringY.target.value+=i.y;var r=this.viewport.getBounds(),o=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=i.x,this.viewport.centerSpringY.target.value-=i.y,r.x!=o.x&&(e.delta.x=0),r.y!=o.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function b(t){if(!t.preventDefaultAction&&this.viewport){var n=this.gestureSettingsByDeviceType(t.pointerType);if(n.flickEnabled&&t.speed>=n.flickMinSpeed){var i=0;this.panHorizontal&&(i=n.flickMomentum*t.speed*Math.cos(t.direction));var r=0;this.panVertical&&(r=n.flickMomentum*t.speed*Math.sin(t.direction));var o=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),a=this.viewport.pointFromPixel(new e.Point(o.x-i,o.y-r));this.viewport.panTo(a,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:t.eventSource,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent})}function v(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function w(t){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function y(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function x(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function k(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function A(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function C(e){var t,n,i;if(!e.preventDefaultAction&&this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(n=this.viewport.pointFromPixel(e.center,!0),i=this.viewport.pointFromPixel(e.lastCenter,!0).minus(n),this.panHorizontal||(i.x=0),this.panVertical||(i.y=0),this.viewport.zoomBy(e.distance/e.lastDistance,n,!0),t.zoomToRefPoint&&this.viewport.panBy(i,!0),this.viewport.applyConstraints()),t.pinchRotate)){var r=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),o=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(r-o)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:e.eventSource,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent}),!1}function E(t){var n,i,r;if((r=e.now())-this._lastScrollTime>this.minScrollDeltaTime){if(this._lastScrollTime=r,this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),!t.preventDefaultAction&&this.viewport&&(n=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(i=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(i,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints()),this.raiseEvent("canvas-scroll",{tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent}),n&&n.scrollToZoom)return!1}else if((n=this.gestureSettingsByDeviceType(t.pointerType))&&n.scrollToZoom)return!1}function S(e){t[this.hash].mouseInside=!0,c(this),this.raiseEvent("container-enter",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function _(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||l(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(e){!function(e){if(e._opening)return;if(e.autoResize){var n=i(e.container),r=t[e.hash].prevContainerSize;if(!n.equals(r)){var o=e.viewport;if(e.preserveImageSizeOnResize){var a=r.x/n.x,s=o.getZoom()*a,u=o.getCenter();o.resize(n,!1),o.zoomTo(s,null,!0),o.panTo(u,!0)}else{var d=o.getBounds();o.resize(n,!0),o.fitBoundsWithConstraints(d,!0)}t[e.hash].prevContainerSize=n,t[e.hash].forceRedraw=!0}}var f=e.viewport.update(),p=e.world.update()||f;f&&e.raiseEvent("viewport-change");e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p);!t[e.hash].animating&&p&&(e.raiseEvent("animation-start"),c(e));(p||t[e.hash].forceRedraw||e.world.needsDraw())&&(!function(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation"));t[e.hash].animating&&!p&&(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||l(e));t[e.hash].animating=p}(e),e.isOpen()?e._updateRequestId=a(e,T):e._updateRequestId=!1}function M(e,t){return e?e+t:t}function z(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function D(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function P(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,I))}function I(){var n,i,r;t[this.hash].zooming&&this.viewport&&(i=(n=e.now())-t[this.hash].lastZoomTime,r=Math.pow(t[this.hash].zoomFactor,i/1e3),this.viewport.zoomBy(r),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=n,F(this))}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function O(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function L(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function B(){this.viewport&&this.viewport.goHome()}function R(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function H(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+90,360):e.positiveModulo(t-90,360),this.viewport.setRotation(t)}}function j(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-90,360):e.positiveModulo(t+90,360),this.viewport.setRotation(t)}}function V(){this.viewport.toggleFlip()}function U(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)}function W(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}e.Viewer=function(r){var o,s,c=arguments,u=this;if(e.isPlainObject(r)||(r={id:c[0],xmlPath:c.length>1?c[1]:void 0,prefixUrl:c.length>2?c[2]:void 0,controls:c.length>3?c[3]:void 0,overlays:c.length>4?c[4]:void 0}),r.config&&(e.extend(!0,r,r.config),delete r.config),e.extend(!0,this,{id:r.id,hash:r.hash||n++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,r),void 0===this.hash)throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",(function(t){var n=e.getString("Errors.OpenFailed",t.eventSource,t.message);u._showMessage(n)})),e.ControlDock.call(this,r),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(s=this.canvas.style).width="100%",s.height="100%",s.overflow="hidden",s.position="absolute",s.top="0px",s.left="0px",e.setElementTouchActionNone(this.canvas),""!==r.tabIndex&&(this.canvas.tabIndex=void 0===r.tabIndex?0:r.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:e.delegate(this,f),keyHandler:e.delegate(this,p),clickHandler:e.delegate(this,h),dblClickHandler:e.delegate(this,m),dragHandler:e.delegate(this,g),dragEndHandler:e.delegate(this,b),enterHandler:e.delegate(this,v),exitHandler:e.delegate(this,w),pressHandler:e.delegate(this,y),releaseHandler:e.delegate(this,x),nonPrimaryPressHandler:e.delegate(this,k),nonPrimaryReleaseHandler:e.delegate(this,A),scrollHandler:e.delegate(this,E),pinchHandler:e.delegate(this,C)}),this.outerTracker=new e.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,S),exitHandler:e.delegate(this,_)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=i(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",(function(e){u.source=u.world.getItemAt(0).source,t[u.hash].forceRedraw=!0,u._updateRequestId||(u._updateRequestId=a(u,T))})),this.world.addHandler("remove-item",(function(e){u.world.getItemCount()?u.source=u.world.getItemAt(0).source:u.source=null,t[u.hash].forceRedraw=!0})),this.world.addHandler("metrics-change",(function(e){u.viewport&&u.viewport._setContentBounds(u.world.getHomeBounds(),u.world.getContentFactor())})),this.world.addHandler("item-index-change",(function(e){u.source=u.world.getItemAt(0).source})),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:r.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(o=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(o,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(o=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(o,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),o=0;o-1&&t.index\s*$/))n=e.parseXml(n);else if(n.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var s=e.parseJSON(n);n=s}catch(e){}function l(e,t){e.ready?r(e):(e.addHandler("ready",(function(){r(e)})),e.addHandler("open-failed",(function(e){o({message:e.message,source:t})})))}setTimeout((function(){if("string"==e.type(n))(n=new e.TileSource({url:n,crossOriginPolicy:void 0!==i.crossOriginPolicy?i.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){r(e.tileSource)}})).addHandler("open-failed",(function(e){o(e)}));else if(e.isPlainObject(n)||n.nodeType)if(void 0!==n.crossOriginPolicy||void 0===i.crossOriginPolicy&&void 0===t.crossOriginPolicy||(n.crossOriginPolicy=void 0!==i.crossOriginPolicy?i.crossOriginPolicy:t.crossOriginPolicy),void 0===n.ajaxWithCredentials&&(n.ajaxWithCredentials=t.ajaxWithCredentials),void 0===n.useCanvas&&(n.useCanvas=t.useCanvas),e.isFunction(n.getTileUrl)){var s=new e.TileSource(n);s.getTileUrl=n.getTileUrl,r(s)}else{var c=e.TileSource.determineType(a,n);if(!c)return void o({message:"Unable to load TileSource",source:n});var u=c.prototype.configure.apply(a,[n]);l(new c(u),n)}else l(n,n)}))}(this,t.tileSource,t,(function(e){i.tileSource=e,a()}),(function(e){e.options=t,r(e),a()})))},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var n=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete n.url,this.addTiledImage(n)},addLayer:function(t){var n=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var i=e.extend({},t,{success:function(e){n.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){n.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(i),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,n){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,n)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},bindSequenceControls:function(){var t=e.delegate(this,u),n=e.delegate(this,d),i=e.delegate(this,W),r=e.delegate(this,U),o=this.navImages,a=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(a=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:M(this.prefixUrl,o.previous.REST),srcGroup:M(this.prefixUrl,o.previous.GROUP),srcHover:M(this.prefixUrl,o.previous.HOVER),srcDown:M(this.prefixUrl,o.previous.DOWN),onRelease:r,onFocus:t,onBlur:n}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:M(this.prefixUrl,o.next.REST),srcGroup:M(this.prefixUrl,o.next.GROUP),srcHover:M(this.prefixUrl,o.next.HOVER),srcDown:M(this.prefixUrl,o.next.DOWN),onRelease:i,onFocus:t,onBlur:n}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),a&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,z),n=e.delegate(this,P),i=e.delegate(this,N),r=e.delegate(this,D),o=e.delegate(this,O),a=e.delegate(this,B),s=e.delegate(this,R),l=e.delegate(this,H),c=e.delegate(this,j),f=e.delegate(this,V),p=e.delegate(this,u),h=e.delegate(this,d),m=this.navImages,g=[],b=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(b=!1),this.showZoomControl&&(g.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:M(this.prefixUrl,m.zoomIn.REST),srcGroup:M(this.prefixUrl,m.zoomIn.GROUP),srcHover:M(this.prefixUrl,m.zoomIn.HOVER),srcDown:M(this.prefixUrl,m.zoomIn.DOWN),onPress:t,onRelease:n,onClick:i,onEnter:t,onExit:n,onFocus:p,onBlur:h})),g.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:M(this.prefixUrl,m.zoomOut.REST),srcGroup:M(this.prefixUrl,m.zoomOut.GROUP),srcHover:M(this.prefixUrl,m.zoomOut.HOVER),srcDown:M(this.prefixUrl,m.zoomOut.DOWN),onPress:r,onRelease:n,onClick:o,onEnter:r,onExit:n,onFocus:p,onBlur:h}))),this.showHomeControl&&g.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:M(this.prefixUrl,m.home.REST),srcGroup:M(this.prefixUrl,m.home.GROUP),srcHover:M(this.prefixUrl,m.home.HOVER),srcDown:M(this.prefixUrl,m.home.DOWN),onRelease:a,onFocus:p,onBlur:h})),this.showFullPageControl&&g.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:M(this.prefixUrl,m.fullpage.REST),srcGroup:M(this.prefixUrl,m.fullpage.GROUP),srcHover:M(this.prefixUrl,m.fullpage.HOVER),srcDown:M(this.prefixUrl,m.fullpage.DOWN),onRelease:s,onFocus:p,onBlur:h})),this.showRotationControl&&(g.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:M(this.prefixUrl,m.rotateleft.REST),srcGroup:M(this.prefixUrl,m.rotateleft.GROUP),srcHover:M(this.prefixUrl,m.rotateleft.HOVER),srcDown:M(this.prefixUrl,m.rotateleft.DOWN),onRelease:l,onFocus:p,onBlur:h})),g.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:M(this.prefixUrl,m.rotateright.REST),srcGroup:M(this.prefixUrl,m.rotateright.GROUP),srcHover:M(this.prefixUrl,m.rotateright.HOVER),srcDown:M(this.prefixUrl,m.rotateright.DOWN),onRelease:c,onFocus:p,onBlur:h}))),this.showFlipControl&&g.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:M(this.prefixUrl,m.flip.REST),srcGroup:M(this.prefixUrl,m.flip.GROUP),srcHover:M(this.prefixUrl,m.flip.HOVER),srcDown:M(this.prefixUrl,m.flip.DOWN),onRelease:f,onFocus:p,onBlur:h})),b&&(this.buttons=new e.ButtonGroup({buttons:g,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttons.element,this.addHandler("open",e.delegate(this,L)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e=0)return this;var l=r(this,s);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:s.location,placement:s.placement}),this},updateOverlay:function(n,i,r){var a;return n=e.getElement(n),(a=o(this.currentOverlays,n))>=0&&(this.currentOverlays[a].update(i,r),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:n,location:i,placement:r})),this},removeOverlay:function(n){var i;return n=e.getElement(n),(i=o(this.currentOverlays,n))>=0&&(this.currentOverlays[i].destroy(),this.currentOverlays.splice(i,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:n})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var n;return t=e.getElement(t),(n=o(this.currentOverlays,t))>=0?this.currentOverlays[n]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var n=e.makeNeutralElement("div");n.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(n),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}})}(OpenSeadragon),function(e){function t(e){e.quick&&this.viewer.viewport&&(this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x),this.viewer.viewport.panTo(this.viewport.pointFromPixel(e.position)),this.viewer.viewport.applyConstraints())}function n(e){this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function i(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function r(e){return this.viewer.raiseEvent("navigator-scroll",{tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent}),!1}function o(e,t){a(e,"rotate("+t+"deg)")}function a(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(a){var s,l,c,u,d=a.viewer,f=this;function p(e){o(f.displayRegionContainer,e),o(f.displayRegion,-e),f.viewport.setRotation(e)}(a.id?(this.element=document.getElementById(a.id),a.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(a.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),a.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:a.autoFade},a.position&&("BOTTOM_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"==a.position?a.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"==a.position&&(a.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,a.controlOptions.top=a.top,a.controlOptions.left=a.left,a.controlOptions.height=a.height,a.controlOptions.width=a.width))),this.element.id=a.id,this.element.className+=" navigator",(a=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},a,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:a.autoResize,minZoomImageRatio:1})).minPixelRatio=this.minPixelRatio=d.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),a.controlOptions.anchor!=e.ControlAnchor.NONE&&(c=this.element.style,u=this.borderWidth,c.margin="0px",c.border=u+"px solid #555",c.padding="0px",c.background="#000",c.opacity=.8,c.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid #900",e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",d.addControl(this.element,a.controlOptions),this._resizeWithViewer=a.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&a.controlOptions.anchor!=e.ControlAnchor.NONE,this._resizeWithViewer&&(a.width&&a.height?(this.element.style.height="number"==typeof a.height?a.height+"px":a.height,this.element.style.width="number"==typeof a.width?a.width+"px":a.width):(s=e.getElementSize(d.element),this.element.style.height=Math.round(s.y*a.sizeRatio)+"px",this.element.style.width=Math.round(s.x*a.sizeRatio)+"px",this.oldViewerSize=s),l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[a]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),a.navigatorRotate)&&(p(a.viewer.viewport?a.viewer.viewport.getRotation():a.viewer.degrees||0),a.viewer.addHandler("rotate",(function(e){p(e.degrees)})));this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,n),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,i),scrollHandler:e.delegate(this,r)}),this.addHandler("reset-size",(function(){f.viewport&&f.viewport.goHome(!0)})),d.world.addHandler("item-index-change",(function(e){window.setTimeout((function(){var t=f.world.getItemAt(e.previousIndex);f.world.setItemIndex(t,e.newIndex)}),1)})),d.world.addHandler("remove-item",(function(e){var t=e.item,n=f._getMatchingItem(t);n&&f.world.removeItem(n)})),this.update(d.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){a(this.displayRegion,e),a(this.canvas,e),a(this.element,e)},update:function(t){var n,i,r,o,a,s;if(n=e.getElementSize(this.viewer.element),this._resizeWithViewer&&n.x&&n.y&&!n.equals(this.oldViewerSize)&&(this.oldViewerSize=n,this.maintainSizeRatio||!this.elementArea?(i=n.x*this.sizeRatio,r=n.y*this.sizeRatio):(i=Math.sqrt(this.elementArea*(n.x/n.y)),r=this.elementArea/i),this.element.style.width=Math.round(i)+"px",this.element.style.height=Math.round(r)+"px",this.elementArea||(this.elementArea=i*r),this.updateSize()),t&&this.viewport){o=t.getBoundsNoRotate(!0),a=this.viewport.pixelFromPointNoRotate(o.getTopLeft(),!1),s=this.viewport.pixelFromPointNoRotate(o.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(a.y)+"px",l.left=Math.round(a.x)+"px";var c=Math.abs(a.x-s.x),u=Math.abs(a.y-s.y);l.width=Math.round(Math.max(c,0))+"px",l.height=Math.round(Math.max(u,0))+"px"}},addTiledImage:function(t){var n=this,i=t.originalTiledImage;delete t.original;var r=e.extend({},t,{success:function(e){var t=e.item;function r(){n._matchBounds(t,i)}t._originalForNavigator=i,n._matchBounds(t,i,!0),i.addHandler("bounds-change",r),i.addHandler("clip-change",r),i.addHandler("opacity-change",(function(){n._matchOpacity(t,i)})),i.addHandler("composite-operation-change",(function(){n._matchCompositeOperation(t,i)}))}});return e.Viewer.prototype.addTiledImage.apply(this,[r])},_getMatchingItem:function(e){for(var t,n=this.world.getItemCount(),i=0;i1||t.y>1);e++);return e-1},getTileAtPoint:function(t,n){var i=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(i,"[TileSource.getTileAtPoint] must be called with a valid point.");var r=this.dimensions.x*this.getLevelScale(t),o=n.x*r,a=n.y*r,s=Math.floor(o/this.getTileWidth(t)),l=Math.floor(a/this.getTileHeight(t));n.x>=1&&(s=this.getNumTiles(t).x-1);return n.y>=1/this.aspectRatio-1e-15&&(l=this.getNumTiles(t).y-1),new e.Point(s,l)},getTileBounds:function(t,n,i,r){var o=this.dimensions.times(this.getLevelScale(t)),a=this.getTileWidth(t),s=this.getTileHeight(t),l=0===n?0:a*n-this.tileOverlap,c=0===i?0:s*i-this.tileOverlap,u=a+(0===n?1:2)*this.tileOverlap,d=s+(0===i?1:2)*this.tileOverlap,f=1/o.x;return u=Math.min(u,o.x-l),d=Math.min(d,o.y-c),r?new e.Rect(0,0,u,d):new e.Rect(l*f,c*f,u*f,d*f)},getImageInfo:function(t){var n,i,r,o,a,s,l,c=this;t&&(l=(s=(a=t.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=s.slice(0,l)),i=function(n){"string"==typeof n&&(n=e.parseXml(n));var i=e.TileSource.determineType(c,n,t);i?(void 0===(o=i.prototype.configure.apply(c,[n,t])).ajaxWithCredentials&&(o.ajaxWithCredentials=c.ajaxWithCredentials),r=new i(o),c.ready=!0,c.raiseEvent("ready",{tileSource:r})):c.raiseEvent("open-failed",{message:"Unable to load TileSource",source:t})},t.match(/\.js$/)?(n=t.split("/").pop().replace(".js",""),e.jsonp({url:t,async:!1,callbackName:n,callback:i})):e.makeAjaxRequest({url:t,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(t){var n=function(t){var n,i,r=t.responseText,o=t.status;if(!t)throw new Error(e.getString("Errors.Security"));if(200!==t.status&&0!==t.status)throw o=t.status,n=404==o?"Not Found":t.statusText,new Error(e.getString("Errors.Status",o,n));if(r.match(/\s*<.*/))try{i=t.responseXML&&t.responseXML.documentElement?t.responseXML:e.parseXml(r)}catch(e){i=t.responseText}else if(r.match(/\s*[\{\[].*/))try{i=e.parseJSON(r)}catch(e){i=r}else i=r;return i}(t);i(n)},error:function(e,n){var i;try{i="HTTP "+e.status+" attempting to load TileSource"}catch(e){i=(void 0!==n&&n.toString?n.toString():"Unknown error")+" attempting to load TileSource"}c.raiseEvent("open-failed",{message:i,source:t})}})},supports:function(e,t){return!1},configure:function(e,t){throw new Error("Method not implemented.")},getTileUrl:function(e,t,n){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,n){return{}},tileExists:function(e,t,n){var i=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&n>=0&&t=0;u--)for(f=(d=this.displayRects[u]).minLevel;f<=d.maxLevel;f++)this._levelRects[f]||(this._levelRects[f]=[]),this._levelRects[f].push(d);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var n;return e.Image?n=e.Image.xmlns:e.documentElement&&("Image"!=e.documentElement.localName&&"Image"!=e.documentElement.tagName||(n=e.documentElement.namespaceURI)),-1!==(n=(n||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==n.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,i){var r;return r=e.isPlainObject(n)?t(this,n):function(n,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,a,s,l,c=i.documentElement,u=c.localName||c.tagName,d=i.documentElement.namespaceURI,f=null,p=[];if("Image"==u)try{if(void 0===(s=c.getElementsByTagName("Size")[0])&&(s=c.getElementsByTagNameNS(d,"Size")[0]),f={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:c.getAttribute("Url"),Format:c.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(c.getAttribute("Overlap"),10),TileSize:parseInt(c.getAttribute("TileSize"),10),Size:{Height:parseInt(s.getAttribute("Height"),10),Width:parseInt(s.getAttribute("Width"),10)}}},!e.imageFormatSupported(f.Image.Format))throw new Error(e.getString("Errors.ImageFormat",f.Image.Format.toUpperCase()));for(void 0===(r=c.getElementsByTagName("DisplayRect"))&&(r=c.getElementsByTagNameNS(d,"DisplayRect")[0]),l=0;l=0;c--)if(!(e<(i=u[c]).minLevel||e>i.maxLevel)&&(r=this.getLevelScale(e),o=i.x*r,a=i.y*r,s=o+i.width*r,l=a+i.height*r,o=Math.floor(o/this._tileWidth),a=Math.floor(a/this._tileWidth),s=Math.ceil(s/this._tileWidth),l=Math.ceil(l/this._tileWidth),o<=t&&t0?t.tileSize=Math.max.apply(null,s):t.tileSize=o}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,t.levels=function(e){for(var t=[],n=0;n0&&t>=this.minLevel&&t<=this.maxLevel&&(n=this.levels[t].width/this.levels[this.maxLevel].width),n}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,n){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,n)},getTileUrl:function(e,t,n){if(this.emulateLegacyImagePyramid){var i=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i}var r,o,a,s,l,c,u,d,f,p,h,m=Math.pow(.5,this.maxLevel-e),g=Math.ceil(this.width*m),b=Math.ceil(this.height*m);return r=this.getTileWidth(e),o=this.getTileHeight(e),a=Math.ceil(r/m),s=Math.ceil(o/m),h=this["@context"].indexOf("/1.0/context.json")>-1||this["@context"].indexOf("/1.1/context.json")>-1||this["@context"].indexOf("/1/context.json")>-1?"native.jpg":"default.jpg",gc?l/256:c/256,a.maxLevel=Math.ceil(Math.log(s)/Math.log(2))-1,a.tileSize=256,a.width=l,a.height=c,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,n){var i=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(i-n)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(e){e.tileSize=256;var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,n){return{x:Math.ceil(e/n),y:Math.ceil(t/n)}},_calculateAbsoluteTileNumber:function(e,t,n){for(var i=0,r={},o=0;o");return r.sort((function(e,t){return e.height-t.height}))}(n.levels),n.levels.length>0?(i=n.levels[n.levels.length-1].width,r=n.levels[n.levels.length-1].height):(i=0,r=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:i,height:r,tileSize:Math.max(r,i),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"==e.type||e.documentElement&&"legacy-image-pyramid"==e.documentElement.getAttribute("type")},configure:function(n,i){return e.isPlainObject(n)?t(this,n):function(n,i){if(!i||!i.documentElement)throw new Error(e.getString("Errors.Xml"));var r,o,a=i.documentElement,s=a.tagName,l=null,c=[];if("image"==s)try{for(l={type:a.getAttribute("type"),levels:[]},c=a.getElementsByTagName("level"),o=0;o0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var i=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i}})}(OpenSeadragon),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var n=this._image=new Image,i=this;this.crossOriginPolicy&&(n.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(n.useCredentials=this.ajaxWithCredentials),e.addEvent(n,"load",(function(){i.width=Object.prototype.hasOwnProperty.call(n,"naturalWidth")?n.naturalWidth:n.width,i.height=Object.prototype.hasOwnProperty.call(n,"naturalHeight")?n.naturalHeight:n.height,i.aspectRatio=i.width/i.height,i.dimensions=new e.Point(i.width,i.height),i._tileWidth=i.width,i._tileHeight=i.height,i.tileOverlap=0,i.minLevel=0,i.levels=i._buildLevels(),i.maxLevel=i.levels.length-1,i.ready=!0,i.raiseEvent("ready",{tileSource:i})})),e.addEvent(n,"error",(function(){i.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})})),n.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,n){var i=null;return e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].url),i},getContext2D:function(e,t,n){var i=null;return e>=this.minLevel&&e<=this.maxLevel&&(i=this.levels[e].context2D),i},_buildLevels:function(){var t=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var n=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,i=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,r=document.createElement("canvas"),o=r.getContext("2d");if(r.width=n,r.height=i,o.drawImage(this._image,0,0,n,i),t[0].context2D=o,delete this._image,e.isCanvasTainted(r))return t;for(;n>=2&&i>=2;){n=Math.floor(n/2),i=Math.floor(i/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=i,s.drawImage(r,0,0,n,i),t.splice(0,0,{context2D:s,width:n,height:i}),r=a,o=s}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,n,i,r){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){function t(n){e.requestAnimationFrame((function(){!function(n){var i,r,o;n.shouldFade&&(i=e.now(),r=i-n.fadeBeginTime,o=1-r/n.fadeLength,o=Math.min(1,o),o=Math.max(0,o),n.imgGroup&&e.setElementOpacity(n.imgGroup,o,!0),o>0&&t(n))}(n)}))}function n(t,n){t.element.disabled||(n>=e.ButtonState.GROUP&&t.currentState==e.ButtonState.REST&&(!function(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}(t),t.currentState=e.ButtonState.GROUP),n>=e.ButtonState.HOVER&&t.currentState==e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),n>=e.ButtonState.DOWN&&t.currentState==e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function i(n,i){n.element.disabled||(i<=e.ButtonState.HOVER&&n.currentState==e.ButtonState.DOWN&&(n.imgDown&&(n.imgDown.style.visibility="hidden"),n.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&n.currentState==e.ButtonState.HOVER&&(n.imgHover&&(n.imgHover.style.visibility="hidden"),n.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&n.currentState==e.ButtonState.GROUP&&(!function(n){n.shouldFade=!0,n.fadeBeginTime=e.now()+n.fadeDelay,window.setTimeout((function(){t(n)}),n.fadeDelay)}(n),n.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var r=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor==e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(n(r,e.ButtonState.DOWN),r.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||n(r,e.ButtonState.HOVER)},focusHandler:function(e){this.enterHandler(e),r.raiseEvent("focus",{originalEvent:e.originalEvent})},exitHandler:function(t){i(r,e.ButtonState.GROUP),t.insideElementPressed&&r.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){this.exitHandler(e),r.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){n(r,e.ButtonState.DOWN),r.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(i(r,e.ButtonState.HOVER),r.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?i(r,e.ButtonState.GROUP):n(r,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&r.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){return 13!==e.keyCode||(r.raiseEvent("click",{originalEvent:e.originalEvent}),r.raiseEvent("release",{originalEvent:e.originalEvent}),!1)}}),i(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){n(this,e.ButtonState.GROUP)},notifyGroupExit:function(){i(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}})}(OpenSeadragon),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var n,i=this.buttons.concat([]),r=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.label=e.makeNeutralElement("label"),this.element.style.display="inline-block",this.element.appendChild(this.label),n=0;n=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},e.Rect.fromSummits=function(t,n,i){var r=t.distanceTo(n),o=t.distanceTo(i),a=n.minus(t),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new e.Rect(t.x,t.y,r,o,s/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var n=this.getBoundingBox(),i=t.getBoundingBox(),r=Math.min(n.x,i.x),o=Math.min(n.y,i.y),a=Math.max(n.x+n.width,i.x+i.width),s=Math.max(n.y+n.height,i.y+i.height);return new e.Rect(r,o,a-r,s-o)},intersection:function(t){var n=[],i=this.getTopLeft();t.containsPoint(i,1e-10)&&n.push(i);var r=this.getTopRight();t.containsPoint(r,1e-10)&&n.push(r);var o=this.getBottomLeft();t.containsPoint(o,1e-10)&&n.push(o);var a=this.getBottomRight();t.containsPoint(a,1e-10)&&n.push(a);var s=t.getTopLeft();this.containsPoint(s,1e-10)&&n.push(s);var l=t.getTopRight();this.containsPoint(l,1e-10)&&n.push(l);var c=t.getBottomLeft();this.containsPoint(c,1e-10)&&n.push(c);var u=t.getBottomRight();this.containsPoint(u,1e-10)&&n.push(u);for(var d=this._getSegments(),f=t._getSegments(),p=0;py&&(y=C.x),C.yk&&(k=C.y)}return new e.Rect(w,x,y-w,k-x)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),n=this.getBottomLeft(),i=this.getBottomRight();return[[e,t],[t,i],[i,n],[n,e]]},rotate:function(t,n){if(0===(t=e.positiveModulo(t,360)))return this.clone();n=n||this.getCenter();var i=this.getTopLeft().rotate(t,n),r=this.getTopRight().rotate(t,n).minus(i);r=r.apply((function(e){return Math.abs(e)<1e-15?0:e}));var o=Math.atan(r.y/r.x);return r.x<0?o+=Math.PI:r.y<0&&(o+=2*Math.PI),new e.Rect(i.x,i.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),n=this.getTopRight(),i=this.getBottomLeft(),r=this.getBottomRight(),o=Math.min(t.x,n.x,i.x,r.x),a=Math.max(t.x,n.x,i.x,r.x),s=Math.min(t.y,n.y,i.y,r.y),l=Math.max(t.y,n.y,i.y,r.y);return new e.Rect(o,s,a-o,l-s)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),n=Math.floor(t.x),i=Math.floor(t.y),r=Math.ceil(t.width+t.x-n),o=Math.ceil(t.height+t.y-i);return new e.Rect(n,i,r,o)},containsPoint:function(e,t){t=t||0;var n=this.getTopLeft(),i=this.getTopRight(),r=this.getBottomLeft(),o=i.minus(n),a=r.minus(n);return(e.x-n.x)*o.x+(e.y-n.y)*o.y>=-t&&(e.x-i.x)*o.x+(e.y-i.y)*o.y<=t&&(e.x-n.x)*a.x+(e.y-n.y)*a.y>=-t&&(e.x-r.x)*a.x+(e.y-r.y)*a.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};function n(t){var n=Number(this.element.style.marginLeft.replace("px","")),i=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.dragging=!0,this.element&&("horizontal"==this.scroll?-t.delta.x>0?n>-(o-s.x)&&(this.element.style.marginLeft=n+2*t.delta.x+"px",r(this,s.x,n+2*t.delta.x)):-t.delta.x<0&&n<0&&(this.element.style.marginLeft=n+2*t.delta.x+"px",r(this,s.x,n+2*t.delta.x)):-t.delta.y>0?i>-(a-s.y)&&(this.element.style.marginTop=i+2*t.delta.y+"px",r(this,s.y,i+2*t.delta.y)):-t.delta.y<0&&i<0&&(this.element.style.marginTop=i+2*t.delta.y+"px",r(this,s.y,i+2*t.delta.y))),!1}function i(t){var n=Number(this.element.style.marginLeft.replace("px","")),i=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),a=Number(this.element.style.height.replace("px","")),s=e.getElementSize(this.viewer.canvas);return this.element&&("horizontal"==this.scroll?t.scroll>0?n>-(o-s.x)&&(this.element.style.marginLeft=n-60*t.scroll+"px",r(this,s.x,n-60*t.scroll)):t.scroll<0&&n<0&&(this.element.style.marginLeft=n-60*t.scroll+"px",r(this,s.x,n-60*t.scroll)):t.scroll<0?i>s.y-a&&(this.element.style.marginTop=i+60*t.scroll+"px",r(this,s.y,i+60*t.scroll)):t.scroll>0&&i<0&&(this.element.style.marginTop=i+60*t.scroll+"px",r(this,s.y,i+60*t.scroll))),!1}function r(t,n,i){var r,o,a,s,l,c,u;for(r="horizontal"==t.scroll?t.panelWidth:t.panelHeight,o=Math.ceil(n/r)+5,c=o=(o=(a=Math.ceil((Math.abs(i)+n)/r)+1)-o)<0?0:o;cc+a.x-this.panelWidth?(n=Math.min(n,s-a.x),this.element.style.marginLeft=-n+"px",r(this,a.x,-n)):nu+a.y-this.panelHeight?(n=Math.min(n,l-a.y),this.element.style.marginTop=-n+"px",r(this,a.y,-n)):n1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){var t,n;this.current.time=e.now(),this._exponential?(t=this.start._logValue,n=this.target._logValue):(t=this.start.value,n=this.target.value);var i,r,o=this.current.time>=this.target.time?n:t+(n-t)*(i=this.springStiffness,r=(this.current.time-this.start.time)/(this.target.time-this.start.time),(1-Math.exp(i*-r))/(1-Math.exp(-i))),a=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,a!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(OpenSeadragon),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,makeAjaxRequest:e.makeAjaxRequest,jobId:null},t),this.image=null}t.prototype={errorMsg:null,start:function(){var e=this,t=this.abort;this.image=new Image,this.image.onload=function(){e.finish(!0)},this.image.onabort=this.image.onerror=function(){e.errorMsg="Image load aborted",e.finish(!1)},this.jobId=window.setTimeout((function(){e.errorMsg="Image load exceeded timeout",e.finish(!1)}),this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(t){var n;try{e.image._array=t.response,n=new window.Blob([t.response])}catch(e){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===e.name&&i){var r=new i;r.append(t.response),n=r.getBlob()}}void 0!==n&&0!==n.size||(e.errorMsg="Empty image response.",e.finish(!1));var o=(window.URL||window.webkitURL).createObjectURL(n);e.image.src=o},error:function(t){e.errorMsg="Image load aborted - XHR error",e.finish(!1)}}),this.abort=function(){e.request.abort(),"function"==typeof t&&t()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,i=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,makeAjaxRequest:e.makeAjaxRequest,callback:function(t){!function(e,t,n){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(e.jobQueue.shift().start(),e.jobsInProgress++);n(t.image,t.errorMsg,t.request)}(n,t,e.callback)},abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgressn&&(n=r)}return n},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!=e.x||this.canvas.height!=e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y}this._clear()}},_clear:function(e,t){if(this.useCanvas){var n=this._getContext(e);if(t)n.clearRect(t.x,t.y,t.width,t.height);else{var i=n.canvas;n.clearRect(0,0,i.width,i.height)}}},viewportToDrawerRectangle:function(t){var n=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),i=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio,i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio)},drawTile:function(t,n,i,r,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(n,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(i);r=r||1,t.drawCanvas(a,n,r,o)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var i=this;this.viewer.addHandler("rotate",(function e(){if(0!==i.viewport.getRotation()){i.viewer.removeHandler("rotate",e);var t=i._calculateSketchCanvasSize();i.sketchCanvas.width=t.x,i.sketchCanvas.height=t.y}}))}}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var n=this._getContext(t);n.beginPath(),n.rect(e.x,e.y,e.width,e.height),n.clip()}},drawRectangle:function(e,t,n){if(this.useCanvas){var i=this._getContext(n);i.save(),i.fillStyle=t,i.fillRect(e.x,e.y,e.width,e.height),i.restore()}},blendSketch:function(t,n,i,r){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:n,translate:i,compositeOperation:r}),this.useCanvas&&this.sketchCanvas){t=o.opacity,r=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,r&&(this.context.globalCompositeOperation=r),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{n=o.scale||1;var s=(i=o.translate)instanceof e.Point?i:new e.Point(0,0),l=0,c=0;if(i){var u=this.sketchCanvas.width-this.canvas.width,d=this.sketchCanvas.height-this.canvas.height;l=Math.round(u/2),c=Math.round(d/2)}this.context.drawImage(this.sketchCanvas,s.x-l*n,s.y-c*n,(this.canvas.width+2*l)*n,(this.canvas.height+2*c)*n,-l,-c,this.canvas.width+2*l,this.canvas.height+2*c)}this.context.restore()}},drawDebugInfo:function(t,n,i,r){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(r)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],0!==this.viewport.degrees?this._offsetForRotation({degrees:this.viewport.degrees}):this.viewer.viewport.flipped&&this._flip(),r.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:r.getRotation(!0),point:r.viewport.pixelFromPointNoRotate(r._getRotationPoint(!0),!0)}),a.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var s=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,l),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-s,-l),0===t.x&&0===t.y&&(a.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+i+" of "+n,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),r.getRotation(!0)%360!=0&&this._restoreRotationChanges(),a.restore()}},debugRect:function(t){if(this.useCanvas){var n=this.context;n.save(),n.lineWidth=2*e.pixelDensityRatio,n.strokeStyle=this.debugGridColor[0],n.fillStyle=this.debugGridColor[0],n.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),n.restore()}},getCanvasSize:function(t){var n=this._getContext(t).canvas;return new e.Point(n.width,n.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var n=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(t.useSketch);i.save(),i.translate(n.x,n.y),this.viewer.viewport.flipped?(i.rotate(Math.PI/180*-t.degrees),i.scale(-1,1)):i.rotate(Math.PI/180*t.degrees),i.translate(-n.x,-n.y)},_flip:function(t){var n=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(t.useSketch);i.translate(n.x,0),i.scale(-1,1),i.translate(-n.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,n=this.viewport.getContainerSize();return{x:n.x*t,y:n.y*t}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var n=arguments;n.length&&n[0]instanceof e.Point&&(t={containerSize:n[0],contentSize:n[1],config:n[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,n){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,n)},_setContentBounds:function(t,n){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(n),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(n),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:n,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),n=1/this.getHomeZoom(),i=n/this.getAspectRatio();return new e.Rect(t.x-n/2,t.y-i/2,n,i)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,e/=this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var n=this.getCenter(t),i=1/this.getZoom(t),r=i/this.getAspectRatio();return new e.Rect(n.x-i/2,n.y-r/2,i,r)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),n=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/n,t.y-=this._margins.top/n,t.width+=(this._margins.left+this._margins.right)/n,t.height+=(this._margins.top+this._margins.bottom)/n,t},getCenter:function(t){var n,i,r,o,a,s,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),c=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(n=this.pixelFromPoint(this.zoomPoint,!0),o=(r=1/(i=this.getZoom()))/this.getAspectRatio(),a=new e.Rect(l.x-r/2,l.y-o/2,r,o),s=this._pixelFromPoint(this.zoomPoint,a).minus(n).divide(this._containerInnerSize.x*i),c.plus(s)):c},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var n=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var i=this.visibilityRatio*n.width,r=n.x+n.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-r+i,s=o-n.x-i;i>this._contentBoundsNoRotate.width?n.x+=(a+s)/2:s<0?n.x+=s:a>0&&(n.x+=a)}if(this.wrapVertical);else{var l=this.visibilityRatio*n.height,c=n.y+n.height,u=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,d=this._contentBoundsNoRotate.y-c+l,f=u-n.y-l;l>this._contentBoundsNoRotate.height?n.y+=(d+f)/2:f<0?n.y+=f:d>0&&(n.y+=d)}return n},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),n=this._applyZoomConstraints(t);t!==n&&this.zoomTo(n,this.zoomPoint,e);var i=this.getBoundsNoRotate(),r=this._applyBoundaryConstraints(i);return this._raiseConstraintsEvent(e),(i.x!==r.x||i.y!==r.y||e)&&this.fitBounds(r.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,n){var i=(n=n||{}).immediately||!1,r=n.constraints||!1,o=this.getAspectRatio(),a=t.getCenter(),s=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var l=1/s.width;if(r){var c=s.getAspectRatio(),u=this._applyZoomConstraints(l);l!==u&&(l=u,s.width=1/l,s.x=a.x-s.width/2,s.height=s.width/c,s.y=a.y-s.height/2),a=(s=this._applyBoundaryConstraints(s)).getCenter(),this._raiseConstraintsEvent(i)}if(i)return this.panTo(a,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var d=this.getBounds(),f=this.getZoom();if(0===f||Math.abs(l/f-1)<1e-8)return this.zoomTo(l,!0),this.panTo(a,i);var p=(s=s.rotate(-this.getRotation())).getTopLeft().times(l).minus(d.getTopLeft().times(f)).divide(l-f);return this.zoomTo(l,p,i)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var n=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(n,t)},fitHorizontally:function(t){var n=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(n,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,n){var i=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(i.plus(t),n)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,n){return this.zoomTo(this.zoomSpring.target.value*e,t,n)},zoomTo:function(t,n,i){var r=this;return this.zoomPoint=n instanceof e.Point&&!isNaN(n.x)&&!isNaN(n.y)?n:null,i?this._adjustCenterSpringsForZoomPoint((function(){r.zoomSpring.resetTo(t)})):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:n,immediately:i}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()?(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this):this},getRotation:function(){return this.degrees},resize:function(e,t){var n,i=this.getBoundsNoRotate(),r=i;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(n=e.x/this.containerSize.x,r.width=i.width*n,r.height=r.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(r,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint((function(){e.zoomSpring.update()})),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var n=this.pixelFromPoint(this.zoomPoint,!0).minus(t),i=this.deltaPointsFromPixels(n,!0);this.centerSpringX.shiftBy(i.x),this.centerSpringY.shiftBy(i.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,n){return t.minus(n.getTopLeft()).times(this._containerInnerSize.x/n.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,n){var i=this.getBoundsNoRotate(n);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/i.width).plus(i.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,n){var i=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/i,n*this._contentSizeNoRotate.x/i)},viewportToImageCoordinates:function(t,n){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===i){return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,n,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,n-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,n){var i=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*i,n/this._contentSizeNoRotate.x*i)},imageToViewportCoordinates:function(t,n){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===i){return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,n,!0)}}var r=this._imageToViewportDelta(t,n);return r.x+=this._contentBoundsNoRotate.x,r.y+=this._contentBoundsNoRotate.y,r},imageToViewportRectangle:function(t,n,i,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,i,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,n,i,r,!0)}}var s=this.imageToViewportCoordinates(o.x,o.y),l=this._imageToViewportDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewportToImageRectangle:function(t,n,i,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,n,i,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===a){return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,n,i,r,!0)}}var s=this.viewportToImageCoordinates(o.x,o.y),l=this._viewportToImageDelta(o.width,o.height);return new e.Rect(s.x,s.y,l.x,l.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(n)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var n=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(n)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}}var i=this._contentSizeNoRotate.x;return t*(this._containerInnerSize.x/i*this._contentBoundsNoRotate.width)},imageToViewportZoom:function(t){if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===n){return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}}return t*(this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width)},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(OpenSeadragon),function(e){function t(e,t,i,r,o,a,l,c,u){var d=l.getBoundingBox().getTopLeft(),f=l.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:r,opacity:o,visibility:a,drawArea:l,topleft:d,bottomright:f,currenttime:c,best:u}),s(e.coverage,r),s(e.loadingCoverage,r);for(var p=e._getCornerTiles(r,d,f),h=p.topLeft,m=p.bottomRight,g=e.source.getNumTiles(r),b=e.viewport.pixelFromPoint(e.viewport.getCenter()),v=h.x;v<=m.x;v++)for(var w=h.y;w<=m.y;w++){if(!e.wrapHorizontal&&!e.wrapVertical){var y=e.source.getTileBounds(r,v,w);if(null===l.intersection(y))continue}u=n(e,i,t,v,w,r,o,a,b,g,c,u)}return u}function n(t,n,r,s,l,c,u,d,f,p,h,m){var g=function(t,n,i,r,o,a,s,l,c,u){var d,f,p,h,m,g,b,v,w;a[i]||(a[i]={});a[i][t]||(a[i][t]={});a[i][t][n]||(d=(l.x+t%l.x)%l.x,f=(l.y+n%l.y)%l.y,p=o.getTileBounds(i,d,f),h=o.getTileBounds(i,d,f,!0),m=o.tileExists(i,d,f),g=o.getTileUrl(i,d,f),r.loadTilesWithAjax?(b=o.getTileAjaxHeaders(i,d,f),e.isPlainObject(r.ajaxHeaders)&&(b=e.extend({},r.ajaxHeaders,b))):b=null,v=o.getContext2D?o.getContext2D(i,d,f):void 0,p.x+=(t-d)/l.x,p.y+=u/c*((n-f)/l.y),w=new e.Tile(i,t,n,p,m,g,v,r.loadTilesWithAjax,b,h),d===l.x-1&&(w.isRightMost=!0),f===l.y-1&&(w.isBottomMost=!0),a[i][t][n]=w);return(w=a[i][t][n]).lastTouchTime=s,w}(s,l,c,t,t.source,t.tilesMatrix,h,p,t._worldWidthCurrent,t._worldHeightCurrent),b=r;t.viewer&&t.viewer.raiseEvent("update-tile",{tiledImage:t,tile:g}),a(t.coverage,c,s,l,!1);var v=g.loaded||g.loading||o(t.loadingCoverage,c,s,l);if(a(t.loadingCoverage,c,s,l,v),!g.exists)return m;if(n&&!b&&(o(t.coverage,c,s,l)?a(t.coverage,c,s,l,!0):b=!0),!b)return m;if(function(t,n,i,r,o,a){var s=t.bounds.getTopLeft();s.x*=a._scaleSpring.current.value,s.y*=a._scaleSpring.current.value,s.x+=a._xSpring.current.value,s.y+=a._ySpring.current.value;var l=t.bounds.getSize();l.x*=a._scaleSpring.current.value,l.y*=a._scaleSpring.current.value;var c=i.pixelFromPointNoRotate(s,!0),u=i.pixelFromPointNoRotate(s,!1),d=i.deltaPixelsFromPointsNoRotate(l,!0),f=i.deltaPixelsFromPointsNoRotate(l,!1),p=u.plus(f.divide(2)),h=r.squaredDistanceTo(p);n||(d=d.plus(new e.Point(1,1)));t.isRightMost&&a.wrapHorizontal&&(d.x+=.75);t.isBottomMost&&a.wrapVertical&&(d.y+=.75);t.position=c,t.size=d,t.squaredDistance=h,t.visibility=o}(g,t.source.tileOverlap,t.viewport,f,d,t),!g.loaded)if(g.context2D)i(t,g);else{var w=t._tileCache.getImageRecord(g.cacheKey);if(w)i(t,g,w.getImage())}g.loaded?function(e,t,n,i,r,o,s){var l,c,u=1e3*e.blendTime;t.blendStart||(t.blendStart=s);l=s-t.blendStart,c=u?Math.min(1,l/u):1,e.alwaysBlend&&(c*=o);if(t.opacity=c,e.lastDrawn.push(t),1==c)a(e.coverage,r,n,i,!0),e._hasOpaqueTile=!0;else if(le.visibility)return t;if(t.visibility==e.visibility&&t.squaredDistanceo?(a=this._clip.x/this._clip.height*t.height,s=this._clip.y/this._clip.height*t.height):(a=this._clip.x/this._clip.width*t.width,s=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>o){var u=t.height/c,d=0;r.isHorizontallyCentered?d=(t.width-t.height*o)/2:r.isRight&&(d=t.width-t.height*o),this.setPosition(new e.Point(t.x-a+d,t.y-s),i),this.setHeight(u,i)}else{var f=t.width/l,p=0;r.isVerticallyCentered?p=(t.height-t.width/o)/2:r.isBottom&&(p=t.height-t.width/o),this.setPosition(new e.Point(t.x-a,t.y-s+p),i),this.setWidth(f,i)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var n=this._scaleSpring.target.value===e;if(t){if(n&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(n)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}n||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,n=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return{lowestLevel:e=Math.min(e,n),highestLevel:n}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){this.lastDrawn.pop().beingDrawn=!1}var n=this.viewport,o=this._viewportToTiledImageRectangle(n.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var a=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(o=o.intersection(a)))return}for(var s=this._getLevelsInterval(),l=s.lowestLevel,c=s.highestLevel,u=null,d=!1,f=e.now(),p=c;p>=l;p--){var h=!1,m=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!0).x*this._scaleSpring.current.value;if(p===l||!d&&m>=this.minPixelRatio)h=!0,d=!0;else if(!d)continue;var g=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!1).x*this._scaleSpring.current.value,b=n.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,v=this.immediateRender?1:b;if(u=t(this,d,h,p,Math.min(1,(m-.5)/.5),v/Math.abs(v-g),o,f,u),r(this.coverage,p))break}!function(t,n){if(0===t.opacity||0===n.length&&!t.placeholderFillStyle)return;var i,r,o,a=n[0];a&&(i=t.opacity<1||t.compositeOperation&&"source-over"!==t.compositeOperation||!t._isBottomItem()&&a._hasTransparencyChannel());var s,l=t.viewport.getZoom(!0),c=t.viewportToImageZoom(l);n.length>1&&c>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(i=!0,r=a.getScaleForEdgeSmoothing(),o=a.getTranslationForEdgeSmoothing(r,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0)));i&&(r||(s=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox().times(e.pixelDensityRatio)),t._drawer._clear(!0,s));r||(0!==t.viewport.degrees?t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:i}):t._drawer.viewer.viewport.flipped&&t._drawer._flip({}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:i}));var u=!1;if(t._clip){t._drawer.saveContext(i);var d=t.imageToViewportRectangle(t._clip,!0);d=d.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var f=t._drawer.viewportToDrawerRectangle(d);r&&(f=f.times(r)),o&&(f=f.translate(o)),t._drawer.setClip(f,i),u=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var p=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));r&&(p=p.times(r)),o&&(p=p.translate(o));var h=null;h="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(p,h,i)}for(var m=n.length-1;m>=0;m--)a=n[m],t._drawer.drawTile(a,t._drawingHandler,i,r,o),a.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:a});u&&t._drawer.restoreContext(i);r||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(i),0!==t.viewport.degrees?t._drawer._restoreRotationChanges(i):t._drawer.viewer.viewport.flipped&&t._drawer._flip({}));i&&(r&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:r,translate:o,compositeOperation:t.compositeOperation,bounds:s}),r&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1)));!function(t,n){if(t.debugMode)for(var i=n.length-1;i>=0;i--){var r=n[i];try{t._drawer.drawDebugInfo(r,n.length,i,t)}catch(t){e.console.error(t)}}}(t,n)}(this,this.lastDrawn),u&&!u.context2D?(!function(t,n,r){var o;n.loading=!0,e.isFunction(t.makeAjaxRequest)&&(o=t.makeAjaxRequest);t._imageLoader.addJob({src:n.url,makeAjaxRequest:o,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.ajaxHeaders,crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,callback:function(o,a,s){!function(t,n,r,o,a,s){if(!o)return e.console.log("Tile %s failed to load: %s - error: %s",n,n.url,a),t.viewer.raiseEvent("tile-load-failed",{tile:n,tiledImage:t,time:r,message:a,tileRequest:s}),n.loading=!1,void(n.exists=!1);if(rthis._maxImageCacheCount){for(var s,l,c,u,d,f,p=null,h=-1,m=null,g=this._tilesLoaded.length-1;g>=0;g--)(s=(f=this._tilesLoaded[g]).tile).level<=r||s.beingDrawn||(p?(u=s.lastTouchTime,l=p.lastTouchTime,d=s.level,c=p.level,(uc)&&(p=s,h=g,m=f)):(p=s,h=g,m=f));p&&h>=0&&(this._unloadTile(m),o=h)}this._tilesLoaded[o]=new t({tile:i.tile,tiledImage:i.tiledImage})},clearTilesFor:function(t){var n;e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var i=0;i=this._items.length)throw new Error("Index bigger than number of layers.");n!==i&&-1!==i&&(this._items.splice(i,1),this._items.splice(n,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:i,newIndex:n}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var n=e.indexOf(this._items,t);-1!==n&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(n,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){var e,t;for(this.viewer._cancelPendingImages(),t=0;tu.height?s:s*(u.width/u.height))*(u.height/u.width),p=new e.Point(h+(s-d)/2,m+(s-f)/2),c.setPosition(p,i),c.setWidth(d,i),"horizontal"===r?h+=l:m+=l;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,n=this._contentSize?this._contentSize.clone():null,i=this._contentFactor||0;if(this._items.length){var r=this._items[0],o=r.getBounds();this._contentFactor=r.getContentSize().x/o.width;for(var a=r.getClippedBounds().getBoundingBox(),s=a.x,l=a.y,c=a.x+a.width,u=a.y+a.height,d=1;d>3)]>>7-((7&h)<<0)&1);l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>2)]>>6-((3&h)<<1)&3),l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>1)]>>4-((1&h)<<2)&15),l[S]=y[_],l[S+1]=y[_+1],l[S+2]=y[_+2],l[S+3]=T>3]>>7-(7&h)&1))==255*g?0:255;c[h]=D<<24|M<<16|M<<8|M}if(2==d)for(h=0;h>2]>>6-((3&h)<<1)&3))==85*g?0:255,c[h]=D<<24|M<<16|M<<8|M;if(4==d)for(h=0;h>1]>>4-((1&h)<<2)&15))==17*g?0:255,c[h]=D<<24|M<<16|M<<8|M;if(8==d)for(h=0;h>3,s=Math.ceil(i*o/8),l=new Uint8Array(r*s),c=0,u=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],f=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],h=0;h<7;){for(var m=f[h],g=p[h],b=0,v=0,w=u[h];w>3])>>7-(7&E)&1,l[A*s+(C>>3)]|=S<<7-((3&C)<<0)),2==o&&(S=(S=t[E>>3])>>6-(7&E)&3,l[A*s+(C>>2)]|=S<<6-((3&C)<<1)),4==o&&(S=(S=t[E>>3])>>4-(7&E)&15,l[A*s+(C>>1)]|=S<<4-((1&C)<<2)),o>=8)for(var _=A*s+C*a,T=0;T>3)+T];E+=o,C+=g}k++,A+=m}b*v!=0&&(c+=v*(1+x)),h+=1}return l},e.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},e.decode._filterZero=function(t,n,i,r,o){var a=e.decode._getBPP(n),s=Math.ceil(r*a/8),l=e.decode._paeth;a=Math.ceil(a/8);for(var c=0;c>1)&255;if(4==f)for(p=a;p>1)&255;for(p=a;p>1)&255}if(4==f){for(p=0;p>8&255,e[t+1]=255&n},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII:function(e,t,n){for(var i="",r=0;r=0&&s>=0?(d=p*t+h<<2,f=(s+p)*r+a+h<<2):(d=(-s+p)*t-a+h<<2,f=p*r+h<<2),0==l)i[f]=e[d],i[f+1]=e[d+1],i[f+2]=e[d+2],i[f+3]=e[d+3];else if(1==l){var m=e[d+3]*(1/255),g=e[d]*m,b=e[d+1]*m,v=e[d+2]*m,w=i[f+3]*(1/255),y=i[f]*w,x=i[f+1]*w,k=i[f+2]*w,A=1-m,C=m+w*A,E=0==C?0:1/C;i[f+3]=255*C,i[f+0]=(g+y*A)*E,i[f+1]=(b+x*A)*E,i[f+2]=(v+k*A)*E}else if(2==l)m=e[d+3],g=e[d],b=e[d+1],v=e[d+2],w=i[f+3],y=i[f],x=i[f+1],k=i[f+2],m==w&&g==y&&b==x&&v==k?(i[f]=0,i[f+1]=0,i[f+2]=0,i[f+3]=0):(i[f]=g,i[f+1]=b,i[f+2]=v,i[f+3]=m);else if(3==l){if(m=e[d+3],g=e[d],b=e[d+1],v=e[d+2],w=i[f+3],y=i[f],x=i[f+1],k=i[f+2],m==w&&g==y&&b==x&&v==k)continue;if(m<220&&w>20)return!1}return!0},e.encode=function(t,n,i,r,o,a){null==r&&(r=0),null==a&&(a=!1);for(var s=new Uint8Array(t[0].byteLength*t.length+100),l=[137,80,78,71,13,10,26,10],c=0;c<8;c++)s[c]=l[c];var u=8,d=e._bin,f=e.crc.crc,p=d.writeUint,h=d.writeUshort,m=d.writeASCII,g=e.encode.compressPNG(t,n,i,r,a);p(s,u,13),m(s,u+=4,"IHDR"),p(s,u+=4,n),p(s,u+=4,i),s[u+=4]=g.depth,s[++u]=g.ctype,s[++u]=0,s[++u]=0,s[++u]=0,p(s,++u,f(s,u-17,17)),p(s,u+=4,1),m(s,u+=4,"sRGB"),s[u+=4]=1,p(s,++u,f(s,u-5,5)),u+=4;var b=t.length>1;if(b&&(p(s,u,8),m(s,u+=4,"acTL"),p(s,u+=4,t.length),p(s,u+=4,0),p(s,u+=4,f(s,u-12,12)),u+=4),3==g.ctype){for(p(s,u,3*(S=g.plte.length)),m(s,u+=4,"PLTE"),u+=4,c=0;c>8&255,k=w>>16&255;s[u+v+0]=y,s[u+v+1]=x,s[u+v+2]=k}if(p(s,u+=3*S,f(s,u-3*S-4,3*S+4)),u+=4,g.gotAlpha){for(p(s,u,S),m(s,u+=4,"tRNS"),u+=4,c=0;c>24&255;p(s,u+=S,f(s,u-S-4,S+4)),u+=4}}for(var A=0,C=0;C=300))break}}var x=!!m&&o,k=b.length;k<=256&&0==a&&(l=k<=2?1:k<=4?2:k<=16?4:8,o&&(l=8),m=!0);var A=[];for(d=0;dR&&(R=V),jH&&(H=j));var U=-1==R?1:(R-L+1)*(H-B+1);U>1)]|=g[E[Y+V]]<<4-4*(1&V);else if(2==l)for(V=0;V>2)]|=g[E[Y+V]]<<6-2*(3&V);else if(1==l)for(V=0;V>3)]|=g[E[Y+V]]<<7-1*(7&V)}C=W,s=3,c=1}else if(0==m&&1==t.length){W=new Uint8Array(T*M*3);var q=T*M;for(h=0;h5e5)||2!=l&&3!=l&&4!=l){for(var c=0;c>1)+256&255;if(4==a)for(u=o;u>1)&255;for(u=o;u>1)&255}if(4==a){for(u=0;u>>1:n>>>=1;e[t]=n}return e}(),update:function(t,n,i,r){for(var o=0;o>>8;return t},crc:function(t,n,i){return 4294967295^e.crc.update(4294967295,t,n,i)}},e.quantize=function(t,n,i){for(var r=[],o=0,a=0;am&&(m=h[a].est.L,g=a);if(m<.001)break;var b=h[g],v=e.quantize.splitPixels(s,l,b.i0,b.i1,b.est.e,b.est.eMq255),w={i0:b.i0,i1:v,bst:null,est:null,tdst:0,left:null,right:null};w.bst=e.quantize.stats(s,w.i0,w.i1),w.est=e.quantize.estats(w.bst);var y={i0:v,i1:b.i1,bst:null,est:null,tdst:0,left:null,right:null};for(y.bst={R:[],m:[],N:b.bst.N-w.bst.N},a=0;a<16;a++)y.bst.R[a]=b.bst.R[a]-w.bst.R[a];for(a=0;a<4;a++)y.bst.m[a]=b.bst.m[a]-w.bst.m[a];y.est=e.quantize.estats(y.bst),b.left=w,b.right=y,h[g]=w,h.push(y)}h.sort((function(e,t){return t.bst.N-e.bst.N}));for(var x=0;x>2]=z.est.rgba}r[x]=C.buffer}return{bufs:r,plte:h}},e.quantize.getNearest=function(t,n,i,r,o){if(null==t.left)return t.tdst=e.quantize.dist(t.est.q,n,i,r,o),t;var a=e.quantize.planeDst(t.est,n,i,r,o),s=t.left,l=t.right;a>0&&(s=t.right,l=t.left);var c=e.quantize.getNearest(s,n,i,r,o);if(c.tdst<=a*a)return c;var u=e.quantize.getNearest(l,n,i,r,o);return u.tdsta;)r-=4;if(i>=r)break;var l=n[i>>2];n[i>>2]=n[r>>2],n[r>>2]=l,i+=4,r-=4}for(;s(t,i,o)>a;)i-=4;return i+4},e.quantize.vecDot=function(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]},e.quantize.stats=function(e,t,n){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=n-t>>2,a=t;a>>0}},e.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},e.encode.alphaMul=function(e,t){for(var n=new Uint8Array(e.length),i=e.length>>2,r=0;r0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=i.deflateSetDictionary(this.strm,u)))throw new Error(a[n]);this._dict_set=!0}}function u(e,t){var n=new c(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new r.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=i.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(s.output,s.next_out))):this.onData(r.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},function(e,t,n){"use strict";var i,r=n(100),o=n(941),a=n(445),s=n(446),l=n(305);function c(e,t){return e.msg=l[t],t}function u(e){return(e<<1)-(e>4?9:0)}function d(e){for(var t=e.length;--t>=0;)e[t]=0}function f(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function p(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function h(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=c[o+a-1],h=c[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===h&&c[n+a-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oa){if(e.match_start=t,a=i,i>=s)break;p=c[o+a-1],h=c[o+a]}}}while((t=d[t&u])>l&&0!=--r);return a<=e.lookahead?a:e.lookahead}function b(e){var t,n,i,o,l,c,u,d,f,p,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-262)){r.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{i=e.head[--t],e.head[t]=i>=h?i-h:0}while(--n);t=n=h;do{i=e.prev[--t],e.prev[t]=i>=h?i-h:0}while(--n);o+=h}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,d=e.strstart+e.lookahead,f=o,p=void 0,(p=c.avail_in)>f&&(p=f),n=0===p?0:(c.avail_in-=p,r.arraySet(u,c.input,c.next_in,p,d),1===c.state.wrap?c.adler=a(c.adler,u,p,d):2===c.state.wrap&&(c.adler=s(c.adler,u,p,d)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<15&&(s=2,i-=16),o<1||o>9||8!==n||i<8||i>15||t<0||t>9||a<0||a>4)return c(e,-2);8===i&&(i=9);var l=new x;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=i,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(b(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,p(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(p(e,!1),e.strm.avail_out),1)})),new y(4,4,8,4,v),new y(4,5,16,8,v),new y(4,6,32,32,v),new y(4,4,16,16,w),new y(8,16,32,32,w),new y(8,16,128,128,w),new y(8,32,128,256,w),new y(32,128,258,1024,w),new y(32,258,258,4096,w)],t.deflateInit=function(e,t){return C(e,t,8,15,8,0)},t.deflateInit2=C,t.deflateReset=A,t.deflateResetKeep=k,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var n,r,a,l;if(!e||!e.state||t>5||t<0)return e?c(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,h(r,31),h(r,139),h(r,8),r.gzhead?(h(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),h(r,255&r.gzhead.time),h(r,r.gzhead.time>>8&255),h(r,r.gzhead.time>>16&255),h(r,r.gzhead.time>>24&255),h(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),h(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(h(r,255&r.gzhead.extra.length),h(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=s(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(h(r,0),h(r,0),h(r,0),h(r,0),h(r,0),h(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),h(r,3),r.status=113);else{var g=8+(r.w_bits-8<<4)<<8;g|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(g|=32),g+=31-g%31,r.status=113,m(r,g),0!==r.strstart&&(m(r,e.adler>>>16),m(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending!==r.pending_buf_size));)h(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),f(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&f(e),r.pending+2<=r.pending_buf_size&&(h(r,255&e.adler),h(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(f(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(n)&&4!==t)return c(e,-5);if(666===r.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var v=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(b(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,i,r,a,s=e.window;;){if(e.lookahead<=258){if(b(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=s[r=e.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=e.strstart+258;do{}while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(p(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(p(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(p(e,!1),0===e.strm.avail_out)?1:2}(r,t):i[r.level].func(r,t);if(3!==v&&4!==v||(r.status=666),1===v||3===v)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===v&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(d(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),f(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(h(r,255&e.adler),h(r,e.adler>>8&255),h(r,e.adler>>16&255),h(r,e.adler>>24&255),h(r,255&e.total_in),h(r,e.total_in>>8&255),h(r,e.total_in>>16&255),h(r,e.total_in>>24&255)):(m(r,e.adler>>>16),m(r,65535&e.adler)),f(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var n,i,o,s,l,c,u,f,p=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=a(e.adler,t,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(d(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new r.Buf8(n.w_size),r.arraySet(f,t,p-n.w_size,n.w_size,0),t=f,p=n.w_size),l=e.avail_in,c=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,b(n);n.lookahead>=3;){i=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<=0;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);r(c);var u=new Array(60);r(u);var d=new Array(512);r(d);var f=new Array(256);r(f);var p=new Array(29);r(p);var h,m,g,b=new Array(30);function v(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function y(e){return e<256?d[e]:d[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function E(e,t,n){var i,r,o=new Array(16),a=0;for(i=1;i<=15;i++)o[i]=a=a+n[i-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=C(o[s]++,s))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function _(e){e.bi_valid>8?x(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function T(e,t,n,i){var r=2*t,o=2*n;return e[r]>1;n>=1;n--)M(e,o,n);r=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,M(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(i=e.heap[n])+1]+1]+1)>h&&(o=h,m++),l[2*i+1]=o,i>c||(e.bl_count[o]++,a=0,i>=p&&(a=f[i-p]),s=l[2*i],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(u[2*i+1]+a)));if(0!==m){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(o=h;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>c||(l[2*r+1]!==o&&(e.opt_len+=(o-l[2*r+1])*l[2*r],l[2*r+1]=o),i--)}}(e,t),E(o,c,e.bl_count)}function P(e,t,n){var i,r,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s>=7;i<30;i++)for(b[i]=r<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),D(e,e.l_desc),D(e,e.d_desc),a=function(e){var t;for(P(e,e.dyn_ltree,e.l_desc.max_code),P(e,e.dyn_dtree,e.d_desc.max_code),D(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=r&&(r=o)):r=o=n+5,n+4<=r&&-1!==t?N(e,t,n,i):4===e.strategy||o===r?(k(e,2+(i?1:0),3),z(e,c,u)):(k(e,4+(i?1:0),3),function(e,t,n,i){var r;for(k(e,t-257,5),k(e,n-1,5),k(e,i-4,4),r=0;r>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*y(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),A(e,256,c),function(e){16===e.bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,n){"use strict";var i=n(943),r=n(100),o=n(447),a=n(449),s=n(305),l=n(448),c=n(946),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,l,c,d,f=this.strm,p=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new r.Buf8(p),f.next_out=0,f.avail_out=p),(n=i.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=i.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(f.output,f.next_out),c=f.next_out-l,d=o.buf2string(f.output,l),f.next_out=c,f.avail_out=p-c,c&&r.arraySet(f.output,f.output,l,c,0),this.onData(d)):this.onData(r.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),f.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},function(e,t,n){"use strict";var i=n(100),r=n(445),o=n(446),a=n(944),s=n(945);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function f(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,d(e))):-2}function p(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var h,m,g=!0;function b(e){if(g){var t;for(h=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,h,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),g=!1}e.lencode=h,e.lenbits=9,e.distcode=m,e.distbits=5}function v(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,N,2,0),m=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,z=8+(15&(m>>>=4)),0===n.wbits)n.wbits=z;else if(z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&m,N[1]=m>>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>8&255,N[2]=m>>>16&255,N[3]=m>>>24&255,n.check=o(n.check,N,4,0)),m=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>8),512&n.flags&&(N[0]=255&m,N[1]=m>>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===p)break e;p--,m+=c[d++]<>>8&255,n.check=o(n.check,N,2,0)),m=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((x=n.length)>p&&(x=p),x&&(n.head&&(z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,d,x,z)),512&n.flags&&(n.check=o(n.check,c,x,d)),p-=x,d+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break e;x=0;do{z=c[d+x++],n.head&&z&&n.length<65536&&(n.head.name+=String.fromCharCode(z))}while(z&&x>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,m+=c[d++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===p)break e;p--,m+=c[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(b(n),n.mode=20,6===t){m>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,m+=c[d++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(x>p&&(x=p),x>h&&(x=h),0===x)break e;i.arraySet(u,c,d,x,f),p-=x,d+=x,h-=x,f+=x,n.length-=x;break}n.mode=12;break;case 17:for(;g<14;){if(0===p)break e;p--,m+=c[d++]<>>=5,g-=5,n.ndist=1+(31&m),m>>>=5,g-=5,n.ncode=4+(15&m),m>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},D=s(0,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,D){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=C,g-=C,n.lens[n.have++]=S;else{if(16===S){for(F=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}z=n.lens[n.have-1],x=3+(3&m),m>>>=2,g-=2}else if(17===S){for(F=C+3;g>>=C)),m>>>=3,g-=3}else{for(F=C+7;g>>=C)),m>>>=7,g-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,P={bits:n.lenbits},D=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,D){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},D=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,D){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(p>=6&&h>=258){e.next_out=f,e.avail_out=h,e.next_in=d,e.avail_in=p,n.hold=m,n.bits=g,a(e,y),f=e.next_out,u=e.output,h=e.avail_out,d=e.next_in,c=e.input,p=e.avail_in,m=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(I=n.lencode[m&(1<>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>_)])>>>16&255,S=65535&I,!(_+(C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=_,g-=_,n.back+=_}if(m>>>=C,g-=C,n.back+=C,n.length=S,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(F=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(I=n.distcode[m&(1<>>16&255,S=65535&I,!((C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>_)])>>>16&255,S=65535&I,!(_+(C=I>>>24)<=g);){if(0===p)break e;p--,m+=c[d++]<>>=_,g-=_,n.back+=_}if(m>>>=C,g-=C,n.back+=C,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=S,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(F=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===h)break e;if(x=y-h,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}x>n.wnext?(x-=n.wnext,k=n.wsize-x):k=n.wnext-x,x>n.length&&(x=n.length),A=n.window}else A=u,k=f-n.offset,x=n.length;x>h&&(x=h),h-=x,n.length-=x;do{u[f++]=A[k++]}while(--x);0===n.length&&(n.mode=21);break;case 26:if(0===h)break e;u[f++]=n.length,h--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===p)break e;p--,m|=c[d++]<>>=y=w>>>24,h-=y,0===(y=w>>>16&255))S[o++]=65535&w;else{if(!(16&y)){if(0==(64&y)){w=m[(65535&w)+(p&(1<>>=y,h-=y),h<15&&(p+=E[i++]<>>=y=w>>>24,h-=y,!(16&(y=w>>>16&255))){if(0==(64&y)){w=g[(65535&w)+(p&(1<l){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=y,h-=y,k>(y=o-a)){if((y=k-y)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,C=f,0===d){if(A+=c-y,y2;)S[o++]=C[A++],S[o++]=C[A++],S[o++]=C[A++],x-=3;x&&(S[o++]=C[A++],x>1&&(S[o++]=C[A++]))}else{A=o-k;do{S[o++]=S[A++],S[o++]=S[A++],S[o++]=S[A++],x-=3}while(x>2);x&&(S[o++]=S[A++],x>1&&(S[o++]=S[A++]))}break}}break}}while(i>3,p&=(1<<(h-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i=1&&0===N[S];S--);if(_>S&&(_=S),0===S)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(E=1;E0&&(0===e||1!==S))return-1;for(O[1]=0,A=1;A<15;A++)O[A+1]=O[A]+N[A];for(C=0;C852||2===e&&D>592)return 1;for(;;){w=A-M,d[C]v?(y=L[B+d[C]],x=F[I+d[C]]):(y=96,x=0),p=1<>M)+(h-=p)]=w<<24|y<<16|x|0}while(0!==h);for(p=1<>=1;if(0!==p?(P&=p-1,P+=p):P=0,C++,0==--N[A]){if(A===S)break;A=t[n+d[C]]}if(A>_&&(P&g)!==m){for(0===M&&(M=_),b+=E,z=1<<(T=A-M);T+M852||2===e&&D>592)return 1;c[m=P&g]=_<<24|T<<16|b-u|0}}return 0!==P&&(c[b+P]=A-M<<24|64<<16|0),f.bits=_,0}},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t){openSeadragonGL=function(e){this.io={"tile-loaded":function(e){new Promise((function(t,n){e.image||n();var i=window.UPNG.decode(e.image._array);0==i.ctype&&16==i.depth?(i.data=i.data.slice(0,2*i.width*i.height),e.tile._array=i.data,e.tile._format="u16"):6==i.ctype&&8==i.depth&&(i.data=i.data.slice(0,4*i.width*i.height),e.tile._array=i.data,e.tile._format="u32"),t()})).then(e.getCompletionCallback())},"tile-drawing":function(e){var t=e.rendered.canvas.width,n=e.rendered.canvas.height,i=this.viaGL.width,r=this.viaGL.height,o=this.viaGL.loadArray(t,n,e.tile._array,e.tile._format);e.rendered.drawImage(o,0,0,i,r,0,0,t,n)}},this.defaults={"tile-loaded":function(e,t){e(t)},"tile-drawing":function(e,t){1!==t.tile.loaded&&(t.tile.loaded=1,e(t))}},this.openSD=e,this.viaGL=new ViaWebGL},openSeadragonGL.prototype={init:function(){var e=this.merger.bind(this);return this.openSD.addHandler("open",e),this},addHandler:function(e,t){e in this.defaults&&(this[e]=this.defaults[e]),"function"==typeof t&&(this[e]=t)},merger:function(e){for(var t of(this.width=this.width||this.openSD.source.getTileWidth(),this.height=this.height||this.openSD.source.getTileHeight(),this.and(this.viaGL)))this.viaGL[t]=this[t];this.viaGL.updateShape(this.width,this.height),this.viaGL.init().then(this.adder.bind(this))},adder:function(){var e=this;this.openSD.addHandler("tile-loaded",(function(t){var n=e.io["tile-loaded"].bind(e);e["tile-loaded"].call(e,n,t)})),this.openSD.addHandler("tile-drawing",(function(t){var n=e.io["tile-drawing"].bind(e);e["tile-drawing"].call(e,n,t)}));for(var t=this.openSD.world,n=0;n0?s.default.createElement("div",null,"Mask Color:",s.default.createElement(p.default,{color:_e.color,handleChange:function(e){return ce({color:e})}})):"",Le=i?"":s.default.createElement("div",{className:"ui form"},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("div",{className:"font-white"},"Mask .tif or ome.tif:"))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("input",{value:_e.path,onChange:function(e){be({path:e.target.value})},style:{width:"72%"},id:"maskpath",name:"maskpath",type:"text"}),s.default.createElement("button",{type:"button",onClick:ge,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:me,close:be,title:"Select a TIFF or OME-TIFF mask image",onFileSelected:be,filter:["tif","tiff"]}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("div",{className:"font-white"},"Mask (CellID, State) .csv:"))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-12"},s.default.createElement("input",{value:_e.map_path,onChange:function(e){xe({path:e.target.value})},style:{width:"72%"},id:"mask_map_path",name:"mask_map_path",type:"text"}),s.default.createElement("button",{type:"button",onClick:ye,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:we,close:xe,title:"Select a CSV mask cell state file",onFileSelected:xe,filter:["csv"]}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-7"},s.default.createElement("div",{className:"font-white"},"Masks:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:_e,onChange:function(e){return fe(e.value)},options:Array.from(Ee.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-5"},s.default.createElement("button",{className:"ui button compact",title:"Previous mask",onClick:function(){fe(Math.max(0,le-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",title:"Next mask",onClick:function(){fe(Math.min(le+1,Ee.size-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete mask",onClick:pe},"X"))),s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-4"},Oe),s.default.createElement("div",{className:"col-4",style:{textAlign:"right",paddingRight:0}},"Mask Name:"),s.default.createElement("div",{className:"col-4"},s.default.createElement("input",{value:_e.name,onChange:function(e){return ce({name:e.target.value})},style:{width:"100%"},id:"maskname",name:"maskname",type:"text"}))),s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-12"},Ne))),Be="";if(R.id>=0){var Re=s.default.createElement("div",null,s.default.createElement("input",{value:R.data,onChange:function(e){return H(R,e.target.value)},style:{width:"72%"},id:"visdatapath",name:"visdatapath",type:"text"}),s.default.createElement("button",{type:"button",onClick:N,className:"ui button"},"Browse"),s.default.createElement(m.default,{open:I,close:O,title:"Select a csv file",onFileSelected:O,filter:["csv"]}));if([0,1].includes(R.id)){var He="";Pe&&(He=s.default.createElement("div",{className:"row font-white"},s.default.createElement("div",{className:"col-4"},"Cluster Color:",s.default.createElement(p.default,{color:Pe.color,handleChange:function(e){return H(R,null,null,null,null,new Map([[Pe.id,{name:Pe.name,color:e}]]))}})),s.default.createElement("div",{className:"col-8"},"Cluster Name:",s.default.createElement("input",{value:Pe.name,onChange:function(e){return H(R,null,null,null,null,new Map([[Pe.id,{name:e.target.value,color:Pe.color}]]))},style:{width:"50%"},id:"clustername",name:"clustername",type:"text"})))),Be=s.default.createElement("div",null,s.default.createElement("div",null,Re,s.default.createElement("div",{className:"font-white"},"X Axis:",s.default.createElement("input",{value:R.x,onChange:function(e){return H(R,null,e.target.value)},style:{width:"25%",marginRight:"2em"},id:"visxaxis",name:"visxaxis",type:"text"}),"Y Axis:",s.default.createElement("input",{value:R.y,onChange:function(e){return H(R,null,null,e.target.value)},style:{width:"25%"},id:"visyaxis",name:"visyaxis",type:"text"}))),s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-5"},s.default.createElement("div",{className:"font-white"},"Clusters:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:Pe,onChange:function(e){return z(e.value)},options:Array.from(De.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-7"},s.default.createElement("button",{className:"ui button compact",title:"Previous cluster",onClick:function(){z(Math.max(0,R.cluster-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",onClick:D,title:"Add cluster"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faPlus})),s.default.createElement("button",{className:"ui button compact",title:"Next cluster",onClick:function(){z(R.cluster+1)}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete cluster",onClick:P},"X"))),He)}else if(2==R.id){var je=[{value:!1,id:0,label:"False"},{value:!0,id:1,label:"True"}],Ve=je[R.colormapInvert?1:0];Be=s.default.createElement("div",null,Re,s.default.createElement("div",{className:"font-white"},"Invert colormap:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{value:Ve,onChange:function(e){return H(R,null,null,null,e.value)},options:je})))}else Be=s.default.createElement("div",null,Re)}var Ue,We,Ge,Ye="",qe="";if(!i){var Xe=Array.from(Ee.values()),Qe=Array.from(Se.values()),Ze=Xe.filter((function(e){return e.map_ids.length>0})),Ke=Qe.filter((function(e){return e.map_ids.length>0})),Je=s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){d(!1)}},"Masks:"),$e=Ze.reduce((function(e,t){return e.includes(t.map_state)?e:e.concat([t.map_state])}),[]),et=Ke.reduce((function(e,t){return void 0===e||e===t.map_state?t.map_state:""}),void 0),tt=function(e){var t=$e[e]||"",n=Ze.filter((function(e){return e.map_state==t}));return $e.length<2?{ideal_group_masks:n}:{ideal_map_state:t,ideal_group_masks:n}},nt=$e.findIndex((function(e){return e===et})),it=(Ue=nt,We=0==Ke.length?0:Ue,(Ge=tt(We)).ideal_group_masks.length==Ke.length?$e.length<2?{ideal_group_masks:[]}:tt((We+1)%$e.length):Ge),rt=it.ideal_map_state,ot=it.ideal_group_masks,at=rt?" ("+rt+")":"";ot.length>0?Je=s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-6 font-white"},Je," "),s.default.createElement("div",{className:"col-6 font-white",style:{textAlign:"right"}},s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){T(ot)}}," Show all states",at))):Ke.length>0&&(Je=s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-6 font-white"},Je),s.default.createElement("div",{className:"col-6 font-white",style:{textAlign:"right"}},s.default.createElement("a",{href:null,style:{textDecoration:"underline",cursor:"pointer",color:"#4fbcff"},onClick:function(){T([])}},"Clear")))),Ye=n?"":s.default.createElement("div",null,Je,s.default.createElement("div",{className:"width-100"},s.default.createElement(y,{getHelperDimensions:function(e){return e.node.getBoundingClientRect()},onSortEnd:_,useDragHandle:!0,axis:"xy",isMulti:!0,styles:E,onChange:T,value:Qe,options:Xe,components:{MultiValue:x,MultiValueLabel:k}}),"/>")),qe=s.default.createElement("div",null,s.default.createElement("div",{className:"font-white"},"Visualization:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{onChange:function(e){return H(e)},value:R,options:Array.from(B.values())}),Be))}if(Y||n)return s.default.createElement("div",{className:"ui form"},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col no-right-padding"},s.default.createElement("div",{className:""},s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col-5"},s.default.createElement("div",{className:"font-white"},"Waypoints:"),s.default.createElement("div",{className:"width-100"},s.default.createElement(c.default,{onChange:C,value:Ie,options:Array.from(Fe.values())}))),s.default.createElement("div",{className:"pt-2 pl-0 col-7"},s.default.createElement("button",{className:"ui button compact",title:"Previous waypoint",onClick:function(){$(Math.max(0,A-1))}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowLeft})),s.default.createElement("button",{className:"ui button compact",onClick:X,title:"Add waypoint"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faPlus})),s.default.createElement("button",{className:"ui button compact",title:"Next waypoint",onClick:function(){$(A+1)}},s.default.createElement(g.FontAwesomeIcon,{icon:b.faArrowRight})),s.default.createElement("button",{className:"ui button red compact",title:"Delete waypoint",onClick:J},"X")))),s.default.createElement("input",{className:"width-100",type:"text",placeholder:"Waypoint Name",value:U,onChange:Q}),s.default.createElement("textarea",{className:"width-100 height-20vh",placeholder:"Waypoint Description",value:G,onChange:Z}),Ye,qe),s.default.createElement("div",{className:"col-1 p-0"},s.default.createElement("div",{className:"btn-group-vertical"},s.default.createElement("span",{id:"arrow-switch",className:"nav-item arrow-switch"},s.default.createElement("a",{className:"btn",onClick:ie,title:"Add arrow"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faLocationArrow,color:"arrow"==oe?"blue":"white"}))),s.default.createElement("span",{id:"draw-switch",className:"nav-item draw-switch"},s.default.createElement("a",{className:"btn",onClick:re,title:"Add rectangle"},s.default.createElement(g.FontAwesomeIcon,{icon:b.faCrosshairs,color:"box"==oe?"blue":"white"})))))),s.default.createElement(f.default,{deleteOverlay:l,deleteArrow:u,addArrowText:t,overlays:ee,arrows:te}));var st=this.props,lt=st.handleSelect,ct=st.handleChange,ut=this.props,dt=ut.activeChanLabel,ft=ut.chanLabel,pt=this.props.activeChannels,ht=this.props.handleSortChannels;return s.default.createElement("div",{className:"row"},s.default.createElement("div",{className:"col"},s.default.createElement(y,{getHelperDimensions:function(e){return e.node.getBoundingClientRect()},onSortEnd:ht,useDragHandle:!0,axis:"xy",isMulti:!0,onChange:lt,value:Array.from(dt.values()),options:Array.from(ft.values()),components:{MultiValue:x,MultiValueLabel:k}}),s.default.createElement("div",null,s.default.createElement(h.default,{className:"ChannelControls",channels:pt,handleChange:ct})),Le))}}]),t}(a.Component);t.default=S},function(e,t,n){"use strict";n.r(t),n.d(t,"NonceProvider",(function(){return d}));var i=n(0),r=n.n(i),o=n(143),a=n(16),s=(n(48),n(5),n(24));n.d(t,"components",(function(){return s.z}));var l=n(101);n.d(t,"createFilter",(function(){return l.c})),n.d(t,"defaultTheme",(function(){return l.b})),n.d(t,"mergeStyles",(function(){return l.d}));n(82),n(223);var c=n(231),u=n(235);var d=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).createEmotionCache=function(e){return Object(u.a)({nonce:e})},n.createEmotionCache=Object(o.a)(n.createEmotionCache),n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this.createEmotionCache(this.props.nonce);return r.a.createElement(a.CacheProvider,{value:e},this.props.children)},i}(i.Component),f=Object(c.a)(l.a);t.default=f},function(e,t,n){ /** * chroma.js - JavaScript library for color conversions * diff --git a/static/index.html b/static/index.html index 2645c68..75ee786 100644 --- a/static/index.html +++ b/static/index.html @@ -1 +1 @@ -Minerva Author
\ No newline at end of file +Minerva Author
\ No newline at end of file