From 783084c6f4968354d3938cd5626fb56b6111ef19 Mon Sep 17 00:00:00 2001 From: t11r Date: Thu, 16 Jan 2025 18:05:21 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tify-iii?= =?UTF-8?q?f-viewer/tify@851cf340002851c01bb23144e82ee76adf73dbcb=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 205/index.html | 220 +++++++++++++++++++++++++++++++++++++++ 205/tify.DDW8MAeX.ico | Bin 0 -> 1150 bytes 205/tify.Dkivg9DL.js | 23 ++++ 205/tify.DswYTg7Y.css | 1 + 205/translations/de.json | 71 +++++++++++++ 205/translations/eo.json | 64 ++++++++++++ 205/translations/fr.json | 67 ++++++++++++ 205/translations/hr.json | 69 ++++++++++++ 205/translations/it.json | 55 ++++++++++ 205/translations/nl.json | 71 +++++++++++++ 205/translations/pl.json | 55 ++++++++++ 11 files changed, 696 insertions(+) create mode 100644 205/index.html create mode 100644 205/tify.DDW8MAeX.ico create mode 100644 205/tify.Dkivg9DL.js create mode 100644 205/tify.DswYTg7Y.css create mode 100644 205/translations/de.json create mode 100644 205/translations/eo.json create mode 100644 205/translations/fr.json create mode 100644 205/translations/hr.json create mode 100644 205/translations/it.json create mode 100644 205/translations/nl.json create mode 100644 205/translations/pl.json diff --git a/205/index.html b/205/index.html new file mode 100644 index 00000000..7f26c29f --- /dev/null +++ b/205/index.html @@ -0,0 +1,220 @@ + + + + + + + + TIFY + + + + + + +
+
+ + + +
+
+
+
+
+ +
+
+
+
+ + + diff --git a/205/tify.DDW8MAeX.ico b/205/tify.DDW8MAeX.ico new file mode 100644 index 0000000000000000000000000000000000000000..82b5ed34eeaeacf2508d1ae39b587d126468f2a9 GIT binary patch literal 1150 zcmZQzU<5(|0R|wcz>vYhz#zuJz@P!dKp~(AL>x#lFaYHa^Fc6}4cLR{GUXC z?q(9TWB3`HewZEj{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function e(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=e(s);fetch(s.href,r)}})();/** +* @vue/shared v3.4.27 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function sn(t,n){const e=new Set(t.split(","));return n?i=>e.has(i.toLowerCase()):i=>e.has(i)}const _e={},At=[],Ve=()=>{},Wr=()=>!1,yi=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),rn=t=>t.startsWith("onUpdate:"),Re=Object.assign,on=(t,n)=>{const e=t.indexOf(n);e>-1&&t.splice(e,1)},Gr=Object.prototype.hasOwnProperty,ge=(t,n)=>Gr.call(t,n),ce=Array.isArray,kt=t=>wi(t)==="[object Map]",ys=t=>wi(t)==="[object Set]",de=t=>typeof t=="function",Se=t=>typeof t=="string",Rt=t=>typeof t=="symbol",xe=t=>t!==null&&typeof t=="object",ws=t=>(xe(t)||de(t))&&de(t.then)&&de(t.catch),_s=Object.prototype.toString,wi=t=>_s.call(t),qr=t=>wi(t).slice(8,-1),Ts=t=>wi(t)==="[object Object]",an=t=>Se(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ut=sn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_i=t=>{const n=Object.create(null);return e=>n[e]||(n[e]=t(e))},Zr=/-(\w)/g,Ye=_i(t=>t.replace(Zr,(n,e)=>e?e.toUpperCase():"")),Kr=/\B([A-Z])/g,Lt=_i(t=>t.replace(Kr,"-$1").toLowerCase()),Ti=_i(t=>t.charAt(0).toUpperCase()+t.slice(1)),Hi=_i(t=>t?`on${Ti(t)}`:""),dt=(t,n)=>!Object.is(t,n),ri=(t,n)=>{for(let e=0;e{Object.defineProperty(t,n,{configurable:!0,enumerable:!1,writable:i,value:e})},Ni=t=>{const n=parseFloat(t);return isNaN(n)?t:n};let Mn;const bs=()=>Mn||(Mn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ln(t){if(ce(t)){const n={};for(let e=0;e{if(e){const i=e.split(Yr);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function Te(t){let n="";if(Se(t))n=t;else if(ce(t))for(let e=0;eSe(t)?t:t==null?"":ce(t)||xe(t)&&(t.toString===_s||!de(t.toString))?JSON.stringify(t,Es,2):String(t),Es=(t,n)=>n&&n.__v_isRef?Es(t,n.value):kt(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((e,[i,s],r)=>(e[Oi(i,r)+" =>"]=s,e),{})}:ys(n)?{[`Set(${n.size})`]:[...n.values()].map(e=>Oi(e))}:Rt(n)?Oi(n):xe(n)&&!ce(n)&&!Ts(n)?String(n):n,Oi=(t,n="")=>{var e;return Rt(t)?`Symbol(${(e=t.description)!=null?e:n})`:t};/** +* @vue/reactivity v3.4.27 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let je;class to{constructor(n=!1){this.detached=n,this._active=!0,this.effects=[],this.cleanups=[],this.parent=je,!n&&je&&(this.index=(je.scopes||(je.scopes=[])).push(this)-1)}get active(){return this._active}run(n){if(this._active){const e=je;try{return je=this,n()}finally{je=e}}}on(){je=this}off(){je=this.parent}stop(n){if(this._active){let e,i;for(e=0,i=this.effects.length;e=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),gt()}return this._dirtyLevel>=4}set dirty(n){this._dirtyLevel=n?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let n=ht,e=Et;try{return ht=!0,Et=this,this._runnings++,Dn(this),this.fn()}finally{An(this),this._runnings--,Et=e,ht=n}}stop(){this.active&&(Dn(this),An(this),this.onStop&&this.onStop(),this.active=!1)}}function so(t){return t.value}function Dn(t){t._trackId++,t._depsLength=0}function An(t){if(t.deps.length>t._depsLength){for(let n=t._depsLength;n{const e=new Map;return e.cleanup=t,e.computed=n,e},ji=new WeakMap,Pt=Symbol(""),Wi=Symbol("");function ze(t,n,e){if(ht&&Et){let i=ji.get(t);i||ji.set(t,i=new Map);let s=i.get(e);s||i.set(e,s=Hs(()=>i.delete(e))),Rs(Et,s)}}function et(t,n,e,i,s,r){const o=ji.get(t);if(!o)return;let l=[];if(n==="clear")l=[...o.values()];else if(e==="length"&&ce(t)){const a=Number(i);o.forEach((c,h)=>{(h==="length"||!Rt(h)&&h>=a)&&l.push(c)})}else switch(e!==void 0&&l.push(o.get(e)),n){case"add":ce(t)?an(e)&&l.push(o.get("length")):(l.push(o.get(Pt)),kt(t)&&l.push(o.get(Wi)));break;case"delete":ce(t)||(l.push(o.get(Pt)),kt(t)&&l.push(o.get(Wi)));break;case"set":kt(t)&&l.push(o.get(Pt));break}un();for(const a of l)a&&Ls(a,4);hn()}const ro=sn("__proto__,__v_isRef,__isVue"),Os=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Rt)),kn=oo();function oo(){const t={};return["includes","indexOf","lastIndexOf"].forEach(n=>{t[n]=function(...e){const i=ye(this);for(let r=0,o=this.length;r{t[n]=function(...e){pt(),un();const i=ye(this)[n].apply(this,e);return hn(),gt(),i}}),t}function ao(t){Rt(t)||(t=String(t));const n=ye(this);return ze(n,"has",t),n.hasOwnProperty(t)}class Ms{constructor(n=!1,e=!1){this._isReadonly=n,this._isShallow=e}get(n,e,i){const s=this._isReadonly,r=this._isShallow;if(e==="__v_isReactive")return!s;if(e==="__v_isReadonly")return s;if(e==="__v_isShallow")return r;if(e==="__v_raw")return i===(s?r?To:Fs:r?ks:As).get(n)||Object.getPrototypeOf(n)===Object.getPrototypeOf(i)?n:void 0;const o=ce(n);if(!s){if(o&&ge(kn,e))return Reflect.get(kn,e,i);if(e==="hasOwnProperty")return ao}const l=Reflect.get(n,e,i);return(Rt(e)?Os.has(e):ro(e))||(s||ze(n,"get",e),r)?l:Ne(l)?o&&an(e)?l:l.value:xe(l)?s?Is(l):bi(l):l}}class Ds extends Ms{constructor(n=!1){super(!1,n)}set(n,e,i,s){let r=n[e];if(!this._isShallow){const a=Zt(r);if(!hi(i)&&!Zt(i)&&(r=ye(r),i=ye(i)),!ce(n)&&Ne(r)&&!Ne(i))return a?!1:(r.value=i,!0)}const o=ce(n)&&an(e)?Number(e)t,xi=t=>Reflect.getPrototypeOf(t);function $t(t,n,e=!1,i=!1){t=t.__v_raw;const s=ye(t),r=ye(n);e||(dt(n,r)&&ze(s,"get",n),ze(s,"get",r));const{has:o}=xi(s),l=i?fn:e?gn:Kt;if(o.call(s,n))return l(t.get(n));if(o.call(s,r))return l(t.get(r));t!==s&&t.get(n)}function ei(t,n=!1){const e=this.__v_raw,i=ye(e),s=ye(t);return n||(dt(t,s)&&ze(i,"has",t),ze(i,"has",s)),t===s?e.has(t):e.has(t)||e.has(s)}function ti(t,n=!1){return t=t.__v_raw,!n&&ze(ye(t),"iterate",Pt),Reflect.get(t,"size",t)}function Fn(t){t=ye(t);const n=ye(this);return xi(n).has.call(n,t)||(n.add(t),et(n,"add",t,t)),this}function In(t,n){n=ye(n);const e=ye(this),{has:i,get:s}=xi(e);let r=i.call(e,t);r||(t=ye(t),r=i.call(e,t));const o=s.call(e,t);return e.set(t,n),r?dt(n,o)&&et(e,"set",t,n):et(e,"add",t,n),this}function Bn(t){const n=ye(this),{has:e,get:i}=xi(n);let s=e.call(n,t);s||(t=ye(t),s=e.call(n,t)),i&&i.call(n,t);const r=n.delete(t);return s&&et(n,"delete",t,void 0),r}function zn(){const t=ye(this),n=t.size!==0,e=t.clear();return n&&et(t,"clear",void 0,void 0),e}function ii(t,n){return function(i,s){const r=this,o=r.__v_raw,l=ye(o),a=n?fn:t?gn:Kt;return!t&&ze(l,"iterate",Pt),o.forEach((c,h)=>i.call(s,a(c),a(h),r))}}function ni(t,n,e){return function(...i){const s=this.__v_raw,r=ye(s),o=kt(r),l=t==="entries"||t===Symbol.iterator&&o,a=t==="keys"&&o,c=s[t](...i),h=e?fn:n?gn:Kt;return!n&&ze(r,"iterate",a?Wi:Pt),{next(){const{value:p,done:m}=c.next();return m?{value:p,done:m}:{value:l?[h(p[0]),h(p[1])]:h(p),done:m}},[Symbol.iterator](){return this}}}}function at(t){return function(...n){return t==="delete"?!1:t==="clear"?void 0:this}}function fo(){const t={get(r){return $t(this,r)},get size(){return ti(this)},has:ei,add:Fn,set:In,delete:Bn,clear:zn,forEach:ii(!1,!1)},n={get(r){return $t(this,r,!1,!0)},get size(){return ti(this)},has:ei,add:Fn,set:In,delete:Bn,clear:zn,forEach:ii(!1,!0)},e={get(r){return $t(this,r,!0)},get size(){return ti(this,!0)},has(r){return ei.call(this,r,!0)},add:at("add"),set:at("set"),delete:at("delete"),clear:at("clear"),forEach:ii(!0,!1)},i={get(r){return $t(this,r,!0,!0)},get size(){return ti(this,!0)},has(r){return ei.call(this,r,!0)},add:at("add"),set:at("set"),delete:at("delete"),clear:at("clear"),forEach:ii(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=ni(r,!1,!1),e[r]=ni(r,!0,!1),n[r]=ni(r,!1,!0),i[r]=ni(r,!0,!0)}),[t,e,n,i]}const[po,go,mo,vo]=fo();function dn(t,n){const e=n?t?vo:mo:t?go:po;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(ge(e,s)&&s in i?e:i,s,r)}const yo={get:dn(!1,!1)},wo={get:dn(!1,!0)},_o={get:dn(!0,!1)};const As=new WeakMap,ks=new WeakMap,Fs=new WeakMap,To=new WeakMap;function xo(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bo(t){return t.__v_skip||!Object.isExtensible(t)?0:xo(qr(t))}function bi(t){return Zt(t)?t:pn(t,!1,co,yo,As)}function So(t){return pn(t,!1,ho,wo,ks)}function Is(t){return pn(t,!0,uo,_o,Fs)}function pn(t,n,e,i,s){if(!xe(t)||t.__v_raw&&!(n&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=bo(t);if(o===0)return t;const l=new Proxy(t,o===2?i:e);return s.set(t,l),l}function jt(t){return Zt(t)?jt(t.__v_raw):!!(t&&t.__v_isReactive)}function Zt(t){return!!(t&&t.__v_isReadonly)}function hi(t){return!!(t&&t.__v_isShallow)}function Bs(t){return t?!!t.__v_raw:!1}function ye(t){const n=t&&t.__v_raw;return n?ye(n):t}function Eo(t){return Object.isExtensible(t)&&xs(t,"__v_skip",!0),t}const Kt=t=>xe(t)?bi(t):t,gn=t=>xe(t)?Is(t):t;class zs{constructor(n,e,i,s){this.getter=n,this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new cn(()=>n(this._value),()=>oi(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=i}get value(){const n=ye(this);return(!n._cacheable||n.effect.dirty)&&dt(n._value,n._value=n.effect.run())&&oi(n,4),Ns(n),n.effect._dirtyLevel>=2&&oi(n,2),n._value}set value(n){this._setter(n)}get _dirty(){return this.effect.dirty}set _dirty(n){this.effect.dirty=n}}function Po(t,n,e=!1){let i,s;const r=de(t);return r?(i=t,s=Ve):(i=t.get,s=t.set),new zs(i,s,r||!s,e)}function Ns(t){var n;ht&&Et&&(t=ye(t),Rs(Et,(n=t.dep)!=null?n:t.dep=Hs(()=>t.dep=void 0,t instanceof zs?t:void 0)))}function oi(t,n=4,e){t=ye(t);const i=t.dep;i&&Ls(i,n)}function Ne(t){return!!(t&&t.__v_isRef===!0)}function Co(t){return Ro(t,!1)}function Ro(t,n){return Ne(t)?t:new Lo(t,n)}class Lo{constructor(n,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?n:ye(n),this._value=e?n:Kt(n)}get value(){return Ns(this),this._value}set value(n){const e=this.__v_isShallow||hi(n)||Zt(n);n=e?n:ye(n),dt(n,this._rawValue)&&(this._rawValue=n,this._value=e?n:Kt(n),oi(this,4))}}function Ho(t){return Ne(t)?t.value:t}const Oo={get:(t,n,e)=>Ho(Reflect.get(t,n,e)),set:(t,n,e,i)=>{const s=t[n];return Ne(s)&&!Ne(e)?(s.value=e,!0):Reflect.set(t,n,e,i)}};function Vs(t){return jt(t)?t:new Proxy(t,Oo)}/** +* @vue/runtime-core v3.4.27 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ft(t,n,e,i){try{return i?t(...i):t()}catch(s){Si(s,n,e)}}function Ge(t,n,e,i){if(de(t)){const s=ft(t,n,e,i);return s&&ws(s)&&s.catch(r=>{Si(r,n,e)}),s}if(ce(t)){const s=[];for(let r=0;r>>1,s=He[i],r=Yt(s);rXe&&He.splice(n,1)}function ko(t){ce(t)?Ft.push(...t):(!lt||!lt.includes(t,t.allowRecurse?Tt+1:Tt))&&Ft.push(t),Ws()}function Nn(t,n,e=Xt?Xe+1:0){for(;eYt(e)-Yt(i));if(Ft.length=0,lt){lt.push(...n);return}for(lt=n,Tt=0;Ttt.id==null?1/0:t.id,Fo=(t,n)=>{const e=Yt(t)-Yt(n);if(e===0){if(t.pre&&!n.pre)return-1;if(n.pre&&!t.pre)return 1}return e};function qs(t){Gi=!1,Xt=!0,He.sort(Fo);try{for(Xe=0;XeSe(T)?T.trim():T)),p&&(s=e.map(Ni))}let l,a=i[l=Hi(n)]||i[l=Hi(Ye(n))];!a&&r&&(a=i[l=Hi(Lt(n))]),a&&Ge(a,t,6,s);const c=i[l+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Ge(c,t,6,s)}}function Zs(t,n,e=!1){const i=n.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},l=!1;if(!de(t)){const a=c=>{const h=Zs(c,n,!0);h&&(l=!0,Re(o,h))};!e&&n.mixins.length&&n.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}return!r&&!l?(xe(t)&&i.set(t,null),null):(ce(r)?r.forEach(a=>o[a]=null):Re(o,r),xe(t)&&i.set(t,o),o)}function Ei(t,n){return!t||!yi(n)?!1:(n=n.slice(2).replace(/Once$/,""),ge(t,n[0].toLowerCase()+n.slice(1))||ge(t,Lt(n))||ge(t,n))}let Ie=null,Ks=null;function fi(t){const n=Ie;return Ie=t,Ks=t&&t.type.__scopeId||null,n}function Bo(t,n=Ie,e){if(!n||t._n)return t;const i=(...s)=>{i._d&&Jn(-1);const r=fi(n);let o;try{o=t(...s)}finally{fi(r),i._d&&Jn(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function Mi(t){const{type:n,vnode:e,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:l,emit:a,render:c,renderCache:h,props:p,data:m,setupState:T,ctx:x,inheritAttrs:E}=t,R=fi(t);let M,f;try{if(e.shapeFlag&4){const H=s||i,L=H;M=Ke(c.call(L,H,h,p,T,m,x)),f=l}else{const H=n;M=Ke(H.length>1?H(p,{attrs:l,slots:o,emit:a}):H(p,null)),f=n.props?l:zo(l)}}catch(H){qt.length=0,Si(H,t,1),M=ie(Ct)}let _=M;if(f&&E!==!1){const H=Object.keys(f),{shapeFlag:L}=_;H.length&&L&7&&(r&&H.some(rn)&&(f=No(f,r)),_=It(_,f,!1,!0))}return e.dirs&&(_=It(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(e.dirs):e.dirs),e.transition&&(_.transition=e.transition),M=_,fi(R),M}const zo=t=>{let n;for(const e in t)(e==="class"||e==="style"||yi(e))&&((n||(n={}))[e]=t[e]);return n},No=(t,n)=>{const e={};for(const i in t)(!rn(i)||!(i.slice(9)in n))&&(e[i]=t[i]);return e};function Vo(t,n,e){const{props:i,children:s,component:r}=t,{props:o,children:l,patchFlag:a}=n,c=r.emitsOptions;if(n.dirs||n.transition)return!0;if(e&&a>=0){if(a&1024)return!0;if(a&16)return i?Vn(i,o,c):!!o;if(a&8){const h=n.dynamicProps;for(let p=0;pt.__isSuspense;function qo(t,n){n&&n.pendingBranch?ce(t)?n.effects.push(...t):n.effects.push(t):ko(t)}const Zo=Symbol.for("v-scx"),Ko=()=>li(Zo),si={};function Di(t,n,e){return Qs(t,n,e)}function Qs(t,n,{immediate:e,deep:i,flush:s,once:r,onTrack:o,onTrigger:l}=_e){if(n&&r){const O=n;n=(...N)=>{O(...N),L()}}const a=Oe,c=O=>i===!0?O:xt(O,i===!1?1:void 0);let h,p=!1,m=!1;if(Ne(t)?(h=()=>t.value,p=hi(t)):jt(t)?(h=()=>c(t),p=!0):ce(t)?(m=!0,p=t.some(O=>jt(O)||hi(O)),h=()=>t.map(O=>{if(Ne(O))return O.value;if(jt(O))return c(O);if(de(O))return ft(O,a,2)})):de(t)?n?h=()=>ft(t,a,2):h=()=>(T&&T(),Ge(t,a,3,[x])):h=Ve,n&&i){const O=h;h=()=>xt(O())}let T,x=O=>{T=_.onStop=()=>{ft(O,a,4),T=_.onStop=void 0}},E;if(Ri)if(x=Ve,n?e&&Ge(n,a,3,[h(),m?[]:void 0,x]):h(),s==="sync"){const O=Ko();E=O.__watcherHandles||(O.__watcherHandles=[])}else return Ve;let R=m?new Array(t.length).fill(si):si;const M=()=>{if(!(!_.active||!_.dirty))if(n){const O=_.run();(i||p||(m?O.some((N,G)=>dt(N,R[G])):dt(O,R)))&&(T&&T(),Ge(n,a,3,[O,R===si?void 0:m&&R[0]===si?[]:R,x]),R=O)}else _.run()};M.allowRecurse=!!n;let f;s==="sync"?f=M:s==="post"?f=()=>Fe(M,a&&a.suspense):(M.pre=!0,a&&(M.id=a.uid),f=()=>vn(M));const _=new cn(h,Ve,f),H=no(),L=()=>{_.stop(),H&&on(H.effects,_)};return n?e?M():R=_.run():s==="post"?Fe(_.run.bind(_),a&&a.suspense):_.run(),E&&E.push(L),L}function Xo(t,n,e){const i=this.proxy,s=Se(t)?t.includes(".")?$s(i,t):()=>i[t]:t.bind(i,i);let r;de(n)?r=n:(r=n.handler,e=n);const o=Qt(this),l=Qs(s,r.bind(i),e);return o(),l}function $s(t,n){const e=n.split(".");return()=>{let i=t;for(let s=0;s{xt(i,n,e)});else if(Ts(t))for(const i in t)xt(t[i],n,e);return t}function De(t,n){if(Ie===null)return t;const e=Li(Ie)||Ie.proxy,i=t.dirs||(t.dirs=[]);for(let s=0;s!!t.type.__asyncLoader,er=t=>t.type.__isKeepAlive;function Yo(t,n){tr(t,"a",n)}function Jo(t,n){tr(t,"da",n)}function tr(t,n,e=Oe){const i=t.__wdc||(t.__wdc=()=>{let s=e;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Pi(n,i,e),e){let s=e.parent;for(;s&&s.parent;)er(s.parent.vnode)&&Qo(i,n,e,s),s=s.parent}}function Qo(t,n,e,i){const s=Pi(n,t,i,!0);ir(()=>{on(i[n],s)},e)}function Pi(t,n,e=Oe,i=!1){if(e){const s=e[t]||(e[t]=[]),r=n.__weh||(n.__weh=(...o)=>{if(e.isUnmounted)return;pt();const l=Qt(e),a=Ge(n,e,t,o);return l(),gt(),a});return i?s.unshift(r):s.push(r),r}}const tt=t=>(n,e=Oe)=>(!Ri||t==="sp")&&Pi(t,(...i)=>n(...i),e),$o=tt("bm"),ea=tt("m"),ta=tt("bu"),ia=tt("u"),na=tt("bum"),ir=tt("um"),sa=tt("sp"),ra=tt("rtg"),oa=tt("rtc");function aa(t,n=Oe){Pi("ec",t,n)}function Be(t,n,e,i){let s;const r=e&&e[i];if(ce(t)||Se(t)){s=new Array(t.length);for(let o=0,l=t.length;on(o,l,void 0,r&&r[l]));else{const o=Object.keys(t);s=new Array(o.length);for(let l=0,a=o.length;lt?vr(t)?Li(t)||t.proxy:qi(t.parent):null,Wt=Re(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>qi(t.parent),$root:t=>qi(t.root),$emit:t=>t.emit,$options:t=>wn(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,vn(t.update)}),$nextTick:t=>t.n||(t.n=js.bind(t.proxy)),$watch:t=>Xo.bind(t)}),Ai=(t,n)=>t!==_e&&!t.__isScriptSetup&&ge(t,n),la={get({_:t},n){if(n==="__v_skip")return!0;const{ctx:e,setupState:i,data:s,props:r,accessCache:o,type:l,appContext:a}=t;let c;if(n[0]!=="$"){const T=o[n];if(T!==void 0)switch(T){case 1:return i[n];case 2:return s[n];case 4:return e[n];case 3:return r[n]}else{if(Ai(i,n))return o[n]=1,i[n];if(s!==_e&&ge(s,n))return o[n]=2,s[n];if((c=t.propsOptions[0])&&ge(c,n))return o[n]=3,r[n];if(e!==_e&&ge(e,n))return o[n]=4,e[n];Zi&&(o[n]=0)}}const h=Wt[n];let p,m;if(h)return n==="$attrs"&&ze(t.attrs,"get",""),h(t);if((p=l.__cssModules)&&(p=p[n]))return p;if(e!==_e&&ge(e,n))return o[n]=4,e[n];if(m=a.config.globalProperties,ge(m,n))return m[n]},set({_:t},n,e){const{data:i,setupState:s,ctx:r}=t;return Ai(s,n)?(s[n]=e,!0):i!==_e&&ge(i,n)?(i[n]=e,!0):ge(t.props,n)||n[0]==="$"&&n.slice(1)in t?!1:(r[n]=e,!0)},has({_:{data:t,setupState:n,accessCache:e,ctx:i,appContext:s,propsOptions:r}},o){let l;return!!e[o]||t!==_e&&ge(t,o)||Ai(n,o)||(l=r[0])&&ge(l,o)||ge(i,o)||ge(Wt,o)||ge(s.config.globalProperties,o)},defineProperty(t,n,e){return e.get!=null?t._.accessCache[n]=0:ge(e,"value")&&this.set(t,n,e.value,null),Reflect.defineProperty(t,n,e)}};function jn(t){return ce(t)?t.reduce((n,e)=>(n[e]=null,n),{}):t}let Zi=!0;function ca(t){const n=wn(t),e=t.proxy,i=t.ctx;Zi=!1,n.beforeCreate&&Wn(n.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:l,provide:a,inject:c,created:h,beforeMount:p,mounted:m,beforeUpdate:T,updated:x,activated:E,deactivated:R,beforeDestroy:M,beforeUnmount:f,destroyed:_,unmounted:H,render:L,renderTracked:O,renderTriggered:N,errorCaptured:G,serverPrefetch:q,expose:$,inheritAttrs:re,components:J,directives:fe,filters:ue}=n;if(c&&ua(c,i,null),o)for(const oe in o){const ee=o[oe];de(ee)&&(i[oe]=ee.bind(e))}if(s){const oe=s.call(e,e);xe(oe)&&(t.data=bi(oe))}if(Zi=!0,r)for(const oe in r){const ee=r[oe],we=de(ee)?ee.bind(e,e):de(ee.get)?ee.get.bind(e,e):Ve,Y=!de(ee)&&de(ee.set)?ee.set.bind(e):Ve,Ee=$e({get:we,set:Y});Object.defineProperty(i,oe,{enumerable:!0,configurable:!0,get:()=>Ee.value,set:Ae=>Ee.value=Ae})}if(l)for(const oe in l)nr(l[oe],i,e,oe);if(a){const oe=de(a)?a.call(e):a;Reflect.ownKeys(oe).forEach(ee=>{ma(ee,oe[ee])})}h&&Wn(h,t,"c");function le(oe,ee){ce(ee)?ee.forEach(we=>oe(we.bind(e))):ee&&oe(ee.bind(e))}if(le($o,p),le(ea,m),le(ta,T),le(ia,x),le(Yo,E),le(Jo,R),le(aa,G),le(oa,O),le(ra,N),le(na,f),le(ir,H),le(sa,q),ce($))if($.length){const oe=t.exposed||(t.exposed={});$.forEach(ee=>{Object.defineProperty(oe,ee,{get:()=>e[ee],set:we=>e[ee]=we})})}else t.exposed||(t.exposed={});L&&t.render===Ve&&(t.render=L),re!=null&&(t.inheritAttrs=re),J&&(t.components=J),fe&&(t.directives=fe)}function ua(t,n,e=Ve){ce(t)&&(t=Ki(t));for(const i in t){const s=t[i];let r;xe(s)?"default"in s?r=li(s.from||i,s.default,!0):r=li(s.from||i):r=li(s),Ne(r)?Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):n[i]=r}}function Wn(t,n,e){Ge(ce(t)?t.map(i=>i.bind(n.proxy)):t.bind(n.proxy),n,e)}function nr(t,n,e,i){const s=i.includes(".")?$s(e,i):()=>e[i];if(Se(t)){const r=n[t];de(r)&&Di(s,r)}else if(de(t))Di(s,t.bind(e));else if(xe(t))if(ce(t))t.forEach(r=>nr(r,n,e,i));else{const r=de(t.handler)?t.handler.bind(e):n[t.handler];de(r)&&Di(s,r,t)}}function wn(t){const n=t.type,{mixins:e,extends:i}=n,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,l=r.get(n);let a;return l?a=l:!s.length&&!e&&!i?a=n:(a={},s.length&&s.forEach(c=>di(a,c,o,!0)),di(a,n,o)),xe(n)&&r.set(n,a),a}function di(t,n,e,i=!1){const{mixins:s,extends:r}=n;r&&di(t,r,e,!0),s&&s.forEach(o=>di(t,o,e,!0));for(const o in n)if(!(i&&o==="expose")){const l=ha[o]||e&&e[o];t[o]=l?l(t[o],n[o]):n[o]}return t}const ha={data:Gn,props:qn,emits:qn,methods:Nt,computed:Nt,beforeCreate:Me,created:Me,beforeMount:Me,mounted:Me,beforeUpdate:Me,updated:Me,beforeDestroy:Me,beforeUnmount:Me,destroyed:Me,unmounted:Me,activated:Me,deactivated:Me,errorCaptured:Me,serverPrefetch:Me,components:Nt,directives:Nt,watch:da,provide:Gn,inject:fa};function Gn(t,n){return n?t?function(){return Re(de(t)?t.call(this,this):t,de(n)?n.call(this,this):n)}:n:t}function fa(t,n){return Nt(Ki(t),Ki(n))}function Ki(t){if(ce(t)){const n={};for(let e=0;e1)return e&&de(n)?n.call(i&&i.proxy):n}}const rr={},or=()=>Object.create(rr),ar=t=>Object.getPrototypeOf(t)===rr;function va(t,n,e,i=!1){const s={},r=or();t.propsDefaults=Object.create(null),lr(t,n,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);e?t.props=i?s:So(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function ya(t,n,e,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,l=ye(s),[a]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const h=t.vnode.dynamicProps;for(let p=0;p{a=!0;const[m,T]=cr(p,n,!0);Re(o,m),T&&l.push(...T)};!e&&n.mixins.length&&n.mixins.forEach(h),t.extends&&h(t.extends),t.mixins&&t.mixins.forEach(h)}if(!r&&!a)return xe(t)&&i.set(t,At),At;if(ce(r))for(let h=0;h-1,T[1]=E<0||x-1||ge(T,"default"))&&l.push(p)}}}const c=[o,l];return xe(t)&&i.set(t,c),c}function Zn(t){return t[0]!=="$"&&!Ut(t)}function Kn(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function Xn(t,n){return Kn(t)===Kn(n)}function Yn(t,n){return ce(n)?n.findIndex(e=>Xn(e,t)):de(n)&&Xn(n,t)?0:-1}const ur=t=>t[0]==="_"||t==="$stable",_n=t=>ce(t)?t.map(Ke):[Ke(t)],wa=(t,n,e)=>{if(n._n)return n;const i=Bo((...s)=>_n(n(...s)),e);return i._c=!1,i},hr=(t,n,e)=>{const i=t._ctx;for(const s in t){if(ur(s))continue;const r=t[s];if(de(r))n[s]=wa(s,r,i);else if(r!=null){const o=_n(r);n[s]=()=>o}}},fr=(t,n)=>{const e=_n(n);t.slots.default=()=>e},_a=(t,n)=>{const e=t.slots=or();if(t.vnode.shapeFlag&32){const i=n._;i?(Re(e,n),xs(e,"_",i,!0)):hr(n,e)}else n&&fr(t,n)},Ta=(t,n,e)=>{const{vnode:i,slots:s}=t;let r=!0,o=_e;if(i.shapeFlag&32){const l=n._;l?e&&l===1?r=!1:(Re(s,n),!e&&l===1&&delete s._):(r=!n.$stable,hr(n,s)),o=n}else n&&(fr(t,n),o={default:1});if(r)for(const l in s)!ur(l)&&o[l]==null&&delete s[l]};function Yi(t,n,e,i,s=!1){if(ce(t)){t.forEach((m,T)=>Yi(m,n&&(ce(n)?n[T]:n),e,i,s));return}if(ai(i)&&!s)return;const r=i.shapeFlag&4?Li(i.component)||i.component.proxy:i.el,o=s?null:r,{i:l,r:a}=t,c=n&&n.r,h=l.refs===_e?l.refs={}:l.refs,p=l.setupState;if(c!=null&&c!==a&&(Se(c)?(h[c]=null,ge(p,c)&&(p[c]=null)):Ne(c)&&(c.value=null)),de(a))ft(a,l,12,[o,h]);else{const m=Se(a),T=Ne(a);if(m||T){const x=()=>{if(t.f){const E=m?ge(p,a)?p[a]:h[a]:a.value;s?ce(E)&&on(E,r):ce(E)?E.includes(r)||E.push(r):m?(h[a]=[r],ge(p,a)&&(p[a]=h[a])):(a.value=[r],t.k&&(h[t.k]=a.value))}else m?(h[a]=o,ge(p,a)&&(p[a]=o)):T&&(a.value=o,t.k&&(h[t.k]=o))};o?(x.id=-1,Fe(x,e)):x()}}}const Fe=qo;function xa(t){return ba(t)}function ba(t,n){const e=bs();e.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:l,createComment:a,setText:c,setElementText:h,parentNode:p,nextSibling:m,setScopeId:T=Ve,insertStaticContent:x}=t,E=(S,u,v,b=null,C=null,P=null,B=void 0,D=null,V=!!u.dynamicChildren)=>{if(S===u)return;S&&!Bt(S,u)&&(b=Qe(S),Ae(S,C,P,!0),S=null),u.patchFlag===-2&&(V=!1,u.dynamicChildren=null);const{type:z,ref:U,shapeFlag:W}=u;switch(z){case Ci:R(S,u,v,b);break;case Ct:M(S,u,v,b);break;case Fi:S==null&&f(u,v,b,B);break;case ve:J(S,u,v,b,C,P,B,D,V);break;default:W&1?L(S,u,v,b,C,P,B,D,V):W&6?fe(S,u,v,b,C,P,B,D,V):(W&64||W&128)&&z.process(S,u,v,b,C,P,B,D,V,Ue)}U!=null&&C&&Yi(U,S&&S.ref,P,u||S,!u)},R=(S,u,v,b)=>{if(S==null)i(u.el=l(u.children),v,b);else{const C=u.el=S.el;u.children!==S.children&&c(C,u.children)}},M=(S,u,v,b)=>{S==null?i(u.el=a(u.children||""),v,b):u.el=S.el},f=(S,u,v,b)=>{[S.el,S.anchor]=x(S.children,u,v,b,S.el,S.anchor)},_=({el:S,anchor:u},v,b)=>{let C;for(;S&&S!==u;)C=m(S),i(S,v,b),S=C;i(u,v,b)},H=({el:S,anchor:u})=>{let v;for(;S&&S!==u;)v=m(S),s(S),S=v;s(u)},L=(S,u,v,b,C,P,B,D,V)=>{u.type==="svg"?B="svg":u.type==="math"&&(B="mathml"),S==null?O(u,v,b,C,P,B,D,V):q(S,u,C,P,B,D,V)},O=(S,u,v,b,C,P,B,D)=>{let V,z;const{props:U,shapeFlag:W,transition:X,dirs:K}=S;if(V=S.el=o(S.type,P,U&&U.is,U),W&8?h(V,S.children):W&16&&G(S.children,V,null,b,C,ki(S,P),B,D),K&&wt(S,null,b,"created"),N(V,S,S.scopeId,B,b),U){for(const pe in U)pe!=="value"&&!Ut(pe)&&r(V,pe,null,U[pe],P,S.children,b,C,ke);"value"in U&&r(V,"value",null,U.value,P),(z=U.onVnodeBeforeMount)&&qe(z,b,S)}K&&wt(S,null,b,"beforeMount");const te=Sa(C,X);te&&X.beforeEnter(V),i(V,u,v),((z=U&&U.onVnodeMounted)||te||K)&&Fe(()=>{z&&qe(z,b,S),te&&X.enter(V),K&&wt(S,null,b,"mounted")},C)},N=(S,u,v,b,C)=>{if(v&&T(S,v),b)for(let P=0;P{for(let z=V;z{const D=u.el=S.el;let{patchFlag:V,dynamicChildren:z,dirs:U}=u;V|=S.patchFlag&16;const W=S.props||_e,X=u.props||_e;let K;if(v&&_t(v,!1),(K=X.onVnodeBeforeUpdate)&&qe(K,v,u,S),U&&wt(u,S,v,"beforeUpdate"),v&&_t(v,!0),z?$(S.dynamicChildren,z,D,v,b,ki(u,C),P):B||ee(S,u,D,null,v,b,ki(u,C),P,!1),V>0){if(V&16)re(D,u,W,X,v,b,C);else if(V&2&&W.class!==X.class&&r(D,"class",null,X.class,C),V&4&&r(D,"style",W.style,X.style,C),V&8){const te=u.dynamicProps;for(let pe=0;pe{K&&qe(K,v,u,S),U&&wt(u,S,v,"updated")},b)},$=(S,u,v,b,C,P,B)=>{for(let D=0;D{if(v!==b){if(v!==_e)for(const D in v)!Ut(D)&&!(D in b)&&r(S,D,v[D],null,B,u.children,C,P,ke);for(const D in b){if(Ut(D))continue;const V=b[D],z=v[D];V!==z&&D!=="value"&&r(S,D,z,V,B,u.children,C,P,ke)}"value"in b&&r(S,"value",v.value,b.value,B)}},J=(S,u,v,b,C,P,B,D,V)=>{const z=u.el=S?S.el:l(""),U=u.anchor=S?S.anchor:l("");let{patchFlag:W,dynamicChildren:X,slotScopeIds:K}=u;K&&(D=D?D.concat(K):K),S==null?(i(z,v,b),i(U,v,b),G(u.children||[],v,U,C,P,B,D,V)):W>0&&W&64&&X&&S.dynamicChildren?($(S.dynamicChildren,X,v,C,P,B,D),(u.key!=null||C&&u===C.subTree)&&dr(S,u,!0)):ee(S,u,v,U,C,P,B,D,V)},fe=(S,u,v,b,C,P,B,D,V)=>{u.slotScopeIds=D,S==null?u.shapeFlag&512?C.ctx.activate(u,v,b,B,V):ue(u,v,b,C,P,B,V):me(S,u,V)},ue=(S,u,v,b,C,P,B)=>{const D=S.component=Da(S,b,C);if(er(S)&&(D.ctx.renderer=Ue),Aa(D),D.asyncDep){if(C&&C.registerDep(D,le),!S.el){const V=D.subTree=ie(Ct);M(null,V,u,v)}}else le(D,S,u,v,C,P,B)},me=(S,u,v)=>{const b=u.component=S.component;if(Vo(S,u,v))if(b.asyncDep&&!b.asyncResolved){oe(b,u,v);return}else b.next=u,Ao(b.update),b.effect.dirty=!0,b.update();else u.el=S.el,b.vnode=u},le=(S,u,v,b,C,P,B)=>{const D=()=>{if(S.isMounted){let{next:U,bu:W,u:X,parent:K,vnode:te}=S;{const w=pr(S);if(w){U&&(U.el=te.el,oe(S,U,B)),w.asyncDep.then(()=>{S.isUnmounted||D()});return}}let pe=U,g;_t(S,!1),U?(U.el=te.el,oe(S,U,B)):U=te,W&&ri(W),(g=U.props&&U.props.onVnodeBeforeUpdate)&&qe(g,K,U,te),_t(S,!0);const d=Mi(S),y=S.subTree;S.subTree=d,E(y,d,p(y.el),Qe(y),S,C,P),U.el=d.el,pe===null&&Uo(S,d.el),X&&Fe(X,C),(g=U.props&&U.props.onVnodeUpdated)&&Fe(()=>qe(g,K,U,te),C)}else{let U;const{el:W,props:X}=u,{bm:K,m:te,parent:pe}=S,g=ai(u);if(_t(S,!1),K&&ri(K),!g&&(U=X&&X.onVnodeBeforeMount)&&qe(U,pe,u),_t(S,!0),W&&yt){const d=()=>{S.subTree=Mi(S),yt(W,S.subTree,S,C,null)};g?u.type.__asyncLoader().then(()=>!S.isUnmounted&&d()):d()}else{const d=S.subTree=Mi(S);E(null,d,v,b,S,C,P),u.el=d.el}if(te&&Fe(te,C),!g&&(U=X&&X.onVnodeMounted)){const d=u;Fe(()=>qe(U,pe,d),C)}(u.shapeFlag&256||pe&&ai(pe.vnode)&&pe.vnode.shapeFlag&256)&&S.a&&Fe(S.a,C),S.isMounted=!0,u=v=b=null}},V=S.effect=new cn(D,Ve,()=>vn(z),S.scope),z=S.update=()=>{V.dirty&&V.run()};z.id=S.uid,_t(S,!0),z()},oe=(S,u,v)=>{u.component=S;const b=S.vnode.props;S.vnode=u,S.next=null,ya(S,u.props,b,v),Ta(S,u.children,v),pt(),Nn(S),gt()},ee=(S,u,v,b,C,P,B,D,V=!1)=>{const z=S&&S.children,U=S?S.shapeFlag:0,W=u.children,{patchFlag:X,shapeFlag:K}=u;if(X>0){if(X&128){Y(z,W,v,b,C,P,B,D,V);return}else if(X&256){we(z,W,v,b,C,P,B,D,V);return}}K&8?(U&16&&ke(z,C,P),W!==z&&h(v,W)):U&16?K&16?Y(z,W,v,b,C,P,B,D,V):ke(z,C,P,!0):(U&8&&h(v,""),K&16&&G(W,v,b,C,P,B,D,V))},we=(S,u,v,b,C,P,B,D,V)=>{S=S||At,u=u||At;const z=S.length,U=u.length,W=Math.min(z,U);let X;for(X=0;XU?ke(S,C,P,!0,!1,W):G(u,v,b,C,P,B,D,V,W)},Y=(S,u,v,b,C,P,B,D,V)=>{let z=0;const U=u.length;let W=S.length-1,X=U-1;for(;z<=W&&z<=X;){const K=S[z],te=u[z]=V?ct(u[z]):Ke(u[z]);if(Bt(K,te))E(K,te,v,null,C,P,B,D,V);else break;z++}for(;z<=W&&z<=X;){const K=S[W],te=u[X]=V?ct(u[X]):Ke(u[X]);if(Bt(K,te))E(K,te,v,null,C,P,B,D,V);else break;W--,X--}if(z>W){if(z<=X){const K=X+1,te=KX)for(;z<=W;)Ae(S[z],C,P,!0),z++;else{const K=z,te=z,pe=new Map;for(z=te;z<=X;z++){const he=u[z]=V?ct(u[z]):Ke(u[z]);he.key!=null&&pe.set(he.key,z)}let g,d=0;const y=X-te+1;let w=!1,I=0;const j=new Array(y);for(z=0;z=y){Ae(he,C,P,!0);continue}let Q;if(he.key!=null)Q=pe.get(he.key);else for(g=te;g<=X;g++)if(j[g-te]===0&&Bt(he,u[g])){Q=g;break}Q===void 0?Ae(he,C,P,!0):(j[Q-te]=z+1,Q>=I?I=Q:w=!0,E(he,u[Q],v,null,C,P,B,D,V),d++)}const ne=w?Ea(j):At;for(g=ne.length-1,z=y-1;z>=0;z--){const he=te+z,Q=u[he],Le=he+1{const{el:P,type:B,transition:D,children:V,shapeFlag:z}=S;if(z&6){Ee(S.component.subTree,u,v,b);return}if(z&128){S.suspense.move(u,v,b);return}if(z&64){B.move(S,u,v,Ue);return}if(B===ve){i(P,u,v);for(let W=0;WD.enter(P),C);else{const{leave:W,delayLeave:X,afterLeave:K}=D,te=()=>i(P,u,v),pe=()=>{W(P,()=>{te(),K&&K()})};X?X(P,te,pe):pe()}else i(P,u,v)},Ae=(S,u,v,b=!1,C=!1)=>{const{type:P,props:B,ref:D,children:V,dynamicChildren:z,shapeFlag:U,patchFlag:W,dirs:X}=S;if(D!=null&&Yi(D,null,v,S,!0),U&256){u.ctx.deactivate(S);return}const K=U&1&&X,te=!ai(S);let pe;if(te&&(pe=B&&B.onVnodeBeforeUnmount)&&qe(pe,u,S),U&6)Ht(S.component,v,b);else{if(U&128){S.suspense.unmount(v,b);return}K&&wt(S,null,u,"beforeUnmount"),U&64?S.type.remove(S,u,v,C,Ue,b):z&&(P!==ve||W>0&&W&64)?ke(z,u,v,!1,!0):(P===ve&&W&384||!C&&U&16)&&ke(V,u,v),b&&vt(S)}(te&&(pe=B&&B.onVnodeUnmounted)||K)&&Fe(()=>{pe&&qe(pe,u,S),K&&wt(S,null,u,"unmounted")},v)},vt=S=>{const{type:u,el:v,anchor:b,transition:C}=S;if(u===ve){st(v,b);return}if(u===Fi){H(S);return}const P=()=>{s(v),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(S.shapeFlag&1&&C&&!C.persisted){const{leave:B,delayLeave:D}=C,V=()=>B(v,P);D?D(S.el,P,V):V()}else P()},st=(S,u)=>{let v;for(;S!==u;)v=m(S),s(S),S=v;s(u)},Ht=(S,u,v)=>{const{bum:b,scope:C,update:P,subTree:B,um:D}=S;b&&ri(b),C.stop(),P&&(P.active=!1,Ae(B,S,u,v)),D&&Fe(D,u),Fe(()=>{S.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},ke=(S,u,v,b=!1,C=!1,P=0)=>{for(let B=P;BS.shapeFlag&6?Qe(S.component.subTree):S.shapeFlag&128?S.suspense.next():m(S.anchor||S.el);let rt=!1;const Ot=(S,u,v)=>{S==null?u._vnode&&Ae(u._vnode,null,null,!0):E(u._vnode||null,S,u,null,null,null,v),rt||(rt=!0,Nn(),Gs(),rt=!1),u._vnode=S},Ue={p:E,um:Ae,m:Ee,r:vt,mt:ue,mc:G,pc:ee,pbc:$,n:Qe,o:t};let ot,yt;return n&&([ot,yt]=n(Ue)),{render:Ot,hydrate:ot,createApp:ga(Ot,ot)}}function ki({type:t,props:n},e){return e==="svg"&&t==="foreignObject"||e==="mathml"&&t==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:e}function _t({effect:t,update:n},e){t.allowRecurse=n.allowRecurse=e}function Sa(t,n){return(!t||t&&!t.pendingBranch)&&n&&!n.persisted}function dr(t,n,e=!1){const i=t.children,s=n.children;if(ce(i)&&ce(s))for(let r=0;r>1,t[e[l]]0&&(n[i]=e[r-1]),e[r]=i)}}for(r=e.length,o=e[r-1];r-- >0;)e[r]=o,o=n[o];return e}function pr(t){const n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:pr(n)}const Pa=t=>t.__isTeleport,ve=Symbol.for("v-fgt"),Ci=Symbol.for("v-txt"),Ct=Symbol.for("v-cmt"),Fi=Symbol.for("v-stc"),qt=[];let We=null;function k(t=!1){qt.push(We=t?null:[])}function Ca(){qt.pop(),We=qt[qt.length-1]||null}let Jt=1;function Jn(t){Jt+=t}function gr(t){return t.dynamicChildren=Jt>0?We||At:null,Ca(),Jt>0&&We&&We.push(t),t}function F(t,n,e,i,s,r){return gr(A(t,n,e,i,s,r,!0))}function Ce(t,n,e,i,s){return gr(ie(t,n,e,i,s,!0))}function Ji(t){return t?t.__v_isVNode===!0:!1}function Bt(t,n){return t.type===n.type&&t.key===n.key}const mr=({key:t})=>t??null,ci=({ref:t,ref_key:n,ref_for:e})=>(typeof t=="number"&&(t=""+t),t!=null?Se(t)||Ne(t)||de(t)?{i:Ie,r:t,k:n,f:!!e}:t:null);function A(t,n=null,e=null,i=0,s=null,r=t===ve?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:t,props:n,key:n&&mr(n),ref:n&&ci(n),scopeId:Ks,slotScopeIds:null,children:e,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ie};return l?(Tn(a,e),r&128&&t.normalize(a)):e&&(a.shapeFlag|=Se(e)?8:16),Jt>0&&!o&&We&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&We.push(a),a}const ie=Ra;function Ra(t,n=null,e=null,i=0,s=null,r=!1){if((!t||t===Wo)&&(t=Ct),Ji(t)){const l=It(t,n,!0);return e&&Tn(l,e),Jt>0&&!r&&We&&(l.shapeFlag&6?We[We.indexOf(t)]=l:We.push(l)),l.patchFlag|=-2,l}if(za(t)&&(t=t.__vccOpts),n){n=La(n);let{class:l,style:a}=n;l&&!Se(l)&&(n.class=Te(l)),xe(a)&&(Bs(a)&&!ce(a)&&(a=Re({},a)),n.style=ln(a))}const o=Se(t)?1:Go(t)?128:Pa(t)?64:xe(t)?4:de(t)?2:0;return A(t,n,e,i,s,o,r,!0)}function La(t){return t?Bs(t)||ar(t)?Re({},t):t:null}function It(t,n,e=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:l,transition:a}=t,c=n?Ha(s||{},n):s,h={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&mr(c),ref:n&&n.ref?e&&r?ce(r)?r.concat(ci(n)):[r,ci(n)]:ci(n):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:n&&t.type!==ve?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:a,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&It(t.ssContent),ssFallback:t.ssFallback&&It(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return a&&i&&(h.transition=a.clone(h)),h}function be(t=" ",n=0){return ie(Ci,null,t,n)}function se(t="",n=!1){return n?(k(),Ce(Ct,null,t)):ie(Ct,null,t)}function Ke(t){return t==null||typeof t=="boolean"?ie(Ct):ce(t)?ie(ve,null,t.slice()):typeof t=="object"?ct(t):ie(Ci,null,String(t))}function ct(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:It(t)}function Tn(t,n){let e=0;const{shapeFlag:i}=t;if(n==null)n=null;else if(ce(n))e=16;else if(typeof n=="object")if(i&65){const s=n.default;s&&(s._c&&(s._d=!1),Tn(t,s()),s._c&&(s._d=!0));return}else{e=32;const s=n._;!s&&!ar(n)?n._ctx=Ie:s===3&&Ie&&(Ie.slots._===1?n._=1:(n._=2,t.patchFlag|=1024))}else de(n)?(n={default:n,_ctx:Ie},e=32):(n=String(n),i&64?(e=16,n=[be(n)]):e=8);t.children=n,t.shapeFlag|=e}function Ha(...t){const n={};for(let e=0;e{let s;return(s=t[e])||(s=t[e]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};pi=n("__VUE_INSTANCE_SETTERS__",e=>Oe=e),Qi=n("__VUE_SSR_SETTERS__",e=>Ri=e)}const Qt=t=>{const n=Oe;return pi(t),t.scope.on(),()=>{t.scope.off(),pi(n)}},Qn=()=>{Oe&&Oe.scope.off(),pi(null)};function vr(t){return t.vnode.shapeFlag&4}let Ri=!1;function Aa(t,n=!1){n&&Qi(n);const{props:e,children:i}=t.vnode,s=vr(t);va(t,e,s,n),_a(t,i);const r=s?ka(t,n):void 0;return n&&Qi(!1),r}function ka(t,n){const e=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,la);const{setup:i}=e;if(i){const s=t.setupContext=i.length>1?Ia(t):null,r=Qt(t);pt();const o=ft(i,t,0,[t.props,s]);if(gt(),r(),ws(o)){if(o.then(Qn,Qn),n)return o.then(l=>{$n(t,l,n)}).catch(l=>{Si(l,t,0)});t.asyncDep=o}else $n(t,o,n)}else yr(t,n)}function $n(t,n,e){de(n)?t.type.__ssrInlineRender?t.ssrRender=n:t.render=n:xe(n)&&(t.setupState=Vs(n)),yr(t,e)}let es;function yr(t,n,e){const i=t.type;if(!t.render){if(!n&&es&&!i.render){const s=i.template||wn(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:l,compilerOptions:a}=i,c=Re(Re({isCustomElement:r,delimiters:l},o),a);i.render=es(s,c)}}t.render=i.render||Ve}{const s=Qt(t);pt();try{ca(t)}finally{gt(),s()}}}const Fa={get(t,n){return ze(t,"get",""),t[n]}};function Ia(t){const n=e=>{t.exposed=e||{}};return{attrs:new Proxy(t.attrs,Fa),slots:t.slots,emit:t.emit,expose:n}}function Li(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Vs(Eo(t.exposed)),{get(n,e){if(e in n)return n[e];if(e in Wt)return Wt[e](t)},has(n,e){return e in n||e in Wt}}))}function Ba(t,n=!0){return de(t)?t.displayName||t.name:t.name||n&&t.__name}function za(t){return de(t)&&"__vccOpts"in t}const $e=(t,n)=>Po(t,n,Ri);function Na(t,n,e){const i=arguments.length;return i===2?xe(n)&&!ce(n)?Ji(n)?ie(t,null,[n]):ie(t,n):ie(t,null,n):(i>3?e=Array.prototype.slice.call(arguments,2):i===3&&Ji(e)&&(e=[e]),ie(t,n,e))}const Va="3.4.27";/** +* @vue/runtime-dom v3.4.27 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const Ua="http://www.w3.org/2000/svg",ja="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,ts=ut&&ut.createElement("template"),Wa={insert:(t,n,e)=>{n.insertBefore(t,e||null)},remove:t=>{const n=t.parentNode;n&&n.removeChild(t)},createElement:(t,n,e,i)=>{const s=n==="svg"?ut.createElementNS(Ua,t):n==="mathml"?ut.createElementNS(ja,t):ut.createElement(t,e?{is:e}:void 0);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>ut.createTextNode(t),createComment:t=>ut.createComment(t),setText:(t,n)=>{t.nodeValue=n},setElementText:(t,n)=>{t.textContent=n},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ut.querySelector(t),setScopeId(t,n){t.setAttribute(n,"")},insertStaticContent(t,n,e,i,s,r){const o=e?e.previousSibling:n.lastChild;if(s&&(s===r||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),e),!(s===r||!(s=s.nextSibling)););else{ts.innerHTML=i==="svg"?`${t}`:i==="mathml"?`${t}`:t;const l=ts.content;if(i==="svg"||i==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}n.insertBefore(l,e)}return[o?o.nextSibling:n.firstChild,e?e.previousSibling:n.lastChild]}},Ga=Symbol("_vtc");function qa(t,n,e){const i=t[Ga];i&&(n=(n?[n,...i]:[...i]).join(" ")),n==null?t.removeAttribute("class"):e?t.setAttribute("class",n):t.className=n}const gi=Symbol("_vod"),wr=Symbol("_vsh"),Ze={beforeMount(t,{value:n},{transition:e}){t[gi]=t.style.display==="none"?"":t.style.display,e&&n?e.beforeEnter(t):zt(t,n)},mounted(t,{value:n},{transition:e}){e&&n&&e.enter(t)},updated(t,{value:n,oldValue:e},{transition:i}){!n!=!e&&(i?n?(i.beforeEnter(t),zt(t,!0),i.enter(t)):i.leave(t,()=>{zt(t,!1)}):zt(t,n))},beforeUnmount(t,{value:n}){zt(t,n)}};function zt(t,n){t.style.display=n?t[gi]:"none",t[wr]=!n}const Za=Symbol(""),Ka=/(^|;)\s*display\s*:/;function Xa(t,n,e){const i=t.style,s=Se(e);let r=!1;if(e&&!s){if(n)if(Se(n))for(const o of n.split(";")){const l=o.slice(0,o.indexOf(":")).trim();e[l]==null&&ui(i,l,"")}else for(const o in n)e[o]==null&&ui(i,o,"");for(const o in e)o==="display"&&(r=!0),ui(i,o,e[o])}else if(s){if(n!==e){const o=i[Za];o&&(e+=";"+o),i.cssText=e,r=Ka.test(e)}}else n&&t.removeAttribute("style");gi in t&&(t[gi]=r?i.display:"",t[wr]&&(i.display="none"))}const is=/\s*!important$/;function ui(t,n,e){if(ce(e))e.forEach(i=>ui(t,n,i));else if(e==null&&(e=""),n.startsWith("--"))t.setProperty(n,e);else{const i=Ya(t,n);is.test(e)?t.setProperty(Lt(i),e.replace(is,""),"important"):t[i]=e}}const ns=["Webkit","Moz","ms"],Ii={};function Ya(t,n){const e=Ii[n];if(e)return e;let i=Ye(n);if(i!=="filter"&&i in t)return Ii[n]=i;i=Ti(i);for(let s=0;sBi||(il.then(()=>Bi=0),Bi=Date.now());function sl(t,n){const e=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=e.attached)return;Ge(rl(i,e.value),n,5,[i])};return e.value=t,e.attached=nl(),e}function rl(t,n){if(ce(n)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},n.map(i=>s=>!s._stopped&&i&&i(s))}else return n}const as=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,ol=(t,n,e,i,s,r,o,l,a)=>{const c=s==="svg";n==="class"?qa(t,i,c):n==="style"?Xa(t,e,i):yi(n)?rn(n)||el(t,n,e,i,o):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):al(t,n,i,c))?Qa(t,n,i,r,o,l,a):(n==="true-value"?t._trueValue=i:n==="false-value"&&(t._falseValue=i),Ja(t,n,i,c))};function al(t,n,e,i){if(i)return!!(n==="innerHTML"||n==="textContent"||n in t&&as(n)&&de(e));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&t.tagName==="INPUT"||n==="type"&&t.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return as(n)&&Se(e)?!1:n in t}const ls=t=>{const n=t.props["onUpdate:modelValue"]||!1;return ce(n)?e=>ri(n,e):n};function ll(t){t.target.composing=!0}function cs(t){const n=t.target;n.composing&&(n.composing=!1,n.dispatchEvent(new Event("input")))}const zi=Symbol("_assign"),_r={created(t,{modifiers:{lazy:n,trim:e,number:i}},s){t[zi]=ls(s);const r=i||s.props&&s.props.type==="number";Dt(t,n?"change":"input",o=>{if(o.target.composing)return;let l=t.value;e&&(l=l.trim()),r&&(l=Ni(l)),t[zi](l)}),e&&Dt(t,"change",()=>{t.value=t.value.trim()}),n||(Dt(t,"compositionstart",ll),Dt(t,"compositionend",cs),Dt(t,"change",cs))},mounted(t,{value:n}){t.value=n??""},beforeUpdate(t,{value:n,modifiers:{lazy:e,trim:i,number:s}},r){if(t[zi]=ls(r),t.composing)return;const o=(s||t.type==="number")&&!/^0\d/.test(t.value)?Ni(t.value):t.value,l=n??"";o!==l&&(document.activeElement===t&&t.type!=="range"&&(e||i&&t.value.trim()===l)||(t.value=l))}},cl=["ctrl","shift","alt","meta"],ul={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,n)=>cl.some(e=>t[`${e}Key`]&&!n.includes(e))},bt=(t,n)=>{const e=t._withMods||(t._withMods={}),i=n.join(".");return e[i]||(e[i]=(s,...r)=>{for(let o=0;o{const e=t._withKeys||(t._withKeys={}),i=n.join(".");return e[i]||(e[i]=s=>{if(!("key"in s))return;const r=Lt(s.key);if(n.some(o=>o===r||hl[o]===r))return t(s)})},fl=Re({patchProp:ol},Wa);let us;function dl(){return us||(us=xa(fl))}const pl=(...t)=>{const n=dl().createApp(...t),{mount:e}=n;return n.mount=i=>{const s=ml(i);if(!s)return;const r=n._component;!de(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.innerHTML="";const o=e(s,!1,gl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},n};function gl(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function ml(t){return Se(t)?document.querySelector(t):t}const ae=(t,n)=>{const e=t.__vccOpts||t;for(const[i,s]of n)e[i]=s;return e},vl={},yl={class:"tify-icon",viewBox:"0 0 24 24"},wl=A("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},null,-1),_l=[wl];function Tl(t,n){return k(),F("svg",yl,_l)}const Tr=ae(vl,[["render",Tl]]);var xl={version:"0.31.0",license:"AGPL-3.0",bugsUrl:"https://github.com/tify-iiif-viewer/tify/issues",contributorsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.31.0/CONTRIBUTORS.md",docsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.31.0/doc",docsLanguages:["de","en"],repositoryUrl:"https://github.com/tify-iiif-viewer/tify"};const bl={computed:{copyrightHtml(){return'Copyright © 2017–2022 Göttingen University / Göttingen State and University Library'},env(){return xl},infoHtml(){return'TIFY is a slim and mobile-friendly IIIF document viewer, released under the GNU Affero General Public License 3.0.'},userGuideUrl(){const t=this.env.docsLanguages.includes(this.$store.options.language)?this.$store.options.language:"en";return`${this.env.docsUrl}/user-guide.${t}.md`}}},Sl={class:"tify-help",tabindex:"0"},El={class:"tify-sr-only"},Pl=["innerHTML"],Cl={class:"tify-list"},Rl=["href"],Ll=["href"],Hl=["href"],Ol=["href"],Ml={class:"tify-help-footer"},Dl=["innerHTML"];function Al(t,n,e,i,s,r){return k(),F("section",Sl,[A("h2",El,Z(t.$translate("Help")),1),A("h3",null,Z(t.$translate("About TIFY")),1),A("p",{innerHTML:t.$translate("$info",r.infoHtml)},null,8,Pl),A("ul",Cl,[A("li",null,[A("a",{href:r.userGuideUrl},Z(t.$translate("User guide")),9,Rl)]),A("li",null,[A("a",{href:r.env.repositoryUrl},Z(t.$translate("Source code")),9,Ll)]),A("li",null,[A("a",{href:r.env.contributorsUrl},Z(t.$translate("Contributors")),9,Hl)]),A("li",null,[A("a",{href:r.env.bugsUrl},Z(t.$translate("Report a bug")),9,Ol)])]),A("footer",Ml,[A("p",null,[be(Z(t.$translate("Version"))+" ",1),A("b",null,Z(r.env.version),1),be(" · "),A("span",{innerHTML:t.$translate("$copyright",r.copyrightHtml)},null,8,Dl)])])])}const kl=ae(bl,[["render",Al]]),Fl={},Il={class:"tify-icon",viewBox:"0 0 24 24"},Bl=A("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},null,-1),zl=[Bl];function Nl(t,n){return k(),F("svg",Il,zl)}const xr=ae(Fl,[["render",Nl]]),Vl={},Ul={class:"tify-icon",viewBox:"0 0 24 24"},jl=A("path",{d:"M19,13H5V11H19V13Z"},null,-1),Wl=[jl];function Gl(t,n){return k(),F("svg",Ul,Wl)}const br=ae(Vl,[["render",Gl]]),ql={name:"CollectionNode",props:{item:{type:Object,default:()=>{}}},data(){return{children:null,expanded:!1,id:this.$store.getId(`collection-node-${Math.floor(Math.random()*1e12)}`)}},methods:{toggleChildren(){if(this.expanded){this.expanded=!1;return}if(this.children){this.expanded=!0;return}if(this.item.children){this.children=this.item.children,this.expanded=!0;return}this.$store.fetchJson(this.item["@id"]||this.item.id).then(t=>{this.children=t.collections||t.items||t.manifests||[],this.expanded=!0},t=>{const n=t.response&&(t.response.statusText||t.response.data)||t.message;this.$store.addError(`Error loading IIIF manifest: ${n}`),this.children=!1})}}},Zl=["aria-controls","aria-expanded"],Kl={class:"tify-sr-only"},Xl={class:"tify-sr-only"},Yl=["id"],Jl={key:1,class:"tify-collection-error"};function Ql(t,n,e,i,s,r){const o=br,l=xr,a=Ys("CollectionNode",!0);return k(),F("li",{class:Te(["tify-collection-item",{"-current":t.$store.manifest&&t.$store.manifest.id===(e.item["@id"]||e.item.id)}])},[e.item.type==="Collection"?(k(),F("button",{key:0,type:"button","aria-controls":s.id,"aria-expanded":s.expanded?"true":"false",class:"tify-collection-link -has-children",onClick:n[0]||(n[0]=c=>r.toggleChildren())},[s.expanded?(k(),F(ve,{key:0},[ie(o),A("span",Kl,Z(t.$translate("Collapse")),1)],64)):(k(),F(ve,{key:1},[ie(l),A("span",Xl,Z(t.$translate("Expand")),1)],64)),be(" "+Z(t.$store.localize(e.item.label)),1)],8,Zl)):(k(),F("a",{key:1,href:"javascript:;",class:"tify-collection-link",onClick:n[1]||(n[1]=c=>t.$store.loadManifest(e.item["@id"]||e.item.id,{expectedType:e.item.type,reset:!0}))},Z(t.$store.localize(e.item.label)),1)),s.expanded?(k(),F(ve,{key:2},[s.expanded?(k(),F("ol",{key:0,id:s.id,class:"tify-collection-list"},[(k(!0),F(ve,null,Be(s.children,c=>(k(),Ce(a,{key:c.id,item:c},null,8,["item"]))),128))],8,Yl)):s.children===!1?(k(),F("p",Jl,Z(t.$translate("Could not load child manifest")),1)):se("",!0)],64)):se("",!0)],2)}const $l=ae(ql,[["render",Ql]]),ec={data(){return{filter:""}},computed:{filteredItems(){const t=this.filter.trim().toLowerCase().split(/\s+/);return this.$store.collection.items.filter(n=>{const e=(this.$store.localize(n.label)||"").toLowerCase();return t.every(i=>e.includes(i))})}}},tc={class:"tify-collection",tabindex:"0"},ic={class:"tify-sr-only"},nc={key:0,class:"tify-collection-controls"},sc=["aria-label","placeholder"],rc=["disabled"],oc={key:1,class:"tify-collection-list"},ac={key:2,class:"tify-collection-no-results"};function lc(t,n,e,i,s,r){const o=$l;return k(),F("section",tc,[A("h2",ic,Z(t.$translate("Collection")),1),t.$store.collection.items.length>5?(k(),F("p",nc,[De(A("input",{"onUpdate:modelValue":n[0]||(n[0]=l=>s.filter=l),"aria-label":t.$translate("Filter collection"),class:"tify-collection-filter",placeholder:t.$translate("Filter collection"),type:"text",onKeydown:[n[1]||(n[1]=Vt(bt(l=>s.filter?s.filter="":l.target.blur(),["prevent"]),["esc"])),n[2]||(n[2]=bt(()=>{},["stop"]))]},null,40,sc),[[_r,s.filter]]),A("button",{type:"button",class:"tify-collection-reset",disabled:!s.filter,onClick:n[3]||(n[3]=l=>s.filter="")},Z(t.$translate("Reset")),9,rc)])):se("",!0),r.filteredItems.length?(k(),F("ol",oc,[(k(!0),F(ve,null,Be(r.filteredItems,l=>(k(),Ce(o,{key:l.id,item:l},null,8,["item"]))),128))])):(k(),F("p",ac,Z(t.$translate("No results")),1))])}const cc=ae(ec,[["render",lc]]),uc={},hc={class:"tify-icon",viewBox:"0 0 24 24"},fc=A("path",{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},null,-1),dc=[fc];function pc(t,n){return k(),F("svg",hc,dc)}const gc=ae(uc,[["render",pc]]),mc={},vc={class:"tify-icon",viewBox:"0 0 24 24"},yc=A("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1),wc=[yc];function _c(t,n){return k(),F("svg",vc,wc)}const Tc=ae(mc,[["render",_c]]);var xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Sr={exports:{}};(function(t){(function(n){if(typeof e!="function"){var e=function(x){return x};e.nonNative=!0}const i=e("plaintext"),s=e("html"),r=e("comment"),o=/<(\w*)>/g,l=/<\/?([^\s\/>]+)/;function a(x,E,R){x=x||"",E=E||[],R=R||"";let M=h(E,R);return p(x,M)}function c(x,E){x=x||[],E=E||"";let R=h(x,E);return function(f){return p(f||"",R)}}a.init_streaming_mode=c;function h(x,E){return x=m(x),{allowable_tags:x,tag_replacement:E,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function p(x,E){if(typeof x!="string")throw new TypeError("'html' parameter must be a string");let R=E.allowable_tags,M=E.tag_replacement,f=E.state,_=E.tag_buffer,H=E.depth,L=E.in_quote_char,O="";for(let N=0,G=x.length;N":if(L)break;if(H){H--;break}L="",f=i,_+=">",R.has(T(_))?O+=_:O+=M,_="";break;case'"':case"'":q===L?L="":L=L||q,_+=q;break;case"-":_==="":_.slice(-2)=="--"&&(f=i),_="";break;default:_+=q;break}}return E.state=f,E.tag_buffer=_,E.depth=H,E.in_quote_char=L,O}function m(x){let E=new Set;if(typeof x=="string"){let R;for(;R=o.exec(x);)E.add(R[1])}else!e.nonNative&&typeof x[e.iterator]=="function"?E=new Set(x):typeof x.forEach=="function"&&x.forEach(E.add,E);return E}function T(x){let E=l.exec(x);return E?E[1].toLowerCase():null}t.exports?t.exports=a:n.striptags=a})(xn)})(Sr);var xc=Sr.exports;const bc=bn(xc);function mi(t){const n=["a","b","br","i","img","p","span"],e={a:["href"],img:["alt","src"]};let i=bc(t,n);const s=/<(\w+)((\s+.+?(\s*=\s*(?:".*?"|'.*?'|.*?|[\^'">\s]+))?)+\s*|\s*)>/g;return i=i.replace(s,(r,o,l)=>{if(!l)return`<${o}>`;const a=/(?:([^\s]+)=(?:"(.*?)"|'(.*?)'))|([^\s]+)/g,c=[];return l.replace(a,(h,p)=>{h!==p&&e[o]&&e[o].includes(p)&&c.push(h)}),c.length>0?`<${o} ${c.join(" ")}>`:`<${o}>`}),i}function hs(t,n){if(!(t instanceof Array)||!n||new Set(t).size!==t.length)return!1;for(let e=0,i=t.length;e0&&t[e]>0&&t[e]<=t[e-1]||t[e]<0||t[e]>n)return!1;return!0}function Sn(t,n=["https:","http:"]){let e;try{e=new URL(t)}catch{return!1}return n.includes(e.protocol)}const Sc={props:{metadata:{type:Array,default:()=>[]}},data(){return{infoItems:[]}},watch:{metadata(){this.updateInfoItems()}},mounted(){this.updateInfoItems()},methods:{cleanLabel(t){const n=t.replace("_"," ");return n.charAt(0).toUpperCase()+n.substr(1)},updateInfoItems(){this.$nextTick(()=>{this.$refs.contents&&this.$refs.contents.forEach((t,n)=>{const e=t.offsetHeight;this.infoItems[n]={collapsed:!0,exceedsHeight:!0},this.$nextTick(()=>{const i=t.offsetHeight,s=e>=i;this.infoItems[n]={collapsed:s,exceedsHeight:s}})})})},filterHtml:mi,isValidUrl:Sn}},Ec={class:"tify-info-metadata"},Pc={class:"tify-info-value"},Cc=["href"],Rc=["innerHTML"],Lc=["onClick"];function Hc(t,n,e,i,s,r){const o=Tc,l=gc;return k(),F("div",Ec,[(k(!0),F(ve,null,Be(e.metadata,(a,c)=>(k(),F("div",{key:c},[A("h4",null,Z(r.cleanLabel(t.$store.localize(a.label))),1),A("div",{ref_for:!0,ref:"contents",class:Te(["tify-info-content",{"-collapsed":s.infoItems[c]&&s.infoItems[c].collapsed}])},[A("div",Pc,[r.isValidUrl(a.value)?(k(),F("p",{key:`url-${c}`},[A("a",{href:a.value},Z(a.value),9,Cc)])):(k(),F("p",{key:`html-${c}`,innerHTML:r.filterHtml(t.$store.localize(a.value))},null,8,Rc))]),s.infoItems[c]&&s.infoItems[c].exceedsHeight?(k(),F("button",{key:0,type:"button",class:"tify-info-toggle",onClick:h=>s.infoItems[c].collapsed=!s.infoItems[c].collapsed},[s.infoItems[c].collapsed?(k(),F(ve,{key:0},[ie(o),be(" "+Z(t.$translate("Expand")),1)],64)):(k(),F(ve,{key:1},[ie(l),be(" "+Z(t.$translate("Collapse")),1)],64))],8,Lc)):se("",!0)],2)]))),128))])}const Oc=ae(Sc,[["render",Hc]]),Mc={data(){return{collectionDataShown:!1}},computed:{manifestOrCollection(){return this.collectionDataShown?this.$store.collection:this.$store.manifest||this.$store.collection||{}},homepages(){return this.manifestOrCollection.homepage?[].concat(this.manifestOrCollection.homepage):[]},logos(){var n;let t=this.manifestOrCollection.logo?[].concat(this.manifestOrCollection.logo):[];return(n=this.manifestOrCollection.provider)==null||n.forEach(e=>{e.logo&&(t=t.concat(e.logo))}),t=t.map(e=>{var i,s,r,o;return{id:e.id,link:((s=(i=e.service)==null?void 0:i[0])==null?void 0:s.id)||((o=(r=e.service)==null?void 0:r[0])==null?void 0:o["@id"])}}),t}},methods:{filterHtml:mi,isValidUrl:Sn}},Dc={class:"tify-info",tabindex:"0"},Ac={class:"tify-sr-only"},kc={key:0,class:"tify-info-header"},Fc={key:1,class:"tify-info-section -title"},Ic={key:2,class:"tify-info-section -metadata"},Bc={key:3,class:"tify-info-section -description"},zc={key:4,class:"tify-info-section -metadata -structure"},Nc={key:0,class:"tify-info-structure"},Vc={key:5,class:"tify-info-section -related"},Uc={class:"tify-list"},jc=["href"],Wc=["href"],Gc={key:6,class:"tify-info-section -attribution"},qc=["innerHTML"],Zc={key:7,class:"tify-info-section -license"},Kc=["href"],Xc={key:8,class:"tify-info-section -logo"},Yc=["href"],Jc=["src","alt"],Qc=["src","alt"];function $c(t,n,e,i,s,r){const o=Oc;return k(),F("section",Dc,[A("h2",Ac,Z(t.$translate("Info")),1),t.$store.collection&&t.$store.manifest?(k(),F("div",kc,[A("button",{type:"button",class:Te(["tify-info-button",{"-active":!s.collectionDataShown}]),onClick:n[0]||(n[0]=l=>s.collectionDataShown=!1)},Z(t.$translate("Document")),3),A("button",{type:"button",class:Te(["tify-info-button",{"-active":s.collectionDataShown}]),onClick:n[1]||(n[1]=l=>s.collectionDataShown=!0)},Z(t.$translate("Collection")),3)])):se("",!0),r.manifestOrCollection.label?(k(),F("div",Fc,[A("h3",null,Z(t.$translate("Title")),1),A("p",null,Z(t.$store.localize(r.manifestOrCollection.label)),1)])):se("",!0),r.manifestOrCollection.metadata&&r.manifestOrCollection.metadata.length?(k(),F("div",Ic,[A("h3",null,Z(t.$translate("Metadata")),1),t.$store.options.view==="info"?(k(),Ce(o,{key:0,metadata:r.manifestOrCollection.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.summary?(k(),F("div",Bc,[A("h3",null,Z(t.$translate("Description")),1),t.$store.options.view==="info"?(k(),Ce(o,{key:0,metadata:[{value:r.manifestOrCollection.summary}]},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.structures&&(t.$store.currentStructure.label||t.$store.currentStructure.metadata)?(k(),F("div",zc,[A("h3",null,Z(t.$translate("Current Element")),1),t.$store.currentStructure.label?(k(),F("p",Nc,Z(t.$store.localize(t.$store.currentStructure.label)),1)):se("",!0),t.$store.options.view==="info"&&t.$store.currentStructure.metadata?(k(),Ce(o,{key:1,class:"tify-info-section -metadata",metadata:t.$store.currentStructure.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.homepages.length?(k(),F("div",Vc,[A("h3",null,Z(t.$translate("Related Resources")),1),A("ul",Uc,[(k(!0),F(ve,null,Be(r.homepages,(l,a)=>(k(),F("li",{key:a},[typeof l=="string"?(k(),F("a",{key:0,href:l},Z(l),9,jc)):(k(),F("a",{key:1,href:l.id},Z(t.$store.localize(l.label)||l.id),9,Wc))]))),128))])])):se("",!0),r.manifestOrCollection.requiredStatement?(k(),F("div",Gc,[A("h3",null,Z(t.$store.localize(r.manifestOrCollection.requiredStatement.label)),1),A("p",{innerHTML:r.filterHtml(t.$store.localize(r.manifestOrCollection.requiredStatement.value))},null,8,qc)])):se("",!0),r.manifestOrCollection.rights?(k(),F("div",Zc,[A("h3",null,Z(t.$translate("License")),1),A("p",null,[A("a",{href:r.manifestOrCollection.rights},Z(r.manifestOrCollection.rights),9,Kc)])])):se("",!0),r.logos.length?(k(),F("div",Xc,[(k(!0),F(ve,null,Be(r.logos,(l,a)=>(k(),F("p",{key:a},[l.link?(k(),F("a",{key:0,href:l.link},[A("img",{class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,Jc)],8,Yc)):(k(),F("img",{key:1,class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,Qc))]))),128))])):se("",!0)])}const eu=ae(Mc,[["render",$c]]),tu={name:"TocList",props:{level:{type:Number,default:0},structures:{type:Array,default:()=>[]},purpose:{type:String,default:""}},data(){return{expandedStructures:this.level===0&&this.structures.length===1&&this.structures[0].items.some(t=>t.items)?[!0]:[],id:this.$store.getId(`toc-list-${Math.floor(Math.random()*1e12)}`)}},methods:{getFirstPage(t){if(t.items)return this.getFirstPage(t.items[0]);const n=this.$store.manifest.items.findIndex(e=>e.id===t.id);return n<0?1:n+1},getFirstPageLabel(t){var e;const n=this.getFirstPage(t);return this.$store.localize((e=this.$store.manifest.items[n-1])==null?void 0:e.label)},getLastPage(t){if(t.items)return this.getLastPage(t.items.at(-1));const n=this.$store.manifest.items.findLastIndex(e=>e.id===t.id);return n<0?this.$store.manifest.items.length:n+1},isCurrentPageInStructure(t){if(this.$store.manifest.items.filter((s,r)=>this.$store.options.pages.includes(r+1)).map(s=>s.id).some(s=>{var r;return(r=t.items)==null?void 0:r.some(o=>o.id===s)}))return!0;const e=t.firstPage||this.getFirstPage(t),i=t.lastPage||this.getLastPage(t);return this.$store.options.pages.some(s=>s>=e&&s<=i)},setPage(t){this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},toggleAllChildren(t=null){if(this.$refs.children){for(let n=this.structures.length-1;n>=0;n-=1)this.toggleChildren(n,t);this.$refs.children.forEach(n=>{n.toggleAllChildren(t)})}},toggleChildren(t,n=null){var i;(i=this.structures[t].items)!=null&&i.some(s=>s.items)&&(this.expandedStructures[t]=n!==null?n:!this.expandedStructures[t])}}},iu={class:"tify-toc-list"},nu=["data-level"],su=["title","aria-controls","aria-expanded","onClick"],ru=["href"],ou=["onClick"],au={class:"tify-toc-label"},lu={class:"tify-toc-page"},cu=["onClick"],uu={class:"tify-toc-label"};function hu(t,n,e,i,s,r){const o=br,l=xr,a=Ys("TocList",!0);return k(),F("ul",iu,[(k(!0),F(ve,null,Be(e.structures,(c,h)=>{var p,m;return k(),F("li",{key:h,class:Te(["tify-toc-structure",{"-current":r.isCurrentPageInStructure(c),"-expanded":s.expandedStructures[h]}]),"data-level":e.level},[(p=c.items)!=null&&p.some(T=>T.items)?(k(),F("button",{key:0,type:"button",class:"tify-toc-toggle",title:t.$translate(s.expandedStructures[h]?"Collapse":"Expand"),"aria-controls":`${s.id}-${h}`,"aria-expanded":s.expandedStructures[h]?"true":"false",onClick:T=>r.toggleChildren(h)},[s.expandedStructures[h]?(k(),Ce(o,{key:0})):(k(),Ce(l,{key:1}))],8,su)):se("",!0),e.purpose==="pdf"&&c.pageCount?(k(),F("a",{key:1,class:"tify-toc-link",href:c.rendering[0].id,download:""},Z(t.$store.localize(c.label))+" ("+Z(c.pageCount)+" "+Z(t.$translate(c.pageCount===1?"page":"pages"))+") ",9,ru)):c.label&&t.$store.localize(c.label)!==r.getFirstPageLabel(c)?(k(),F("a",{key:2,class:"tify-toc-link -dots",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[A("span",au,Z(t.$store.localize(c.label)),1),A("span",lu,Z(r.getFirstPageLabel(c)||"—"),1)],8,ou)):(k(),F("a",{key:3,class:"tify-toc-link",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[A("span",uu,Z(t.$store.localize(c.label)||r.getFirstPageLabel(c)),1)],8,cu)),(m=c.items)!=null&&m.some(T=>T.items)?De((k(),Ce(a,{key:4,id:`${s.id}-${h}`,ref_for:!0,ref:"children",level:e.level+1,purpose:e.purpose,structures:c.items},null,8,["id","level","purpose","structures"])),[[Ze,s.expandedStructures[h]]]):se("",!0)],10,nu)}),128))])}const Er=ae(tu,[["render",hu]]),fu={data(){return{otherItems:[],perElementPdfLinksVisible:!1}},computed:{hasElementPdfLinks(){return!(this.$store.manifest.structures instanceof Array)||!this.$store.manifest.structures[0]||!this.$store.manifest.structures[0].rendering?!1:this.$store.manifest.structures[0].rendering.some(n=>n.format&&n.format==="application/pdf")},imageUrls(){const t={};return this.$store.options.pages.forEach(n=>{var i,s;if(!n)return;const e=(s=(i=this.$store.manifest.items[n-1].items)==null?void 0:i[0].items)==null?void 0:s[0].body;if(e!=null&&e.service){const r=e.service instanceof Array?e.service[0]:e.service,o=["ImageService2","ImageService3"].includes(r.type||r["@type"])?"default":"native",l=r.type==="ImageService3"?"max":"full",a=r.id||r["@id"];t[n]=`${a}${a.at(-1)==="/"?"":"/"}full/${l}/0/${o}.jpg`}else t[n]=e.id}),t},pages(){return this.$store.options.pages.filter(t=>t>0)},renderings(){return this.$store.manifest.rendering?[].concat(this.$store.manifest.rendering):[]}}},du={class:"tify-export",tabindex:"0"},pu={class:"tify-sr-only"},gu={class:"tify-export-section -links"},mu={class:"tify-list"},vu=["href","download"],yu={key:0,class:"tify-export-section -renderings"},wu={class:"tify-list"},_u=["href"],Tu={key:0,class:"tify-export-container"},xu=["aria-controls","aria-expanded"],bu={class:"tify-sr-only"},Su=["id"],Eu={class:"tify-export-section -iiif"},Pu=A("h3",null,"IIIF",-1),Cu={class:"tify-list"},Ru={key:0},Lu=["href"],Hu=["href"],Ou={key:1,class:"tify-export-section -other"},Mu={class:"tify-list"},Du=["href"];function Au(t,n,e,i,s,r){var a;const o=Tr,l=Er;return k(),F("section",du,[A("h2",pu,Z(t.$translate("Export")),1),A("div",gu,[A("h3",null,Z(t.$translate("Download Individual Images")),1),A("ul",mu,[(k(!0),F(ve,null,Be(r.pages,c=>(k(),F("li",{key:c},[A("a",{href:r.imageUrls[c],download:`${c}.jpg`},Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(c,t.$store.localize(t.$store.manifest.items[c-1].label))),9,vu)]))),128))])]),t.$store.manifest.rendering?(k(),F("div",yu,[A("h3",null,Z(t.$translate("Renderings")),1),A("ul",wu,[(k(!0),F(ve,null,Be(r.renderings,c=>(k(),F("li",{key:c.id},[A("a",{href:c.id},Z(t.$store.localize(c.label)),9,_u)]))),128))]),r.hasElementPdfLinks?(k(),F("div",Tu,[A("button",{type:"button",class:Te(["tify-export-toggle",{"-close":s.perElementPdfLinksVisible}]),"aria-controls":t.$store.getId("export-pdf-list"),"aria-expanded":s.perElementPdfLinksVisible?"true":"false",onClick:n[0]||(n[0]=c=>s.perElementPdfLinksVisible=!s.perElementPdfLinksVisible)},[s.perElementPdfLinksVisible?(k(),F(ve,{key:1},[ie(o),A("span",bu,Z(t.$translate("Close PDF list")),1)],64)):(k(),F(ve,{key:0},[be(Z(t.$translate("PDFs for each element")),1)],64))],10,xu),s.perElementPdfLinksVisible?(k(),F("div",{key:0,id:t.$store.getId("export-pdf-list"),class:"tify-export-toc"},[A("h4",null,Z(t.$translate("PDFs for each element")),1),ie(l,{ref:"children",purpose:"pdf",level:0,structures:t.$store.structures},null,8,["structures"])],8,Su)):se("",!0)])):se("",!0)])):se("",!0),A("div",Eu,[Pu,A("ul",Cu,[t.$store.options.childManifestUrl?(k(),F("li",Ru,[A("a",{href:t.$store.options.childManifestUrl,download:"manifest.json"},Z(t.$translate("IIIF manifest (current document)")),9,Lu)])):se("",!0),A("li",null,[A("a",{href:t.$store.options.manifestUrl,download:"manifest.json"},Z(t.$translate(t.$store.collection?"IIIF manifest (collection)":"IIIF manifest")),9,Hu)])])]),(a=t.$store.manifest.seeAlso)!=null&&a.length?(k(),F("div",Ou,[A("h3",null,Z(t.$translate("Other Formats")),1),A("ul",Mu,[(k(!0),F(ve,null,Be(t.$store.manifest.seeAlso,c=>(k(),F("li",{key:c.id},[A("a",{href:c.id,download:""},Z(c.label?t.$store.localize(c.label):c.id),9,Du)]))),128))])])):se("",!0)])}const ku=ae(fu,[["render",Au]]);function vi(t,n,e=120){const i=t,s=e===!0?120:e;if(!s||s<0){i.scrollTop=n;return}const o=(n-t.scrollTop)/s/.1;setTimeout(()=>{i.scrollTop+=o,i.scrollTop!==n&&vi(i,n,s-10)},10)}function $i(t,n,e=!0){const i=n.querySelectorAll(t);if(!i.length)return;let s=i[0];const r=i[i.length-1];Array.prototype.forEach.call(i,c=>{c.dataset.level>=s.dataset.level&&(s=c)});const o=n.getBoundingClientRect(),l=s.getBoundingClientRect(),a=r.getBoundingClientRect();if(l.topo.bottom){const c=a.bottom-o.bottom+n.scrollTop;vi(n,c+50,e)}}const fs=".tify-toc-structure.-current",Fu={data(){return{isInited:!1}},computed:{isNested(){return this.$store.structures.filter(t=>{var n;return(n=t.items)==null?void 0:n.some(e=>e.items)}).length>1}},watch:{"$store.options.pages":function(){this.$nextTick(()=>$i(fs,this.$el))},"$store.options.view":{handler(t){t==="toc"&&this.$nextTick(this.init)},immediate:!0}},methods:{init(){this.isInited=!0,this.$nextTick(()=>$i(fs,this.$el,!1))}}},Iu={class:"tify-toc",tabindex:"0"},Bu={class:"tify-sr-only"},zu={key:0,class:"tify-toc-header"};function Nu(t,n,e,i,s,r){const o=Er;return k(),F("section",Iu,[A("h2",Bu,Z(t.$translate("Table of Contents")),1),r.isNested?(k(),F("div",zu,[A("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[0]||(n[0]=l=>t.$refs.children.toggleAllChildren(!0))},Z(t.$translate("Expand all")),1),A("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[1]||(n[1]=l=>t.$refs.children.toggleAllChildren(!1))},Z(t.$translate("Collapse all")),1)])):se("",!0),s.isInited?(k(),Ce(o,{key:1,ref:"children",level:0,structures:t.$store.structures},null,8,["structures"])):se("",!0)])}const Vu=ae(Fu,[["render",Nu]]),Uu=750,ju={data(){return{itemHeight:0,itemVMargin:0,items:[{label:""}],itemsPerRow:0,knownImages:[],lastScrollTop:0,resizeTimeout:null,style:{},thumbnailWidth:0,touchTimeout:null}},watch:{"$store.options.pages":function(t){this.$nextTick(()=>{const n=".tify-thumbnails-item.-current";t.length>2||t.length>1&&t[1]!==t[0]+1||(this.$refs.container.querySelector(n)?$i(n,this.$el):this.scrollToCurrentPage())})},"$store.options.view":{handler(t){t==="thumbnails"&&this.$nextTick(this.init)},immediate:!0}},mounted(){this.style.flex=this.$el.style.flex},methods:{init(){this.updateDimensions(),this.scrollToCurrentPage(!1),new ResizeObserver(this.onResize).observe(this.$el)},onResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.$store.options.view==="thumbnails"&&this.updateDimensions()},200)},updateDimensions(){const t=this.$refs.container.querySelector(".tify-thumbnails-item"),n=t.currentStyle||window.getComputedStyle(t),e=parseInt(n.marginTop,10)+parseFloat(n.marginBottom,10);this.itemHeight=t.offsetHeight+e,this.itemVerticalMargin=e;const i=parseInt(n.marginLeft,10)+parseFloat(n.marginRight,10),s=t.offsetWidth+i;this.thumbnailWidth=t.offsetWidth,this.itemsPerRow=Math.floor(this.$refs.container.clientWidth/s);const o=Math.ceil(this.$store.manifest.items.length/this.itemsPerRow)*this.itemHeight;this.$refs.container.style.height=`${o}px`,this.redrawThumbnails(),this.scrollToCurrentPage(!1)},redrawThumbnails(){const t=this.$el.scrollTop,n=Math.floor(t/this.itemHeight)*this.itemsPerRow+1,i=Math.ceil(this.$el.offsetHeight/this.itemHeight)*this.itemsPerRow,s=n+this.itemsPerRow+i,r=Math.min(this.$store.manifest.items.length,s),o=[];for(let l=n-1;l{const l=Math.floor(n/this.itemsPerRow);this.$refs.container.style.paddingTop=`${l*this.itemHeight}px`})},scrollToCurrentPage(t=!0){const e=Math.floor((this.$store.options.pages[0]-1)/this.itemsPerRow)*this.itemHeight+(this.itemVMargin-50);t?vi(this.$el,e):this.$el.scrollTop=e},setPageAndSwitchView(t,n=!1){if(n){const e=this.$store.options.pages.slice(0),i=e.indexOf(t);i<0?(e.push(t),e.sort((s,r)=>s-r),e[0]===0&&e.shift()):e.length>1&&e.splice(i,1),this.$store.updateOptions({pages:e});return}this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},touchStartTogglePage(t){this.lastScrollTop=this.$el.scrollTop,this.touchTimeout=setTimeout(()=>{this.$el.scrollTop===this.lastScrollTop&&this.setPageAndSwitchView(t,!0)},Uu)},touchEnd(){clearTimeout(this.touchTimeout)}}},Wu={class:"tify-sr-only"},Gu={ref:"container",class:"tify-thumbnails-list"},qu=["onClick","onTouchstart"],Zu=["src"],Ku={class:"tify-thumbnails-page"};function Xu(t,n,e,i,s,r){return k(),F("section",{class:"tify-thumbnails",tabindex:"0",onScroll:n[1]||(n[1]=(...o)=>r.redrawThumbnails&&r.redrawThumbnails(...o))},[A("h2",Wu,Z(t.$translate("Pages")),1),A("div",Gu,[(k(!0),F(ve,null,Be(s.items,o=>(k(),F("a",{key:o.page,class:Te(["tify-thumbnails-item",{"-current":t.$store.options.pages.includes(o.page)}]),href:"javascript:;",onClick:bt(l=>r.setPageAndSwitchView(o.page,l.ctrlKey),["prevent"]),onTouchstart:l=>r.touchStartTogglePage(o.page),onTouchend:n[0]||(n[0]=(...l)=>r.touchEnd&&r.touchEnd(...l))},[A("img",{alt:"",src:o.imgUrl},null,8,Zu),A("span",Ku,Z(t.$store.getPageLabel(o.page,o.label)),1)],42,qu))),128))],512)],32)}const Yu=ae(ju,[["render",Xu]]),Ju={data(){return{fulltextAvailable:null,fulltexts:[]}},computed:{pages(){return this.$store.options.pages.filter(t=>!!t)}},watch:{"$store.options.pages":function(){this.loadFulltexts()}},mounted(){this.loadFulltexts()},methods:{loadFulltexts(){this.fulltextAvailable=null,this.fulltexts=[],this.$store.options.pages.forEach(t=>{if(t<1||this.fulltexts[t])return;const n=this.$store.manifest.items[t-1];if(!("annotations"in n)){this.fulltextAvailable=!1;return}const e=n.annotations[0].id;this.$store.fetchJson(e).then(i=>{const{resources:s}=i;s instanceof Array&&s.forEach((r,o)=>{const l=r.resource;if(l)if(this.fulltexts[t]||(this.fulltexts[t]=[]),l&&l.chars){const a=mi(l.chars);a&&(this.fulltextAvailable=!0),this.fulltexts[t][o]=a}else(l.id||l["@id"])&&this.loadRemoteFulltext(t,o,l.id||l["@id"])})},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load annotations: ${s}`),this.fulltextAvailable=!1})})},loadRemoteFulltext(t,n,e){Sn(e)&&this.$store.fetchText(e).then(i=>{const s=mi(i);s&&(this.fulltextAvailable=!0),this.fulltexts[t]||(this.fulltexts[t]=[]),this.fulltexts[t][n]=s},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load fulltext: ${s}`)})}}},Qu={class:"tify-fulltext",tabindex:"0"},$u={class:"tify-sr-only"},eh={key:0,class:"tify-fulltext-texts"},th=["innerHTML"],ih={key:1,class:"tify-fulltext-none"};function nh(t,n,e,i,s,r){return k(),F("section",Qu,[A("h2",$u,Z(t.$translate("Fulltext")),1),s.fulltextAvailable!==!1?(k(),F("div",eh,[(k(!0),F(ve,null,Be(r.pages,o=>(k(),F("div",{key:o,class:"tify-fulltext-page"},[A("h3",null,Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(o,t.$store.localize(t.$store.manifest.items[o-1].label))),1),(k(!0),F(ve,null,Be(s.fulltexts[o],(l,a)=>(k(),F("div",{key:`${o}-${a}`,class:"tify-fulltext-text",innerHTML:l},null,8,th))),128))]))),128))])):(k(),F("p",ih,Z(t.$translate("Fulltext not available for this page")),1))])}const sh=ae(Ju,[["render",nh]]),rh={},oh={class:"tify-icon",viewBox:"0 0 24 24"},ah=A("path",{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"},null,-1),lh=[ah];function ch(t,n){return k(),F("svg",oh,lh)}const uh=ae(rh,[["render",ch]]),hh={},fh={class:"tify-icon",viewBox:"0 0 24 24"},dh=A("path",{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"},null,-1),ph=[dh];function gh(t,n){return k(),F("svg",fh,ph)}const mh=ae(hh,[["render",gh]]),vh={},yh={class:"tify-icon",viewBox:"0 0 24 24"},wh=A("path",{d:"M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"},null,-1),_h=[wh];function Th(t,n){return k(),F("svg",yh,_h)}const xh=ae(vh,[["render",Th]]),bh={},Sh={class:"tify-icon",viewBox:"0 0 24 24"},Eh=A("path",{d:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"},null,-1),Ph=[Eh];function Ch(t,n){return k(),F("svg",Sh,Ph)}const Rh=ae(bh,[["render",Ch]]),Lh={},Hh={class:"tify-icon",viewBox:"0 0 24 24"},Oh=A("path",{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"},null,-1),Mh=[Oh];function Dh(t,n){return k(),F("svg",Hh,Mh)}const Ah=ae(Lh,[["render",Dh]]),kh={},Fh={class:"tify-icon",viewBox:"0 0 24 24"},Ih=A("path",{d:"M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z"},null,-1),Bh=[Ih];function zh(t,n){return k(),F("svg",Fh,Bh)}const Nh=ae(kh,[["render",zh]]),Vh={},Uh={class:"tify-icon",viewBox:"0 0 24 24"},jh=A("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"},null,-1),Wh=[jh];function Gh(t,n){return k(),F("svg",Uh,Wh)}const qh=ae(Vh,[["render",Gh]]),Zh={},Kh={class:"tify-icon",viewBox:"0 0 24 24"},Xh=A("path",{d:"M19,12H17V15H14V17H19V12M7,9H10V7H5V12H7V9M21,3H3A2,2 0 0,0 1,5V19A2,2 0 0,0 3,21H21A2,2 0 0,0 23,19V5A2,2 0 0,0 21,3M21,19H3V5H21V19Z"},null,-1),Yh=[Xh];function Jh(t,n){return k(),F("svg",Kh,Yh)}const Qh=ae(Zh,[["render",Jh]]),$h={},ef={class:"tify-icon",viewBox:"0 0 24 24"},tf=A("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"},null,-1),nf=[tf];function sf(t,n){return k(),F("svg",ef,nf)}const rf=ae($h,[["render",sf]]),of={},af={class:"tify-icon",viewBox:"0 0 24 24"},lf=A("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},null,-1),cf=[lf];function uf(t,n){return k(),F("svg",af,cf)}const Pr=ae(of,[["render",uf]]),hf={},ff={class:"tify-icon",viewBox:"0 0 24 24"},df=A("path",{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},null,-1),pf=[df];function gf(t,n){return k(),F("svg",ff,pf)}const Cr=ae(hf,[["render",gf]]);var Rr={exports:{}};(function(t,n){(function(e,i){t.exports=i()})(xn,function(){var e="__v-click-outside",i=typeof window<"u",s=typeof navigator<"u",r=i&&("ontouchstart"in window||s&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],o=function(h){var p=h.event,m=h.handler;(0,h.middleware)(p)&&m(p)},l=function(h,p){var m=function(f){var _=typeof f=="function";if(!_&&typeof f!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:_?f:f.handler,middleware:f.middleware||function(H){return H},events:f.events||r,isActive:f.isActive!==!1,detectIframe:f.detectIframe!==!1,capture:!!f.capture}}(p.value),T=m.handler,x=m.middleware,E=m.detectIframe,R=m.capture;if(m.isActive){if(h[e]=m.events.map(function(f){return{event:f,srcTarget:document.documentElement,handler:function(_){return function(H){var L=H.el,O=H.event,N=H.handler,G=H.middleware,q=O.path||O.composedPath&&O.composedPath();(q?q.indexOf(L)<0:!L.contains(O.target))&&o({event:O,handler:N,middleware:G})}({el:h,event:_,handler:T,middleware:x})},capture:R}}),E){var M={event:"blur",srcTarget:window,handler:function(f){return function(_){var H=_.el,L=_.event,O=_.handler,N=_.middleware;setTimeout(function(){var G=document.activeElement;G&&G.tagName==="IFRAME"&&!H.contains(G)&&o({event:L,handler:O,middleware:N})},0)}({el:h,event:f,handler:T,middleware:x})},capture:R};h[e]=[].concat(h[e],[M])}h[e].forEach(function(f){var _=f.event,H=f.srcTarget,L=f.handler;return setTimeout(function(){h[e]&&H.addEventListener(_,L,R)},0)})}},a=function(h){(h[e]||[]).forEach(function(p){return p.srcTarget.removeEventListener(p.event,p.handler,p.capture)}),delete h[e]},c=i?{beforeMount:l,updated:function(h,p){var m=p.value,T=p.oldValue;JSON.stringify(m)!==JSON.stringify(T)&&(a(h),l(h,{value:m}))},unmounted:a}:{};return{install:function(h){h.directive("click-outside",c)},directive:c}})})(Rr);var mf=Rr.exports;const En=bn(mf);var Lr={exports:{}};(function(t){//! openseadragon 3.0.0 +//! Built on 2021-12-15 +//! Git commit: v3.0.0-0-3eded36 +//! http://openseadragon.github.io +//! License: http://openseadragon.github.io/license/ +function n(e){return new n.Viewer(e)}(function(e){e.version={versionStr:"3.0.0",major:parseInt("3",10),minor:parseInt("0",10),revision:parseInt("0",10)};var i={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},s=Object.prototype.toString,r=Object.prototype.hasOwnProperty;e.isFunction=function(o){return e.type(o)==="function"},e.isArray=Array.isArray||function(o){return e.type(o)==="array"},e.isWindow=function(o){return o&&typeof o=="object"&&"setInterval"in o},e.type=function(o){return o==null?String(o):i[s.call(o)]||"object"},e.isPlainObject=function(o){if(!o||n.type(o)!=="object"||o.nodeType||e.isWindow(o)||o.constructor&&!r.call(o,"constructor")&&!r.call(o.constructor.prototype,"isPrototypeOf"))return!1;var l;for(var a in o)l=a;return l===void 0||r.call(o,l)},e.isEmptyObject=function(o){for(var l in o)return!1;return!0},e.freezeObject=function(o){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(l){return l},e.freezeObject(o)},e.supportsCanvas=function(){var o=document.createElement("canvas");return!!(e.isFunction(o.getContext)&&o.getContext("2d"))}(),e.isCanvasTainted=function(o){var l=!1;try{o.getContext("2d").getImageData(0,0,1,1)}catch{l=!0}return l},e.supportsAddEventListener=function(){return!!(document.documentElement.addEventListener&&document.addEventListener)}(),e.supportsRemoveEventListener=function(){return!!(document.documentElement.removeEventListener&&document.removeEventListener)}(),e.supportsEventListenerOptions=function(){var o=0;if(e.supportsAddEventListener)try{var l={get capture(){return o++,!1},get once(){return o++,!1},get passive(){return o++,!1}};window.addEventListener("test",null,l),window.removeEventListener("test",null,l)}catch{o=0}return o>=3}(),e.getCurrentPixelDensityRatio=function(){if(e.supportsCanvas){var o=document.createElement("canvas").getContext("2d"),l=window.devicePixelRatio||1,a=o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1;return Math.max(l,1)/a}else return 1},e.pixelDensityRatio=e.getCurrentPixelDensityRatio()})(n),function(e){e.extend=function(){var a,c,h,p,m,T,x=arguments[0]||{},E=arguments.length,R=!1,M=1;for(typeof x=="boolean"&&(R=x,x=arguments[1]||{},M=2),typeof x!="object"&&!n.isFunction(x)&&(x={}),E===M&&(x=this,--M);M=h.x&&c.x=h.y},getMousePosition:function(a){if(typeof a.pageX=="number")e.getMousePosition=function(c){var h=new e.Point;return h.x=c.pageX,h.y=c.pageY,h};else if(typeof a.clientX=="number")e.getMousePosition=function(c){var h=new e.Point;return h.x=c.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,h.y=c.clientY+document.body.scrollTop+document.documentElement.scrollTop,h};else throw new Error("Unknown event mouse position, no known technique.");return e.getMousePosition(a)},getPageScroll:function(){var a=document.documentElement||{},c=document.body||{};if(typeof window.pageXOffset=="number")e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(c.scrollLeft||c.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else if(a.scrollLeft||a.scrollTop)e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new e.Point(0,0);return e.getPageScroll()},setPageScroll:function(a){if(typeof window.scrollTo<"u")e.setPageScroll=function(p){window.scrollTo(p.x,p.y)};else{var c=e.getPageScroll();if(c.x===a.x&&c.y===a.y)return;document.body.scrollLeft=a.x,document.body.scrollTop=a.y;var h=e.getPageScroll();if(h.x!==c.x&&h.y!==c.y){e.setPageScroll=function(p){document.body.scrollLeft=p.x,document.body.scrollTop=p.y};return}if(document.documentElement.scrollLeft=a.x,document.documentElement.scrollTop=a.y,h=e.getPageScroll(),h.x!==c.x&&h.y!==c.y){e.setPageScroll=function(p){document.documentElement.scrollLeft=p.x,document.documentElement.scrollTop=p.y};return}e.setPageScroll=function(p){}}e.setPageScroll(a)},getWindowSize:function(){var a=document.documentElement||{},c=document.body||{};if(typeof window.innerWidth=="number")e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(a.clientWidth||a.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(c.clientWidth||c.clientHeight)e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return e.getWindowSize()},makeCenteredNode:function(a){a=e.getElement(a);var c=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(c[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(c[1].style,{display:"table-row"}),e.extend(c[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),c[0].appendChild(c[1]),c[1].appendChild(c[2]),c[2].appendChild(a),c[0]},makeNeutralElement:function(a){var c=document.createElement(a),h=c.style;return h.background="transparent none",h.border="none",h.margin="0px",h.padding="0px",h.position="static",c},now:function(){return Date.now?e.now=Date.now:e.now=function(){return new Date().getTime()},e.now()},makeTransparentImage:function(a){var c=e.makeNeutralElement("img");return c.src=a,c},setElementOpacity:function(a,c,h){var p,m;a=e.getElement(a),h&&!e.Browser.alpha&&(c=Math.round(c)),e.Browser.opacity?a.style.opacity=c<1?c:"":c<1?(p=Math.round(100*c),m="alpha(opacity="+p+")",a.style.filter=m):a.style.filter=""},setElementTouchActionNone:function(a){a=e.getElement(a),typeof a.style.touchAction<"u"?a.style.touchAction="none":typeof a.style.msTouchAction<"u"&&(a.style.msTouchAction="none")},setElementPointerEvents:function(a,c){a=e.getElement(a),typeof a.style.pointerEvents<"u"&&(a.style.pointerEvents=c)},setElementPointerEventsNone:function(a){e.setElementPointerEvents(a,"none")},addClass:function(a,c){a=e.getElement(a),a.className?(" "+a.className+" ").indexOf(" "+c+" ")===-1&&(a.className+=" "+c):a.className=c},indexOf:function(a,c,h){return Array.prototype.indexOf?this.indexOf=function(p,m,T){return p.indexOf(m,T)}:this.indexOf=function(p,m,T){var x,E=T||0,R;if(!p)throw new TypeError;if(R=p.length,R===0||E>=R)return-1;for(E<0&&(E=R-Math.abs(E)),x=E;x=200&&E.status<300||E.status===0&&x!=="http:"&&x!=="https:"?c(E):(e.console.log("AJAX request returned %d: %s",E.status,a),e.isFunction(h)&&h(E)))};try{if(E.open("GET",a,!0),T&&(E.responseType=T),m)for(var R in m)Object.prototype.hasOwnProperty.call(m,R)&&m[R]&&E.setRequestHeader(R,m[R]);p&&(E.withCredentials=!0),E.send(null)}catch(M){e.console.log("%s while making AJAX request: %s",M.name,M.message),E.onreadystatechange=function(){},e.isFunction(h)&&h(E,M)}return E},jsonp:function(a){var c,h=a.url,p=document.head||document.getElementsByTagName("head")[0]||document.documentElement,m=a.callbackName||"openseadragon"+e.now(),T=window[m],x="$1"+m+"$2",E=a.param||"callback",R=a.callback;h=h.replace(/(=)\?(&|$)|\?\?/i,x),h+=(/\?/.test(h)?"&":"?")+E+"="+m,window[m]=function(M){if(T)window[m]=T;else try{delete window[m]}catch{}R&&e.isFunction(R)&&R(M)},c=document.createElement("script"),(a.async!==void 0||a.async!==!1)&&(c.async="async"),a.scriptCharset&&(c.charset=a.scriptCharset),c.src=h,c.onload=c.onreadystatechange=function(M,f){(f||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,p&&c.parentNode&&p.removeChild(c),c=void 0)},p.insertBefore(c,p.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(a){if(window.DOMParser)e.parseXml=function(c){var h=null,p;return p=new DOMParser,h=p.parseFromString(c,"text/xml"),h};else if(window.ActiveXObject)e.parseXml=function(c){var h=null;return h=new ActiveXObject("Microsoft.XMLDOM"),h.async=!1,h.loadXML(c),h};else throw new Error("Browser doesn't support XML DOM.");return e.parseXml(a)},parseJSON:function(a){return e.parseJSON=window.JSON.parse,e.parseJSON(a)},imageFormatSupported:function(a){return a=a||"",!!r[a.toLowerCase()]},setImageFormatsSupported:function(a){e.extend(r,a)}});var s=function(a){};e.console=window.console||{log:s,debug:s,info:s,warn:s,error:s,assert:s},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var r={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},o={};(function(){var a=navigator.appVersion,c=navigator.userAgent,h;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(c.substring(c.indexOf("MSIE")+5,c.indexOf(";",c.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(c.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(c.substring(c.indexOf("Edge")+5))):c.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(c.substring(c.indexOf("Edg")+4))):c.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(c.substring(c.indexOf("Firefox")+8))):c.indexOf("Safari")>=0?(e.Browser.vendor=c.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(c.substring(c.substring(0,c.indexOf("Safari")).lastIndexOf("/")+1,c.indexOf("Safari")))):(h=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),h.exec(c)!==null&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(a);break}var p=window.location.search.substring(1),m=p.split("&"),T,x,E;for(E=0;E0){var R=T.substring(0,x),M=T.substring(x+1);try{o[R]=decodeURIComponent(M)}catch{e.console.error("Ignoring malformed URL parameter: %s=%s",R,M)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(a){var c=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,h=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame;if(c&&h)e.requestAnimationFrame=function(){return c.apply(a,arguments)},e.cancelAnimationFrame=function(){return h.apply(a,arguments)};else{var p=[],m=[],T=0,x;e.requestAnimationFrame=function(E){return p.push([++T,E]),x||(x=setInterval(function(){if(p.length){var R=e.now(),M=m;for(m=p,p=M;m.length;)m.shift()[1](R)}else clearInterval(x),x=void 0},1e3/50)),T},e.cancelAnimationFrame=function(E){var R,M;for(R=0,M=p.length;R8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],e.MouseTracker.wheelEventName==="DOMMouseScroll"&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=function(){var g=document.createElement("div");return e.isFunction(g.setPointerCapture)&&e.isFunction(g.releasePointerCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=function(){var g=document.createElement("div");return e.isFunction(g.setCapture)&&e.isFunction(g.releaseCapture)}(),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(g){this._gPoints=[],this.type=g,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(g){return this._gPoints.push(g)},removeById:function(g){var d,y=this._gPoints.length;for(d=0;d1&&(this.type==="mouse"||this.type==="pen")&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(e.console.warn("GesturePointList.removeContact() Implausible contacts value"),this.contacts=0)}};function o(g){var d=i[g.hash],y,w,I,j,ne,he=d.activePointersLists.length;for(y=0;y0){for(ne=[],j=I.asArray(),w=0;wd.touches.length-I&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var he={originalEvent:d,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(P(g,he),w=0;w0&&d.removeContact(),w=d.removeById(y.id)):w=d.getLength(),w}function C(g,d){switch(d.eventType){case"pointermove":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!1,d.preventGesture=!g.hasGestureHandlers,d.stopPropagation=!1;break;case"pointerover":case"pointerout":case"contextmenu":case"keydown":case"keyup":case"keypress":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!1,d.preventGesture=!1,d.stopPropagation=!1;break;case"pointerdown":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!1,d.preventGesture=!g.hasGestureHandlers,d.stopPropagation=!1;break;case"pointerup":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!1,d.preventGesture=!g.hasGestureHandlers,d.stopPropagation=!1;break;case"wheel":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!1,d.preventGesture=!g.hasScrollHandler,d.stopPropagation=!1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":d.isStoppable=!0,d.isCancelable=!1,d.preventDefault=!1,d.preventGesture=!1,d.stopPropagation=!1;break;case"click":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!!g.clickHandler,d.preventGesture=!1,d.stopPropagation=!1;break;case"dblclick":d.isStoppable=!0,d.isCancelable=!0,d.preventDefault=!!g.dblClickHandler,d.preventGesture=!1,d.stopPropagation=!1;break;case"focus":case"blur":case"pointerenter":case"pointerleave":default:d.isStoppable=!1,d.isCancelable=!1,d.preventDefault=!1,d.preventGesture=!1,d.stopPropagation=!1;break}}function P(g,d){d.eventSource=g,d.eventPhase=d.originalEvent&&typeof d.originalEvent.eventPhase<"u"?d.originalEvent.eventPhase:0,d.defaultPrevented=e.eventIsCanceled(d.originalEvent),d.shouldCapture=!1,d.shouldReleaseCapture=!1,d.userData=g.userData,C(g,d),g.preProcessEventHandler&&g.preProcessEventHandler(d)}function B(g,d,y){var w=g.getActivePointersListByType(d.type),I=w.getById(d.id);I?y&&!I.captured?(I.captured=!0,w.captureCount++):!y&&I.captured&&(I.captured=!1,w.captureCount--,w.captureCount<0&&(w.captureCount=0,e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))):e.console.warn("updatePointerCaptured() called on untracked pointer")}function D(g,d,y){var w=g.getActivePointersListByType(y.type),I;I=w.getById(y.id),I?(I.insideElement=!0,I.lastPos=I.currentPos,I.lastTime=I.currentTime,I.currentPos=y.currentPos,I.currentTime=y.currentTime,y=I):(y.captured=!1,y.insideElementPressed=!1,y.insideElement=!0,v(w,y)),g.enterHandler&&g.enterHandler({eventSource:g,pointerType:y.type,position:M(y.currentPos,g.element),buttons:w.buttons,pointers:g.getActivePointerCount(),insideElementPressed:y.insideElementPressed,buttonDownAny:w.buttons!==0,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData})}function V(g,d,y){var w=g.getActivePointersListByType(y.type),I,j;I=w.getById(y.id),I?(I.captured?(I.insideElement=!1,I.lastPos=I.currentPos,I.lastTime=I.currentTime,I.currentPos=y.currentPos,I.currentTime=y.currentTime):b(g,w,I),y=I):(y.captured=!1,y.insideElementPressed=!1),(g.leaveHandler||g.exitHandler)&&(j={eventSource:g,pointerType:y.type,position:y.currentPos&&M(y.currentPos,g.element),buttons:w.buttons,pointers:g.getActivePointerCount(),insideElementPressed:y.insideElementPressed,buttonDownAny:w.buttons!==0,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData},g.leaveHandler&&g.leaveHandler(j),g.exitHandler&&g.exitHandler(j))}function z(g,d,y){var w,I;w=g.getActivePointersListByType(y.type),I=w.getById(y.id),I?y=I:(y.captured=!1,y.insideElementPressed=!1),g.overHandler&&g.overHandler({eventSource:g,pointerType:y.type,position:M(y.currentPos,g.element),buttons:w.buttons,pointers:g.getActivePointerCount(),insideElementPressed:y.insideElementPressed,buttonDownAny:w.buttons!==0,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData})}function U(g,d,y){var w,I;w=g.getActivePointersListByType(y.type),I=w.getById(y.id),I?y=I:(y.captured=!1,y.insideElementPressed=!1),g.outHandler&&g.outHandler({eventSource:g,pointerType:y.type,position:y.currentPos&&M(y.currentPos,g.element),buttons:w.buttons,pointers:g.getActivePointerCount(),insideElementPressed:y.insideElementPressed,buttonDownAny:w.buttons!==0,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData})}function W(g,d,y,w){var I=i[g.hash],j=g.getActivePointersListByType(y.type),ne;if(typeof d.originalEvent.buttons<"u"?j.buttons=d.originalEvent.buttons:w===0?j.buttons|=1:w===1?j.buttons|=4:w===2?j.buttons|=2:w===3?j.buttons|=8:w===4?j.buttons|=16:w===5&&(j.buttons|=32),w!==0){d.shouldCapture=!1,d.shouldReleaseCapture=!1,g.nonPrimaryPressHandler&&!d.preventGesture&&!d.defaultPrevented&&(d.preventDefault=!0,g.nonPrimaryPressHandler({eventSource:g,pointerType:y.type,position:M(y.currentPos,g.element),button:w,buttons:j.buttons,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData}));return}if(ne=j.getById(y.id),ne)ne.insideElementPressed=!0,ne.insideElement=!0,ne.originalTarget=d.originalEvent.target,ne.contactPos=y.currentPos,ne.contactTime=y.currentTime,ne.lastPos=ne.currentPos,ne.lastTime=ne.currentTime,ne.currentPos=y.currentPos,ne.currentTime=y.currentTime,y=ne;else{e.console.warn("pointerdown event on untracked pointer"),y.captured=!1,y.insideElementPressed=!0,y.insideElement=!0,y.originalTarget=d.originalEvent.target,v(j,y);return}j.addContact(),!d.preventGesture&&!d.defaultPrevented?(d.shouldCapture=!0,d.shouldReleaseCapture=!1,d.preventDefault=!0,(g.dragHandler||g.dragEndHandler||g.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.addPoint(g,y),j.contacts===1?g.pressHandler&&!d.preventGesture&&g.pressHandler({eventSource:g,pointerType:y.type,position:M(y.contactPos,g.element),buttons:j.buttons,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData}):j.contacts===2&&g.pinchHandler&&y.type==="touch"&&(I.pinchGPoints=j.asArray(),I.lastPinchDist=I.currentPinchDist=I.pinchGPoints[0].currentPos.distanceTo(I.pinchGPoints[1].currentPos),I.lastPinchCenter=I.currentPinchCenter=f(I.pinchGPoints[0].currentPos,I.pinchGPoints[1].currentPos))):(d.shouldCapture=!1,d.shouldReleaseCapture=!1)}function X(g,d,y,w){var I=i[g.hash],j=g.getActivePointersListByType(y.type),ne,he,Q,Le=!1,Pe;if(typeof d.originalEvent.buttons<"u"?j.buttons=d.originalEvent.buttons:w===0?j.buttons^=-2:w===1?j.buttons^=-5:w===2?j.buttons^=-3:w===3?j.buttons^=-9:w===4?j.buttons^=-17:w===5&&(j.buttons^=-33),d.shouldCapture=!1,w!==0){d.shouldReleaseCapture=!1,g.nonPrimaryReleaseHandler&&!d.preventGesture&&!d.defaultPrevented&&(d.preventDefault=!0,g.nonPrimaryReleaseHandler({eventSource:g,pointerType:y.type,position:M(y.currentPos,g.element),button:w,buttons:j.buttons,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData}));return}Q=j.getById(y.id),Q?(j.removeContact(),Q.captured&&(Le=!0),Q.lastPos=Q.currentPos,Q.lastTime=Q.currentTime,Q.currentPos=y.currentPos,Q.currentTime=y.currentTime,Q.insideElement||b(g,j,Q),ne=Q.currentPos,he=Q.currentTime):(e.console.warn("updatePointerUp(): pointerup on untracked gPoint"),y.captured=!1,y.insideElementPressed=!1,y.insideElement=!0,v(j,y),Q=y),!d.preventGesture&&!d.defaultPrevented&&(Le?(d.shouldReleaseCapture=!0,d.preventDefault=!0,(g.dragHandler||g.dragEndHandler||g.pinchHandler)&&e.MouseTracker.gesturePointVelocityTracker.removePoint(g,Q),j.contacts===0?(g.releaseHandler&&g.releaseHandler({eventSource:g,pointerType:Q.type,position:M(ne,g.element),buttons:j.buttons,insideElementPressed:Q.insideElementPressed,insideElementReleased:Q.insideElement,isTouchEvent:Q.type==="touch",originalEvent:d.originalEvent,userData:g.userData}),g.dragEndHandler&&I.sentDragEvent&&g.dragEndHandler({eventSource:g,pointerType:Q.type,position:M(Q.currentPos,g.element),speed:Q.speed,direction:Q.direction,shift:d.originalEvent.shiftKey,isTouchEvent:Q.type==="touch",originalEvent:d.originalEvent,userData:g.userData}),I.sentDragEvent=!1,(g.clickHandler||g.dblClickHandler)&&Q.insideElement&&(Pe=he-Q.contactTime<=g.clickTimeThreshold&&Q.contactPos.distanceTo(ne)<=g.clickDistThreshold,g.clickHandler&&g.clickHandler({eventSource:g,pointerType:Q.type,position:M(Q.currentPos,g.element),quick:Pe,shift:d.originalEvent.shiftKey,isTouchEvent:Q.type==="touch",originalEvent:d.originalEvent,originalTarget:Q.originalTarget,userData:g.userData}),g.dblClickHandler&&Pe&&(j.clicks++,j.clicks===1?(I.lastClickPos=ne,I.dblClickTimeOut=setTimeout(function(){j.clicks=0},g.dblClickTimeThreshold)):j.clicks===2&&(clearTimeout(I.dblClickTimeOut),j.clicks=0,I.lastClickPos.distanceTo(ne)<=g.dblClickDistThreshold&&g.dblClickHandler({eventSource:g,pointerType:Q.type,position:M(Q.currentPos,g.element),shift:d.originalEvent.shiftKey,isTouchEvent:Q.type==="touch",originalEvent:d.originalEvent,userData:g.userData}),I.lastClickPos=null)))):j.contacts===2&&g.pinchHandler&&Q.type==="touch"&&(I.pinchGPoints=j.asArray(),I.lastPinchDist=I.currentPinchDist=I.pinchGPoints[0].currentPos.distanceTo(I.pinchGPoints[1].currentPos),I.lastPinchCenter=I.currentPinchCenter=f(I.pinchGPoints[0].currentPos,I.pinchGPoints[1].currentPos))):(d.shouldReleaseCapture=!1,g.releaseHandler&&(g.releaseHandler({eventSource:g,pointerType:Q.type,position:M(ne,g.element),buttons:j.buttons,insideElementPressed:Q.insideElementPressed,insideElementReleased:Q.insideElement,isTouchEvent:Q.type==="touch",originalEvent:d.originalEvent,userData:g.userData}),d.preventDefault=!0)))}function K(g,d,y){var w=i[g.hash],I=g.getActivePointersListByType(y.type),j,ne,he;if(typeof d.originalEvent.buttons<"u"&&(I.buttons=d.originalEvent.buttons),j=I.getById(y.id),j)j.lastPos=j.currentPos,j.lastTime=j.currentTime,j.currentPos=y.currentPos,j.currentTime=y.currentTime;else return;d.shouldCapture=!1,d.shouldReleaseCapture=!1,g.stopHandler&&y.type==="mouse"&&(clearTimeout(g.stopTimeOut),g.stopTimeOut=setTimeout(function(){pe(g,d.originalEvent,y.type)},g.stopDelay)),I.contacts===0?g.moveHandler&&g.moveHandler({eventSource:g,pointerType:y.type,position:M(y.currentPos,g.element),buttons:I.buttons,isTouchEvent:y.type==="touch",originalEvent:d.originalEvent,userData:g.userData}):I.contacts===1?(g.moveHandler&&(j=I.asArray()[0],g.moveHandler({eventSource:g,pointerType:j.type,position:M(j.currentPos,g.element),buttons:I.buttons,isTouchEvent:j.type==="touch",originalEvent:d.originalEvent,userData:g.userData})),g.dragHandler&&!d.preventGesture&&!d.defaultPrevented&&(j=I.asArray()[0],he=j.currentPos.minus(j.lastPos),g.dragHandler({eventSource:g,pointerType:j.type,position:M(j.currentPos,g.element),buttons:I.buttons,delta:he,speed:j.speed,direction:j.direction,shift:d.originalEvent.shiftKey,isTouchEvent:j.type==="touch",originalEvent:d.originalEvent,userData:g.userData}),d.preventDefault=!0,w.sentDragEvent=!0)):I.contacts===2&&(g.moveHandler&&(ne=I.asArray(),g.moveHandler({eventSource:g,pointerType:ne[0].type,position:M(f(ne[0].currentPos,ne[1].currentPos),g.element),buttons:I.buttons,isTouchEvent:ne[0].type==="touch",originalEvent:d.originalEvent,userData:g.userData})),g.pinchHandler&&y.type==="touch"&&!d.preventGesture&&!d.defaultPrevented&&(he=w.pinchGPoints[0].currentPos.distanceTo(w.pinchGPoints[1].currentPos),he!==w.currentPinchDist&&(w.lastPinchDist=w.currentPinchDist,w.currentPinchDist=he,w.lastPinchCenter=w.currentPinchCenter,w.currentPinchCenter=f(w.pinchGPoints[0].currentPos,w.pinchGPoints[1].currentPos),g.pinchHandler({eventSource:g,pointerType:"touch",gesturePoints:w.pinchGPoints,lastCenter:M(w.lastPinchCenter,g.element),center:M(w.currentPinchCenter,g.element),lastDistance:w.lastPinchDist,distance:w.currentPinchDist,shift:d.originalEvent.shiftKey,originalEvent:d.originalEvent,userData:g.userData}),d.preventDefault=!0)))}function te(g,d,y){var w=g.getActivePointersListByType(y.type),I;I=w.getById(y.id),I&&b(g,w,I)}function pe(g,d,y){g.stopHandler&&g.stopHandler({eventSource:g,pointerType:y,position:R(d,g.element),buttons:g.getActivePointersListByType(y).buttons,isTouchEvent:y==="touch",originalEvent:d,userData:g.userData})}}(n),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(i,s,r){var o=i.parentNode;typeof s=="number"&&(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"),s={anchor:s}),s.attachToViewer=typeof s.attachToViewer>"u"?!0:s.attachToViewer,this.autoFade=typeof s.autoFade>"u"?!0:s.autoFade,this.element=i,this.anchor=s.anchor,this.container=r,this.anchor===e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof s.top=="number"?s.top+"px":s.top,this.wrapper.style.left=typeof s.left=="number"?s.left+"px":s.left,this.wrapper.style.height=typeof s.height=="number"?s.height+"px":s.height,this.wrapper.style.width=typeof s.width=="number"?s.width+"px":s.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),s.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):o.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==e.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!=="none"},setVisible:function(i){this.wrapper.style.display=i?this.anchor===e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(i){this.element[e.SIGNAL]&&e.Browser.vendor===e.BROWSERS.IE?e.setElementOpacity(this.element,i,!0):e.setElementOpacity(this.wrapper,i,!0)}}}(n),function(e){e.ControlDock=function(s){var r=["topleft","topright","bottomright","bottomleft"],o,l;for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(Math.random()*1e6),container:e.makeNeutralElement("div"),controls:[]},s),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%"),l=0;l=0)){switch(r.anchor){case e.ControlAnchor.TOP_RIGHT:o=this.controls.topright,s.style.position="relative",s.style.paddingRight="0px",s.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:o=this.controls.bottomright,s.style.position="relative",s.style.paddingRight="0px",s.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:o=this.controls.bottomleft,s.style.position="relative",s.style.paddingLeft="0px",s.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:o=this.controls.topleft,s.style.position="relative",s.style.paddingLeft="0px",s.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:o=this.container,s.style.margin="0px",s.style.padding="0px";break;default:case e.ControlAnchor.NONE:o=this.container,s.style.margin="0px",s.style.padding="0px";break}this.controls.push(new e.Control(s,r,o)),s.style.display="inline-block"}},removeControl:function(s){s=e.getElement(s);var r=i(this,s);return r>=0&&(this.controls[r].destroy(),this.controls.splice(r,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var s;for(s=this.controls.length-1;s>=0;s--)if(this.controls[s].isVisible())return!0;return!1},setControlsEnabled:function(s){var r;for(r=this.controls.length-1;r>=0;r--)this.controls[r].setVisible(s);return this}};function i(s,r){var o=s.controls,l;for(l=o.length-1;l>=0;l--)if(o[l].element===r)return l;return-1}}(n),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}}})}(n),function(e){var i={},s=1;e.Viewer=function(u){var v=arguments,b=this,C;if(e.isPlainObject(u)||(u={id:v[0],xmlPath:v.length>1?v[1]:void 0,prefixUrl:v.length>2?v[2]:void 0,controls:v.length>3?v[3]:void 0,overlays:v.length>4?v[4]:void 0}),u.config&&(e.extend(!0,u,u.config),delete u.config),e.extend(!0,this,{id:u.id,hash:u.hash||s++,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,u),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof i[this.hash]<"u"&&e.console.warn("Hash "+this.hash+" has already been used."),i[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._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(P){var B=e.getString("Errors.OpenFailed",P.eventSource,P.message);b._showMessage(B)}),e.ControlDock.call(this,u),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(P){P.width="100%",P.height="100%",P.overflow="hidden",P.position="absolute",P.top="0px",P.left="0px"}(this.canvas.style),e.setElementTouchActionNone(this.canvas),u.tabIndex!==""&&(this.canvas.tabIndex=u.tabIndex===void 0?0:u.tabIndex),this.container.className="openseadragon-container",function(P){P.width="100%",P.height="100%",P.position="relative",P.overflow="hidden",P.left="0px",P.top="0px",P.textAlign="left"}(this.container.style),e.setElementTouchActionNone(this.container),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({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,R),keyDownHandler:e.delegate(this,M),keyHandler:e.delegate(this,f),clickHandler:e.delegate(this,_),dblClickHandler:e.delegate(this,H),dragHandler:e.delegate(this,L),dragEndHandler:e.delegate(this,O),enterHandler:e.delegate(this,N),leaveHandler:e.delegate(this,G),pressHandler:e.delegate(this,q),releaseHandler:e.delegate(this,$),nonPrimaryPressHandler:e.delegate(this,re),nonPrimaryReleaseHandler:e.delegate(this,J),scrollHandler:e.delegate(this,ue),pinchHandler:e.delegate(this,fe)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,me),leaveHandler:e.delegate(this,le)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),i[this.hash].prevContainerSize=r(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(P){b.source=b.world.getItemAt(0).source,i[b.hash].forceRedraw=!0,b._updateRequestId||(b._updateRequestId=c(b,oe))}),this.world.addHandler("remove-item",function(P){b.world.getItemCount()?b.source=b.world.getItemAt(0).source:b.source=null,i[b.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(P){b.viewport&&b.viewport._setContentBounds(b.world.getHomeBounds(),b.world.getContentFactor())}),this.world.addHandler("item-index-change",function(P){b.source=b.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:i[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:u.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&&(C=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(C,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(C=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(C,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),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,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),C=0;C-1&&u.index=0&&u=0)return this;var B=l(this,P);return this.currentOverlays.push(B),B.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:u,location:P.location,placement:P.placement}),this},updateOverlay:function(u,v,b){var C;return u=e.getElement(u),C=a(this.currentOverlays,u),C>=0&&(this.currentOverlays[C].update(v,b),i[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:u,location:v,placement:b})),this},removeOverlay:function(u){var v;return u=e.getElement(u),v=a(this.currentOverlays,u),v>=0&&(this.currentOverlays[v].destroy(),this.currentOverlays.splice(v,1),i[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:u})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return i[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(u){var v;return u=e.getElement(u),v=a(this.currentOverlays,u),v>=0?this.currentOverlays[v]:null},_updateSequenceButtons:function(u){this.nextButton&&(!this.tileSources||this.tileSources.length-1===u?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(u>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(u){this._hideMessage();var v=e.makeNeutralElement("div");v.appendChild(document.createTextNode(u)),this.messageDiv=e.makeCenteredNode(v),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var u=this.messageDiv;u&&(u.parentNode.removeChild(u),delete this.messageDiv)},gestureSettingsByDeviceType:function(u){switch(u){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var u,v=this.currentOverlays.length;for(u=0;u1&&(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,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var u=e.pixelDensityRatio,v=e.getCurrentPixelDensityRatio();u!==v&&(e.pixelDensityRatio=v,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var u=this._sequenceIndex-1;this.navPrevNextWrap&&u<0&&(u+=this.tileSources.length),this.goToPage(u)},goToNextPage:function(){var u=this._sequenceIndex+1;this.navPrevNextWrap&&u>=this.tileSources.length&&(u=0),this.goToPage(u)}});function r(u){return u=e.getElement(u),new e.Point(u.clientWidth===0?1:u.clientWidth,u.clientHeight===0?1:u.clientHeight)}function o(u,v,b,C,P){var B=u;if(e.type(v)==="string"){if(v.match(/^\s*<.*>\s*$/))v=e.parseXml(v);else if(v.match(/^\s*[{[].*[}\]]\s*$/))try{var D=e.parseJSON(v);v=D}catch{}}function V(z,U){z.ready?C(z):(z.addHandler("ready",function(){C(z)}),z.addHandler("open-failed",function(W){P({message:W.message,source:U})}))}setTimeout(function(){if(e.type(v)==="string")v=new e.TileSource({url:v,crossOriginPolicy:b.crossOriginPolicy!==void 0?b.crossOriginPolicy:u.crossOriginPolicy,ajaxWithCredentials:u.ajaxWithCredentials,ajaxHeaders:b.ajaxHeaders?b.ajaxHeaders:u.ajaxHeaders,useCanvas:u.useCanvas,success:function(X){C(X.tileSource)}}),v.addHandler("open-failed",function(X){P(X)});else if(e.isPlainObject(v)||v.nodeType)if(v.crossOriginPolicy===void 0&&(b.crossOriginPolicy!==void 0||u.crossOriginPolicy!==void 0)&&(v.crossOriginPolicy=b.crossOriginPolicy!==void 0?b.crossOriginPolicy:u.crossOriginPolicy),v.ajaxWithCredentials===void 0&&(v.ajaxWithCredentials=u.ajaxWithCredentials),v.useCanvas===void 0&&(v.useCanvas=u.useCanvas),e.isFunction(v.getTileUrl)){var z=new e.TileSource(v);z.getTileUrl=v.getTileUrl,C(z)}else{var U=e.TileSource.determineType(B,v);if(!U){P({message:"Unable to load TileSource",source:v});return}var W=U.prototype.configure.apply(B,[v]);V(new U(W),v)}else V(v,v)})}function l(u,v){if(v instanceof e.Overlay)return v;var b=null;if(v.element)b=e.getElement(v.element);else{var C=v.id?v.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);b=e.getElement(v.id),b||(b=document.createElement("a"),b.href="#/overlay/"+C),b.id=C,e.addClass(b,v.className?v.className:"openseadragon-overlay")}var P=v.location,B=v.width,D=v.height;if(!P){var V=v.x,z=v.y;if(v.px!==void 0){var U=u.viewport.imageToViewportRectangle(new e.Rect(v.px,v.py,B||0,D||0));V=U.x,z=U.y,B=B!==void 0?U.width:void 0,D=D!==void 0?U.height:void 0}P=new e.Point(V,z)}var W=v.placement;return W&&e.type(W)==="string"&&(W=e.Placement[v.placement.toUpperCase()]),new e.Overlay({element:b,location:P,placement:W,onDraw:v.onDraw,checkResize:v.checkResize,width:B,height:D,rotationMode:v.rotationMode})}function a(u,v){var b;for(b=u.length-1;b>=0;b--)if(u[b].element===v)return b;return-1}function c(u,v){return e.requestAnimationFrame(function(){v(u)})}function h(u){e.requestAnimationFrame(function(){m(u)})}function p(u){u.autoHideControls&&(u.controlsShouldFade=!0,u.controlsFadeBeginTime=e.now()+u.controlsFadeDelay,window.setTimeout(function(){h(u)},u.controlsFadeDelay))}function m(u){var v,b,C,P;if(u.controlsShouldFade){for(v=e.now(),b=v-u.controlsFadeBeginTime,C=1-b/u.controlsFadeLength,C=Math.min(1,C),C=Math.max(0,C),P=u.controls.length-1;P>=0;P--)u.controls[P].autoFade&&u.controls[P].setOpacity(C);C>0&&h(u)}}function T(u){var v;for(u.controlsShouldFade=!1,v=u.controls.length-1;v>=0;v--)u.controls[v].setOpacity(1)}function x(){T(this)}function E(){p(this)}function R(u){var v={tracker:u.eventSource,position:u.position,originalEvent:u.originalEvent,preventDefault:u.preventDefault};this.raiseEvent("canvas-contextmenu",v),u.preventDefault=v.preventDefault}function M(u){var v={originalEvent:u.originalEvent,preventDefaultAction:!1,preventVerticalPan:u.preventVerticalPan,preventHorizontalPan:u.preventHorizontalPan};if(this.raiseEvent("canvas-key",v),!v.preventDefaultAction&&!u.ctrl&&!u.alt&&!u.meta)switch(u.keyCode){case 38:v.preventVerticalPan||(u.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 40:v.preventVerticalPan||(u.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 37:v.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 39:v.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),u.preventDefault=!0;break;default:u.preventDefault=!1;break}else u.preventDefault=!1}function f(u){var v={originalEvent:u.originalEvent,preventDefaultAction:!1,preventVerticalPan:u.preventVerticalPan,preventHorizontalPan:u.preventHorizontalPan};if(this.raiseEvent("canvas-key",v),!v.preventDefaultAction&&!u.ctrl&&!u.alt&&!u.meta)switch(u.keyCode){case 43:case 61:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),u.preventDefault=!0;break;case 45:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),u.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),u.preventDefault=!0;break;case 119:case 87:v.preventVerticalPan||(u.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 115:case 83:v.preventVerticalPan||(u.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 97:v.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 100:v.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),u.preventDefault=!0;break;case 114:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),u.preventDefault=!0;break;case 82:this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),u.preventDefault=!0;break;case 102:this.viewport.toggleFlip(),u.preventDefault=!0;break;case 106:this.goToPreviousPage();break;case 107:this.goToNextPage();break;default:u.preventDefault=!1;break}else u.preventDefault=!1}function _(u){var v,b=document.activeElement===this.canvas;b||this.canvas.focus(),this.viewport.flipped&&(u.position.x=this.viewport.getContainerSize().x-u.position.x);var C={tracker:u.eventSource,position:u.position,quick:u.quick,shift:u.shift,originalEvent:u.originalEvent,originalTarget:u.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",C),!C.preventDefaultAction&&this.viewport&&u.quick&&(v=this.gestureSettingsByDeviceType(u.pointerType),v.clickToZoom&&(this.viewport.zoomBy(u.shift?1/this.zoomPerClick:this.zoomPerClick,v.zoomToRefPoint?this.viewport.pointFromPixel(u.position,!0):null),this.viewport.applyConstraints()))}function H(u){var v,b={tracker:u.eventSource,position:u.position,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",b),!b.preventDefaultAction&&this.viewport&&(v=this.gestureSettingsByDeviceType(u.pointerType),v.dblClickToZoom&&(this.viewport.zoomBy(u.shift?1/this.zoomPerClick:this.zoomPerClick,v.zoomToRefPoint?this.viewport.pointFromPixel(u.position,!0):null),this.viewport.applyConstraints()))}function L(u){var v,b={tracker:u.eventSource,pointerType:u.pointerType,position:u.position,delta:u.delta,speed:u.speed,direction:u.direction,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",b),v=this.gestureSettingsByDeviceType(u.pointerType),v.dragToPan&&!b.preventDefaultAction&&this.viewport){if(this.panHorizontal||(u.delta.x=0),this.panVertical||(u.delta.y=0),this.viewport.flipped&&(u.delta.x=-u.delta.x),this.constrainDuringPan){var C=this.viewport.deltaPointsFromPixels(u.delta.negate());this.viewport.centerSpringX.target.value+=C.x,this.viewport.centerSpringY.target.value+=C.y;var P=this.viewport.getBounds(),B=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=C.x,this.viewport.centerSpringY.target.value-=C.y,P.x!==B.x&&(u.delta.x=0),P.y!==B.y&&(u.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(u.delta.negate()),v.flickEnabled&&!this.constrainDuringPan)}}function O(u){var v={tracker:u.eventSource,pointerType:u.pointerType,position:u.position,speed:u.speed,direction:u.direction,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",v),!v.preventDefaultAction&&this.viewport){var b=this.gestureSettingsByDeviceType(u.pointerType);if(b.flickEnabled&&u.speed>=b.flickMinSpeed){var C=0;this.panHorizontal&&(C=b.flickMomentum*u.speed*Math.cos(u.direction));var P=0;this.panVertical&&(P=b.flickMomentum*u.speed*Math.sin(u.direction));var B=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),D=this.viewport.pointFromPixel(new e.Point(B.x-C,B.y-P));this.viewport.panTo(D,!1)}this.viewport.applyConstraints()}}function N(u){this.raiseEvent("canvas-enter",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,buttons:u.buttons,pointers:u.pointers,insideElementPressed:u.insideElementPressed,buttonDownAny:u.buttonDownAny,originalEvent:u.originalEvent})}function G(u){this.raiseEvent("canvas-exit",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,buttons:u.buttons,pointers:u.pointers,insideElementPressed:u.insideElementPressed,buttonDownAny:u.buttonDownAny,originalEvent:u.originalEvent})}function q(u){this.raiseEvent("canvas-press",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,insideElementPressed:u.insideElementPressed,insideElementReleased:u.insideElementReleased,originalEvent:u.originalEvent})}function $(u){this.raiseEvent("canvas-release",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,insideElementPressed:u.insideElementPressed,insideElementReleased:u.insideElementReleased,originalEvent:u.originalEvent})}function re(u){this.raiseEvent("canvas-nonprimary-press",{tracker:u.eventSource,position:u.position,pointerType:u.pointerType,button:u.button,buttons:u.buttons,originalEvent:u.originalEvent})}function J(u){this.raiseEvent("canvas-nonprimary-release",{tracker:u.eventSource,position:u.position,pointerType:u.pointerType,button:u.button,buttons:u.buttons,originalEvent:u.originalEvent})}function fe(u){var v,b,C,P,B={tracker:u.eventSource,pointerType:u.pointerType,gesturePoints:u.gesturePoints,lastCenter:u.lastCenter,center:u.center,lastDistance:u.lastDistance,distance:u.distance,shift:u.shift,originalEvent:u.originalEvent,preventDefaultPanAction:!1,preventDefaultZoomAction:!1,preventDefaultRotateAction:!1};if(this.raiseEvent("canvas-pinch",B),this.viewport&&(v=this.gestureSettingsByDeviceType(u.pointerType),v.pinchToZoom&&(!B.preventDefaultPanAction||!B.preventDefaultZoomAction)&&(b=this.viewport.pointFromPixel(u.center,!0),B.preventDefaultZoomAction||this.viewport.zoomBy(u.distance/u.lastDistance,b,!0),v.zoomToRefPoint&&!B.preventDefaultPanAction&&(C=this.viewport.pointFromPixel(u.lastCenter,!0),P=C.minus(b),this.panHorizontal||(P.x=0),this.panVertical||(P.y=0),this.viewport.panBy(P,!0)),this.viewport.applyConstraints()),v.pinchRotate&&!B.preventDefaultRotateAction)){var D=Math.atan2(u.gesturePoints[0].currentPos.y-u.gesturePoints[1].currentPos.y,u.gesturePoints[0].currentPos.x-u.gesturePoints[1].currentPos.x),V=Math.atan2(u.gesturePoints[0].lastPos.y-u.gesturePoints[1].lastPos.y,u.gesturePoints[0].lastPos.x-u.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(D-V)*(180/Math.PI))}}function ue(u){var v,b,C,P,B;P=e.now(),B=P-this._lastScrollTime,B>this.minScrollDeltaTime?(this._lastScrollTime=P,v={tracker:u.eventSource,position:u.position,scroll:u.scroll,shift:u.shift,originalEvent:u.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",v),!v.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(u.position.x=this.viewport.getContainerSize().x-u.position.x),b=this.gestureSettingsByDeviceType(u.pointerType),b.scrollToZoom&&(C=Math.pow(this.zoomPerScroll,u.scroll),this.viewport.zoomBy(C,b.zoomToRefPoint?this.viewport.pointFromPixel(u.position,!0):null),this.viewport.applyConstraints())),u.preventDefault=v.preventDefault):u.preventDefault=!0}function me(u){i[this.hash].mouseInside=!0,T(this),this.raiseEvent("container-enter",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,buttons:u.buttons,pointers:u.pointers,insideElementPressed:u.insideElementPressed,buttonDownAny:u.buttonDownAny,originalEvent:u.originalEvent})}function le(u){u.pointers<1&&(i[this.hash].mouseInside=!1,i[this.hash].animating||p(this)),this.raiseEvent("container-exit",{tracker:u.eventSource,pointerType:u.pointerType,position:u.position,buttons:u.buttons,pointers:u.pointers,insideElementPressed:u.insideElementPressed,buttonDownAny:u.buttonDownAny,originalEvent:u.originalEvent})}function oe(u){ee(u),u.isOpen()?u._updateRequestId=c(u,oe):u._updateRequestId=!1}function ee(u){if(!(u._opening||!i[u.hash])){if(u.autoResize){var v=r(u.container),b=i[u.hash].prevContainerSize;if(!v.equals(b)){var C=u.viewport;if(u.preserveImageSizeOnResize){var P=b.x/v.x,B=C.getZoom()*P,D=C.getCenter();C.resize(v,!1),C.zoomTo(B,null,!0),C.panTo(D,!0)}else{var V=C.getBounds();C.resize(v,!0),C.fitBoundsWithConstraints(V,!0)}i[u.hash].prevContainerSize=v,i[u.hash].forceRedraw=!0}}var z=u.viewport.update(),U=u.world.update()||z;z&&u.raiseEvent("viewport-change"),u.referenceStrip&&(U=u.referenceStrip.update(u.viewport)||U),!i[u.hash].animating&&U&&(u.raiseEvent("animation-start"),T(u)),(U||i[u.hash].forceRedraw||u.world.needsDraw())&&(we(u),u._drawOverlays(),u.navigator&&u.navigator.update(u.viewport),i[u.hash].forceRedraw=!1,U&&u.raiseEvent("animation")),i[u.hash].animating&&!U&&(u.raiseEvent("animation-finish"),i[u.hash].mouseInside||p(u)),i[u.hash].animating=U}}function we(u){u.imageLoader.clear(),u.drawer.clear(),u.world.draw(),u.raiseEvent("update-viewport",{})}function Y(u,v){return u?u+v:v}function Ee(){i[this.hash].lastZoomTime=e.now(),i[this.hash].zoomFactor=this.zoomPerSecond,i[this.hash].zooming=!0,st(this)}function Ae(){i[this.hash].lastZoomTime=e.now(),i[this.hash].zoomFactor=1/this.zoomPerSecond,i[this.hash].zooming=!0,st(this)}function vt(){i[this.hash].zooming=!1}function st(u){e.requestAnimationFrame(e.delegate(u,Ht))}function Ht(){var u,v,b;i[this.hash].zooming&&this.viewport&&(u=e.now(),v=u-i[this.hash].lastZoomTime,b=Math.pow(i[this.hash].zoomFactor,v/1e3),this.viewport.zoomBy(b),this.viewport.applyConstraints(),i[this.hash].lastZoomTime=u,st(this))}function ke(){this.viewport&&(i[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Qe(){this.viewport&&(i[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function rt(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function Ot(){this.viewport&&this.viewport.goHome()}function Ue(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function ot(){if(this.viewport){var u=this.viewport.getRotation();this.viewport.flipped?u=e.positiveModulo(u+this.rotationIncrement,360):u=e.positiveModulo(u-this.rotationIncrement,360),this.viewport.setRotation(u)}}function yt(){if(this.viewport){var u=this.viewport.getRotation();this.viewport.flipped?u=e.positiveModulo(u-this.rotationIncrement,360):u=e.positiveModulo(u+this.rotationIncrement,360),this.viewport.setRotation(u)}}function S(){this.viewport.toggleFlip()}}(n),function(e){e.Navigator=function(c){var h=c.viewer,p=this,m,T;c.id?(this.element=document.getElementById(c.id),c.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(c.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),c.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:c.autoFade},c.position&&(c.position==="BOTTOM_RIGHT"?c.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:c.position==="BOTTOM_LEFT"?c.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:c.position==="TOP_RIGHT"?c.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:c.position==="TOP_LEFT"?c.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:c.position==="ABSOLUTE"&&(c.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,c.controlOptions.top=c.top,c.controlOptions.left=c.left,c.controlOptions.height=c.height,c.controlOptions.width=c.width))),this.element.id=c.id,this.element.className+=" navigator",c=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},c,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:c.autoResize,minZoomImageRatio:1,background:c.background,opacity:c.opacity,borderColor:c.borderColor,displayRegionColor:c.displayRegionColor}),c.minPixelRatio=this.minPixelRatio=h.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),c.controlOptions.anchor!==e.ControlAnchor.NONE&&function(R,M){R.margin="0px",R.border=M+"px solid "+c.borderColor,R.padding="0px",R.background=c.background,R.opacity=c.opacity,R.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(R,M){R.position="relative",R.top="0px",R.left="0px",R.fontSize="0px",R.overflow="hidden",R.border=M+"px solid "+c.displayRegionColor,R.margin="0px",R.padding="0px",R.background="transparent",R.float="left",R.cssFloat="left",R.styleFloat="left",R.zIndex=999999999,R.cursor="default"}(this.displayRegion.style,this.borderWidth),e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),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%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),h.addControl(this.element,c.controlOptions),this._resizeWithViewer=c.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&c.controlOptions.anchor!==e.ControlAnchor.NONE,c.width&&c.height?(this.setWidth(c.width),this.setHeight(c.height)):this._resizeWithViewer&&(m=e.getElementSize(h.element),this.element.style.height=Math.round(m.y*c.sizeRatio)+"px",this.element.style.width=Math.round(m.x*c.sizeRatio)+"px",this.oldViewerSize=m,T=e.getElementSize(this.element),this.elementArea=T.x*T.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[c]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function x(R){l(p.displayRegionContainer,R),l(p.displayRegion,-R),p.viewport.setRotation(R)}if(c.navigatorRotate){var E=c.viewer.viewport?c.viewer.viewport.getRotation():c.viewer.degrees||0;x(E),c.viewer.addHandler("rotate",function(R){x(R.degrees)})}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,s),clickHandler:e.delegate(this,i),releaseHandler:e.delegate(this,r),scrollHandler:e.delegate(this,o),preProcessEventHandler:function(R){R.eventType==="wheel"&&(R.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){p.viewport&&p.viewport.goHome(!0)}),h.world.addHandler("item-index-change",function(R){window.setTimeout(function(){var M=p.world.getItemAt(R.previousIndex);p.world.setItemIndex(M,R.newIndex)},1)}),h.world.addHandler("remove-item",function(R){var M=R.item,f=p._getMatchingItem(M);f&&p.world.removeItem(f)}),this.update(h.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var c=new e.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);c.equals(this.oldContainerSize)||(this.viewport.resize(c,!0),this.viewport.goHome(!0),this.oldContainerSize=c,this.drawer.clear(),this.world.draw())}},setWidth:function(c){this.width=c,this.element.style.width=typeof c=="number"?c+"px":c,this._resizeWithViewer=!1},setHeight:function(c){this.height=c,this.element.style.height=typeof c=="number"?c+"px":c,this._resizeWithViewer=!1},setFlip:function(c){return this.viewport.setFlip(c),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(c){a(this.displayRegion,c),a(this.canvas,c),a(this.element,c)},update:function(c){var h,p,m,T,x,E;if(h=e.getElementSize(this.viewer.element),this._resizeWithViewer&&h.x&&h.y&&!h.equals(this.oldViewerSize)&&(this.oldViewerSize=h,this.maintainSizeRatio||!this.elementArea?(p=h.x*this.sizeRatio,m=h.y*this.sizeRatio):(p=Math.sqrt(this.elementArea*(h.x/h.y)),m=this.elementArea/p),this.element.style.width=Math.round(p)+"px",this.element.style.height=Math.round(m)+"px",this.elementArea||(this.elementArea=p*m),this.updateSize()),c&&this.viewport){T=c.getBoundsNoRotate(!0),x=this.viewport.pixelFromPointNoRotate(T.getTopLeft(),!1),E=this.viewport.pixelFromPointNoRotate(T.getBottomRight(),!1).minus(this.totalBorderWidths);var R=this.displayRegion.style;R.display=this.world.getItemCount()?"block":"none",R.top=Math.round(x.y)+"px",R.left=Math.round(x.x)+"px";var M=Math.abs(x.x-E.x),f=Math.abs(x.y-E.y);R.width=Math.round(Math.max(M,0))+"px",R.height=Math.round(Math.max(f,0))+"px"}},addTiledImage:function(c){var h=this,p=c.originalTiledImage;delete c.original;var m=e.extend({},c,{success:function(T){var x=T.item;x._originalForNavigator=p,h._matchBounds(x,p,!0),h._matchOpacity(x,p),h._matchCompositeOperation(x,p);function E(){h._matchBounds(x,p)}function R(){h._matchOpacity(x,p)}function M(){h._matchCompositeOperation(x,p)}p.addHandler("bounds-change",E),p.addHandler("clip-change",E),p.addHandler("opacity-change",R),p.addHandler("composite-operation-change",M)}});return e.Viewer.prototype.addTiledImage.apply(this,[m])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(c){for(var h=this.world.getItemCount(),p,m=0;m1||r.y>1));s++);return s-1},getTileAtPoint:function(s,r){var o=r.x>=0&&r.x<=1&&r.y>=0&&r.y<=1/this.aspectRatio;e.console.assert(o,"[TileSource.getTileAtPoint] must be called with a valid point.");var l=this.dimensions.x*this.getLevelScale(s),a=r.x*l,c=r.y*l,h=Math.floor(a/this.getTileWidth(s)),p=Math.floor(c/this.getTileHeight(s));r.x>=1&&(h=this.getNumTiles(s).x-1);var m=1e-15;return r.y>=1/this.aspectRatio-m&&(p=this.getNumTiles(s).y-1),new e.Point(h,p)},getTileBounds:function(s,r,o,l){var a=this.dimensions.times(this.getLevelScale(s)),c=this.getTileWidth(s),h=this.getTileHeight(s),p=r===0?0:c*r-this.tileOverlap,m=o===0?0:h*o-this.tileOverlap,T=c+(r===0?1:2)*this.tileOverlap,x=h+(o===0?1:2)*this.tileOverlap,E=1/a.x;return T=Math.min(T,a.x-p),x=Math.min(x,a.y-m),l?new e.Rect(0,0,T,x):new e.Rect(p*E,m*E,T*E,x*E)},getImageInfo:function(s){var r=this,o,l,a,c,h,p,m;s&&(h=s.split("/"),p=h[h.length-1],m=p.lastIndexOf("."),m>-1&&(h[h.length-1]=p.slice(0,m))),l=function(T){typeof T=="string"&&(T=e.parseXml(T));var x=e.TileSource.determineType(r,T,s);if(!x){r.raiseEvent("open-failed",{message:"Unable to load TileSource",source:s});return}c=x.prototype.configure.apply(r,[T,s]),c.ajaxWithCredentials===void 0&&(c.ajaxWithCredentials=r.ajaxWithCredentials),a=new x(c),r.ready=!0,r.raiseEvent("ready",{tileSource:a})},s.match(/\.js$/)?(o=s.split("/").pop().replace(".js",""),e.jsonp({url:s,async:!1,callbackName:o,callback:l})):e.makeAjaxRequest({url:s,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(T){var x=i(T);l(x)},error:function(T,x){var E;try{E="HTTP "+T.status+" attempting to load TileSource"}catch{var R;typeof x>"u"||!x.toString?R="Unknown error":R=x.toString(),E=R+" attempting to load TileSource"}r.raiseEvent("open-failed",{message:E,source:s})}})},supports:function(s,r){return!1},configure:function(s,r){throw new Error("Method not implemented.")},getTileUrl:function(s,r,o){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(s,r,o){return{}},tileExists:function(s,r,o){var l=this.getNumTiles(s);return s>=this.minLevel&&s<=this.maxLevel&&r>=0&&o>=0&&r=0;x--)for(E=this.displayRects[x],R=E.minLevel;R<=E.maxLevel;R++)this._levelRects[R]||(this._levelRects[R]=[]),this._levelRects[R].push(E);e.TileSource.apply(this,[M])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(r,o){var l;return r.Image?l=r.Image.xmlns:r.documentElement&&(r.documentElement.localName==="Image"||r.documentElement.tagName==="Image")&&(l=r.documentElement.namespaceURI),l=(l||"").toLowerCase(),l.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||l.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(r,o){var l;return e.isPlainObject(r)?l=s(this,r):l=i(this,r),o&&!l.tilesUrl&&(l.tilesUrl=o.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/,"$1_files/"),o.search(/\.(dzi|xml|js)\?/)!==-1?l.queryParams=o.match(/\?.*/):l.queryParams=""),l},getTileUrl:function(r,o,l){return[this.tilesUrl,r,"/",o,"_",l,".",this.fileFormat,this.queryParams].join("")},tileExists:function(r,o,l){var a=this._levelRects[r],c,h,p,m,T,x,E;if(this.minLevel&&rthis.maxLevel)return!1;if(!a||!a.length)return!0;for(E=a.length-1;E>=0;E--)if(c=a[E],!(rc.maxLevel)&&(h=this.getLevelScale(r),p=c.x*h,m=c.y*h,T=p+c.width*h,x=m+c.height*h,p=Math.floor(p/this._tileWidth),m=Math.floor(m/this._tileWidth),T=Math.ceil(T/this._tileWidth),x=Math.ceil(x/this._tileWidth),p<=o&&o0?l.tileSize=Math.max.apply(null,T):l.tileSize=p}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,l.levels=s(this),e.extend(!0,l,{width:l.levels[l.levels.length-1].width,height:l.levels[l.levels.length-1].height,tileSize:Math.max(l.height,l.width),tileOverlap:0,minLevel:0,maxLevel:l.levels.length-1}),this.levels=l.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!l.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)l.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var E=Math.max.apply(null,this.scale_factors);l.maxLevel=Math.round(Math.log(E)*Math.LOG2E)}e.TileSource.apply(this,[l])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(l,a){return l.protocol&&l.protocol==="http://iiif.io/api/image"||l["@context"]&&(l["@context"]==="http://library.stanford.edu/iiif/image-api/1.1/context.json"||l["@context"]==="http://iiif.io/api/image/1/context.json")||l.profile&&l.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||l.identifier&&l.width&&l.height?!0:!!(l.documentElement&&l.documentElement.tagName==="info"&&l.documentElement.namespaceURI==="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(l,a){if(e.isPlainObject(l)){if(!l["@context"])l["@context"]="http://iiif.io/api/image/1.0/context.json",l["@id"]=a.replace("/info.json",""),l.version=1;else{var h=l["@context"];if(Array.isArray(h)){for(var p=0;p0&&l>=this.minLevel&&l<=this.maxLevel&&(a=this.levels[l].width/this.levels[this.maxLevel].width),a}return e.TileSource.prototype.getLevelScale.call(this,l)},getNumTiles:function(l){if(this.emulateLegacyImagePyramid){var a=this.getLevelScale(l);return a?new e.Point(1,1):new e.Point(0,0)}return e.TileSource.prototype.getNumTiles.call(this,l)},getTileAtPoint:function(l,a){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,l,a)},getTileUrl:function(l,a,c){if(this.emulateLegacyImagePyramid){var h=null;return this.levels.length>0&&l>=this.minLevel&&l<=this.maxLevel&&(h=this.levels[l].url),h}var p="0",m=Math.pow(.5,this.maxLevel-l),T=Math.ceil(this.width*m),x=Math.ceil(this.height*m),E,R,M,f,_,H,L,O,N,G,q,$,re,J;return E=this.getTileWidth(l),R=this.getTileHeight(l),M=Math.ceil(E/m),f=Math.ceil(R/m),this.version===1?re="native."+this.tileFormat:re="default."+this.tileFormat,T1&&l.profile[1].supports&&(p=l.profile[1].supports.indexOf("sizeByW")!==-1),l.version===3&&l.extraFeatures&&(p=l.extraFeatures.indexOf("sizeByWh")!==-1),!h||p}function s(l){for(var a=[],c=0;ch?p=c/256:p=h/256,a.maxLevel=Math.ceil(Math.log(p)/Math.log(2))-1,a.tileSize=256,a.width=c,a.height=h,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(i,s){return i.type&&i.type==="tiledmapservice"},configure:function(i,s){return i},getTileUrl:function(i,s,r){var o=this.getNumTiles(i).y-1;return this.tilesUrl+i+"/"+s+"/"+(o-r)+".png"}})}(n),function(e){e.ZoomifyTileSource=function(i){typeof i.tileSize>"u"&&(i.tileSize=256),typeof i.fileFormat>"u"&&(i.fileFormat="jpg",this.fileFormat=i.fileFormat);var s={x:i.width,y:i.height};for(i.imageSizes=[{x:i.width,y:i.height}],i.gridSize=[this._getGridSize(i.width,i.height,i.tileSize)];parseInt(s.x,10)>i.tileSize||parseInt(s.y,10)>i.tileSize;)s.x=Math.floor(s.x/2),s.y=Math.floor(s.y/2),i.imageSizes.push({x:s.x,y:s.y}),i.gridSize.push(this._getGridSize(s.x,s.y,i.tileSize));i.imageSizes.reverse(),i.gridSize.reverse(),i.minLevel=0,i.maxLevel=i.gridSize.length-1,n.TileSource.apply(this,[i])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(i,s,r){return{x:Math.ceil(i/r),y:Math.ceil(s/r)}},_calculateAbsoluteTileNumber:function(i,s,r){for(var o=0,l={},a=0;a0?(a=l.levels[l.levels.length-1].width,c=l.levels[l.levels.length-1].height):(a=0,c=0,e.console.error("No supported image formats found")),e.extend(!0,l,{width:a,height:c,tileSize:Math.max(c,a),tileOverlap:0,minLevel:0,maxLevel:l.levels.length>0?l.levels.length-1:0}),e.TileSource.apply(this,[l]),this.levels=l.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(o,l){return o.type&&o.type==="legacy-image-pyramid"||o.documentElement&&o.documentElement.getAttribute("type")==="legacy-image-pyramid"},configure:function(o,l){var a;return e.isPlainObject(o)?a=r(this,o):a=s(this,o),a},getLevelScale:function(o){var l=NaN;return this.levels.length>0&&o>=this.minLevel&&o<=this.maxLevel&&(l=this.levels[o].width/this.levels[this.maxLevel].width),l},getNumTiles:function(o){var l=this.getLevelScale(o);return l?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(o,l,a){var c=null;return this.levels.length>0&&o>=this.minLevel&&o<=this.maxLevel&&(c=this.levels[o].url),c}});function i(o){var l=[],a,c;for(c=0;c");return l.sort(function(h,p){return h.height-p.height})}function s(o,l){if(!l||!l.documentElement)throw new Error(e.getString("Errors.Xml"));var a=l.documentElement,c=a.tagName,h=null,p=[],m,T;if(c==="image")try{for(h={type:a.getAttribute("type"),levels:[]},p=a.getElementsByTagName("level"),T=0;T=this.minLevel&&i<=this.maxLevel&&(s=this.levels[i].width/this.levels[this.maxLevel].width),s},getNumTiles:function(i){var s=this.getLevelScale(i);return s?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(i,s,r){var o=null;return i>=this.minLevel&&i<=this.maxLevel&&(o=this.levels[i].url),o},getContext2D:function(i,s,r){var o=null;return i>=this.minLevel&&i<=this.maxLevel&&(o=this.levels[i].context2D),o},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var i=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,i;var s=this._image.naturalWidth,r=this._image.naturalHeight,o=document.createElement("canvas"),l=o.getContext("2d");if(o.width=s,o.height=r,l.drawImage(this._image,0,0,s,r),i[0].context2D=l,delete this._image,e.isCanvasTainted(o))return i;for(;s>=2&&r>=2;){s=Math.floor(s/2),r=Math.floor(r/2);var a=document.createElement("canvas"),c=a.getContext("2d");a.width=s,a.height=r,c.drawImage(o,0,0,s,r),i.splice(0,0,{context2D:c,width:s,height:r}),o=a,l=c}return i},_freeupCanvasMemory:function(){for(var i=0;i0&&i(c))}function r(c){c.shouldFade=!0,c.fadeBeginTime=e.now()+c.fadeDelay,window.setTimeout(function(){i(c)},c.fadeDelay)}function o(c){c.shouldFade=!1,c.imgGroup&&e.setElementOpacity(c.imgGroup,1,!0)}function l(c,h){c.element.disabled||(h>=e.ButtonState.GROUP&&c.currentState===e.ButtonState.REST&&(o(c),c.currentState=e.ButtonState.GROUP),h>=e.ButtonState.HOVER&&c.currentState===e.ButtonState.GROUP&&(c.imgHover&&(c.imgHover.style.visibility=""),c.currentState=e.ButtonState.HOVER),h>=e.ButtonState.DOWN&&c.currentState===e.ButtonState.HOVER&&(c.imgDown&&(c.imgDown.style.visibility=""),c.currentState=e.ButtonState.DOWN))}function a(c,h){c.element.disabled||(h<=e.ButtonState.HOVER&&c.currentState===e.ButtonState.DOWN&&(c.imgDown&&(c.imgDown.style.visibility="hidden"),c.currentState=e.ButtonState.HOVER),h<=e.ButtonState.GROUP&&c.currentState===e.ButtonState.HOVER&&(c.imgHover&&(c.imgHover.style.visibility="hidden"),c.currentState=e.ButtonState.GROUP),h<=e.ButtonState.REST&&c.currentState===e.ButtonState.GROUP&&(r(c),c.currentState=e.ButtonState.REST))}}(n),function(e){e.ButtonGroup=function(i){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},i);var s=this.buttons.concat([]),r=this,o;if(this.element=i.element||e.makeNeutralElement("div"),!i.group)for(this.element.style.display="inline-block",o=0;o=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,c=this.height,this.height=this.width,this.width=c,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,c=this.height,this.height=this.width,this.width=c,this.degrees-=90)},e.Rect.fromSummits=function(i,s,r){var o=i.distanceTo(s),l=i.distanceTo(r),a=s.minus(i),c=Math.atan(a.y/a.x);return a.x<0?c+=Math.PI:a.y<0&&(c+=2*Math.PI),new e.Rect(i.x,i.y,o,l,c/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(i){return i instanceof e.Rect&&this.x===i.x&&this.y===i.y&&this.width===i.width&&this.height===i.height&&this.degrees===i.degrees},times:function(i){return new e.Rect(this.x*i,this.y*i,this.width*i,this.height*i,this.degrees)},translate:function(i){return new e.Rect(this.x+i.x,this.y+i.y,this.width,this.height,this.degrees)},union:function(i){var s=this.getBoundingBox(),r=i.getBoundingBox(),o=Math.min(s.x,r.x),l=Math.min(s.y,r.y),a=Math.max(s.x+s.width,r.x+r.width),c=Math.max(s.y+s.height,r.y+r.height);return new e.Rect(o,l,a-o,c-l)},intersection:function(i){var s=1e-10,r=[],o=this.getTopLeft();i.containsPoint(o,s)&&r.push(o);var l=this.getTopRight();i.containsPoint(l,s)&&r.push(l);var a=this.getBottomLeft();i.containsPoint(a,s)&&r.push(a);var c=this.getBottomRight();i.containsPoint(c,s)&&r.push(c);var h=i.getTopLeft();this.containsPoint(h,s)&&r.push(h);var p=i.getTopRight();this.containsPoint(p,s)&&r.push(p);var m=i.getBottomLeft();this.containsPoint(m,s)&&r.push(m);var T=i.getBottomRight();this.containsPoint(T,s)&&r.push(T);for(var x=this._getSegments(),E=i._getSegments(),R=0;RN&&(N=re.x),re.yq&&(q=re.y)}return new e.Rect(O,G,N-O,q-G)},_getSegments:function(){var i=this.getTopLeft(),s=this.getTopRight(),r=this.getBottomLeft(),o=this.getBottomRight();return[[i,s],[s,o],[o,r],[r,i]]},rotate:function(i,s){if(i=e.positiveModulo(i,360),i===0)return this.clone();s=s||this.getCenter();var r=this.getTopLeft().rotate(i,s),o=this.getTopRight().rotate(i,s),l=o.minus(r);l=l.apply(function(c){var h=1e-15;return Math.abs(c)=-s&&(i.x-o.x)*a.x+(i.y-o.y)*a.y<=s&&(i.x-r.x)*c.x+(i.y-r.y)*c.y>=-s&&(i.x-l.x)*c.x+(i.y-l.y)*c.y<=s},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(n),function(e){var i={};e.ReferenceStrip=function(m){var T=this,x=m.viewer,E=e.getElementSize(x.element),R,M,f;for(m.id||(m.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=m.id,this.element.className="referencestrip"),m=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},m,{element:this.element}),e.extend(this,m),i[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,this.element.tabIndex=0,M=this.element.style,M.marginTop="0px",M.marginRight="0px",M.marginBottom="0px",M.marginLeft="0px",M.left="0px",M.bottom="0px",M.border="0px",M.background="#000",M.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=x,this.tracker=new e.MouseTracker({userData:"ReferenceStrip.tracker",element:this.element,clickHandler:e.delegate(this,s),dragHandler:e.delegate(this,r),scrollHandler:e.delegate(this,o),enterHandler:e.delegate(this,a),leaveHandler:e.delegate(this,c),keyDownHandler:e.delegate(this,h),keyHandler:e.delegate(this,p),preProcessEventHandler:function(_){_.eventType==="wheel"&&(_.preventDefault=!0)}}),m.width&&m.height?(this.element.style.width=m.width+"px",this.element.style.height=m.height+"px",x.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):m.scroll==="horizontal"?(this.element.style.width=E.x*m.sizeRatio*x.tileSources.length+12*x.tileSources.length+"px",this.element.style.height=E.y*m.sizeRatio+"px",x.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=E.y*m.sizeRatio*x.tileSources.length+12*x.tileSources.length+"px",this.element.style.width=E.x*m.sizeRatio+"px",x.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=E.x*this.sizeRatio+8,this.panelHeight=E.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},f=0;fM+x.x-this.panelWidth?(_=Math.min(_,E-x.x),this.element.style.marginLeft=-_+"px",l(this,x.x,-_)):_f+x.y-this.panelHeight?(_=Math.min(_,R-x.y),this.element.style.marginTop=-_+"px",l(this,x.y,-_)):_0?T>-(E-M.x)&&(this.element.style.marginLeft=T+m.delta.x*2+"px",l(this,M.x,T+m.delta.x*2)):-m.delta.x<0&&T<0&&(this.element.style.marginLeft=T+m.delta.x*2+"px",l(this,M.x,T+m.delta.x*2)):-m.delta.y>0?x>-(R-M.y)&&(this.element.style.marginTop=x+m.delta.y*2+"px",l(this,M.y,x+m.delta.y*2)):-m.delta.y<0&&x<0&&(this.element.style.marginTop=x+m.delta.y*2+"px",l(this,M.y,x+m.delta.y*2))}}function o(m){if(this.element){var T=Number(this.element.style.marginLeft.replace("px","")),x=Number(this.element.style.marginTop.replace("px","")),E=Number(this.element.style.width.replace("px","")),R=Number(this.element.style.height.replace("px","")),M=e.getElementSize(this.viewer.canvas);this.scroll==="horizontal"?m.scroll>0?T>-(E-M.x)&&(this.element.style.marginLeft=T-m.scroll*60+"px",l(this,M.x,T-m.scroll*60)):m.scroll<0&&T<0&&(this.element.style.marginLeft=T-m.scroll*60+"px",l(this,M.x,T-m.scroll*60)):m.scroll<0?x>M.y-R&&(this.element.style.marginTop=x+m.scroll*60+"px",l(this,M.y,x+m.scroll*60)):m.scroll>0&&x<0&&(this.element.style.marginTop=x+m.scroll*60+"px",l(this,M.y,x+m.scroll*60)),m.preventDefault=!0}}function l(m,T,x){var E,R,M,f,_,H;for(m.scroll==="horizontal"?E=m.panelWidth:E=m.panelHeight,R=Math.ceil(T/E)+5,M=Math.ceil((Math.abs(x)+T)/E)+1,R=M-R,R=R<0?0:R,_=R;_1?r[1].springStiffness:5,animationTime:r.length>1?r[1].animationTime:1.5}),e.console.assert(typeof s.springStiffness=="number"&&s.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert(typeof s.animationTime=="number"&&s.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),s.exponential&&(this._exponential=!0,delete s.exponential),e.extend(!0,this,s),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||this.current.value!==0,"[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(s){e.console.assert(!this._exponential||s!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=s,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(s){e.console.assert(!this._exponential||s!==0,"[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=s,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(s){this.start.value+=s,this.target.value+=s,this._exponential&&(e.console.assert(this.target.value!==0&&this.start.value!==0,"[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(s){this._exponential=s,this._exponential&&(e.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[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(){this.current.time=e.now();var s,r;this._exponential?(s=this.start._logValue,r=this.target._logValue):(s=this.start.value,r=this.target.value);var o=this.current.time>=this.target.time?r:s+(r-s)*i(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),l=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,l!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function i(s,r){return(1-Math.exp(s*-r))/(1-Math.exp(-s))}}(n),function(e){function i(r){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},r),this.image=null}i.prototype={errorMsg:null,start:function(){var r=this,o=this.abort;this.image=new Image,this.image.onload=function(){r.finish(!0)},this.image.onabort=this.image.onerror=function(){r.errorMsg="Image load aborted",r.finish(!1)},this.jobId=window.setTimeout(function(){r.errorMsg="Image load exceeded timeout ("+r.timeout+" ms)",r.finish(!1)},this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(l){var a;try{a=new window.Blob([l.response])}catch(m){var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(m.name==="TypeError"&&c){var h=new c;h.append(l.response),a=h.getBlob()}}a.size===0&&(r.errorMsg="Empty image response.",r.finish(!1));var p=(window.URL||window.webkitURL).createObjectURL(a);r.image.src=p},error:function(l){r.errorMsg="Image load aborted - XHR error",r.finish(!1)}}),this.abort=function(){r.request.abort(),typeof o=="function"&&o()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(r){this.image.onload=this.image.onerror=this.image.onabort=null,r||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(r){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},r)},e.ImageLoader.prototype={addJob:function(r){var o=this,l=function(h){s(o,h,r.callback)},a={src:r.src,loadWithAjax:r.loadWithAjax,ajaxHeaders:r.loadWithAjax?r.ajaxHeaders:null,crossOriginPolicy:r.crossOriginPolicy,ajaxWithCredentials:r.ajaxWithCredentials,callback:l,abort:r.abort,timeout:this.timeout},c=new i(a);!this.jobLimit||this.jobsInProgress0&&(a=r.jobQueue.shift(),a.start(),r.jobsInProgress++),l(o.image,o.errorMsg,o.request)}}(n),function(e){e.Tile=function(i,s,r,o,l,a,c,h,p,m){this.level=i,this.x=s,this.y=r,this.bounds=o,this.sourceBounds=m,this.exists=l,this.url=a,this.context2D=c,this.loadWithAjax=h,this.ajaxHeaders=p,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.flipped=!1,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(i){if(!this.cacheImageRecord){e.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=e.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!==i&&i.appendChild(this.element),this.imgElement.parentNode!==this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",this.flipped&&(this.style.transform="scaleX(-1)"),e.setElementOpacity(this.element,this.opacity)},drawCanvas:function(i,s,r,o){var l=this.position.times(e.pixelDensityRatio),a=this.size.times(e.pixelDensityRatio),c;if(!this.context2D&&!this.cacheImageRecord){e.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(c=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!c){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}i.save(),i.globalAlpha=this.opacity,typeof r=="number"&&r!==1&&(l=l.times(r),a=a.times(r)),o instanceof e.Point&&(l=l.plus(o)),i.globalAlpha===1&&this._hasTransparencyChannel()&&i.clearRect(l.x,l.y,a.x,a.y),s({context:i,tile:this,rendered:c});var h,p;this.sourceBounds?(h=Math.min(this.sourceBounds.width,c.canvas.width),p=Math.min(this.sourceBounds.height,c.canvas.height)):(h=c.canvas.width,p=c.canvas.height),i.translate(l.x+a.x/2,0),this.flipped&&i.scale(-1,1),i.drawImage(c.canvas,0,0,h,p,-a.x/2,l.y,a.x,a.y),i.restore()},getScaleForEdgeSmoothing:function(){var i;if(this.cacheImageRecord)i=this.cacheImageRecord.getRenderedContext();else if(this.context2D)i=this.context2D;else return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return i.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(i,s,r){var o=Math.max(1,Math.ceil((r.x-s.x)/2)),l=Math.max(1,Math.ceil((r.y-s.y)/2));return new e.Point(o,l).minus(this.position.times(e.pixelDensityRatio).times(i||1).apply(function(a){return a%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(n),function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(i,s,r){var o;e.isPlainObject(i)?o=i:o={element:i,location:s,placement:r},this.element=o.element,this.style=o.element.style,this._init(o)},e.Overlay.prototype={_init:function(i){this.location=i.location,this.placement=i.placement===void 0?e.Placement.TOP_LEFT:i.placement,this.onDraw=i.onDraw,this.checkResize=i.checkResize===void 0?!0:i.checkResize,this.width=i.width===void 0?null:i.width,this.height=i.height===void 0?null:i.height,this.rotationMode=i.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(i,s){var r=e.Placement.properties[this.placement];r&&(r.isHorizontallyCentered?i.x-=s.x/2:r.isRight&&(i.x-=s.x),r.isVerticallyCentered?i.y-=s.y/2:r.isBottom&&(i.y-=s.y))},destroy:function(){var i=this.element,s=this.style;i.parentNode&&(i.parentNode.removeChild(i),i.prevElementParent&&(s.display="none",document.body.appendChild(i))),this.onDraw=null,s.top="",s.left="",s.position="",this.width!==null&&(s.width=""),this.height!==null&&(s.height="");var r=e.getCssPropertyWithVendorPrefix("transformOrigin"),o=e.getCssPropertyWithVendorPrefix("transform");r&&o&&(s[r]="",s[o]="")},drawHTML:function(i,s){var r=this.element;r.parentNode!==i&&(r.prevElementParent=r.parentNode,r.prevNextSibling=r.nextSibling,i.appendChild(r),this.style.position="absolute",this.size=e.getElementSize(r));var o=this._getOverlayPositionAndSize(s),l=o.position,a=this.size=o.size,c=o.rotate;if(this.onDraw)this.onDraw(l,a,this.element);else{var h=this.style;h.left=l.x+"px",h.top=l.y+"px",this.width!==null&&(h.width=a.x+"px"),this.height!==null&&(h.height=a.y+"px");var p=e.getCssPropertyWithVendorPrefix("transformOrigin"),m=e.getCssPropertyWithVendorPrefix("transform");p&&m&&(c?(h[p]=this._getTransformOrigin(),h[m]="rotate("+c+"deg)"):(h[p]="",h[m]="")),h.display="block"}},_getOverlayPositionAndSize:function(i){var s=i.pixelFromPoint(this.location,!0),r=this._getSizeInPixels(i);this.adjust(s,r);var o=0;if(i.degrees&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var l=new e.Rect(s.x,s.y,r.x,r.y),a=this._getBoundingBox(l,i.degrees);s=a.getTopLeft(),r=a.getSize()}else o=i.degrees;return{position:s,size:r,rotate:o}},_getSizeInPixels:function(i){var s=this.size.x,r=this.size.y;if(this.width!==null||this.height!==null){var o=i.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);this.width!==null&&(s=o.x),this.height!==null&&(r=o.y)}if(this.checkResize&&(this.width===null||this.height===null)){var l=this.size=e.getElementSize(this.element);this.width===null&&(s=l.x),this.height===null&&(r=l.y)}return new e.Point(s,r)},_getBoundingBox:function(i,s){var r=this._getPlacementPoint(i);return i.rotate(s,r).getBoundingBox()},_getPlacementPoint:function(i){var s=new e.Point(i.x,i.y),r=e.Placement.properties[this.placement];return r&&(r.isHorizontallyCentered?s.x+=i.width/2:r.isRight&&(s.x+=i.width),r.isVerticallyCentered?s.y+=i.height/2:r.isBottom&&(s.y+=i.height)),s},_getTransformOrigin:function(){var i="",s=e.Placement.properties[this.placement];return s&&(s.isLeft?i="left":s.isRight&&(i="right"),s.isTop?i+=" top":s.isBottom&&(i+=" bottom")),i},update:function(i,s){var r=e.isPlainObject(i)?i:{location:i,placement:s};this._init({location:r.location||this.location,placement:r.placement!==void 0?r.placement:this.placement,onDraw:r.onDraw||this.onDraw,checkResize:r.checkResize||this.checkResize,width:r.width!==void 0?r.width:this.width,height:r.height!==void 0?r.height:this.height,rotationMode:r.rotationMode||this.rotationMode})},getBounds:function(i){e.console.assert(i,"A viewport must now be passed to Overlay.getBounds.");var s=this.width,r=this.height;if(s===null||r===null){var o=i.deltaPointsFromPixelsNoRotate(this.size,!0);s===null&&(s=o.x),r===null&&(r=o.y)}var l=this.location.clone();return this.adjust(l,new e.Point(s,r)),this._adjustBoundsForRotation(i,new e.Rect(l.x,l.y,s,r))},_adjustBoundsForRotation:function(i,s){if(!i||i.degrees===0||this.rotationMode===e.OverlayRotationMode.EXACT)return s;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return s;var r=this._getOverlayPositionAndSize(i);return i.viewerElementToViewportRectangle(new e.Rect(r.position.x,r.position.y,r.size.x,r.size.y))}return s.rotate(-i.degrees,this._getPlacementPoint(s))}}}(n),function(e){e.Drawer=function(i){e.console.assert(i.viewer,"[Drawer] options.viewer is required");var s=arguments;if(e.isPlainObject(i)||(i={source:s[0],viewport:s[1],element:s[2]}),e.console.assert(i.viewport,"[Drawer] options.viewport is required"),e.console.assert(i.element,"[Drawer] options.element is required"),i.source&&e.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=i.viewer,this.viewport=i.viewport,this.debugGridColor=typeof i.debugGridColor=="string"?[i.debugGridColor]:i.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,i.opacity&&e.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=e.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=e.getElement(i.element),this.canvas=e.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var r=this._calculateCanvasSize();this.canvas.width=r.x,this.canvas.height=r.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",e.setElementOpacity(this.canvas,this.opacity,!0),e.setElementPointerEventsNone(this.canvas),e.setElementTouchActionNone(this.canvas),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},e.Drawer.prototype={addOverlay:function(i,s,r,o){return e.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(i,s,r,o),this},updateOverlay:function(i,s,r){return e.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(i,s,r),this},removeOverlay:function(i){return e.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(i),this},clearOverlays:function(){return e.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(i){var s=this.viewport.pixelFromPointNoRotate(i,!0);return new e.Point(s.x*e.pixelDensityRatio,s.y*e.pixelDensityRatio)},clipWithPolygons:function(i,s){if(this.useCanvas){var r=this._getContext(s);r.beginPath(),i.forEach(function(o){o.forEach(function(l,a){r[a===0?"moveTo":"lineTo"](l.x,l.y)})}),r.clip()}},setOpacity:function(i){e.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var s=this.viewer.world,r=0;rs&&(s=o)}return s},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 i=this._calculateCanvasSize();if((this.canvas.width!==i.x||this.canvas.height!==i.y)&&(this.canvas.width=i.x,this.canvas.height=i.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var s=this._calculateSketchCanvasSize();this.sketchCanvas.width=s.x,this.sketchCanvas.height=s.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(i,s){if(this.useCanvas){var r=this._getContext(i);if(s)r.clearRect(s.x,s.y,s.width,s.height);else{var o=r.canvas;r.clearRect(0,0,o.width,o.height)}}},viewportToDrawerRectangle:function(i){var s=this.viewport.pixelFromPointNoRotate(i.getTopLeft(),!0),r=this.viewport.deltaPixelsFromPointsNoRotate(i.getSize(),!0);return new e.Rect(s.x*e.pixelDensityRatio,s.y*e.pixelDensityRatio,r.x*e.pixelDensityRatio,r.y*e.pixelDensityRatio)},drawTile:function(i,s,r,o,l){if(e.console.assert(i,"[Drawer.drawTile] tile is required"),e.console.assert(s,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(r);o=o||1,i.drawCanvas(a,s,o,l)}else i.drawHTML(this.canvas)},_getContext:function(i){var s=this.context;if(i){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var r=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=r.x,this.sketchCanvas.height=r.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var o=this;this.viewer.addHandler("rotate",function l(){if(o.viewport.getRotation()!==0){o.viewer.removeHandler("rotate",l);var a=o._calculateSketchCanvasSize();o.sketchCanvas.width=a.x,o.sketchCanvas.height=a.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}s=this.sketchContext}return s},saveContext:function(i){this.useCanvas&&this._getContext(i).save()},restoreContext:function(i){this.useCanvas&&this._getContext(i).restore()},setClip:function(i,s){if(this.useCanvas){var r=this._getContext(s);r.beginPath(),r.rect(i.x,i.y,i.width,i.height),r.clip()}},drawRectangle:function(i,s,r){if(this.useCanvas){var o=this._getContext(r);o.save(),o.fillStyle=s,o.fillRect(i.x,i.y,i.width,i.height),o.restore()}},blendSketch:function(i,s,r,o){var l=i;if(e.isPlainObject(l)||(l={opacity:i,scale:s,translate:r,compositeOperation:o}),!(!this.useCanvas||!this.sketchCanvas)){i=l.opacity,o=l.compositeOperation;var a=l.bounds;if(this.context.save(),this.context.globalAlpha=i,o&&(this.context.globalCompositeOperation=o),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{s=l.scale||1,r=l.translate;var c=r instanceof e.Point?r:new e.Point(0,0),h=0,p=0;if(r){var m=this.sketchCanvas.width-this.canvas.width,T=this.sketchCanvas.height-this.canvas.height;h=Math.round(m/2),p=Math.round(T/2)}this.context.drawImage(this.sketchCanvas,c.x-h*s,c.y-p*s,(this.canvas.width+2*h)*s,(this.canvas.height+2*p)*s,-h,-p,this.canvas.width+2*h,this.canvas.height+2*p)}this.context.restore()}},drawDebugInfo:function(i,s,r,o){if(this.useCanvas){var l=this.viewer.world.getIndexOfItem(o)%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[l],a.fillStyle=this.debugGridColor[l],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),o.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:o.getRotation(!0),point:o.viewport.pixelFromPointNoRotate(o._getRotationPoint(!0),!0)}),o.viewport.degrees===0&&o.getRotation(!0)%360===0&&o._drawer.viewer.viewport.getFlip()&&o._drawer._flip(),a.strokeRect(i.position.x*e.pixelDensityRatio,i.position.y*e.pixelDensityRatio,i.size.x*e.pixelDensityRatio,i.size.y*e.pixelDensityRatio);var c=(i.position.x+i.size.x/2)*e.pixelDensityRatio,h=(i.position.y+i.size.y/2)*e.pixelDensityRatio;a.translate(c,h),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-c,-h),i.x===0&&i.y===0&&(a.fillText("Zoom: "+this.viewport.getZoom(),i.position.x*e.pixelDensityRatio,(i.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),i.position.x*e.pixelDensityRatio,(i.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+i.level,(i.position.x+10)*e.pixelDensityRatio,(i.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+i.x,(i.position.x+10)*e.pixelDensityRatio,(i.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+i.y,(i.position.x+10)*e.pixelDensityRatio,(i.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+r+" of "+s,(i.position.x+10)*e.pixelDensityRatio,(i.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+i.size.toString(),(i.position.x+10)*e.pixelDensityRatio,(i.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+i.position.toString(),(i.position.x+10)*e.pixelDensityRatio,(i.position.y+70)*e.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),o.getRotation(!0)%360!==0&&this._restoreRotationChanges(),o.viewport.degrees===0&&o.getRotation(!0)%360===0&&o._drawer.viewer.viewport.getFlip()&&o._drawer._flip(),a.restore()}},debugRect:function(i){if(this.useCanvas){var s=this.context;s.save(),s.lineWidth=2*e.pixelDensityRatio,s.strokeStyle=this.debugGridColor[0],s.fillStyle=this.debugGridColor[0],s.strokeRect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,i.width*e.pixelDensityRatio,i.height*e.pixelDensityRatio),s.restore()}},setImageSmoothingEnabled:function(i){this.useCanvas&&(this._imageSmoothingEnabled=i,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(i){i.msImageSmoothingEnabled=this._imageSmoothingEnabled,i.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(i){var s=this._getContext(i).canvas;return new e.Point(s.width,s.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(i){var s=i.point?i.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(i.useSketch);r.save(),r.translate(s.x,s.y),this.viewer.viewport.flipped?(r.rotate(Math.PI/180*-i.degrees),r.scale(-1,1)):r.rotate(Math.PI/180*i.degrees),r.translate(-s.x,-s.y)},_flip:function(i){i=i||{};var s=i.point?i.point.times(e.pixelDensityRatio):this.getCanvasCenter(),r=this._getContext(i.useSketch);r.translate(s.x,0),r.scale(-1,1),r.translate(-s.x,0)},_restoreRotationChanges:function(i){var s=this._getContext(i);s.restore()},_calculateCanvasSize:function(){var i=e.pixelDensityRatio,s=this.viewport.getContainerSize();return{x:Math.round(s.x*i),y:Math.round(s.y*i)}},_calculateSketchCanvasSize:function(){var i=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return i;var s=Math.ceil(Math.sqrt(i.x*i.x+i.y*i.y));return{x:s,y:s}}}}(n),function(e){e.Viewport=function(i){var s=arguments;s.length&&s[0]instanceof e.Point&&(i={containerSize:s[0],contentSize:s[1],config:s[2]}),i.config&&(e.extend(!0,i,i.config),delete i.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},i.margins||{}),delete i.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},i),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(i){return e.console.assert(i,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(i instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(i.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(i.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,i.y/i.x),i.x),this},setHomeBounds:function(i,s){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(i,s)},_setContentBounds:function(i,s){e.console.assert(i,"[Viewport._setContentBounds] bounds is required"),e.console.assert(i instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(i.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(i.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=i.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(s),this._contentBounds=i.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(s),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:s,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var i=this._contentAspectRatio/this.getAspectRatio(),s;return this.homeFillsViewer?s=i>=1?i:1:s=i>=1?1:i,s/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var i=this._contentBounds.getCenter(),s=1/this.getHomeZoom(),r=s/this.getAspectRatio();return new e.Rect(i.x-s/2,i.y-r/2,s,r)},goHome:function(i){return this.viewer&&this.viewer.raiseEvent("home",{immediately:i}),this.fitBounds(this.getHomeBounds(),i)},getMinZoom:function(){var i=this.getHomeZoom(),s=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*i;return s},getMaxZoom:function(){var i=this.maxZoomLevel;return i||(i=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,i/=this._contentBounds.width),Math.max(i,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(i){e.console.assert(e.type(i)==="object","[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},i),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(i){return this.getBoundsNoRotate(i).rotate(-this.getRotation())},getBoundsNoRotate:function(i){var s=this.getCenter(i),r=1/this.getZoom(i),o=r/this.getAspectRatio();return new e.Rect(s.x-r/2,s.y-o/2,r,o)},getBoundsWithMargins:function(i){return this.getBoundsNoRotateWithMargins(i).rotate(-this.getRotation(),this.getCenter(i))},getBoundsNoRotateWithMargins:function(i){var s=this.getBoundsNoRotate(i),r=this._containerInnerSize.x*this.getZoom(i);return s.x-=this._margins.left/r,s.y-=this._margins.top/r,s.width+=(this._margins.left+this._margins.right)/r,s.height+=(this._margins.top+this._margins.bottom)/r,s},getCenter:function(i){var s=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),r=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),o,l,a,c,h,p,m,T;return i?s:this.zoomPoint?(o=this.pixelFromPoint(this.zoomPoint,!0),l=this.getZoom(),a=1/l,c=a/this.getAspectRatio(),h=new e.Rect(s.x-a/2,s.y-c/2,a,c),p=this._pixelFromPoint(this.zoomPoint,h),m=p.minus(o),T=m.divide(this._containerInnerSize.x*l),r.plus(T)):r},getZoom:function(i){return i?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(i){return Math.max(Math.min(i,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(i){var s=new e.Rect(i.x,i.y,i.width,i.height);if(!this.wrapHorizontal){var r=this.visibilityRatio*s.width,o=s.x+s.width,l=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-o+r,c=l-s.x-r;r>this._contentBoundsNoRotate.width?s.x+=(a+c)/2:c<0?s.x+=c:a>0&&(s.x+=a)}if(!this.wrapVertical){var h=this.visibilityRatio*s.height,p=s.y+s.height,m=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,T=this._contentBoundsNoRotate.y-p+h,x=m-s.y-h;h>this._contentBoundsNoRotate.height?s.y+=(T+x)/2:x<0?s.y+=x:T>0&&(s.y+=T)}return s},_raiseConstraintsEvent:function(i){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:i})},applyConstraints:function(i){var s=this.getZoom(),r=this._applyZoomConstraints(s);s!==r&&this.zoomTo(r,this.zoomPoint,i);var o=this.getBoundsNoRotate(),l=this._applyBoundaryConstraints(o);return this._raiseConstraintsEvent(i),(o.x!==l.x||o.y!==l.y||i)&&this.fitBounds(l.rotate(-this.getRotation()),i),this},ensureVisible:function(i){return this.applyConstraints(i)},_fitBounds:function(i,s){s=s||{};var r=s.immediately||!1,o=s.constraints||!1,l=this.getAspectRatio(),a=i.getCenter(),c=new e.Rect(i.x,i.y,i.width,i.height,i.degrees+this.getRotation()).getBoundingBox();c.getAspectRatio()>=l?c.height=c.width/l:c.width=c.height*l,c.x=a.x-c.width/2,c.y=a.y-c.height/2;var h=1/c.width;if(o){var p=c.getAspectRatio(),m=this._applyZoomConstraints(h);h!==m&&(h=m,c.width=1/h,c.x=a.x-c.width/2,c.height=c.width/p,c.y=a.y-c.height/2),c=this._applyBoundaryConstraints(c),a=c.getCenter(),this._raiseConstraintsEvent(r)}if(r)return this.panTo(a,!0),this.zoomTo(h,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var T=this.getBounds(),x=this.getZoom();if(x===0||Math.abs(h/x-1)<1e-8)return this.zoomTo(h,!0),this.panTo(a,r);c=c.rotate(-this.getRotation());var E=c.getTopLeft().times(h).minus(T.getTopLeft().times(x)).divide(h-x);return this.zoomTo(h,E,r)},fitBounds:function(i,s){return this._fitBounds(i,{immediately:s,constraints:!1})},fitBoundsWithConstraints:function(i,s){return this._fitBounds(i,{immediately:s,constraints:!0})},fitVertically:function(i){var s=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(s,i)},fitHorizontally:function(i){var s=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(s,i)},getConstrainedBounds:function(i){var s,r;return s=this.getBounds(i),r=this._applyBoundaryConstraints(s),r},panBy:function(i,s){var r=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(r.plus(i),s)},panTo:function(i,s){return s?(this.centerSpringX.resetTo(i.x),this.centerSpringY.resetTo(i.y)):(this.centerSpringX.springTo(i.x),this.centerSpringY.springTo(i.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:i,immediately:s}),this},zoomBy:function(i,s,r){return this.zoomTo(this.zoomSpring.target.value*i,s,r)},zoomTo:function(i,s,r){var o=this;return this.zoomPoint=s instanceof e.Point&&!isNaN(s.x)&&!isNaN(s.y)?s:null,r?this._adjustCenterSpringsForZoomPoint(function(){o.zoomSpring.resetTo(i)}):this.zoomSpring.springTo(i),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:i,refPoint:s,immediately:r}),this},setRotation:function(i){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=e.positiveModulo(i,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:i}),this)},getRotation:function(){return this.degrees},resize:function(i,s){var r=this.getBoundsNoRotate(),o=r,l;return this.containerSize.x=i.x,this.containerSize.y=i.y,this._updateContainerInnerSize(),s&&(l=i.x/this.containerSize.x,o.width=r.width*l,o.height=o.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:i,maintain:s}),this.fitBounds(o,!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 i=this;this._adjustCenterSpringsForZoomPoint(function(){i.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var s=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,s},_adjustCenterSpringsForZoomPoint:function(i){if(this.zoomPoint){var s=this.pixelFromPoint(this.zoomPoint,!0);i();var r=this.pixelFromPoint(this.zoomPoint,!0),o=r.minus(s),l=this.deltaPointsFromPixels(o,!0);this.centerSpringX.shiftBy(l.x),this.centerSpringY.shiftBy(l.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else i()},deltaPixelsFromPointsNoRotate:function(i,s){return i.times(this._containerInnerSize.x*this.getZoom(s))},deltaPixelsFromPoints:function(i,s){return this.deltaPixelsFromPointsNoRotate(i.rotate(this.getRotation()),s)},deltaPointsFromPixelsNoRotate:function(i,s){return i.divide(this._containerInnerSize.x*this.getZoom(s))},deltaPointsFromPixels:function(i,s){return this.deltaPointsFromPixelsNoRotate(i,s).rotate(-this.getRotation())},pixelFromPointNoRotate:function(i,s){return this._pixelFromPointNoRotate(i,this.getBoundsNoRotate(s))},pixelFromPoint:function(i,s){return this._pixelFromPoint(i,this.getBoundsNoRotate(s))},_pixelFromPointNoRotate:function(i,s){return i.minus(s.getTopLeft()).times(this._containerInnerSize.x/s.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(i,s){return this._pixelFromPointNoRotate(i.rotate(this.getRotation(),this.getCenter(!0)),s)},pointFromPixelNoRotate:function(i,s){var r=this.getBoundsNoRotate(s);return i.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/r.width).plus(r.getTopLeft())},pointFromPixel:function(i,s){return this.pointFromPixelNoRotate(i,s).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(i,s){var r=this._contentBoundsNoRotate.width;return new e.Point(i*this._contentSizeNoRotate.x/r,s*this._contentSizeNoRotate.x/r)},viewportToImageCoordinates:function(i,s){if(i instanceof e.Point)return this.viewportToImageCoordinates(i.x,i.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(r===1){var o=this.viewer.world.getItemAt(0);return o.viewportToImageCoordinates(i,s,!0)}}return this._viewportToImageDelta(i-this._contentBoundsNoRotate.x,s-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(i,s){var r=this._contentBoundsNoRotate.width;return new e.Point(i/this._contentSizeNoRotate.x*r,s/this._contentSizeNoRotate.x*r)},imageToViewportCoordinates:function(i,s){if(i instanceof e.Point)return this.imageToViewportCoordinates(i.x,i.y);if(this.viewer){var r=this.viewer.world.getItemCount();if(r>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(r===1){var o=this.viewer.world.getItemAt(0);return o.imageToViewportCoordinates(i,s,!0)}}var l=this._imageToViewportDelta(i,s);return l.x+=this._contentBoundsNoRotate.x,l.y+=this._contentBoundsNoRotate.y,l},imageToViewportRectangle:function(i,s,r,o){var l=i;if(l instanceof e.Rect||(l=new e.Rect(i,s,r,o)),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(a===1){var c=this.viewer.world.getItemAt(0);return c.imageToViewportRectangle(i,s,r,o,!0)}}var h=this.imageToViewportCoordinates(l.x,l.y),p=this._imageToViewportDelta(l.width,l.height);return new e.Rect(h.x,h.y,p.x,p.y,l.degrees)},viewportToImageRectangle:function(i,s,r,o){var l=i;if(l instanceof e.Rect||(l=new e.Rect(i,s,r,o)),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(a===1){var c=this.viewer.world.getItemAt(0);return c.viewportToImageRectangle(i,s,r,o,!0)}}var h=this.viewportToImageCoordinates(l.x,l.y),p=this._viewportToImageDelta(l.width,l.height);return new e.Rect(h.x,h.y,p.x,p.y,l.degrees)},viewerElementToImageCoordinates:function(i){var s=this.pointFromPixel(i,!0);return this.viewportToImageCoordinates(s)},imageToViewerElementCoordinates:function(i){var s=this.imageToViewportCoordinates(i);return this.pixelFromPoint(s,!0)},windowToImageCoordinates:function(i){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var s=i.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(s)},imageToWindowCoordinates:function(i){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var s=this.imageToViewerElementCoordinates(i);return s.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(i){return this.pointFromPixel(i,!0)},viewportToViewerElementCoordinates:function(i){return this.pixelFromPoint(i,!0)},viewerElementToViewportRectangle:function(i){return e.Rect.fromSummits(this.pointFromPixel(i.getTopLeft(),!0),this.pointFromPixel(i.getTopRight(),!0),this.pointFromPixel(i.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(i){return e.Rect.fromSummits(this.pixelFromPoint(i.getTopLeft(),!0),this.pixelFromPoint(i.getTopRight(),!0),this.pixelFromPoint(i.getBottomLeft(),!0))},windowToViewportCoordinates:function(i){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var s=i.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(s)},viewportToWindowCoordinates:function(i){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var s=this.viewportToViewerElementCoordinates(i);return s.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(i){if(this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(s===1){var r=this.viewer.world.getItemAt(0);return r.viewportToImageZoom(i)}}var o=this._contentSizeNoRotate.x,l=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,c=l/o*a;return i*c},imageToViewportZoom:function(i){if(this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(s===1){var r=this.viewer.world.getItemAt(0);return r.imageToViewportZoom(i)}}var o=this._contentSizeNoRotate.x,l=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,c=o/l/a;return i*c},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(i){return this.flipped===i?this:(this.flipped=i,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:i}),this)}}}(n),function(e){e.TiledImage=function(f){var _=this;e.console.assert(f.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(f.drawer,"[TiledImage] options.drawer is required"),e.console.assert(f.viewer,"[TiledImage] options.viewer is required"),e.console.assert(f.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(f.source,"[TiledImage] options.source is required"),e.console.assert(!f.clip||f.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=f.tileCache,delete f.tileCache,this._drawer=f.drawer,delete f.drawer,this._imageLoader=f.imageLoader,delete f.imageLoader,f.clip instanceof e.Rect&&(this._clip=f.clip.clone()),delete f.clip;var H=f.x||0;delete f.x;var L=f.y||0;delete f.y,this.normHeight=f.source.dimensions.y/f.source.dimensions.x,this.contentAspectX=f.source.dimensions.x/f.source.dimensions.y;var O=1;f.width?(O=f.width,delete f.width,f.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete f.height)):f.height&&(O=f.height/this.normHeight,delete f.height);var N=f.fitBounds;delete f.fitBounds;var G=f.fitBoundsPlacement||n.Placement.CENTER;delete f.fitBoundsPlacement;var q=f.degrees||0;delete f.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation},f),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:H,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:L,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:O,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:q,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),N&&this.fitBounds(N,G,!0),this._drawingHandler=function($){_.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:_},$))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(f){f!==this._fullyLoaded&&(this._fullyLoaded=f,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var f=this._xSpring.update(),_=this._ySpring.update(),H=this._scaleSpring.update(),L=this._degreesSpring.update();return f||_||H||L?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(f){return this.getBoundsNoRotate(f).rotate(this.getRotation(f),this._getRotationPoint(f))},getBoundsNoRotate:function(f){return f?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(f){var _=this.getBoundsNoRotate(f);if(this._clip){var H=f?this._worldWidthCurrent:this._worldWidthTarget,L=H/this.source.dimensions.x,O=this._clip.times(L);_=new e.Rect(_.x+O.x,_.y+O.y,O.width,O.height)}return _.rotate(this.getRotation(f),this._getRotationPoint(f))},getTileBounds:function(f,_,H){var L=this.source.getNumTiles(f),O=(L.x+_%L.x)%L.x,N=(L.y+H%L.y)%L.y,G=this.source.getTileBounds(f,O,N);return this.getFlip()&&(G.x=1-G.x-G.width),G.x+=(_-O)/L.x,G.y+=this._worldHeightCurrent/this._worldWidthCurrent*((H-N)/L.y),G},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var f=this.imageToWindowCoordinates(new e.Point(0,0)),_=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(_.x-f.x,_.y-f.y)},_viewportToImageDelta:function(f,_,H){var L=H?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(f*(this.source.dimensions.x/L),_*(this.source.dimensions.y*this.contentAspectX/L))},viewportToImageCoordinates:function(f,_,H){var L;return f instanceof e.Point?(H=_,L=f):L=new e.Point(f,_),L=L.rotate(-this.getRotation(H),this._getRotationPoint(H)),H?this._viewportToImageDelta(L.x-this._xSpring.current.value,L.y-this._ySpring.current.value):this._viewportToImageDelta(L.x-this._xSpring.target.value,L.y-this._ySpring.target.value)},_imageToViewportDelta:function(f,_,H){var L=H?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(f/this.source.dimensions.x*L,_/this.source.dimensions.y/this.contentAspectX*L)},imageToViewportCoordinates:function(f,_,H){f instanceof e.Point&&(H=_,_=f.y,f=f.x);var L=this._imageToViewportDelta(f,_);return H?(L.x+=this._xSpring.current.value,L.y+=this._ySpring.current.value):(L.x+=this._xSpring.target.value,L.y+=this._ySpring.target.value),L.rotate(this.getRotation(H),this._getRotationPoint(H))},imageToViewportRectangle:function(f,_,H,L,O){var N=f;N instanceof e.Rect?O=_:N=new e.Rect(f,_,H,L);var G=this.imageToViewportCoordinates(N.getTopLeft(),O),q=this._imageToViewportDelta(N.width,N.height,O);return new e.Rect(G.x,G.y,q.x,q.y,N.degrees+this.getRotation(O))},viewportToImageRectangle:function(f,_,H,L,O){var N=f;f instanceof e.Rect?O=_:N=new e.Rect(f,_,H,L);var G=this.viewportToImageCoordinates(N.getTopLeft(),O),q=this._viewportToImageDelta(N.width,N.height,O);return new e.Rect(G.x,G.y,q.x,q.y,N.degrees-this.getRotation(O))},viewerElementToImageCoordinates:function(f){var _=this.viewport.pointFromPixel(f,!0);return this.viewportToImageCoordinates(_)},imageToViewerElementCoordinates:function(f){var _=this.imageToViewportCoordinates(f);return this.viewport.pixelFromPoint(_,!0)},windowToImageCoordinates:function(f){var _=f.minus(n.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(_)},imageToWindowCoordinates:function(f){var _=this.imageToViewerElementCoordinates(f);return _.plus(n.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(f){var _=this._scaleSpring.current.value;return f=f.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((f.x-this._xSpring.current.value)/_,(f.y-this._ySpring.current.value)/_,f.width/_,f.height/_,f.degrees)},viewportToImageZoom:function(f){var _=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return _*f},imageToViewportZoom:function(f){var _=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return f/_},setPosition:function(f,_){var H=this._xSpring.target.value===f.x&&this._ySpring.target.value===f.y;if(_){if(H&&this._xSpring.current.value===f.x&&this._ySpring.current.value===f.y)return;this._xSpring.resetTo(f.x),this._ySpring.resetTo(f.y),this._needsDraw=!0}else{if(H)return;this._xSpring.springTo(f.x),this._ySpring.springTo(f.y),this._needsDraw=!0}H||this._raiseBoundsChange()},setWidth:function(f,_){this._setScale(f,_)},setHeight:function(f,_){this._setScale(f/this.normHeight,_)},setCroppingPolygons:function(f){var _=function(L){return L instanceof e.Point||typeof L.x=="number"&&typeof L.y=="number"},H=function(L){return L.map(function(O){try{if(_(O))return{x:O.x,y:O.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!e.isArray(f))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=f.map(function(L){return H(L)})}catch(L){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(L),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(f,_,H){_=_||e.Placement.CENTER;var L=e.Placement.properties[_],O=this.contentAspectX,N=0,G=0,q=1,$=1;if(this._clip&&(O=this._clip.getAspectRatio(),q=this._clip.width/this.source.dimensions.x,$=this._clip.height/this.source.dimensions.y,f.getAspectRatio()>O?(N=this._clip.x/this._clip.height*f.height,G=this._clip.y/this._clip.height*f.height):(N=this._clip.x/this._clip.width*f.width,G=this._clip.y/this._clip.width*f.width)),f.getAspectRatio()>O){var re=f.height/$,J=0;L.isHorizontallyCentered?J=(f.width-f.height*O)/2:L.isRight&&(J=f.width-f.height*O),this.setPosition(new e.Point(f.x-N+J,f.y-G),H),this.setHeight(re,H)}else{var fe=f.width/q,ue=0;L.isVerticallyCentered?ue=(f.height-f.width/O)/2:L.isBottom&&(ue=f.height-f.width/O),this.setPosition(new e.Point(f.x-N,f.y-G+ue),H),this.setWidth(fe,H)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(f){e.console.assert(!f||f instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),f instanceof e.Rect?this._clip=f.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(f){this.flipped=!!f,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(f){f!==this.opacity&&(this.opacity=f,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(f){this._preload=!!f,this._needsDraw=!0},getRotation:function(f){return f?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(f,_){this._degreesSpring.target.value===f&&this._degreesSpring.isAtTargetValue()||(_?this._degreesSpring.resetTo(f):this._degreesSpring.springTo(f),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(f){return this.getBoundsNoRotate(f).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(f){f!==this.compositeOperation&&(this.compositeOperation=f,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(f,_){var H=this._scaleSpring.target.value===f;if(_){if(H&&this._scaleSpring.current.value===f)return;this._scaleSpring.resetTo(f),this._updateForScale(),this._needsDraw=!0}else{if(H)return;this._scaleSpring.springTo(f),this._updateForScale(),this._needsDraw=!0}H||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 f=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),_=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,H=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(_/this.minPixelRatio)/Math.log(2))));return H=Math.max(H,this.source.minLevel||0),f=Math.min(f,H),{lowestLevel:f,highestLevel:H}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var f=this.lastDrawn.pop();f.beingDrawn=!1}var _=this.viewport,H=this._viewportToTiledImageRectangle(_.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var L=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(H=H.intersection(L),H===null)return}for(var O=this._getLevelsInterval(),N=O.lowestLevel,G=O.highestLevel,q=null,$=!1,re=e.now(),J=G;J>=N;J--){var fe=!1,ue=_.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(J),!0).x*this._scaleSpring.current.value;if(J===N||!$&&ue>=this.minPixelRatio)fe=!0,$=!0;else if(!$)continue;var me=_.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(J),!1).x*this._scaleSpring.current.value,le=_.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,oe=this.immediateRender?1:le,ee=Math.min(1,(ue-.5)/.5),we=oe/Math.abs(oe-me);if(q=i(this,$,fe,J,ee,we,H,re,q),p(this.coverage,J))break}R(this,this.lastDrawn),q&&!q.context2D?(o(this,q,re),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(f,_,H){var L,O;this.wrapHorizontal?(L=e.positiveModulo(_.x,1),O=e.positiveModulo(H.x,1)):(L=Math.max(0,_.x),O=Math.min(1,H.x));var N,G,q=1/this.source.aspectRatio;this.wrapVertical?(N=e.positiveModulo(_.y,q),G=e.positiveModulo(H.y,q)):(N=Math.max(0,_.y),G=Math.min(q,H.y));var $=this.source.getTileAtPoint(f,new e.Point(L,N)),re=this.source.getTileAtPoint(f,new e.Point(O,G)),J=this.source.getNumTiles(f);return this.wrapHorizontal&&($.x+=J.x*Math.floor(_.x),re.x+=J.x*Math.floor(H.x)),this.wrapVertical&&($.y+=J.y*Math.floor(_.y/q),re.y+=J.y*Math.floor(H.y/q)),{topLeft:$,bottomRight:re}}});function i(f,_,H,L,O,N,G,q,$){var re=G.getBoundingBox().getTopLeft(),J=G.getBoundingBox().getBottomRight();f.viewer&&f.viewer.raiseEvent("update-level",{tiledImage:f,havedrawn:_,level:L,opacity:O,visibility:N,drawArea:G,topleft:re,bottomright:J,currenttime:q,best:$}),x(f.coverage,L),x(f.loadingCoverage,L);var fe=f._getCornerTiles(L,re,J),ue=fe.topLeft,me=fe.bottomRight,le=f.source.getNumTiles(L),oe=f.viewport.pixelFromPoint(f.viewport.getCenter());f.getFlip()&&(me.x+=1,f.wrapHorizontal||(me.x=Math.min(me.x,le.x-1)));for(var ee=ue.x;ee<=me.x;ee++)for(var we=ue.y;we<=me.y;we++){var Y;if(f.getFlip()){var Ee=(le.x+ee%le.x)%le.x;Y=ee+le.x-Ee-Ee-1}else Y=ee;G.intersection(f.getTileBounds(L,Y,we))!==null&&($=s(f,H,_,Y,we,L,O,N,oe,le,q,$))}return $}function s(f,_,H,L,O,N,G,q,$,re,J,fe){var ue=r(L,O,N,f,f.source,f.tilesMatrix,J,re,f._worldWidthCurrent,f._worldHeightCurrent),me=H;f.viewer&&f.viewer.raiseEvent("update-tile",{tiledImage:f,tile:ue}),T(f.coverage,N,L,O,!1);var le=ue.loaded||ue.loading||m(f.loadingCoverage,N,L,O);if(T(f.loadingCoverage,N,L,O,le),!ue.exists||(_&&!me&&(m(f.coverage,N,L,O)?T(f.coverage,N,L,O,!0):me=!0),!me))return fe;if(c(ue,f.source.tileOverlap,f.viewport,$,q,f),!ue.loaded)if(ue.context2D)a(f,ue);else{var oe=f._tileCache.getImageRecord(ue.cacheKey);if(oe){var ee=oe.getImage();a(f,ue,ee)}}if(ue.loaded){var we=h(f,ue,L,O,N,G,J);we&&(f._needsDraw=!0)}else ue.loading?f._tilesLoading++:le||(fe=E(fe,ue));return fe}function r(f,_,H,L,O,N,G,q,$,re){var J,fe,ue,me,le,oe,ee,we,Y;return N[H]||(N[H]={}),N[H][f]||(N[H][f]={}),(!N[H][f][_]||!N[H][f][_].flipped!=!L.flipped)&&(J=(q.x+f%q.x)%q.x,fe=(q.y+_%q.y)%q.y,ue=L.getTileBounds(H,f,_),me=O.getTileBounds(H,J,fe,!0),le=O.tileExists(H,J,fe),oe=O.getTileUrl(H,J,fe),L.loadTilesWithAjax?(ee=O.getTileAjaxHeaders(H,J,fe),e.isPlainObject(L.ajaxHeaders)&&(ee=e.extend({},L.ajaxHeaders,ee))):ee=null,we=O.getContext2D?O.getContext2D(H,J,fe):void 0,Y=new e.Tile(H,f,_,ue,le,oe,we,L.loadTilesWithAjax,ee,me),L.getFlip()?J===0&&(Y.isRightMost=!0):J===q.x-1&&(Y.isRightMost=!0),fe===q.y-1&&(Y.isBottomMost=!0),Y.flipped=L.flipped,N[H][f][_]=Y),Y=N[H][f][_],Y.lastTouchTime=G,Y}function o(f,_,H){_.loading=!0,f._imageLoader.addJob({src:_.url,loadWithAjax:_.loadWithAjax,ajaxHeaders:_.ajaxHeaders,crossOriginPolicy:f.crossOriginPolicy,ajaxWithCredentials:f.ajaxWithCredentials,callback:function(L,O,N){l(f,_,H,L,O,N)},abort:function(){_.loading=!1}})}function l(f,_,H,L,O,N){if(!L){e.console.log("Tile %s failed to load: %s - error: %s",_,_.url,O),f.viewer.raiseEvent("tile-load-failed",{tile:_,tiledImage:f,time:H,message:O,tileRequest:N}),_.loading=!1,_.exists=!1;return}if(Hf.visibility||_.visibility===f.visibility&&_.squaredDistance1&&q>f.smoothTileEdgesMinZoom&&!f.iOSDevice&&f.getRotation(!0)%360===0&&e.supportsCanvas&&(L=!0,O=H.getScaleForEdgeSmoothing(),N=H.getTranslationForEdgeSmoothing(O,f._drawer.getCanvasSize(!1),f._drawer.getCanvasSize(!0)));var $;L&&(O||($=f.viewport.viewportToViewerElementRectangle(f.getClippedBounds(!0)).getIntegerBoundingBox(),f._drawer.viewer.viewport.getFlip()&&(f.viewport.degrees!==0||f.getRotation(!0)%360!==0)&&($.x=f._drawer.viewer.container.clientWidth-($.x+$.width)),$=$.times(e.pixelDensityRatio)),f._drawer._clear(!0,$)),O||(f.viewport.degrees!==0&&f._drawer._offsetForRotation({degrees:f.viewport.degrees,useSketch:L}),f.getRotation(!0)%360!==0&&f._drawer._offsetForRotation({degrees:f.getRotation(!0),point:f.viewport.pixelFromPointNoRotate(f._getRotationPoint(!0),!0),useSketch:L}),f.viewport.degrees===0&&f.getRotation(!0)%360===0&&f._drawer.viewer.viewport.getFlip()&&f._drawer._flip());var re=!1;if(f._clip){f._drawer.saveContext(L);var J=f.imageToViewportRectangle(f._clip,!0);J=J.rotate(-f.getRotation(!0),f._getRotationPoint(!0));var fe=f._drawer.viewportToDrawerRectangle(J);O&&(fe=fe.times(O)),N&&(fe=fe.translate(N)),f._drawer.setClip(fe,L),re=!0}if(f._croppingPolygons){f._drawer.saveContext(L);try{var ue=f._croppingPolygons.map(function(ee){return ee.map(function(we){var Y=f.imageToViewportCoordinates(we.x,we.y,!0).rotate(-f.getRotation(!0),f._getRotationPoint(!0)),Ee=f._drawer.viewportCoordToDrawerCoord(Y);return O&&(Ee=Ee.times(O)),Ee})});f._drawer.clipWithPolygons(ue,L)}catch(ee){e.console.error(ee)}re=!0}if(f.placeholderFillStyle&&f._hasOpaqueTile===!1){var me=f._drawer.viewportToDrawerRectangle(f.getBounds(!0));O&&(me=me.times(O)),N&&(me=me.translate(N));var le=null;typeof f.placeholderFillStyle=="function"?le=f.placeholderFillStyle(f,f._drawer.context):le=f.placeholderFillStyle,f._drawer.drawRectangle(me,le,L)}for(var oe=_.length-1;oe>=0;oe--)H=_[oe],f._drawer.drawTile(H,f._drawingHandler,L,O,N),H.beingDrawn=!0,f.viewer&&f.viewer.raiseEvent("tile-drawn",{tiledImage:f,tile:H});re&&f._drawer.restoreContext(L),O||(f.getRotation(!0)%360!==0&&f._drawer._restoreRotationChanges(L),f.viewport.degrees!==0&&f._drawer._restoreRotationChanges(L)),L&&(O&&(f.viewport.degrees!==0&&f._drawer._offsetForRotation({degrees:f.viewport.degrees,useSketch:!1}),f.getRotation(!0)%360!==0&&f._drawer._offsetForRotation({degrees:f.getRotation(!0),point:f.viewport.pixelFromPointNoRotate(f._getRotationPoint(!0),!0),useSketch:!1})),f._drawer.blendSketch({opacity:f.opacity,scale:O,translate:N,compositeOperation:f.compositeOperation,bounds:$}),O&&(f.getRotation(!0)%360!==0&&f._drawer._restoreRotationChanges(!1),f.viewport.degrees!==0&&f._drawer._restoreRotationChanges(!1))),O||f.viewport.degrees===0&&f.getRotation(!0)%360===0&&f._drawer.viewer.viewport.getFlip()&&f._drawer._flip(),M(f,_)}}function M(f,_){if(f.debugMode)for(var H=_.length-1;H>=0;H--){var L=_[H];try{f._drawer.drawDebugInfo(L,_.length,H,f)}catch(O){e.console.error(O)}}}}(n),function(e){var i=function(r){e.console.assert(r,"[TileCache.cacheTile] options is required"),e.console.assert(r.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(r.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=r.tile,this.tiledImage=r.tiledImage},s=function(r){e.console.assert(r,"[ImageRecord] options is required"),e.console.assert(r.image,"[ImageRecord] options.image is required"),this._image=r.image,this._tiles=[]};s.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var r=document.createElement("canvas");r.width=this._image.width,r.height=this._image.height,this._renderedContext=r.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(r){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=r},addTile:function(r){e.console.assert(r,"[ImageRecord.addTile] tile is required"),this._tiles.push(r)},removeTile:function(r){for(var o=0;othis._maxImageCacheCount){for(var c=null,h=-1,p=null,m,T,x,E,R,M,f=this._tilesLoaded.length-1;f>=0;f--)if(M=this._tilesLoaded[f],m=M.tile,!(m.level<=o||m.beingDrawn)){if(!c){c=m,h=f,p=M;continue}E=m.lastTouchTime,T=c.lastTouchTime,R=m.level,x=c.level,(Ex)&&(c=m,h=f,p=M)}c&&h>=0&&(this._unloadTile(p),l=h)}this._tilesLoaded[l]=new i({tile:r.tile,tiledImage:r.tiledImage})},clearTilesFor:function(r){e.console.assert(r,"[TileCache.clearTilesFor] tiledImage is required");for(var o,l=0;l=this._items.length)throw new Error("Index bigger than number of layers.");s===r||r===-1||(this._items.splice(r,1),this._items.splice(s,0,i),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:i,previousIndex:r,newIndex:s}))},removeItem:function(i){e.console.assert(i,"[World.removeItem] item is required");var s=e.indexOf(this._items,i);s!==-1&&(i.removeHandler("bounds-change",this._delegatedFigureSizes),i.removeHandler("clip-change",this._delegatedFigureSizes),i.destroy(),this._items.splice(s,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(i))},removeAll:function(){this.viewer._cancelPendingImages();var i,s;for(s=0;sE.height?R=a:R=a*(E.width/E.height),M=R*(E.height/E.width),f=new e.Point(m+(a-R)/2,T+(a-M)/2),x.setPosition(f,s),x.setWidth(R,s),r==="horizontal"?m+=h:T+=h;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var i=this._homeBounds?this._homeBounds.clone():null,s=this._contentSize?this._contentSize.clone():null,r=this._contentFactor||0;if(!this._items.length)this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;else{var o=this._items[0],l=o.getBounds();this._contentFactor=o.getContentSize().x/l.width;for(var a=o.getClippedBounds().getBoundingBox(),c=a.x,h=a.y,p=a.x+a.width,m=a.y+a.height,T=1;T{t=i,n=s});return e.resolve=t,e.reject=n,e}const wf=.01,_f={directives:{clickOutside:En.directive},data(){return{filtersVisible:!1,loadingTimeout:null,promise:Cn(),tileSources:{},viewer:null,viewerState:{},zoomFactor:1.5}},computed:{filtersActive(){return Object.keys(this.$store.options.filters).length>0},saturation(){const t=this.$store.options.filters.saturate;return typeof t=="number"?t:1}},watch:{"$store.options.pages":function(t,n){const e=t.length!==n.length;this.loadImageInfo(e)}},mounted(){this.loadImageInfo(),this.updateFilterStyle(),this.$store.readyPromises.push(this.promise),this.$store.rootElement.addEventListener("keydown",this.onKeydown),this.$store.rootElement.addEventListener("keypress",this.onKeypress)},beforeUnmount(){this.viewer&&this.viewer.destroy(),this.$store.rootElement.removeEventListener("keydown",this.onKeydown),this.$store.rootElement.removeEventListener("keypress",this.onKeypress)},methods:{closeFilters(){this.filtersVisible=!1},initViewer(t){const n=[];let e=0,i,s=0;if(this.$store.options.pages.forEach((r,o)=>{let l=1;r<1?(l=0,i=o>0?this.$store.pageCount:1):i=r;const a=this.tileSources[i];if(!a)return;e||(e=a.width);const c=a.width/e;n.push({opacity:l,tileSource:a,width:c,x:s}),s+=c+wf}),this.viewer){this.viewer.addOnceHandler("open",()=>{if(this.viewerState.isReset||t)this.resetScan();else{if(this.viewer.viewport.applyConstraints(!0),!this.$store.options.optionsResetOnPageChange)return;this.$store.options.optionsResetOnPageChange.forEach(r=>{if(r==="filters")this.resetFilters();else if(r==="pan"){const o=this.viewer.viewport.getBounds();if(o.x<=0&&o.y<=0)return;const l=this.$store.options.pages[0]?0:1;this.viewer.viewport.panTo({x:o.x>0?o.width/2+l:this.$store.options.pan.x,y:o.y>0?o.height/2:this.$store.options.pan.y}),this.$store.updateOptions({pan:{}})}else r==="rotation"?(this.viewer.viewport.setRotation(0),this.$store.updateOptions({rotation:null})):r==="zoom"&&(this.viewer.viewport.goHome(),this.$store.updateOptions({zoom:null}))})}}),this.viewer.open(n);return}this.viewer=yf({animationTime:.4,element:this.$refs.image,immediateRender:!0,preload:!this.$store.isMobile(),preserveImageSizeOnResize:!0,preserveViewport:!0,showNavigationControl:!1,showZoomControl:!1,tileSources:n,visibilityRatio:.2,...this.$store.options.viewer}),this.viewer.innerTracker.keyHandler=null,this.viewer.gestureSettingsMouse.clickToZoom=!1,this.viewer.addHandler("animation-finish",()=>{if(this.viewerState.isReset){this.removeScanOptions();return}const r=this.viewer.viewport.getCenter();this.$store.updateOptions({pan:{x:Math.round(r.x*1e3)/1e3,y:Math.round(r.y*1e3)/1e3},zoom:Math.round(this.viewer.viewport.getZoom()*1e3)/1e3})}),this.viewer.addHandler("canvas-click",()=>{document.body.click()}),this.viewer.addHandler("open",()=>{this.startLoadingWatch(),this.$store.options.pan.x!==void 0||this.$store.options.pan.y!==void 0||this.$store.options.zoom?((this.$store.options.pan.x!==void 0||this.$store.options.pan.y!==void 0)&&this.viewer.viewport.panTo({x:this.$store.options.pan.x,y:this.$store.options.pan.y},!0),this.$store.options.zoom&&this.viewer.viewport.zoomTo(this.$store.options.zoom,null,!0)):this.viewer.viewport.goHome(),this.$store.options.rotation!==null&&this.viewer.viewport.setRotation(this.$store.options.rotation)}),this.viewer.addHandler("pan",this.updateViewerState),this.viewer.addHandler("resize",this.updateViewerState),this.viewer.addHandler("zoom",this.updateViewerState),this.viewer.addHandler("tile-load-failed",r=>{this.$store.addError(`Error loading image: ${r.message}`)}),this.$api.expose(this.resetScan),this.$api.expose(this.viewer,"viewer"),this.promise.resolve()},loadImageInfo(t=!1){this.stopLoadingWatch();const n=[];this.$store.options.pages.forEach(e=>{var s,r;if(e<1||this.tileSources[e])return;const i=(r=(s=this.$store.manifest.items[e-1].items)==null?void 0:s[0].items)==null?void 0:r[0].body;if(i.service){const o=i.service instanceof Array?i.service[0]:i.service,l=o.id||o["@id"],a=`${l}${l.at(-1)==="/"?"":"/"}info.json`;n.push(this.$store.fetchJson(a).then(c=>({...c,page:e}),c=>{let h;c.response&&c.response.statusText?h=c.response.statusText:c.message&&(h=c.message),this.$store.addError(`Error loading info file for page ${e}${h?`: ${h}`:""}`)}))}else this.tileSources[e]={type:"image",url:i.id,width:i.width,height:i.height}}),n.length?Promise.all(n).then(e=>{e.forEach(i=>{i&&(this.tileSources[i.page]=i)}),this.initViewer(t)}):this.initViewer(t)},onKeydown(t){t.key==="Escape"&&(this.filtersVisible=!1,this.$store.rootElement.focus()),[45,48,96].includes(t.keyCode)&&(t.shiftKey?this.resetScan(t):this.viewer.viewport.goHome())},onKeypress(t){if(!Pn(t))switch(t.key){case"r":case"R":this.rotateRight(t);break;case"i":this.filtersVisible=!this.filtersVisible,this.filtersVisible?this.$nextTick(()=>this.$refs.firstSlider.focus()):this.$store.rootElement.focus();break;case"I":this.resetFilters();break;case"+":case"=":case"W":this.viewer.viewport.zoomBy(1.1),this.viewer.viewport.applyConstraints();break;case"-":case"_":case"S":this.viewer.viewport.zoomBy(.9),this.viewer.viewport.applyConstraints();break;case"w":this.viewer.innerTracker.keyDownHandler({keyCode:38});break;case"s":this.viewer.innerTracker.keyDownHandler({keyCode:40});break;case"a":this.viewer.innerTracker.keyDownHandler({keyCode:37});break;case"d":this.viewer.innerTracker.keyDownHandler({keyCode:39});break}},removeScanOptions(){this.$store.updateOptions({pan:{},zoom:null})},resetFilters(){this.$refs.image.style.cssText="",this.$store.updateOptions({filters:{}})},resetScan(t){t&&(this.viewer.viewport.setRotation(0),this.$store.updateOptions({rotation:null}),this.filtersActive&&this.resetFilters()),this.viewer.viewport.goHome(),this.removeScanOptions()},rotateRight(t){const{viewport:n}=this.viewer,e=t&&t.shiftKey?0:(n.getRotation()+90)%360;n.setRotation(e),this.$store.updateOptions({rotation:e||null})},setFilter(t,n){const e=n.target.valueAsNumber;e===1?delete this.$store.options.filters[t]:this.$store.options.filters[t]=e,this.$store.updateOptions({filters:this.$store.options.filters}),this.updateFilterStyle()},startLoadingWatch(){this.$store.loading=0;for(let t=this.viewer.world.getItemCount()-1;t>=0;t-=1){const n=this.viewer.world.getItemAt(t);if(n&&n._tilesLoading){this.$store.loading=1;break}}this.loadingTimeout=setTimeout(this.startLoadingWatch,200)},stopLoadingWatch(){clearTimeout(this.loadingTimeout)},updateFilterStyle(){if(!this.filtersActive)return;const t=[];Object.keys(this.$store.options.filters).forEach(i=>{t.push(`${i}(${this.$store.options.filters[i]})`)});const{image:n}=this.$refs,e=t.join(" ");n.style.cssText=`filter: ${e}`},updateViewerState(){const t=this.viewer.viewport.getZoom();this.viewerState.isMaxZoom=t>=this.viewer.viewport.getMaxZoom(),this.viewerState.isMinZoom=t<=this.viewer.viewport.getMinZoom();const n=this.viewer.viewport.getHomeBounds(),e=this.viewer.viewport.getBounds();this.viewerState.isReset=Math.abs(n.height-e.height)<1e-9&&Math.abs(n.width-e.width)<1e-9&&Math.abs(n.x-e.x)<1e-9&&Math.abs(n.y-e.y)<1e-9},zoomIn(){this.viewer.viewport.zoomBy(this.zoomFactor)},zoomOut(){this.viewer.viewport.zoomBy(1/this.zoomFactor)}}},Tf={class:"tify-scan"},xf={class:"tify-sr-only"},bf=["title"],Sf=["title"],Ef={key:2,class:"tify-scan-buttons"},Pf=["disabled","title"],Cf=["disabled","title"],Rf=["disabled","title"],Lf=["title"],Hf=["title","aria-controls","aria-expanded"],Of=["id"],Mf={class:"tify-sr-only"},Df=["value"],Af=["value"],kf=["value"],Ff=["disabled"],If={ref:"image",class:"tify-scan-image"};function Bf(t,n,e,i,s,r){const o=Cr,l=Pr,a=rf,c=Qh,h=qh,p=Nh,m=Ah,T=Rh,x=xh,E=mh,R=uh,M=yn("click-outside");return k(),F("section",Tf,[A("h2",xf,Z(t.$translate("Scan")),1),!t.$store.isCustomPageView&&!t.$store.isFirstPage?(k(),F("button",{key:0,type:"button",class:"tify-scan-page-button -previous",title:t.$translate("Previous page"),onClick:n[0]||(n[0]=f=>t.$store.goToPreviousPage())},[ie(o)],8,bf)):se("",!0),!t.$store.isCustomPageView&&!t.$store.isLastPage?(k(),F("button",{key:1,type:"button",class:"tify-scan-page-button -next",title:t.$translate("Next page"),onClick:n[1]||(n[1]=f=>t.$store.goToNextPage())},[ie(l)],8,Sf)):se("",!0),s.viewer?(k(),F("div",Ef,[A("button",{type:"button",class:"tify-scan-button",disabled:s.viewerState.isMaxZoom,title:t.$translate("Zoom in"),onClick:n[2]||(n[2]=f=>r.zoomIn())},[ie(a)],8,Pf),A("button",{type:"button",class:"tify-scan-button",disabled:s.viewerState.isReset,title:t.$translate("Reset"),onClick:n[3]||(n[3]=f=>r.resetScan(!!f.shiftKey))},[ie(c)],8,Cf),A("button",{type:"button",class:"tify-scan-button",disabled:s.viewerState.isMinZoom,title:t.$translate("Zoom out"),onClick:n[4]||(n[4]=f=>r.zoomOut())},[ie(h)],8,Rf),A("button",{type:"button",class:Te(["tify-scan-button",{"-active":t.$store.options.rotation}]),title:t.$translate("Rotate"),onClick:n[5]||(n[5]=f=>r.rotateRight(f))},[ie(p)],10,Lf),De((k(),F("div",{class:Te(["tify-scan-filters",{"-open":s.filtersVisible}])},[A("button",{type:"button",class:Te(["tify-scan-button",{"-active":r.filtersActive}]),title:t.$translate("Toggle image filters"),"aria-controls":t.$store.getId("filters"),"aria-expanded":s.filtersVisible?"true":"false",onClick:n[6]||(n[6]=f=>s.filtersVisible=!s.filtersVisible)},[ie(m)],10,Hf),De(A("div",{id:t.$store.getId("filters"),class:"tify-scan-filters-popup"},[A("h3",Mf,Z(t.$translate("Image filters")),1),A("p",null,[A("label",null,[ie(T),be(" "+Z(t.$translate("Brightness"))+" ",1),A("b",null,Z(Math.round((t.$store.options.filters.brightness||1)*100))+" %",1),A("input",{ref:"firstSlider",class:"tify-scan-range",max:"2",min:".5",step:".01",type:"range",value:t.$store.options.filters.brightness||1,onInput:n[7]||(n[7]=f=>r.setFilter("brightness",f))},null,40,Df)])]),A("p",null,[A("label",null,[ie(x),be(" "+Z(t.$translate("Contrast"))+" ",1),A("b",null,Z(Math.round((t.$store.options.filters.contrast||1)*100))+" %",1),A("input",{class:"tify-scan-range",max:"2",min:".5",step:".01",type:"range",value:t.$store.options.filters.contrast||1,onInput:n[8]||(n[8]=f=>r.setFilter("contrast",f))},null,40,Af)])]),A("p",null,[A("label",null,[ie(E),be(" "+Z(t.$translate("Saturation"))+" ",1),A("b",null,Z(Math.round(r.saturation*100))+" %",1),A("input",{class:"tify-scan-range",max:"3",min:"0",step:".01",type:"range",value:r.saturation,onInput:n[9]||(n[9]=f=>r.setFilter("saturate",f))},null,40,kf)])]),A("p",null,[A("button",{type:"button",class:"tify-scan-reset",disabled:!r.filtersActive,onClick:n[10]||(n[10]=f=>r.resetFilters())},[ie(R),be(" "+Z(t.$translate("Reset")),1)],8,Ff)])],8,Of),[[Ze,s.filtersVisible]])],2)),[[M,r.closeFilters]])])):se("",!0),A("div",If,null,512)])}const zf=ae(_f,[["render",Bf]]),Nf={},Vf={class:"tify-icon",viewBox:"0 0 24 24"},Uf=A("path",{d:"M14,14H19V16H16V19H14V14M5,14H10V19H8V16H5V14M8,5H10V10H5V8H8V5M19,8V10H14V5H16V8H19Z"},null,-1),jf=[Uf];function Wf(t,n){return k(),F("svg",Vf,jf)}const Gf=ae(Nf,[["render",Wf]]),qf={},Zf={class:"tify-icon",viewBox:"0 0 24 24"},Kf=A("path",{d:"M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"},null,-1),Xf=[Kf];function Yf(t,n){return k(),F("svg",Zf,Xf)}const Jf=ae(qf,[["render",Yf]]),Qf={},$f={class:"tify-icon",viewBox:"0 0 24 24"},ed=A("path",{d:"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"},null,-1),td=[ed];function id(t,n){return k(),F("svg",$f,td)}const nd=ae(Qf,[["render",id]]),sd={},rd={class:"tify-icon",viewBox:"0 0 24 24"},od=A("path",{d:"M11 15H17V17H11V15M9 7H7V9H9V7M11 13H17V11H11V13M11 9H17V7H11V9M9 11H7V13H9V11M21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H19C20.1 3 21 3.9 21 5M19 5H5V19H19V5M9 15H7V17H9V15Z"},null,-1),ad=[od];function ld(t,n){return k(),F("svg",rd,ad)}const cd=ae(sd,[["render",ld]]),ud={},hd={class:"tify-icon",viewBox:"0 0 24 24"},fd=A("path",{d:"M13,5V11H14.17L12,13.17L9.83,11H11V5H13M15,3H9V9H5L12,16L19,9H15V3M19,18H5V20H19V18Z"},null,-1),dd=[fd];function pd(t,n){return k(),F("svg",hd,dd)}const gd=ae(ud,[["render",pd]]),md={},vd={class:"tify-icon",viewBox:"0 0 24 24"},yd=A("path",{d:"M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z"},null,-1),wd=[yd];function _d(t,n){return k(),F("svg",vd,wd)}const Td=ae(md,[["render",_d]]),xd={},bd={class:"tify-icon",viewBox:"0 0 24 24"},Sd=A("path",{d:"M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z"},null,-1),Ed=[Sd];function Pd(t,n){return k(),F("svg",bd,Ed)}const Cd=ae(xd,[["render",Pd]]),Rd={},Ld={class:"tify-icon",viewBox:"0 0 24 24"},Hd=A("path",{d:"M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z"},null,-1),Od=[Hd];function Md(t,n){return k(),F("svg",Ld,Od)}const Dd=ae(Rd,[["render",Md]]),Ad={},kd={class:"tify-icon",viewBox:"0 0 24 24"},Fd=A("path",{d:"M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"},null,-1),Id=[Fd];function Bd(t,n){return k(),F("svg",kd,Id)}const zd=ae(Ad,[["render",Bd]]),Nd={},Vd={class:"tify-icon",viewBox:"0 0 24 24"},Ud=A("path",{d:"M12 16C13.1 16 14 16.9 14 18S13.1 20 12 20 10 19.1 10 18 10.9 16 12 16M12 10C13.1 10 14 10.9 14 12S13.1 14 12 14 10 13.1 10 12 10.9 10 12 10M12 4C13.1 4 14 4.9 14 6S13.1 8 12 8 10 7.1 10 6 10.9 4 12 4M6 16C7.1 16 8 16.9 8 18S7.1 20 6 20 4 19.1 4 18 4.9 16 6 16M6 10C7.1 10 8 10.9 8 12S7.1 14 6 14 4 13.1 4 12 4.9 10 6 10M6 4C7.1 4 8 4.9 8 6S7.1 8 6 8 4 7.1 4 6 4.9 4 6 4M18 16C19.1 16 20 16.9 20 18S19.1 20 18 20 16 19.1 16 18 16.9 16 18 16M18 10C19.1 10 20 10.9 20 12S19.1 14 18 14 16 13.1 16 12 16.9 10 18 10M18 4C19.1 4 20 4.9 20 6S19.1 8 18 8 16 7.1 16 6 16.9 4 18 4Z"},null,-1),jd=[Ud];function Wd(t,n){return k(),F("svg",Vd,jd)}const Gd=ae(Nd,[["render",Wd]]),qd={},Zd={class:"tify-icon",viewBox:"0 0 24 24"},Kd=A("path",{d:"M5.59,7.41L10.18,12L5.59,16.59L7,18L13,12L7,6L5.59,7.41M16,6H18V18H16V6Z"},null,-1),Xd=[Kd];function Yd(t,n){return k(),F("svg",Zd,Xd)}const Jd=ae(qd,[["render",Yd]]),Qd={},$d={class:"tify-icon",viewBox:"0 0 24 24"},ep=A("path",{d:"M16,18H18V6H16M6,18L14.5,12L6,6V18Z"},null,-1),tp=[ep];function ip(t,n){return k(),F("svg",$d,tp)}const np=ae(Qd,[["render",ip]]),sp={},rp={class:"tify-icon",viewBox:"0 0 24 24"},op=A("path",{d:"M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z"},null,-1),ap=[op];function lp(t,n){return k(),F("svg",rp,ap)}const cp=ae(sp,[["render",lp]]),up={},hp={class:"tify-icon",viewBox:"0 0 24 24"},fp=A("path",{d:"M18.41,16.59L13.82,12L18.41,7.41L17,6L11,12L17,18L18.41,16.59M6,6H8V18H6V6Z"},null,-1),dp=[fp];function pp(t,n){return k(),F("svg",hp,dp)}const gp=ae(up,[["render",pp]]),mp={},vp={class:"tify-header-button-group -pagination"},yp=["disabled","title"],wp=["disabled","title"],_p=["disabled","title"],Tp=["disabled","title"],xp=["disabled","title"],bp=["disabled","title"];function Sp(t,n){const e=gp,i=cp,s=Cr,r=Pr,o=np,l=Jd;return k(),F("div",vp,[A("button",{type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isFirstPage,title:t.$translate("First page"),onClick:n[0]||(n[0]=a=>t.$store.goToFirstPage())},[ie(e)],8,yp),t.$store.manifest.structures?(k(),F("button",{key:0,type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isFirstPage,title:t.$translate("Previous section"),onClick:n[1]||(n[1]=a=>t.$store.goToPreviousSection())},[ie(i)],8,wp)):se("",!0),A("button",{type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isFirstPage,title:t.$translate("Previous page"),onClick:n[2]||(n[2]=a=>t.$store.goToPreviousPage())},[ie(s)],8,_p),A("button",{type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isLastPage,title:t.$translate("Next page"),onClick:n[3]||(n[3]=a=>t.$store.goToNextPage())},[ie(r)],8,Tp),t.$store.manifest.structures?(k(),F("button",{key:1,type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isLastSection,title:t.$translate("Next section"),onClick:n[4]||(n[4]=a=>t.$store.goToNextSection())},[ie(o)],8,xp)):se("",!0),A("button",{type:"button",class:"tify-header-button",disabled:t.$store.isCustomPageView||t.$store.isLastPage,title:t.$translate("Last page"),onClick:n[5]||(n[5]=a=>t.$store.goToLastPage())},[ie(l)],8,bp)])}const Ep=ae(mp,[["render",Sp]]),Pp={},Cp={class:"tify-icon",viewBox:"0 0 24 24"},Rp=A("path",{d:"M6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20M12 19.5V8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5Z"},null,-1),Lp=[Rp];function Hp(t,n){return k(),F("svg",Cp,Lp)}const Op=ae(Pp,[["render",Hp]]),Mp={},Dp={class:"tify-icon",viewBox:"0 0 24 24"},Ap=A("path",{d:"M16,5V11H21V5M10,11H15V5H10M16,18H21V12H16M10,18H15V12H10M4,18H9V12H4M4,11H9V5H4V11Z"},null,-1),kp=[Ap];function Fp(t,n){return k(),F("svg",Dp,kp)}const Ip=ae(Mp,[["render",Fp]]),Bp={directives:{clickOutside:En.directive},data(){return{filter:"",filteredCanvases:[],highlightIndex:0,isOpen:!1}},computed:{currentPageLabel(){const t=this.$store.options.pages[0]||1,n=this.$store.options.pages[0]?this.$store.options.pages[0]-1:0,e=this.$store.localize(this.$store.manifest.items[n].label);return this.$store.getPageLabel(t,e)}},watch:{filter(){this.updateFilteredCanvases(),this.$nextTick(()=>this.updateScroll())},isOpen(){this.isOpen&&(this.filter="",this.highlightIndex=this.$store.options.pages[0]-1)}},mounted(){this.updateFilteredCanvases(),this.$store.rootElement.addEventListener("keydown",this.onKeydown)},beforeUnmount(){this.$store.rootElement.removeEventListener("keydown",this.onKeydown)},methods:{closeDropdown(){this.isOpen=!1},onKeydown(t){if(!Pn(t)){if(t.key==="Escape"){this.closeDropdown();return}t.key==="x"&&(this.toggleDropdown(),t.preventDefault())}},onKeyDownArrow(){this.highlightIndex0&&(this.highlightIndex-=1,this.updateScroll())},setPage(t){this.closeDropdown(),this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&this.$nextTick(()=>{this.$refs.search.focus(),this.updateScroll()})},updateFilteredCanvases(){const t=[],n=this.filter.toLowerCase();let e=-1;this.$store.manifest.items.forEach((i,s)=>{const o=this.$store.localize(i.label).toLowerCase().includes(n),l=(s+1).toFixed().includes(n);if(o||l){const a=i;a.page=s+1,a.page===this.$store.options.pages[0]&&(e=t.length),t.push(a)}}),this.highlightIndex=e<0?0:e,this.filteredCanvases=t},updateScroll(){const{list:t}=this.$refs;if(t&&t.children[this.highlightIndex]){const{offsetTop:n}=t.children[this.highlightIndex];t.scrollTop=n-(t.offsetHeight/2-t.children[0].offsetHeight)}}}},zp={class:"tify-page-select"},Np=["aria-controls","aria-expanded"],Vp={class:"tify-sr-only"},Up={class:"tify-sr-only"},jp=["id"],Wp={class:"tify-page-select-filter"},Gp=["aria-label"],qp={ref:"list",class:"tify-page-select-list"},Zp=["onClick"];function Kp(t,n,e,i,s,r){const o=yn("click-outside");return De((k(),F("div",zp,[A("button",{type:"button",class:"tify-page-select-button","aria-controls":t.$store.getId("dropdown"),"aria-expanded":s.isOpen?"true":"false",onClick:n[0]||(n[0]=l=>r.toggleDropdown())},[A("span",Vp,Z(t.$translate("Current page:")),1),be(" "+Z(r.currentPageLabel)+" ",1),A("span",Up,"/ "+Z(t.$translate("Toggle page select")),1)],8,Np),De(A("div",{id:t.$store.getId("dropdown"),key:"dropdown",class:"tify-page-select-dropdown",onClick:n[6]||(n[6]=bt(()=>{},["stop"]))},[A("div",Wp,[De(A("input",{ref:"search","onUpdate:modelValue":n[1]||(n[1]=l=>s.filter=l),"aria-label":t.$translate("Filter pages"),type:"text",class:"tify-page-select-input",onKeyup:n[2]||(n[2]=Vt(l=>s.filteredCanvases[s.highlightIndex]&&t.$store.setPage(s.filteredCanvases[s.highlightIndex].page),["enter"])),onKeydown:[n[3]||(n[3]=Vt(bt(l=>s.filter?s.filter="":r.closeDropdown(),["prevent"]),["esc"])),n[4]||(n[4]=Vt(bt(l=>r.onKeyUpArrow(),["prevent"]),["up"])),n[5]||(n[5]=Vt(bt(l=>r.onKeyDownArrow(),["prevent"]),["down"]))]},null,40,Gp),[[_r,s.filter]])]),A("ol",qp,[(k(!0),F(ve,null,Be(s.filteredCanvases,(l,a)=>(k(),F("li",{key:a,class:Te({"-current":t.$store.options.pages.includes(l.page),"-highlighted":s.highlightIndex===a})},[A("a",{href:"javascript:;",onClick:c=>r.setPage(l.page)},Z(t.$store.getPageLabel(l.page,t.$store.localize(l.label))),9,Zp)],2))),128))],512)],8,jp),[[Ze,s.isOpen]])])),[[o,r.closeDropdown]])}const Xp=ae(Bp,[["render",Kp]]),Yp={directives:{clickOutside:En.directive},props:{fulltextEnabled:Boolean,tocEnabled:Boolean},data(){return{controlsVisible:!1,fullscreenActive:!1,screen:this.$store.rootElement.parentNode}},computed:{fullscreenSupported(){return document.fullscreenElement===null||document.webkitFullscreenElement===null},title(){return this.$store.localize((this.$store.manifest||this.$store.collection||{}).label).replace(/(\S{1,10})\s+(\S{1,10})$/,"$1 $2")}},created(){this.$api.expose(this.setView),this.$api.expose(this.toggleDoublePage),this.$api.expose(this.toggleFullscreen)},mounted(){this.$store.rootElement.addEventListener("keydown",this.onKeyDown),["","moz","webkit"].forEach(n=>{document.addEventListener(`${n}fullscreenchange`,this.toggleFullscreenActive)})},beforeUnmount(){this.$store.rootElement.removeEventListener("keydown",this.onKeyDown)},methods:{closeControlsPopup(){this.controlsVisible=!1},detectFullscreen(){let t;switch(null){case document.fullscreenElement:t=document.fullscreenElement;break;case document.webkitFullscreenElement:t=document.webkitFullscreenElement;break;default:t=!1}return t},onKeyDown(t){if(Pn(t))return;if(t.key==="Escape"){this.controlsVisible=!1;return}switch(t.key){case"Backspace":this.$refs.switchViewSmall.offsetParent&&this.toggleView("scan");break;case"1":this.$store.manifest&&this.fulltextEnabled&&this.toggleView("fulltext");break;case"2":this.$store.manifest&&this.toggleView("thumbnails");break;case"3":this.$store.manifest&&this.tocEnabled&&this.toggleView("toc");break;case"4":this.toggleView("info");break;case"5":this.$store.manifest&&this.toggleView("export");break;case"6":this.$store.collection&&this.toggleView("collection");break;case"7":this.toggleView("help");break;case"b":this.$store.manifest&&this.toggleDoublePage();break;case"f":this.toggleFullscreen();break}if(!this.$store.manifest||this.$store.isCustomPageView)return;const{pages:n}=this.$store.options;switch(t.key){case"q":case",":n[0]>1&&this.$store.goToPreviousPage();break;case"e":case".":this.isLastPage||this.$store.goToNextPage();break;case"Q":n[0]>1&&this.$store.goToFirstPage();break;case"E":this.isLastPage||this.$store.goToLastPage();break}},setView(t){this.$store.updateOptions({view:t})},toggleControlsPopup(){this.controlsVisible=!this.controlsVisible},toggleDoublePage(t){const{pages:n}=this.$store.options;let e;if(n.length>1&&t!==!0||t===!1)e=[n[0]<1?1:n[0]];else if(n[0]<2)e=[0,1];else if(n[0]%2>0)e=[n[0]-1,n[0]];else{const i=n[0]1}]),title:t.$translate("Toggle double-page"),onClick:n[0]||(n[0]=(...L)=>r.toggleDoublePage&&r.toggleDoublePage(...L))},[t.$store.isCustomPageView?(k(),Ce(l,{key:0})):(k(),Ce(a,{key:1}))],10,ig)]),ie(c)],8,eg)):se("",!0),De((k(),F("nav",{class:"tify-header-column -controls","aria-label":t.$translate("View")},[A("div",sg,[A("button",{type:"button","aria-controls":t.$store.getId("controls"),"aria-expanded":s.controlsVisible?"true":"false","aria-label":t.$translate("View"),class:"tify-header-button",title:t.$translate("View"),onClick:n[1]||(n[1]=(...L)=>r.toggleControlsPopup&&r.toggleControlsPopup(...L))},[ie(h)],8,rg)],512),A("div",{id:t.$store.getId("controls"),class:Te(["tify-header-popup",{"-visible":s.controlsVisible}])},[A("div",ag,[t.$store.manifest?(k(),F("button",{key:0,type:"button",class:Te(["tify-header-button -scan",{"-active":t.$store.options.view==="scan"}]),"aria-controls":t.$store.getId("scan"),"aria-expanded":t.$store.options.view==="scan"?"true":"false",onClick:n[2]||(n[2]=L=>r.toggleView("scan"))},[ie(p),be(" "+Z(t.$translate("Scan")),1)],10,lg)):se("",!0),e.fulltextEnabled?(k(),F("button",{key:1,type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="fulltext"}]),"aria-controls":t.$store.getId("fulltext"),"aria-expanded":t.$store.options.view==="fulltext"?"true":"false",onClick:n[3]||(n[3]=L=>r.toggleView("fulltext"))},[ie(m),be(" "+Z(t.$translate("Fulltext")),1)],10,cg)):se("",!0),t.$store.manifest?(k(),F("button",{key:2,type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="thumbnails"}]),"aria-controls":t.$store.getId("thumbnails"),"aria-expanded":t.$store.options.view==="thumbnails"?"true":"false",onClick:n[4]||(n[4]=L=>r.toggleView("thumbnails"))},[ie(l),be(" "+Z(t.$translate("Pages")),1)],10,ug)):se("",!0),e.tocEnabled?(k(),F("button",{key:3,type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="toc"}]),"aria-controls":t.$store.getId("toc"),"aria-expanded":t.$store.options.view==="toc"?"true":"false",onClick:n[5]||(n[5]=L=>r.toggleView("toc"))},[ie(T),be(" "+Z(t.$translate("Contents")),1)],10,hg)):se("",!0),A("button",{type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="info"}]),"aria-controls":t.$store.getId("info"),"aria-expanded":t.$store.options.view==="info"?"true":"false",onClick:n[6]||(n[6]=L=>r.toggleView("info"))},[ie(x),be(" "+Z(t.$translate("Info")),1)],10,fg),t.$store.manifest?(k(),F("button",{key:4,type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="export"}]),"aria-controls":t.$store.getId("export"),"aria-expanded":t.$store.options.view==="export"?"true":"false",onClick:n[7]||(n[7]=L=>r.toggleView("export"))},[ie(E),be(" "+Z(t.$translate("Export")),1)],10,dg)):se("",!0),t.$store.collection?(k(),F("button",{key:5,type:"button",class:Te(["tify-header-button",{"-active":t.$store.options.view==="collection"}]),"aria-controls":t.$store.getId("collection"),"aria-expanded":t.$store.options==="collection"?"true":"false",onClick:n[8]||(n[8]=L=>r.toggleView("collection"))},[ie(R),be(" "+Z(t.$translate("Collection")),1)],10,pg)):se("",!0)]),r.fullscreenSupported?(k(),F("div",gg,[A("button",{type:"button",class:Te(["tify-header-button -icon-only",{"-active":t.$store.options.view==="help"}]),"aria-controls":t.$store.getId("help"),"aria-expanded":t.$store.options.view==="help"?"true":"false",title:t.$translate("Help"),onClick:n[9]||(n[9]=L=>r.toggleView("help"))},[ie(M),be(" "+Z(t.$translate("Help")),1)],10,mg),s.fullscreenActive?(k(),F("button",{key:1,type:"button",class:"tify-header-button -icon-only",title:t.$translate("Exit fullscreen"),onClick:n[11]||(n[11]=(...L)=>r.toggleFullscreen&&r.toggleFullscreen(...L))},[ie(_),be(" "+Z(t.$translate("Exit fullscreen")),1)],8,yg)):(k(),F("button",{key:0,type:"button",class:"tify-header-button -icon-only",title:t.$translate("Fullscreen"),onClick:n[10]||(n[10]=(...L)=>r.toggleFullscreen&&r.toggleFullscreen(...L))},[ie(f),be(" "+Z(t.$translate("Fullscreen")),1)],8,vg))])):se("",!0),t.$store.manifest?(k(),Ce(c,{key:1})):se("",!0)],10,og)],8,ng)),[[H,r.closeControlsPopup]])])}const _g=ae(Yp,[["render",wg]]),Tg={props:{readyPromise:{type:Object,default:null,required:!0}},data(){return{readyToRender:!1}},computed:{hasAnnotations(){var t,n;return(n=(t=this.$store.manifest)==null?void 0:t.items)==null?void 0:n.some(e=>"annotations"in e)},hasToc(){return this.$store.structures.length>0}},created(){this.$api.expose(this.setLanguage),this.$api.expose(this.$store.setPage)},mounted(){if(this.$store.rootElement=this.$el,!this.$store.options.manifestUrl){this.$store.addError('Missing option "manifestUrl"');return}this.updateBreakpoint(),new ResizeObserver(this.updateBreakpoint).observe(this.$el),Promise.all([this.$store.loadManifest(this.$store.options.manifestUrl),this.setLanguage(this.$store.options.language)]).then(()=>{this.readyToRender=!0,this.$nextTick(()=>{Promise.all(this.$store.readyPromises).then(()=>{setTimeout(this.readyPromise.resolve)})})},t=>{this.readyPromise.reject(t)})},beforeUnmount(){clearTimeout(this.$store.urlUpdateTimeout),window.removeEventListener("popstate",this.$store.initOptions)},methods:{setLanguage(t){const n=Cn();if(t==="en")return this.$store.options.language="en",this.$translate.setTranslation(null),n.resolve(t),n;if(this.$store.options.translationsDirUrl===null)return n.reject(new Error("Could not determine translationsDirUrl")),n;const e=`${this.$store.options.translationsDirUrl}/${t}.json`;return this.$store.fetchJson(e).then(i=>{this.$store.options.language=t,this.$translate.setTranslation(i),n.resolve(t)},i=>{const s=i.response?i.response.statusText:i.message;this.$store.addError(`Error loading translation for "${t}": ${s}`),n.resolve(this.$store.options.language)}),n},updateBreakpoint(){Object.keys(this.$store.options.breakpoints).forEach(t=>{this.$el.clientWidth<=this.$store.options.breakpoints[t]?this.$el.classList.add(`-${t}`):this.$el.classList.remove(`-${t}`)}),this.$el.clientHeight<520?this.$el.classList.add("-short"):this.$el.classList.remove("-short")}}},xg={class:"tify",tabindex:"-1"},bg={key:1,class:"tify-main"},Sg={key:2,class:"tify-loading",role:"status"},Eg={class:"tify-sr-only"},Pg={key:3,class:"tify-error"},Cg=["aria-label"],Rg={class:"tify-error-messages"};function Lg(t,n,e,i,s,r){const o=_g,l=zf,a=sh,c=Yu,h=Vu,p=ku,m=eu,T=cc,x=kl,E=Tr;return k(),F("article",xg,[s.readyToRender&&(t.$store.collection||t.$store.manifest)?(k(),Ce(o,{key:0,fulltextEnabled:r.hasAnnotations,tocEnabled:r.hasToc},null,8,["fulltextEnabled","tocEnabled"])):se("",!0),s.readyToRender?(k(),F("div",bg,[t.$store.manifest?(k(),F(ve,{key:0},[ie(l,{id:t.$store.getId("scan")},null,8,["id"]),r.hasAnnotations?De((k(),Ce(a,{key:0,id:t.$store.getId("fulltext")},null,8,["id"])),[[Ze,t.$store.options.view==="fulltext"]]):se("",!0),De(ie(c,{id:t.$store.getId("thumbnails")},null,8,["id"]),[[Ze,t.$store.options.view==="thumbnails"]]),r.hasToc?De((k(),Ce(h,{key:1,id:t.$store.getId("toc")},null,8,["id"])),[[Ze,t.$store.options.view==="toc"]]):se("",!0),De(ie(p,{id:t.$store.getId("export")},null,8,["id"]),[[Ze,t.$store.options.view==="export"]])],64)):se("",!0),t.$store.collection||t.$store.manifest?De((k(),Ce(m,{key:1,id:t.$store.getId("info")},null,8,["id"])),[[Ze,t.$store.options.view==="info"]]):se("",!0),t.$store.collection?De((k(),Ce(T,{key:2,id:t.$store.getId("collection")},null,8,["id"])),[[Ze,t.$store.options.view==="collection"]]):se("",!0),De(ie(x,{id:t.$store.getId("help")},null,8,["id"]),[[Ze,t.$store.options.view==="help"]])])):se("",!0),t.$store.loading?(k(),F("div",Sg,[A("span",Eg,Z(t.$translate("Loading")),1)])):se("",!0),t.$store.errors.length?(k(),F("section",Pg,[A("button",{type:"button",class:"tify-error-close","aria-label":t.$translate("Dismiss"),onClick:n[0]||(n[0]=R=>t.$store.clearErrors())},[ie(E)],8,Cg),A("div",Rg,[(k(!0),F(ve,null,Be(t.$store.errors,R=>(k(),F("p",{key:R},Z(R),1))),128))])])):se("",!0)])}const Hg=ae(Tg,[["render",Lg]]);function Og(t){return{expose(n,e){t[e||n.name.replace("bound ","")]=n}}}const Mg={install:(t,n)=>{t.config.globalProperties.$api=new Og(n.instance)}},Dg={install:t=>{const n=Co(null);t.config.globalProperties.$translate=(e,i)=>{var s;return(s=n.value)!=null&&s[e]?n.value[e]:i||e},t.config.globalProperties.$translate.setTranslation=e=>{n.value=e}}};var Ag="http://library.stanford.edu/iiif/image-api/compliance.html#level0",kg="http://library.stanford.edu/iiif/image-api/compliance.html#level1",Hr="http://library.stanford.edu/iiif/image-api/compliance.html#level2",Fg="http://library.stanford.edu/iiif/image-api/conformance.html#level0",Ig="http://library.stanford.edu/iiif/image-api/conformance.html#level1",Or="http://library.stanford.edu/iiif/image-api/conformance.html#level2",Bg="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",zg="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",Mr="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",Ng="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",Vg="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",Dr="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",Ug="http://iiif.io/api/image/1/level0.json",jg="http://iiif.io/api/image/1/profiles/level0.json",Wg="http://iiif.io/api/image/1/level1.json",Gg="http://iiif.io/api/image/1/profiles/level1.json",Ar="http://iiif.io/api/image/1/level2.json",kr="http://iiif.io/api/image/1/profiles/level2.json",qg="http://iiif.io/api/image/2/level0.json",Zg="http://iiif.io/api/image/2/profiles/level0.json",Kg="http://iiif.io/api/image/2/level1.json",Xg="http://iiif.io/api/image/2/profiles/level1.json",Fr="http://iiif.io/api/image/2/level2.json",Ir="http://iiif.io/api/image/2/profiles/level2.json",Yg="level0",Jg="level1",Br="level2",Qg="http://iiif.io/api/image/2/level0",$g="http://iiif.io/api/image/2/level1",zr="http://iiif.io/api/image/2/level2",em=[zr,Hr,Or,Mr,Dr,Ar,kr,Fr,Ir,Br],tm=[Qg,$g,zr,Ag,kg,Hr,Fg,Ig,Or,Bg,zg,Mr,Ng,Vg,Dr,Ug,jg,Wg,Gg,Ar,kr,qg,Zg,Kg,Xg,Fr,Ir,Yg,Jg,Br],im=tm;function Je(t){for(let n in t)(typeof t[n]>"u"||t[n]===null)&&delete t[n];return t}function nm(t){return Array.isArray(t)?t:t?[t]:[]}var sm=Object.defineProperty,rm=(t,n,e)=>n in t?sm(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,ds=(t,n,e)=>(rm(t,typeof n!="symbol"?n+"":n,e),e),ps=["sc:Collection","sc:Manifest","sc:Canvas","sc:AnnotationList","oa:Annotation","sc:Range","sc:Layer","sc:Sequence","oa:Choice","Service","ContentResource"];function om(t){if(typeof t>"u"||t===null)throw new Error("Null or undefined is not a valid entity.");if(Array.isArray(t))throw new Error("Array is not a valid entity");if(typeof t!="object")throw new Error(`${typeof t} is not a valid entity`);if(typeof t["@type"]=="string"){let n=ps.indexOf(t["@type"]);if(n!==-1)return ps[n]}if(t.profile)return"Service";if(t.format||t["@type"])return"ContentResource";throw new Error("Resource type is not known")}var am=class Nr{constructor(n,e={}){ds(this,"traversals"),ds(this,"options"),this.traversals={collection:[],manifest:[],canvas:[],annotationList:[],sequence:[],annotation:[],contentResource:[],choice:[],range:[],service:[],layer:[],...n},this.options={convertPropsToArray:!0,mergeMemberProperties:!0,allowUndefinedReturn:!1,...e}}static all(n){return new Nr({collection:[n],manifest:[n],canvas:[n],annotationList:[n],sequence:[n],annotation:[n],contentResource:[n],choice:[n],range:[n],service:[n],layer:[n]})}traverseCollection(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCollectionItems(n))),this.traversals.collection)}traverseCollectionItems(n){if(this.options.mergeMemberProperties){let e=[...(n.manifests||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Manifest"}:i),...(n.collections||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Collection"}:i),...n.members||[]];delete n.collections,delete n.manifests,n.members=e}return n.manifests&&(n.manifests=n.manifests.map(e=>this.traverseManifest(typeof e=="string"?{"@id":e,"@type":"sc:Manifest"}:e))),n.collections&&(n.collections=n.collections.map(e=>this.traverseCollection(typeof e=="string"?{"@id":e,"@type":"sc:Collection"}:e))),n.members&&(n.members=n.members.map(e=>typeof e=="string"?e:this.traverseUnknown(e))),n}traverseManifest(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseManifestItems(n))),this.traversals.manifest)}traverseManifestItems(n){return n.sequences&&(n.sequences=n.sequences.map(e=>this.traverseSequence(e))),n.structures&&(n.structures=n.structures.map(e=>this.traverseRange(e))),n}traverseSequence(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseSequenceItems(n))),this.traversals.sequence)}traverseSequenceItems(n){return n.canvases&&(n.canvases=n.canvases.map(e=>this.traverseCanvas(e))),n}traverseCanvas(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseCanvasItems(n))),this.traversals.canvas)}traverseCanvasItems(n){return n.images&&(n.images=n.images.map(e=>this.traverseAnnotation(e))),n.otherContent&&(n.otherContent=n.otherContent.map(e=>this.traverseAnnotationList(e))),n}traverseRange(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseRangeItems(n))),this.traversals.range)}traverseRangeItems(n){if(this.options.mergeMemberProperties){let e=[...(n.ranges||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Range"}:i),...(n.canvases||[]).map(i=>typeof i=="string"?{"@id":i,"@type":"sc:Canvas"}:i),...n.members||[]];delete n.ranges,delete n.canvases,n.members=e.length?e.map(i=>this.traverseUnknown(i)):void 0}return n}traverseAnnotationList(n){let e=typeof n=="string"?{"@id":n,"@type":"sc:AnnotationList"}:n;return this.traverseType(this.traverseDescriptive(this.traverseAnnotationListItems(e)),this.traversals.annotationList)}traverseAnnotationListItems(n){return n.resources&&(n.resources=n.resources.map(e=>this.traverseAnnotation(e))),n}traverseAnnotation(n){return this.traverseType(this.traverseDescriptive(this.traverseLinking(this.traverseAnnotationItems(n))),this.traversals.annotation)}traverseAnnotationItems(n){return n.resource&&(Array.isArray(n.resource)?n.resource=n.resource.map(e=>this.traverseContentResource(e)):n.resource=this.traverseContentResource(n.resource)),n.on,n}traverseLayer(n){return this.traverseType(this.traverseLinking(this.traverseLayerItems(n)),this.traversals.layer)}traverseLayerItems(n){return n.otherContent&&(n.otherContent=n.otherContent.map(e=>this.traverseAnnotationList(e))),n}traverseChoice(n){return this.traverseType(this.traverseChoiceItems(n),this.traversals.choice)}traverseChoiceItems(n){return n.default&&n.default!=="rdf:nil"&&(n.default=this.traverseContentResource(n.default)),n.item&&n.item!=="rdf:nil"&&(n.item=n.item.map(e=>this.traverseContentResource(e))),n}traverseService(n){return this.traverseType(this.traverseLinking(n),this.traversals.service)}traverseContentResource(n){return n["@type"]==="oa:Choice"?this.traverseChoice(n):this.traverseType(this.traverseDescriptive(this.traverseLinking(n)),this.traversals.contentResource)}traverseUnknown(n){if(!n["@type"]||typeof n=="string")return n;switch(om(n)){case"sc:Collection":return this.traverseCollection(n);case"sc:Manifest":return this.traverseManifest(n);case"sc:Canvas":return this.traverseCanvas(n);case"sc:Sequence":return this.traverseSequence(n);case"sc:Range":return this.traverseRange(n);case"oa:Annotation":return this.traverseAnnotation(n);case"sc:AnnotationList":return this.traverseAnnotationList(n);case"sc:Layer":return this.traverseLayer(n);case"Service":return this.traverseService(n);case"oa:Choice":return this.traverseChoice(n);case"ContentResource":return this.traverseContentResource(n)}return n.profile?this.traverseService(n):n}traverseImageResource(n){let e=Array.isArray(n),i=Array.isArray(n)?n:[n],s=[];for(let r of i)typeof r=="string"?s.push(this.traverseContentResource({"@id":r,"@type":"dctypes:Image"})):s.push(this.traverseContentResource(r));return!e&&!this.options.convertPropsToArray?s[0]:s}traverseDescriptive(n){return n.thumbnail&&(n.thumbnail=this.traverseImageResource(n.thumbnail)),n.logo&&(n.logo=this.traverseImageResource(n.logo)),n}traverseOneOrMoreServices(n){let e=Array.isArray(n),i=Array.isArray(n)?n:[n],s=[];for(let r of i)s.push(this.traverseService(r));return!e&&!this.options.convertPropsToArray?s[0]:s}traverseLinking(n){return n.related&&(n.related=this.traverseOneOrManyType(n.related,this.traversals.contentResource)),n.rendering&&(n.rendering=this.traverseOneOrManyType(n.rendering,this.traversals.contentResource)),n.service&&(n.service=this.traverseOneOrMoreServices(n.service)),n.seeAlso&&(n.seeAlso=this.traverseOneOrManyType(n.seeAlso,this.traversals.contentResource)),n.within&&(typeof n.within=="string"||(n.within=this.traverseOneOrManyType(n.within,this.traversals.contentResource))),n.startCanvas&&(typeof n.startCanvas=="string"?n.startCanvas=this.traverseType({"@id":n.startCanvas,"@type":"sc:Canvas"},this.traversals.canvas):n.startCanvas&&this.traverseType(n.startCanvas,this.traversals.canvas)),n.contentLayer&&(typeof n.contentLayer=="string"?n.contentLayer=this.traverseLayer({"@id":n.contentLayer,"@type":"sc:Layer"}):n.contentLayer=this.traverseLayer(n.contentLayer)),n}traverseOneOrManyType(n,e){if(!Array.isArray(n))if(this.options.convertPropsToArray)n=[n];else return this.traverseType(n,e);return n.map(i=>this.traverseType(i,e))}traverseType(n,e){return e.reduce((i,s)=>{let r=s(i);return typeof r>"u"&&!this.options.allowUndefinedReturn?i:r},n)}},lm="http://library.stanford.edu/iiif/image-api/compliance.html#level1",cm="http://library.stanford.edu/iiif/image-api/compliance.html#level2",um="http://library.stanford.edu/iiif/image-api/conformance.html#level1",hm="http://library.stanford.edu/iiif/image-api/conformance.html#level2",fm="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",dm="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",pm="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",gm="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",mm="http://iiif.io/api/image/1/level1.json",vm="http://iiif.io/api/image/1/profiles/level1.json",ym="http://iiif.io/api/image/1/level2.json",wm="http://iiif.io/api/image/1/profiles/level2.json",_m="http://iiif.io/api/image/2/level1.json",Tm="http://iiif.io/api/image/2/profiles/level1.json",xm="http://iiif.io/api/image/2/level2.json",bm="http://iiif.io/api/image/2/profiles/level2.json",Sm="level1",Em="level2",Pm="http://iiif.io/api/image/2/level1",Cm="http://iiif.io/api/image/2/level2",Rm=[Pm,Cm,lm,cm,um,hm,fm,dm,pm,gm,mm,vm,ym,wm,_m,Tm,xm,bm,Sm,Em],en={attributionLabel:"Attribution",lang:"none",providerId:"http://example.org/provider",providerName:"Unknown"};function Lm(t){if(typeof t=="string")return[t];if(!t)return[];let n=Array.isArray(t)?t:[t],e=[];for(let i of n){if(typeof i=="string"){e.push(i);continue}e.push({"@language":i["@language"]||i.language,"@value":i["@value"]||i.value})}return e}function St(t,n="none"){if(!t)return{};let e=Lm(t),i={};for(let s of e){if(typeof s=="string"){i[n]=i[n]?i[n]:[],i[n].push(s||"");continue}if(!s["@language"]){i[n]=i[n]?i[n]:[],i[n].push(s["@value"]||"");continue}let r=s["@language"];i[r]=i[r]?i[r]:[],i[r].push(s["@value"]||"")}return i}function Vr(t){if(Array.isArray(t))return Vr(t.find(n=>typeof n=="string"));if(em.indexOf(t)!==-1)return"level2";if(Rm.indexOf(t)!==-1)return"level1";if(im.indexOf(t)!==-1)return"level0";if(typeof t=="string")return t}function Hm(t){let n=Array.isArray(t)?t:[t];for(let e of n)switch(e){case"http://iiif.io/api/image/2/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2":return"ImageService2";case"http://iiif.io/api/image/1/context.json":case"http://library.stanford.edu/iiif/image-api/1.1/context.json":return"ImageService1";case"http://iiif.io/api/annex/openannotation/context.json":return"ImageApiSelector"}}function Om(t){switch(t){case"http://iiif.io/api/image/2/level0.json":case"http://iiif.io/api/image/2/level1.json":case"http://iiif.io/api/image/2/level2.json":return"ImageService2";case"http://iiif.io/api/auth/1/kiosk":case"http://iiif.io/api/auth/1/login":case"http://iiif.io/api/auth/1/clickthrough":case"http://iiif.io/api/auth/1/external":case"http://iiif.io/api/auth/0/kiosk":case"http://iiif.io/api/auth/0/login":case"http://iiif.io/api/auth/0/clickthrough":case"http://iiif.io/api/auth/0/external":return"AuthCookieService1";case"http://iiif.io/api/auth/1/token":case"http://iiif.io/api/auth/0/token":return"AuthTokenService1";case"http://iiif.io/api/auth/1/logout":case"http://iiif.io/api/auth/0/logout":return"AuthLogoutService1";case"http://iiif.io/api/search/1/search":case"http://iiif.io/api/search/0/search":return"SearchService1";case"http://iiif.io/api/search/1/autocomplete":case"http://iiif.io/api/search/0/autocomplete":return"AutoCompleteService1"}}function gs(t){for(let n of["sc","oa","dcterms","dctypes","iiif"])if(t.startsWith(`${n}:`))return t.slice(n.length+1);return t}var Mm=["Collection","Manifest","Annotation","AnnotationPage","Range","Service"];function Rn(t){let n=t["@id"]||t.id,e=t["@type"]||t.type,i=t.profile||void 0,s=t["@context"]||void 0;if(i){let r=Om(i);if(r)return r}if(s){let r=Hm(s);if(r)return r}if(e){if(Array.isArray(e)){if(e.indexOf("oa:CssStylesheet")!==-1)return"CssStylesheet";if(e.indexOf("cnt:ContentAsText")!==-1)return"TextualBody";e=e[0]}for(let r of["sc","oa","dcterms","dctypes","iiif"])if(e.startsWith(`${r}:`)){e=e.slice(r.length+1);break}switch(e){case"Layer":return"AnnotationCollection";case"AnnotationList":return"AnnotationPage";case"cnt:ContentAsText":return"TextualBody"}}if(e&&Mm.indexOf(e)!==-1)return e;if(t.format){if(t.format.startsWith("image/"))return"Image";if(t.format.startsWith("text/")||t.format==="application/pdf")return"Text";if(t.format.startsWith("application/"))return"Dataset"}return n&&(n.endsWith(".jpg")||n.endsWith(".png")||n.endsWith(".jpeg"))?"Image":e||"unknown"}var Dm=/http(s)?:\/\/(creativecommons.org|rightsstatements.org)[^"'\\<\n]+/gm;function Am(t){let n=t.match(Dm);return n?n[0]:t}function km(t,n="Rights/License",e="none"){let i=null,s=[],r=Array.isArray(t)?t:[t];for(let o of r){let l=o?Am(o):void 0;if(l&&(l.indexOf("creativecommons.org")!==-1||l.indexOf("rightsstatements.org")!==-1)){l.startsWith("https://")?i=`http://${l.slice(8)}`:i=l;continue}l&&s.push({label:{[e]:[n]},value:{[e]:[l]}})}return[i,s]}var Fm=["http://iiif.io/api/presentation/2/context.json","http://iiif.io/api/image/2/context.json","http://iiif.io/api/image/1/context.json","http://library.stanford.edu/iiif/image-api/1.1/context.json","http://iiif.io/api/search/1/context.json","http://iiif.io/api/search/0/context.json","http://iiif.io/api/auth/1/context.json","http://iiif.io/api/auth/0/context.json","http://iiif.io/api/annex/openannotation/context.json"];function Im(t){if(t){let n=Array.isArray(t)?t:[t],e=[];for(let i of n)i==="http://iiif.io/api/presentation/2/context.json"&&e.push("http://iiif.io/api/presentation/3/context.json"),Fm.indexOf(i)===-1&&e.push(i);if(n.length)return e.length===1?e[0]:e}}function Bm(t){return t?t.map(n=>({label:St(n.label),value:St(n.value)})):[]}var ms=0;function Ur(t,n){let e=encodeURI(t.id||t["@id"]||"").trim();return e&&n?`${e}/${n}`:e||(ms++,`http://example.org/${t["@type"]}${n?`/${n}`:""}/${ms}`)}function it(t){let n=[...t.behavior||[]];t.viewingHint&&n.push(t.viewingHint);let e;return Array.isArray(t.motivation)?e=t.motivation.map(gs):t.motivation&&(e=gs(t.motivation)),{"@context":t["@context"]?Im(t["@context"]):void 0,id:(t["@id"]||Ur(t)).trim(),type:Rn(t),behavior:n.length?n:void 0,height:t.height?t.height:void 0,width:t.width?t.width:void 0,motivation:e,viewingDirection:t.viewingDirection,profile:t.profile,format:t.format?t.format:void 0,duration:void 0,timeMode:void 0}}function nt(t){let[n,e]=km(t.license),i=[...t.metadata?Bm(t.metadata):[],...e];return{rights:n,metadata:i.length?i:void 0,label:t.label?St(t.label):void 0,requiredStatement:t.attribution?{label:St(en.attributionLabel),value:St(t.attribution)}:void 0,navDate:t.navDate,summary:t.description?St(t.description):void 0,thumbnail:zm(t.thumbnail)}}function zm(t){return t&&(Array.isArray(t)?t:[t]).map(n=>typeof n=="string"?{id:n,type:"Image"}:(n.type==="unknown"&&(n.type="Image"),n))}function Nm(t){if(!t.within)return;let n=Array.isArray(t.within)?t.within:[t.within],e=[];for(let i of n)if(typeof i=="string"){if(i)switch(t["@type"]){case"sc:Manifest":e.push({id:i,type:"Collection"});break}}else i["@id"]&&e.push({id:i["@id"],type:Rn(i)});return e.length?e:void 0}function mt(t){let n=t.related?Array.isArray(t.related)?t.related:[t.related]:[],e=t.contentLayer;return{provider:t.logo||n.length?[{id:en.providerId,type:"Agent",homepage:n.length?[n[0]]:void 0,logo:t.logo?Array.isArray(t.logo)?t.logo:[t.logo]:void 0,label:St(en.providerName)}]:void 0,partOf:Nm(t),rendering:t.rendering,seeAlso:t.seeAlso,start:t.startCanvas,service:t.service?nm(t.service):void 0,supplementary:e?[e]:void 0}}function Vm(t){return{chars:t.chars,format:t.format?t.format:void 0,language:t.language}}function Um(t){return Je({...it(t),...nt(t),...mt(t),items:t.members})}function jm(t){let n=[],e=[],i;for(let r of t.sequences||[])r.canvases.length&&n.push(...r.canvases),r.behavior&&e.push(...r.behavior),r.startCanvas&&(i=r.startCanvas);let s=it(t);return e.length&&(s.behavior?s.behavior.push(...e):s.behavior=e),Je({...s,...nt(t),...mt(t),start:i,items:n,structures:Wm(t.structures)})}function Wm(t){if(!t)return t;let n=new Map;for(let i of t)n.set(i.id,i);let e=[];for(let i of t)if(i.items){let s=i.items.map(r=>typeof r=="string"?(e.push(r),n.get(r)||r):r&&r.id?(e.push(r.id),n.get(r.id)||r):r);i.items=s}return t.filter(i=>e.indexOf(i.id)===-1)}function Gm(t){return Je({...it(t),...nt(t),...mt(t),annotations:t.otherContent&&t.otherContent.length?t.otherContent:void 0,items:t.images&&t.images.length?[{id:Ur(t,"annotation-page"),type:"AnnotationPage",items:t.images}]:void 0})}function qm(t){return Je({...it(t),...nt(t),...mt(t),items:t.resources&&t.resources.length?t.resources:void 0})}function Zm(t){return!t.canvases||t.canvases.length===0?{canvases:[],behavior:[]}:{canvases:t.canvases,behavior:t.viewingHint?[t.viewingHint]:[],startCanvas:t.startCanvas}}function Km(t){function n(e){if(Array.isArray(e)){if(e.length>1)return{type:"List",items:e.map(n)};e=e[0]}if(typeof e=="string")return encodeURI(e).trim();if("@type"in e){let i;if(typeof e.full=="string")i=e.full;else if(e.full["@type"]==="dctypes:Image")i={id:e.full["@id"],type:"Image"};else if(e.full["@type"]==="sc:Canvas")i={id:e.full["@id"],type:"Canvas"};else throw new Error(`Unsupported source type on annotation: ${e.full["@type"]}`);return{type:"SpecificResource",source:i,selector:tn(e.selector)}}else return encodeURI(e["@id"]).trim()}return Je({...it(t),...nt(t),...mt(t),target:n(t.on),body:Array.isArray(t.resource)?t.resource.map(vs):vs(t.resource)})}function vs(t){return t.type==="Choice"?t:jr(t)}function jr(t){let n=t;return Je({...it(n),...nt(n),...mt(n),...Vm(n)})}function Xm(t){let n=[];return t.default&&t.default!=="rdf:nil"&&n.push(t.default),t.item&&t.item!=="rdf:nil"&&n.push(...t.item),Je({...it(t),...nt(t),items:n})}function Ym(t){return Je({...it(t),...nt(t),...mt(t),items:t.members})}function Jm(t){let{"@id":n,"@type":e,"@context":i,profile:s,...r}=t,o={};return n&&(o["@id"]=n),o["@type"]=Rn(t),o["@type"]==="unknown"&&(i&&i.length&&(o["@context"]=i),o["@type"]="Service"),s&&(o.profile=Vr(s)),Je({...o,...r})}function Qm(t){return Je({...it(t),...nt(t),...mt(t)})}var $m=new am({collection:[Um],manifest:[jm],canvas:[Gm],annotationList:[qm],sequence:[Zm],annotation:[Km],contentResource:[jr],choice:[Xm],range:[Ym],service:[Jm],layer:[Qm]});function ev(t){return t&&t["@context"]&&(t["@context"]==="http://iiif.io/api/presentation/2/context.json"||t["@context"].indexOf("http://iiif.io/api/presentation/2/context.json")!==-1||t["@context"]==="http://www.shared-canvas.org/ns/context.json")||t["@context"]==="http://iiif.io/api/image/2/context.json"?$m.traverseUnknown(t):t}function tn(t){if((Array.isArray(t["@type"])&&t["@type"].includes("oa:SvgSelector")||t["@type"]=="oa:SvgSelector")&&("chars"in t||"value"in t))return{type:"SvgSelector",value:"chars"in t?t.chars:t.value};if(t["@type"]==="oa:FragmentSelector")return{type:"FragmentSelector",value:t.value};if(t["@type"]==="oa:Choice")return[tn(t.default),...(Array.isArray(t.item)?t.item:[t.item]).map(tn)];if(t["@type"]=="iiif:ImageApiSelector")return{type:"ImageApiSelector",region:"region"in t?t.region:void 0,rotation:"rotation"in t?t.rotation:void 0};throw new Error(`Unsupported selector type: ${t["@type"]}`)}var tv=ev;function nn(t){const{related:n}=t,e=tv(t);return n&&t["@context"]==="http://iiif.io/api/presentation/2/context.json"&&[].concat(n).forEach(i=>{e.homepage=e.homepage||[],e.homepage.push(typeof i=="string"?i:{id:i["@id"],label:i.label,format:i.format})}),e}function iv(t){const n=`tify-${Math.floor(Math.random()*Date.now())}`,e=bi({collection:null,errors:[],loading:0,manifest:t.manifest?nn(t.manifest):null,options:t.options||{},readyPromises:[],rootElement:t.rootElement||null,urlUpdateTimeout:null,currentStructure:$e(()=>{if(!(e.manifest.structures instanceof Array))return!1;const i=[];e.options.pages.forEach(l=>{l&&i.push(e.manifest.items[l-1].id)});const{length:s}=e.manifest.structures;let r,o;for(let l=0;li.includes(h.id))){const h=a.items.length;if((h=0?e.manifest.structures[r]:!1}),isCustomPageView:$e(()=>{const{pages:i}=e.options;return i?i.length>2||i.length===2&&(i[0]%2>0||i[1]!==i[0]+1)&&i[1]>0:!1}),isFirstPage:$e(()=>e.options.pages[0]<2),isLastPage:$e(()=>{const{pages:i}=e.options;return i[0]>=e.pageCount||i[i.length-1]>=e.pageCount}),isLastSection:$e(()=>{const{pages:i}=e.options,s=i.length-1;return(i[s]?i[s]:i[s-1])>=e.sections[e.sections.length-1].firstPage}),pageCount:$e(()=>{var i;return(i=e.manifest.items)==null?void 0:i.length}),sections:$e(()=>{const i=[];return e.manifest.structures&&e.manifest.structures.forEach(s=>{if(!s.items){i.push({firstPage:1,lastPage:e.pageCount});return}const r=s.items[0].id,o=e.manifest.items.findIndex(c=>c.id===r)+1,l=s.items[s.items.length-1].id,a=e.manifest.items.findIndex(c=>c.id===l)+1;i.push({firstPage:o,lastPage:a})}),i}),structures:$e(()=>{var a,c;if(!((a=e.manifest)!=null&&a.structures))return[];if(e.manifest.structures.some(h=>h.type==="Range"))return e.manifest.structures.length===1&&((c=e.manifest.structures[0].behavior)!=null&&c.includes("top"))?e.manifest.structures[0].items:e.manifest.structures;const i=[],s=e.manifest.items,r=e.manifest.structures.length;for(let h=0;hx.id===m)+1;const T=p.items.at(-1).id;if(p.lastPage=s.findIndex(x=>x.id===T)+1,!s[p.firstPage-1])continue}else s!=null&&s[0]&&(p.firstPage=1,p.lastPage=e.pageCount);p.level=0,p.pageCount=p.lastPage-p.firstPage+1,i.push(p)}let o=0;for(let h=0;h=p.firstPage&&T.lastPage<=p.lastPage&&(p.items=(p.items||[]).filter(x=>x.label),p.items.push(T),T.level+=1,o=Math.max(o,T.level))}}const l=(h,p=0)=>{for(let m=0;mp?h.splice(m,1):T.items&&l(T.items,p+1)}};for(let h=0;h(e.loading=0,Promise.reject(o)))).json().catch(o=>(e.loading=0,Promise.reject(o)));return e.loading>0&&(e.loading-=1),r},async fetchText(i){e.loading+=1;const r=await(await fetch(i).catch(o=>(e.loading=0,Promise.reject(o)))).text().catch(o=>(e.loading=0,Promise.reject(o)));return e.loading>0&&(e.loading-=1),r},getId(i){return n+(i?`-${i}`:"")},getPageLabel(i,s){return e.options.pageLabelFormat.replace("P",i).replace("L",s)},getStartPage(){if(!e.manifest.start||!e.manifest.items)return 1;const i=e.manifest.items.findIndex(s=>s.id===e.manifest.start.id);return i>=0?i+1:1},goToFirstPage(){e.setPage(1)},goToNextPage(){let i=e.options.pages[0]+1;e.options.pages.length>1&&i%2>0&&i=this.sections[o].firstPage||r&&r>=this.sections[o].firstPage;)o+=1;e.setPage(this.sections[o].firstPage)},goToLastPage(){e.setPage(e.pageCount)},goToPreviousPage(){let i=e.options.pages[0]-1;e.options.pages.length>1&&i%2>0&&i>0&&(i-=1),e.setPage(i)},goToPreviousSection(){const{pages:i}=e.options,s=i[0]?i[0]:i[1];let r=this.sections.length-1;for(;s<=this.sections[r].firstPage||s&&s<=this.sections[r].firstPage;)r-=1;e.setPage(this.sections[r].firstPage)},initOptions(i){let s={};if(e.options.urlQueryKey)try{const r=new URLSearchParams(window.location.search);s=JSON.parse(r.get(e.options.urlQueryKey))||{}}catch{}s.view===""&&e.isMobile()&&(s.view="scan"),s.pages&&!hs(s.pages,e.pageCount)&&(e.addError("Invalid pages, reset to start page"),s.pages=null),e.options.childManifestUrl=s.childManifestUrl||e.options.childManifestUrl,e.options.filters=s.filters||e.options.filters,e.options.pages=i&&i.type==="popstate"?s.pages||[e.getStartPage()]:s.pages||e.options.pages||[e.getStartPage()],e.options.pan=s.panX||s.panY?{x:s.panX,y:s.panY}:s.pan||e.options.pan,e.options.rotation=parseInt(s.rotation,10)||e.options.rotation,e.options.view=s.view||s.view===""?s.view:e.options.view,e.options.zoom=parseFloat(s.zoom)||e.options.zoom},isMobile(){return e.rootElement.offsetWidth{const l=nn(o);if(s.expectedType&&l.type!==s.expectedType){const c=`Expected manifest of type ${s.expectedType}, but got ${l.type}`;return e.addError(c),r.reject(c),r}if(e.manifest=null,await js(),l.type==="Manifest")return e.manifest=l,e.initOptions(),window.addEventListener("popstate",e.initOptions),s.reset&&e.updateOptions({childManifestUrl:i,pages:[e.getStartPage()],pan:{},rotation:null,view:e.isMobile()?"scan":"collection",zoom:null}),r.resolve(),r;if(l.type==="Collection"){e.collection=l;const c=new URLSearchParams(window.location.search);let h={};try{h=JSON.parse(c.get(e.options.urlQueryKey))||{}}catch{}let p="";if(e.options.urlQueryParams.includes("childManifestUrl")&&h.childManifestUrl?p=h.childManifestUrl:e.collection.manifests&&e.options.childManifestAutoloaded&&(p=e.collection.manifests[0].id),p)await e.loadManifest(p,{expectedType:"Manifest"}),e.updateOptions({childManifestUrl:p});else{const m=h.view||e.options.view;e.updateOptions({view:["collection","help","info"].includes(m)?m:"collection"})}return r.resolve(),r}const a="Please provide a valid IIIF Presentation API manifest";return e.addError(a),r.reject(a),r},o=>{const a=`Error loading IIIF manifest: ${o.response&&(o.response.statusText||o.response.data)||o.message}`;return e.addError(a),r.reject(a),r})},localize(i){const r=" · ";if(!e.options.language)throw new Error("language not set");if(!i)return"";if(typeof i=="string")return i;const o=i[e.options.language]||i[e.options.fallbackLanguage]||Object.values(i)[0];return((o instanceof Array?o.join(r):o)||"").trim()||"—"},setPage(i){let s=i;if(i instanceof Array||(s=[i]),!hs(s,e.pageCount))throw new RangeError("Invalid pages");if(s.length===1&&e.options.pages&&e.options.pages[0]%2<1&&(e.options.pages[1]===e.options.pages[0]+1||e.options.pages[1]===0)){const r=s[0]%2>0?s[0]-1:s[0];s=[r,r===e.pageCount?0:r+1]}return e.updateOptions({pages:s}),s},updateOptions(i){Object.assign(e.options,i),clearTimeout(e.urlUpdateTimeout),e.options.urlQueryKey&&(e.urlUpdateTimeout=setTimeout(()=>{const s={};e.options.urlQueryParams.forEach(o=>{const l=e.options[o];l===null||o==="pages"&&l.length<2&&l[0]<2||typeof l=="object"&&!Object.keys(l).length?delete s[o]:s[o]=e.options[o]});const r=new URL(window.location);Object.keys(s).length?r.searchParams.set(e.options.urlQueryKey,JSON.stringify(s)):r.searchParams.delete(e.options.urlQueryKey),window.history&&(i.pages?(e.clearErrors(),window.history.pushState({},"",r)):window.history.replaceState({},"",r))},100))}});return e}const nv={convertManifest:nn,install:(t,n={})=>{t.config.globalProperties.$store=new iv(n)}};window.Tify=function(n={}){const e={breakpoints:{tiny:359,small:719,medium:959,large:1199},childManifestAutoloaded:!0,childManifestUrl:null,container:null,fallbackLanguage:"en",filters:{},language:"en",manifestUrl:null,optionsResetOnPageChange:["pan"],pageLabelFormat:"P : L",pages:null,pan:{},rotation:null,translationsDirUrl:null,urlQueryKey:null,urlQueryParams:["childManifestUrl","filters","pages","pan","rotation","view","zoom"],view:"",viewer:{},zoom:null};if(this.options={...e,...n},!this.options.translationsDirUrl){const l=[...document.getElementsByTagName("script")].find(a=>a.src.includes("/tify"));if(l){const{src:a}=l;this.options.translationsDirUrl=`${a.substring(0,a.lastIndexOf("/"))}/translations`}}let i=null;this.ready=new Promise((o,l)=>{i={resolve:o,reject:l}});const s=this;this.app=pl({render:()=>Na(Hg,{readyPromise:i})}).use(Mg,{instance:s}).use(Dg).use(nv,{options:this.options});let r=!1;this.mount=o=>{if(r)throw new Error("TIFY is already mounted");const l=typeof o=="string"?document.querySelector(o):o;if(!l)throw new Error("Container element not found");window.getComputedStyle(l).position==="static"&&(l.style.position="relative"),this.app.mount(l),r=!0},this.destroy=()=>{this.app.unmount()},this.options.container&&this.mount(this.options.container)}; diff --git a/205/tify.DswYTg7Y.css b/205/tify.DswYTg7Y.css new file mode 100644 index 00000000..e6918489 --- /dev/null +++ b/205/tify.DswYTg7Y.css @@ -0,0 +1 @@ +.tify-toc-toggle,.tify-scan-reset,.tify-scan-page-button,.tify-scan-button,.tify-page-select-button,.tify-header-button,.tify-collection-link,.tify-toc-toggle-all,.tify-info-toggle,.tify-info-button,.tify-export-toggle,.tify-collection-reset{align-items:center;background:#f5f5f5 linear-gradient(to bottom,#fff7,#fff0);border-radius:var(--tify-border-radius, 2px);border:0;box-shadow:0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset;color:inherit;display:inline-flex;font:inherit;justify-content:center;padding:calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .5);text-align:center;-webkit-user-select:none;user-select:none;vertical-align:middle}.tify-toc-toggle:not(:disabled),.tify-scan-reset:not(:disabled),.tify-scan-page-button:not(:disabled),.tify-scan-button:not(:disabled),.tify-page-select-button:not(:disabled),.tify-header-button:not(:disabled),.tify-collection-link:not(:disabled),.tify-toc-toggle-all:not(:disabled),.tify-info-toggle:not(:disabled),.tify-info-button:not(:disabled),.tify-export-toggle:not(:disabled),.tify-collection-reset:not(:disabled){cursor:pointer}.tify-toc-toggle:not(:disabled):hover,.tify-scan-reset:not(:disabled):hover,.tify-scan-page-button:not(:disabled):hover,.tify-scan-button:not(:disabled):hover,.tify-page-select-button:not(:disabled):hover,.tify-header-button:not(:disabled):hover,.tify-collection-link:not(:disabled):hover,.tify-toc-toggle-all:not(:disabled):hover,.tify-info-toggle:not(:disabled):hover,.tify-info-button:not(:disabled):hover,.tify-export-toggle:not(:disabled):hover,.tify-collection-reset:not(:disabled):hover,.tify-toc-toggle:not(:disabled):focus,.tify-scan-reset:not(:disabled):focus,.tify-scan-page-button:not(:disabled):focus,.tify-scan-button:not(:disabled):focus,.tify-page-select-button:not(:disabled):focus,.tify-header-button:not(:disabled):focus,.tify-collection-link:not(:disabled):focus,.tify-toc-toggle-all:not(:disabled):focus,.tify-info-toggle:not(:disabled):focus,.tify-info-button:not(:disabled):focus,.tify-export-toggle:not(:disabled):focus,.tify-collection-reset:not(:disabled):focus,.tify-toc-toggle:not(:disabled):active,.tify-scan-reset:not(:disabled):active,.tify-scan-page-button:not(:disabled):active,.tify-scan-button:not(:disabled):active,.tify-page-select-button:not(:disabled):active,.tify-header-button:not(:disabled):active,.tify-collection-link:not(:disabled):active,.tify-toc-toggle-all:not(:disabled):active,.tify-info-toggle:not(:disabled):active,.tify-info-button:not(:disabled):active,.tify-export-toggle:not(:disabled):active,.tify-collection-reset:not(:disabled):active{background:#f5f5f5 linear-gradient(to bottom,#fff,#fff7)}.tify-toc-toggle:not(:disabled):active,.tify-scan-reset:not(:disabled):active,.tify-scan-page-button:not(:disabled):active,.tify-scan-button:not(:disabled):active,.tify-page-select-button:not(:disabled):active,.tify-header-button:not(:disabled):active,.tify-collection-link:not(:disabled):active,.tify-toc-toggle-all:not(:disabled):active,.tify-info-toggle:not(:disabled):active,.tify-info-button:not(:disabled):active,.tify-export-toggle:not(:disabled):active,.tify-collection-reset:not(:disabled):active{box-shadow:0 .5px 3px #0003 inset,0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify-toc-toggle:not(:disabled):focus-visible,.tify-scan-reset:not(:disabled):focus-visible,.tify-scan-page-button:not(:disabled):focus-visible,.tify-scan-button:not(:disabled):focus-visible,.tify-page-select-button:not(:disabled):focus-visible,.tify-header-button:not(:disabled):focus-visible,.tify-collection-link:not(:disabled):focus-visible,.tify-toc-toggle-all:not(:disabled):focus-visible,.tify-info-toggle:not(:disabled):focus-visible,.tify-info-button:not(:disabled):focus-visible,.tify-export-toggle:not(:disabled):focus-visible,.tify-collection-reset:not(:disabled):focus-visible{outline:2px solid var(--tify-base-color-light, #73abda);z-index:1}[disabled].tify-toc-toggle,[disabled].tify-scan-reset,[disabled].tify-scan-page-button,[disabled].tify-scan-button,[disabled].tify-page-select-button,[disabled].tify-header-button,[disabled].tify-collection-link,[disabled].tify-toc-toggle-all,[disabled].tify-info-toggle,[disabled].tify-info-button,[disabled].tify-export-toggle,[disabled].tify-collection-reset{opacity:.3}.tify-info-button.-active,.tify-header-button.-active,.tify-collection-item.-current .tify-collection-link{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff3,#fff0);color:#fff;z-index:1}.tify-info-button.-active:not(:disabled):hover,.tify-header-button.-active:not(:disabled):hover,.tify-collection-item.-current .tify-collection-link:not(:disabled):hover,.tify-info-button.-active:not(:disabled):focus,.tify-header-button.-active:not(:disabled):focus,.tify-collection-item.-current .tify-collection-link:not(:disabled):focus,.tify-info-button.-active:not(:disabled):active,.tify-header-button.-active:not(:disabled):active,.tify-collection-item.-current .tify-collection-link:not(:disabled):active{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff1,#0002);color:#fff}.tify-toc-toggle-all,.tify-info-toggle,.tify-info-button,.tify-export-toggle,.tify-collection-reset{font-size:var(--tify-font-size-small, calc(var(--tify-font-size, 16px) * .8125));padding:0 calc(var(--tify-grid-base, 24px) * .5)}.tify-toc,.tify-thumbnails,.tify-scan,.tify-info,.tify-help,.tify-fulltext,.tify-export,.tify-collection{background:#fff;box-shadow:-1px 0 var(--tify-border-color, rgba(0, 0, 0, .2));flex:1;min-width:calc(var(--tify-grid-base, 24px) * 15);overflow-y:auto;padding:calc(var(--tify-grid-base, 24px) * .5);position:relative}.tify.-medium .tify-toc,.tify.-medium .tify-thumbnails,.tify.-medium .tify-scan,.tify.-medium .tify-info,.tify.-medium .tify-help,.tify.-medium .tify-fulltext,.tify.-medium .tify-export,.tify.-medium .tify-collection{border:0;bottom:0;min-width:0;position:absolute;top:0;width:100%;z-index:0}.tify-toc:first-child,.tify-thumbnails:first-child,.tify-scan:first-child,.tify-info:first-child,.tify-help:first-child,.tify-fulltext:first-child,.tify-export:first-child,.tify-collection:first-child{border:0}.-active.tify-toc,.-active.tify-thumbnails,.-active.tify-scan,.-active.tify-info,.-active.tify-help,.-active.tify-fulltext,.-active.tify-export,.-active.tify-collection{display:block}.-always-active.tify-toc,.-always-active.tify-thumbnails,.-always-active.tify-scan,.-always-active.tify-info,.-always-active.tify-help,.-always-active.tify-fulltext,.-always-active.tify-export,.-always-active.tify-collection{display:block!important}.tify{background:var(--tify-body-bg, #666 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEElEQVQImWNgwAGkcElgAgAEogAbFZcwKQAAAABJRU5ErkJggg==));box-sizing:border-box;color:var(--tify-text-color, #333);display:flex;flex-direction:column;font-size:var(--tify-font-size, 16px);height:100%;line-height:var(--tify-line-height, var(--tify-grid-base, 24px));min-height:240px;min-width:240px;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,.1)}.tify *,.tify *:before,.tify *:after{box-sizing:inherit}.tify a{color:var(--tify-link-color, var(--tify-base-color, #06b));word-wrap:break-word}.tify a:hover,.tify a:focus,.tify a:active{color:var(--tify-link-hover-color, var(--tify-link-color, var(--tify-base-color, #06b)))}.tify a:focus-visible{outline:2px solid var(--tify-base-color-light, #73abda)}.tify h3{box-shadow:0 1px var(--tify-border-color, rgba(0, 0, 0, .2));font-size:.75em;font-weight:700;letter-spacing:.1em;margin:0 0 calc(var(--tify-grid-base, 24px) * .5);color:var(--tify-text-muted-color, #666);padding:0;text-transform:uppercase}.tify h4{font-size:1em;font-weight:400;margin:0;color:var(--tify-text-muted-color, #666);padding:0}.tify h4:nth-of-type(n+2){margin-top:calc(var(--tify-grid-base, 24px) * .5)}.tify label{cursor:pointer;font-size:inherit;font-weight:400}.tify p{margin:0 0 calc(var(--tify-grid-base, 24px) * .5);padding:0}.tify [type=text]{background:#fff;border:1px solid rgba(0,0,0,.2);border-radius:var(--tify-border-radius, 2px);color:inherit;font:inherit;padding:calc(calc(var(--tify-grid-base, 24px) * .25) - 1px) .5em}.tify [type=text]:focus{border-color:var(--tify-base-color, #06b);outline:2px solid var(--tify-base-color-lighter, #e6f0f8)}.tify-collection{overflow-y:scroll;padding:calc(var(--tify-grid-base, 24px) * .5)}.tify-collection-controls{display:flex}.tify-collection-controls>:first-child{border-radius:var(--tify-border-radius, 2px) 0 0 var(--tify-border-radius, 2px)}.tify-collection-controls>:last-child{border-radius:0 var(--tify-border-radius, 2px) var(--tify-border-radius, 2px) 0}.tify-collection-filter{flex:1;max-width:36em}.tify-collection-filter:focus{z-index:1}.tify-collection-list{list-style:none;margin:0;padding:0}.tify-collection-list .tify-collection-list{margin-left:var(--tify-grid-base, 24px);margin-top:calc(var(--tify-grid-base, 24px) * .25)}.tify-collection-list li{margin-bottom:calc(var(--tify-grid-base, 24px) * .25)}.tify-collection-link{color:inherit!important;display:block;padding:calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .5);text-align:left;text-decoration:none;width:100%}.tify-collection-link.-has-children{font-weight:700}.tify-collection-item.-current .tify-collection-link{color:#fff!important}.tify-collection-link .tify-icon{margin-left:calc(var(--tify-grid-base, 24px) * -.25)}.tify-collection-no-results{color:var(--tify-text-muted-color, #666)}.tify-collection-reset{margin-left:-1px;white-space:nowrap}.tify-error{background:#d22c;border-radius:0 var(--tify-border-radius, 2px) 0 0;bottom:0;color:#fff;display:flex;font-weight:700;max-height:50%;max-width:90%;position:absolute}.tify-error p{margin:0}.tify-error-close{align-self:flex-start;background:0;border:0;color:#fff;cursor:pointer;display:flex;padding:calc(var(--tify-grid-base, 24px) * .25)}.tify-error-close:hover,.tify-error-close:focus,.tify-error-close:active{background:#0000001a}.tify-error-messages{overflow:auto;padding:calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .5) calc(var(--tify-grid-base, 24px) * .25) 0}.tify-export-container{margin:calc(var(--tify-grid-base, 24px) * .5) 0 var(--tify-grid-base, 24px);position:relative}.tify-export-section{margin:0 0 var(--tify-grid-base, 24px)}.tify-export-toc{border:1px solid var(--tify-border-color, rgba(0, 0, 0, .2));border-radius:var(--tify-border-radius, 2px);margin:calc(var(--tify-grid-base, 24px) * .5) 0 0;padding:calc(var(--tify-grid-base, 24px) * .25);position:relative}.tify-export-toc h4{margin:calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .75)}.tify-export-toc ul{margin:0 0 0 calc(var(--tify-grid-base, 24px) * .5);padding:0}.tify-export-toggle.-close{border-radius:0 var(--tify-border-radius, 2px);padding:calc(var(--tify-grid-base, 24px) * .25);position:absolute;right:0;z-index:1}.tify-fulltext{overflow-y:auto}.tify-fulltext-none{color:var(--tify-text-muted-color, #666);font-style:italic}.tify-fulltext-page{margin:0 0 var(--tify-grid-base, 24px)}.tify-fulltext-text{margin-left:1em;text-indent:-1em;word-break:break-word}.tify-fulltext-text p{margin:0 0 1em}.tify-header{background:var(--tify-header-bg, #f5f5f5);box-shadow:0 1px var(--tify-border-color, rgba(0, 0, 0, .2));display:flex;flex-wrap:wrap;justify-content:space-between;z-index:9}.tify-header-button-group{align-items:center;display:flex;margin:calc(var(--tify-grid-base, 24px) * .25) 0;padding:0 calc(var(--tify-grid-base, 24px) * .25);position:relative}.tify-header-button-group.-page-select{align-self:center;box-shadow:0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset;border-radius:var(--tify-border-radius, 2px);margin:0 calc(var(--tify-grid-base, 24px) * .25);padding:0}.tify.-small .tify-header-button-group.-page-select{margin:0}.tify-header-button-group.-pagination{padding-left:0}.tify.-small .tify-header-button-group.-pagination{display:none}.tify-header-popup .tify-header-button-group.-pagination{box-shadow:0 -1px var(--tify-border-color, rgba(0, 0, 0, .2));display:none;margin:calc(var(--tify-border-radius, 2px) * 2 - 1px) 0 0;padding:var(--tify-border-radius, 2px) 0 0}.tify.-small .tify-header-popup .tify-header-button-group.-pagination{display:flex}.tify-header-button-group.-toggle{display:none}.tify.-large .tify-header-button-group.-toggle{display:flex}.tify-header-column:not(:nth-child(2)) .tify-header-button-group.-toggle{border-left:1px solid var(--tify-border-color, rgba(0, 0, 0, .2))}.tify.-small .tify-header-column:not(:nth-child(2)) .tify-header-button-group.-toggle{border:0}.tify.-large .tify-header-button-group.-view{display:block;margin:0;padding:0}.tify-header-button-group.-view:nth-child(n+2),.tify-header-column.-pagination~.tify-header-column .tify-header-button-group.-view{border-left:1px solid var(--tify-border-color, rgba(0, 0, 0, .2))}.tify.-large .tify-header-button-group.-view:nth-child(n+2),.tify.-large .tify-header-column.-pagination~.tify-header-column .tify-header-button-group.-view{border-left:0}.tify-header-button{align-self:center;background:none;border-radius:var(--tify-border-radius, 2px);border:0;box-shadow:none;margin:0;min-height:calc(var(--tify-grid-base, 24px) * 1.5);min-width:calc(var(--tify-grid-base, 24px) * 1.5);padding:0}.tify-header-button:not(:disabled):hover,.tify-header-button:not(:disabled):focus,.tify-header-button:not(:disabled):active{box-shadow:0 0 0 1px #0000001a inset}.tify-header-button:not(:disabled):active{box-shadow:0 .5px 3px #0003 inset,0 0 0 1px #0000001a inset}.tify-header-button.-icon-only{display:block;font-size:0!important}.tify.-large .tify-header-button.-icon-only{font-size:inherit!important}.tify-header-button.-scan{display:none!important}.tify.-medium .tify-header-button.-scan{display:block!important}.tify-header-button-group.-toggle .tify-header-button{padding:calc(var(--tify-grid-base, 24px) * .375)}.tify.-tiny .tify-header-button-group.-toggle .tify-header-button{margin:calc(var(--tify-grid-base, 24px) * .125) 0;padding:calc(var(--tify-grid-base, 24px) * .25)}.tify-header-button-group.-view .tify-header-button{font-size:.75em}.tify-header-button-group.-view .tify-header-button:not(.-icon-only){align-items:center;display:flex;flex-direction:column;font-size:var(--tify-font-size-small, calc(var(--tify-font-size, 16px) * .8125));line-height:1;min-height:calc(var(--tify-grid-base, 24px) * 1.75);min-width:calc(var(--tify-grid-base, 24px) * 1.75);padding:0 .5em 4px}.tify.-large .tify-header-button-group.-view .tify-header-button{align-items:flex-start;display:block;font:inherit;min-height:0;padding:calc(var(--tify-grid-base, 24px) * .25);text-align:left;width:100%}.tify-page-select+.tify-header-button{border-radius:0 var(--tify-border-radius, 2px) var(--tify-border-radius, 2px) 0;margin-left:-1px}.tify-page-select+.tify-header-button:not(:disabled):hover,.tify-page-select+.tify-header-button:not(:disabled):focus,.tify-page-select+.tify-header-button:not(:disabled):active{box-shadow:0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify-page-select+.tify-header-button:not(:disabled):active{box-shadow:0 .5px 3px #0003 inset,0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify-header-column{display:flex;flex-wrap:wrap;justify-content:space-between;min-width:0}.tify-header-column:first-child{flex:1}.tify-header-popup{display:flex}.tify.-large .tify-header-popup{background:#fff;border:var(--tify-border-radius, 2px) solid #fff;border-radius:var(--tify-border-radius, 2px);filter:drop-shadow(0 0 calc(var(--tify-grid-base, 24px) * .25) rgba(0,0,0,.5));min-width:6em;overflow:visible;position:absolute;text-shadow:none;z-index:9;margin:calc(var(--tify-grid-base, 24px) * .25) 0;left:auto;right:calc(var(--tify-grid-base, 24px) * .25);box-shadow:none;display:none;top:calc(var(--tify-grid-base, 24px) * 2)}.tify.-large .tify-header-popup:before{position:absolute;content:"";background:#fff;width:calc(var(--tify-grid-base, 24px) * .5);height:calc(var(--tify-grid-base, 24px) * .5);transform:rotate(45deg);z-index:-1;bottom:auto;top:calc(calc(var(--tify-grid-base, 24px) * -.25) - var(--tify-border-radius, 2px));left:auto;right:calc(var(--tify-grid-base, 24px) * .5)}.tify.-large .tify-header-popup.-visible{display:block}.tify-header-title{-webkit-box-orient:vertical;-webkit-line-clamp:2;align-self:center;display:-webkit-box;font-size:1em;font-weight:400;line-height:var(--tify-grid-base, 24px);margin:0;overflow:hidden;margin:calc(var(--tify-grid-base, 24px) * .125) calc(var(--tify-grid-base, 24px) * .5);text-align:left;text-overflow:ellipsis}.tify-help{overflow-y:auto}.tify-help-footer{box-shadow:0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset;font-size:var(--tify-font-size-small, calc(var(--tify-font-size, 16px) * .8125));margin-top:var(--tify-grid-base, 24px);padding-top:calc(var(--tify-grid-base, 24px) * .5)}.tify-icon{fill:currentColor;height:24px;vertical-align:middle;width:24px}.tify-info{overflow-y:auto}.tify-info-button{border-radius:0}.tify-info-button:first-child{border-radius:var(--tify-border-radius, 2px) 0 0 var(--tify-border-radius, 2px)}.tify-info-button:last-child{border-radius:0 var(--tify-border-radius, 2px) var(--tify-border-radius, 2px) 0}.tify-info-button+.tify-info-button{margin-left:-1px}.tify-info-content{position:relative}.tify-info-content.-collapsed{max-height:calc(var(--tify-grid-base, 24px) * 6.5)}.tify-info-header{display:inline-flex;margin:0 0 calc(var(--tify-grid-base, 24px) * .75);position:relative}.tify-info-logo{display:block;max-height:calc(var(--tify-grid-base, 24px) * 6);max-width:100%;height:auto;width:auto}.tify-info-metadata>div{margin-bottom:calc(var(--tify-grid-base, 24px) * .5)}.tify-info-section{margin:0 0 var(--tify-grid-base, 24px);word-break:break-word}.tify-info-section.-attribution img{display:block}.tify-info-section.-logo>a{border:0;box-shadow:none;display:inline-block}.tify-info-section.-title>p{font-weight:700}.tify-info-toggle{margin:calc(var(--tify-grid-base, 24px) * .5) 0;padding-left:calc(var(--tify-grid-base, 24px) * .25);position:relative}.tify-info-value>div:last-child>:last-child{margin-bottom:0}.tify-info-content.-collapsed .tify-info-value{max-height:calc(calc(var(--tify-grid-base, 24px) * 6.5) - calc(var(--tify-grid-base, 24px) * 2));overflow:hidden}.tify-info-content.-collapsed .tify-info-value:after{background:linear-gradient(#fff0,#fff);bottom:calc(var(--tify-grid-base, 24px) * 2);content:"";height:calc(var(--tify-grid-base, 24px) * 2);position:absolute;width:100%}.tify-list{margin:0 0 calc(var(--tify-grid-base, 24px) * .5);padding:0 0 0 var(--tify-grid-base, 24px)}.tify-list li{margin:0;padding:0}.tify-list li:only-child{list-style:none;margin-left:calc(var(--tify-grid-base, 24px) * -1)}.tify-loading{animation:fadeIn .5s forwards .5s,spin 1.2s infinite ease-in-out;background:var(--tify-base-color-light, #73abda);border-radius:var(--tify-border-radius, 2px);bottom:calc(var(--tify-grid-base, 24px) * .5);height:calc(var(--tify-grid-base, 24px) * 1.5);left:calc(var(--tify-grid-base, 24px) * .5);opacity:0;pointer-events:none;position:absolute;width:calc(var(--tify-grid-base, 24px) * 1.5)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes spin{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.tify-main{display:flex;flex:1;overflow:hidden;position:relative}.tify-page-select a{border:0;box-shadow:none}.tify-page-select-button{background:none;border-radius:var(--tify-border-radius, 2px) 0 0 var(--tify-border-radius, 2px);box-shadow:none;display:block;height:100%;max-width:calc(var(--tify-grid-base, 24px) * 10);min-width:calc(var(--tify-grid-base, 24px) * 3);overflow:hidden;padding:calc(var(--tify-grid-base, 24px) * .25) .5em;position:relative;text-overflow:ellipsis;white-space:nowrap}.tify-page-select-button:not(:disabled):hover,.tify-page-select-button:not(:disabled):focus,.tify-page-select-button:not(:disabled):active{box-shadow:0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify-page-select-button:not(:disabled):active{box-shadow:0 .5px 3px #0003 inset,0 0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify.-medium .tify-page-select-button{max-width:calc(var(--tify-grid-base, 24px) * 8)}.tify.-small .tify-page-select-button{max-width:calc(var(--tify-grid-base, 24px) * 6)}.tify.-tiny .tify-page-select-button{max-width:calc(var(--tify-grid-base, 24px) * 4)}.tify-page-select-dropdown{background:#fff;border:var(--tify-border-radius, 2px) solid #fff;border-radius:var(--tify-border-radius, 2px);filter:drop-shadow(0 0 calc(var(--tify-grid-base, 24px) * .25) rgba(0,0,0,.5));min-width:6em;overflow:visible;position:absolute;text-shadow:none;z-index:9;margin:calc(var(--tify-grid-base, 24px) * .25) 0;left:0;right:auto;max-width:100%;text-align:center}.tify-page-select-dropdown:before{position:absolute;content:"";background:#fff;width:calc(var(--tify-grid-base, 24px) * .5);height:calc(var(--tify-grid-base, 24px) * .5);transform:rotate(45deg);z-index:-1;bottom:auto;top:calc(calc(var(--tify-grid-base, 24px) * -.25) - var(--tify-border-radius, 2px));left:calc(var(--tify-grid-base, 24px) * .5);right:auto}.tify.-small .tify-page-select-dropdown{left:0}.tify-page-select-filter{padding:var(--tify-border-radius, 2px) var(--tify-border-radius, 2px) calc(var(--tify-border-radius, 2px) * 2)}.tify-page-select-input{width:100%}.tify-page-select-list{list-style:none;margin:0;max-height:calc(var(--tify-grid-base, 24px) * 11);min-width:100%;overflow-y:scroll;padding:0;position:relative}.tify-page-select-list>li{margin:0;-webkit-user-select:none;user-select:none}.tify-page-select-list>li+li{box-shadow:0 1px var(--tify-border-color, rgba(0, 0, 0, .2)) inset}.tify-page-select-list>li>a:hover,.tify-page-select-list>li>a:focus,.tify-page-select-list>li>a:active{background:#0000001a}.tify-page-select-list>li.-current>a{background:#0000001a}.tify-page-select-list>li.-highlighted>a{background:var(--tify-link-color, var(--tify-base-color, #06b));color:#fff}.tify-page-select-list a{color:inherit;display:block;padding:calc(var(--tify-grid-base, 24px) * .125) .5em;text-decoration:none}.tify-page-select-list a:hover,.tify-page-select-list a:focus,.tify-page-select-list a:active{color:inherit}.tify-scan{background:transparent;box-shadow:none;flex:3;padding:0;-webkit-user-select:none;user-select:none;z-index:0}.tify-scan-buttons{border-radius:var(--tify-border-radius, 2px);display:flex;flex-direction:column;left:calc(var(--tify-grid-base, 24px) * .25);position:absolute;top:calc(var(--tify-grid-base, 24px) * .25);z-index:9}.tify-scan-button{background:none;box-shadow:none;color:#fff;height:calc(var(--tify-grid-base, 24px) * 1.5);padding:0;position:relative;width:calc(var(--tify-grid-base, 24px) * 1.5)}.tify-scan-button:not(:disabled):hover,.tify-scan-button:not(:disabled):focus,.tify-scan-button:not(:disabled):active{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0003}.tify-scan-button.-active:after{background:var(--tify-base-color, #06b);box-shadow:0 0 calc(var(--tify-grid-base, 24px) * .25) var(--tify-base-color-lighter, #e6f0f8);content:"";border-radius:50%;display:block;height:.5em;position:absolute;right:calc(var(--tify-grid-base, 24px) * .25);top:calc(var(--tify-grid-base, 24px) * .25);width:.5em}.tify-scan-button .tify-icon{filter:drop-shadow(0 0 2px rgba(0,0,0,.2)) drop-shadow(0 0 1px rgba(0,0,0,.5))}.tify-scan-filters{position:relative}.tify-scan-filters-popup{background:#fff;border:var(--tify-border-radius, 2px) solid #fff;border-radius:var(--tify-border-radius, 2px);filter:drop-shadow(0 0 calc(var(--tify-grid-base, 24px) * .25) rgba(0,0,0,.5));min-width:6em;overflow:visible;position:absolute;text-shadow:none;z-index:9;transform:translateY(-50%);left:0;right:auto;left:calc(var(--tify-grid-base, 24px) * 1.75);padding:calc(var(--tify-grid-base, 24px) * .5);top:calc(var(--tify-grid-base, 24px) * .75);width:calc(var(--tify-grid-base, 24px) * 10)}.tify-scan-filters-popup:before{position:absolute;content:"";background:#fff;width:calc(var(--tify-grid-base, 24px) * .5);height:calc(var(--tify-grid-base, 24px) * .5);transform:rotate(45deg);z-index:-1;left:calc(calc(var(--tify-grid-base, 24px) * -.25) - var(--tify-border-radius, 2px));top:calc(50% - calc(var(--tify-grid-base, 24px) * .25))}.tify-scan-filters-popup label>b{float:right;font-size:var(--tify-font-size-small, calc(var(--tify-font-size, 16px) * .8125))}.tify-scan-filters-popup>p{margin:0}.tify-scan-filters-popup>p+p{margin-top:calc(var(--tify-grid-base, 24px) * .5)}.tify-scan-image{height:100%;white-space:nowrap;width:100%}.tify-scan-image .openseadragon-canvas{outline:0}.tify-scan-page-button{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#fff6;border:0;box-shadow:0 0 1px var(--tify-border-color, rgba(0, 0, 0, .2));height:calc(var(--tify-grid-base, 24px) * 2.5);margin-top:calc(var(--tify-grid-base, 24px) * -1.25);padding:0;position:absolute;top:50%;width:calc(var(--tify-grid-base, 24px) * 1.25);z-index:1}.tify.-short .tify-scan-page-button{bottom:0;height:calc(var(--tify-grid-base, 24px) * 1.75);width:calc(var(--tify-grid-base, 24px) * 1.75);top:auto}.tify-scan-page-button.-previous{border-radius:0 calc(var(--tify-grid-base, 24px) * 1.25) calc(var(--tify-grid-base, 24px) * 1.25) 0;left:0;justify-content:flex-start}.tify.-short .tify-scan-page-button.-previous{border-radius:0 calc(var(--tify-grid-base, 24px) * 1.75) 0 0;padding:calc(var(--tify-grid-base, 24px) * .375) 0 0 calc(var(--tify-grid-base, 24px) * .25)}.tify-scan-page-button.-next{border-radius:calc(var(--tify-grid-base, 24px) * 1.25) 0 0 calc(var(--tify-grid-base, 24px) * 1.25);right:0;justify-content:flex-end}.tify.-short .tify-scan-page-button.-next{border-radius:calc(var(--tify-grid-base, 24px) * 1.75) 0 0;padding:calc(var(--tify-grid-base, 24px) * .375) calc(var(--tify-grid-base, 24px) * .25) 0 0}.tify-scan-range{-webkit-appearance:none;margin:calc(var(--tify-grid-base, 24px) * .25) 0 calc(var(--tify-grid-base, 24px) * -.25);width:100%}.tify-scan-range::-webkit-slider-runnable-track{cursor:pointer;height:calc(var(--tify-grid-base, 24px) * .25);width:100%;background:var(--tify-border-color, rgba(0, 0, 0, .2));border-radius:var(--tify-border-radius, 2px);margin:0}.tify-scan-range::-webkit-slider-thumb{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff3,#fff0);border:0;border-radius:var(--tify-border-radius, 2px);cursor:pointer;height:var(--tify-grid-base, 24px);width:calc(var(--tify-grid-base, 24px) * .5);-webkit-appearance:none;margin-top:calc(calc(var(--tify-grid-base, 24px) * .25) * .5 - var(--tify-grid-base, 24px) * .5)}.tify-scan-range::-moz-range-track{cursor:pointer;height:calc(var(--tify-grid-base, 24px) * .25);width:100%;background:var(--tify-border-color, rgba(0, 0, 0, .2));border:0;border-radius:var(--tify-border-radius, 2px)}.tify-scan-range::-moz-range-thumb{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff3,#fff0);border:0;border-radius:var(--tify-border-radius, 2px);cursor:pointer;height:var(--tify-grid-base, 24px);width:calc(var(--tify-grid-base, 24px) * .5)}.tify-scan-range:focus::-webkit-slider-runnable-track{box-shadow:0 .5px 3px #0003 inset}.tify-scan-range:focus::-webkit-slider-thumb{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff1,#0002);box-shadow:0 .5px 3px #0003 inset}.tify-scan-range:focus::-moz-range-track{box-shadow:0 .5px 3px #0003 inset}.tify-scan-range:focus::-moz-range-thumb{background:var(--tify-link-color, var(--tify-base-color, #06b)) linear-gradient(to bottom,#fff1,#0002);box-shadow:0 .5px 3px #0003 inset}.tify-scan-reset{width:100%}.tify-sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tify-thumbnails{min-height:100%;overflow-y:scroll;position:relative;-webkit-user-select:none;user-select:none}.tify-thumbnails a{color:inherit;border:0;box-shadow:none}.tify-thumbnails-list{margin:calc(var(--tify-grid-base, 24px) * -.25)}.tify-thumbnails-item{background:currentColor;border-radius:var(--tify-border-radius, 2px);cursor:pointer;float:left;margin:calc(var(--tify-grid-base, 24px) * .25);overflow:hidden;padding-bottom:var(--tify-grid-base, 24px);position:relative}.tify-thumbnails-item:hover,.tify-thumbnails-item:focus,.tify-thumbnails-item:active{background:currentColor;filter:brightness(1.2)}.tify-thumbnails-item img{display:block;height:var(--tify-thumbnail-height, calc(var(--tify-grid-base, 24px) * 4.5));margin:auto;object-fit:contain;pointer-events:none;max-width:100%;width:var(--tify-thumbnail-width, calc(var(--tify-grid-base, 24px) * 4))}.tify-thumbnails-item.-current{outline:calc(var(--tify-grid-base, 24px) * .1666666667) solid var(--tify-base-color-light, #73abda)}.tify-thumbnails-page{bottom:0;box-shadow:0 -1px #fff6;color:#fff;display:block;font-size:var(--tify-font-size-small, calc(var(--tify-font-size, 16px) * .8125));font-weight:700;height:var(--tify-grid-base, 24px);overflow:hidden;padding:0 calc(var(--tify-grid-base, 24px) * .25);position:absolute;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.tify-thumbnails-item.-current .tify-thumbnails-page{background:var(--tify-link-color, var(--tify-base-color, #06b))}.tify-toc-page,.tify-toc-label{background:#fff;position:relative;z-index:1}.tify-toc{overflow-y:auto;position:relative;z-index:0}.tify-toc-header{margin:0 calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .5)}.tify-toc-label{padding-right:.2em;transition:inherit}.tify-toc-link{border-radius:var(--tify-border-radius, 2px);color:var(--tify-link-color, var(--tify-base-color, #06b));cursor:pointer;display:block;overflow:hidden;padding:calc(var(--tify-grid-base, 24px) * .25);position:relative;text-decoration:none}.tify-toc-link:hover,.tify-toc-link:focus,.tify-toc-link:active{background:var(--tify-base-color-lighter, #e6f0f8)}.tify-toc-link:hover>span,.tify-toc-link:focus>span,.tify-toc-link:active>span{background:var(--tify-base-color-lighter, #e6f0f8)}.tify-toc-link.-dots:after{bottom:calc(calc(var(--tify-grid-base, 24px) * .5) - 1px);content:"";left:calc(var(--tify-grid-base, 24px) * .25);min-width:4em;border-bottom:1px dotted;position:absolute;right:calc(var(--tify-grid-base, 24px) * .25)}.tify-toc-list{margin:0 0 calc(var(--tify-grid-base, 24px) * .25) calc(var(--tify-grid-base, 24px) * .25);padding:0;position:relative;z-index:0}.tify-toc-list .tify-toc-list{margin:0 0 0 calc(var(--tify-grid-base, 24px) * 1.25)}.tify-toc-list a{border:0;box-shadow:none}.tify-toc-page{float:right;padding-left:.2em;transition:inherit;z-index:1}.tify-toc-structure{display:block;margin:0;position:relative}.tify-toc-structure.-current{box-shadow:calc(calc(var(--tify-grid-base, 24px) * -.5) + 1px) 0 #fff,calc(var(--tify-grid-base, 24px) * -.75) 0 var(--tify-base-color-light, #73abda)}.tify-toc-structure.-expanded:after{border-left:1px solid var(--tify-base-color-light, #73abda);content:"";left:calc(var(--tify-grid-base, 24px) * .75);height:100%;position:absolute;top:calc(var(--tify-grid-base, 24px) * .25);z-index:-2}.tify-toc-structure .tify-toc-structure:before{border-top:1px solid var(--tify-base-color-light, #73abda);content:"";display:block;height:100%;left:calc(var(--tify-grid-base, 24px) * -.5);position:absolute;top:calc(var(--tify-grid-base, 24px) * .75);width:calc(var(--tify-grid-base, 24px) * .5)}.tify-toc-structure .tify-toc-structure:not(.-current):last-child:before{background:#fff}.tify-toc-toggle-all{margin:calc(var(--tify-grid-base, 24px) * .25)}.tify-toc-toggle{float:left;margin:calc(var(--tify-grid-base, 24px) * .25) 0 0 calc(var(--tify-grid-base, 24px) * .25);padding:0;position:relative}.tify-toc-toggle:after{content:"";border-bottom:calc(var(--tify-grid-base, 24px) * .25) solid #fff;bottom:calc(var(--tify-grid-base, 24px) * -.25);left:calc(var(--tify-grid-base, 24px) * .5);pointer-events:none;position:absolute;width:1px;z-index:-1} diff --git a/205/translations/de.json b/205/translations/de.json new file mode 100644 index 00000000..de3ae122 --- /dev/null +++ b/205/translations/de.json @@ -0,0 +1,71 @@ +{ + "$language": "Deutsch", + "$copyright": "Copyright © 2017–2022 Universität Göttingen / Staats- und Universitätsbibliothek Göttingen", + "$info": "TIFY ist ein schlanker und für Mobilgeräte optimierter IIIF-Dokumenten­betrachter, veröffentlicht unter der GNU Affero General Public License 3.0.", + "About TIFY": "Über TIFY", + "Brightness": "Helligkeit", + "Close PDF list": "PDF-Liste schließen", + "Collapse": "Einklappen", + "Collapse all": "Alle einklappen", + "Collection": "Sammlung", + "Contents": "Inhalt", + "Contrast": "Kontrast", + "Contributors": "Beitragende", + "Could not load child manifest": "Konnte Kind-Manifest nicht laden", + "Current Element": "Aktuelles Element", + "Current page:": "Aktuelle Seite:", + "Description": "Beschreibung", + "Dismiss": "Ausblenden", + "Document": "Dokument", + "Download Individual Images": "Einzelbilder herunterladen", + "Exit fullscreen": "Vollbildmodus verlassen", + "Expand": "Ausklappen", + "Expand all": "Alle ausklappen", + "Export": "Export", + "Filter collection": "Sammlung filtern", + "Filter pages": "Seiten filtern", + "First page": "Erste Seite", + "Fullscreen": "Vollbildmodus", + "Fulltext": "Volltext", + "Fulltext not available for this page": "Volltext nicht verfügbar", + "Help": "Hilfe", + "IIIF manifest": "IIIF-Manifest", + "IIIF manifest (collection)": "IIIF-Manifest (Sammlung)", + "IIIF manifest (current document)": "IIIF-Manifest (Dokument)", + "Image filters": "Bildfilter", + "Info": "Info", + "Last page": "Letzte Seite", + "License": "Lizenz", + "Loading": "Wird geladen", + "Logo": "Logo", + "Metadata": "Metadaten", + "Next page": "Nächste Seite", + "Next section": "Nächster Abschnitt", + "No results": "Keine Treffer", + "Other Formats": "Andere Formate", + "page": "Seite", + "Page": "Seite", + "pages": "Seiten", + "Pages": "Seiten", + "PDFs for each element": "PDFs für einzelne Elemente", + "Previous page": "Vorige Seite", + "Previous section": "Voriger Abschnitt", + "Related Resources": "Zugehörige Quellen", + "Renderings": "Bilddaten", + "Report a bug": "Fehler melden", + "Reset": "Zurücksetzen", + "Rotate": "Drehen", + "Saturation": "Sättigung", + "Scan": "Scan", + "Source code": "Quellcode", + "Table of Contents": "Inhaltsverzeichnis", + "Title": "Titel", + "Toggle double-page": "Doppelseite umschalten", + "Toggle image filters": "Bildfilter umschalten", + "Toggle page select": "Seitenauswahl umschalten", + "User guide": "Kurzanleitung", + "Version": "Version", + "View": "Ansicht", + "Zoom in": "Vergrößern", + "Zoom out": "Verkleinern" +} diff --git a/205/translations/eo.json b/205/translations/eo.json new file mode 100644 index 00000000..65ca0682 --- /dev/null +++ b/205/translations/eo.json @@ -0,0 +1,64 @@ +{ + "$language": "Esperanto", + "$copyright": "Kopirajtoj © 2017–2022 Universitato Goettingen / Ŝtata kaj Universitata Biblioteko Goettingen", + "$info": "TIFY estas pli svelta kaj pli movebla amika IIIF-dokumentrigardilo publikigita sub la Ĝenerala Publika Permesilo 3.0 de GNU Affero.", + "About TIFY": "Per TIFY", + "Brightness": "Helecon", + "Close PDF list": "Fermu PDF-liston", + "Collapse all": "Kolapu ĉion", + "Collapse": "Kolapso", + "Collection": "Kolekto", + "Contents": "Enhavojn", + "Contrast": "Kontrasto", + "Contributors": "Kontribuanto", + "Current Element": "Nuna ero", + "Current page:": "Nuna paĝo:", + "Description": "Priskribo", + "Document": "Dokumento", + "Download Individual Images": "Elŝutu unuopajn bildojn", + "Exit fullscreen": "Eliru plenekranan reĝimon", + "Expand all": "Plivastigu ĉion", + "Expand": "Disfaldas", + "Export": "Eksporti", + "Filter pages": "Filtrilaj paĝoj", + "First page": "Unua paĝo", + "Fullscreen": "Plena ekrana reĝimo", + "Fulltext not available for this page": "Plena teksto ne havebla", + "Fulltext": "Plena teksto", + "Help": "Helpu", + "IIIF manifest": "IIIF-Manifesto", + "Image filters": "Bilda filtrilo", + "Info": "Info", + "Last page": "Lasta paĝo", + "License": "Permesilo", + "Loading": "Ŝarĝante", + "Logo": "Emblemo", + "Metadata": "Metadatenoj", + "Next page": "Sekva paĝo", + "Next section": "Sekva sekcio", + "Other Formats": "Aliaj formatoj", + "page": "paĝo", + "Page": "Paĝo", + "pages": "paĝoj", + "Pages": "Paĝoj", + "PDFs for each element": "PDF-oj por individuaj eroj", + "Previous page": "Antaŭa paĝo", + "Previous section": "Antaŭa sekcio", + "Related Resources": "Rilataj fontoj", + "Renderings": "Bildaj datumoj", + "Report a bug": "Raportu eraron", + "Reset": "Restarigi al defaŭlta", + "Rotate": "Turni", + "Saturation": "Saturiĝo", + "Scan": "Skani", + "Source code": "Fontkodo", + "Table of Contents": "Enhavtabelo", + "Title": "Titolo", + "Toggle double-page": "Ŝaltu duoblan paĝon", + "Toggle image filters": "Ŝaltu bildfiltrilojn", + "User guide": "Uzant-gvidilo", + "Version": "Versio", + "View": "Vido", + "Zoom in": "Zomi", + "Zoom out": "Malzomi" +} diff --git a/205/translations/fr.json b/205/translations/fr.json new file mode 100644 index 00000000..6d27a02e --- /dev/null +++ b/205/translations/fr.json @@ -0,0 +1,67 @@ +{ + "$language": "Français", + "About TIFY": "À propos de TIFY", + "Brightness": "Luminosité", + "Close PDF list": "Fermer la liste de PDFs", + "Collapse all": "Tout replier", + "Collapse": "Replier", + "Collection": "Collection", + "Contents": "Contenu", + "Contrast": "Contraste", + "Contributors": "Contributeurs", + "Current Element": "Élement actuel", + "Current page:": "Page actuelle :", + "Description": "Description", + "Dismiss": "Rejeter", + "Document": "Document", + "Download Individual Images": "Télécharger les images individuellement", + "Exit fullscreen": "Quitter le mode plein écran", + "Expand all": "Tout déplier", + "Expand": "Déplier", + "Export": "Exporter", + "Filter collection": "Filtrer la collection", + "Filter pages": "Filtrer les pages", + "First page": "Première page", + "Fullscreen": "Plein écran", + "Fulltext not available for this page": "Texte intégral non disponible pour cette page", + "Fulltext": "Texte intégral", + "Help": "Aide", + "IIIF manifest": "Manifeste IIIF", + "IIIF manifest (collection)": "Manifeste IIIF (collection)", + "IIIF manifest (current document)": "Manifeste IIIF (document actuel)", + "Image filters": "Filtres d’image", + "Info": "Info", + "Last page": "Dernière page", + "License": "License", + "Loading": "Chargement", + "Logo": "Logo", + "Metadata": "Metadonnées", + "Next page": "Page suivante", + "Next section": "Section suivante", + "No results": "Pas de résultats", + "Other Formats": "Autres formats", + "page": "page", + "Page": "Page", + "pages": "pages", + "Pages": "Pages", + "PDFs for each element": "PDFs pour chaque élément", + "Previous page": "Page précédente", + "Previous section": "Section précédente", + "Related Resources": "Ressources associées", + "Renderings": "Rendus", + "Report a bug": "Signaler un bogue", + "Reset": "Réinitialiser", + "Rotate": "Pivoter", + "Saturation": "Saturation", + "Scan": "Scan", + "Source code": "Code source", + "Table of Contents": "Table des matières", + "Title": "Titre", + "Toggle double-page": "Basculer en mode double page", + "Toggle image filters": "Appliquer les filtres visuels", + "User guide": "Guide d’utilisation", + "Version": "Version", + "View": "Vue", + "Zoom in": "Zoomer", + "Zoom out": "Dézoomer" +} diff --git a/205/translations/hr.json b/205/translations/hr.json new file mode 100644 index 00000000..8fb45ea8 --- /dev/null +++ b/205/translations/hr.json @@ -0,0 +1,69 @@ +{ + "$language": "Hrvatski", + "$copyright": "Autorska prava © 2017–2022 Universität Göttingen / Staats- und Universitätsbibliothek Göttingen", + "$info": "TIFY je mali i optimiziran za mobilne uređaje preglednik IIIF dokumenata, otorenog koda prema GNU Affero General Public License 3.0.", + "About TIFY": "O TIFY-ju", + "Brightness": "Svjetlina", + "Close PDF list": "Zatvori popis PDF-a", + "Collapse all": "Smanji sve", + "Collapse": "Smanji", + "Collection": "Zbirka", + "Contents": "Sadržaj", + "Contrast": "Kontrast", + "Contributors": "Suradnici", + "Current Element": "Trenutni element", + "Current page:": "Trenutna stranica:", + "Description": "Opis", + "Dismiss": "Odbaci", + "Document": "Dokument", + "Download Individual Images": "Skini pojedine slike", + "Exit fullscreen": "Isključi preko cijelog ekrana", + "Expand all": "Proširi sve", + "Expand": "Proširi", + "Export": "Izvoz", + "Filter collection": "Filtriraj zbirku", + "Filter pages": "Filtriraj stranice", + "First page": "Prva stranica", + "Fullscreen": "Preko cijelog ekrana", + "Fulltext not available for this page": "Cjeloviti tekst nije dostupan za ovu stranicu", + "Fulltext": "Cjeloviti tekst", + "Help": "Pomoć", + "IIIF manifest": "IIIF-Manifest", + "IIIF manifest (collection)": "IIIF-Manifest (zbirka)", + "IIIF manifest (current document)": "IIIF-Manifest (trenutno)", + "Image filters": "Filteri slike", + "Info": "Info", + "Last page": "Posljednja stranica", + "License": "Licenca", + "Loading": "Učitavam", + "Logo": "Logo", + "Metadata": "Metapodaci", + "Next page": "Sljedeća stranica", + "Next section": "Sljedeća sekcija", + "No results": "Nema rezultata", + "Other Formats": "Ostali formati", + "page": "stranica", + "Page": "Stranica", + "pages": "stranice", + "Pages": "Stranice", + "PDFs for each element": "PDF za svaki element", + "Previous page": "Prethodna stranica", + "Previous section": "Prethodna sekcija", + "Related Resources": "Povezani resursi", + "Renderings": "Renderiranja", + "Report a bug": "Prijavi grešku", + "Reset": "Reset", + "Rotate": "Rotiraj", + "Saturation": "Zasićenje", + "Scan": "Sken", + "Source code": "Izvorni kod", + "Table of Contents": "Sadržaj", + "Title": "Naslov", + "Toggle double-page": "Dvije stranice na stranici", + "Toggle image filters": "Filtri slika", + "User guide": "Korisnički vodič", + "Version": "Verzija", + "View": "Pogled", + "Zoom in": "Uvećaj", + "Zoom out": "Umanji" +} diff --git a/205/translations/it.json b/205/translations/it.json new file mode 100644 index 00000000..77544540 --- /dev/null +++ b/205/translations/it.json @@ -0,0 +1,55 @@ +{ + "$language": "Italiano", + "About TIFY": "Informazioni su TIFY", + "Brightness": "Luminosità", + "Close PDF list": "Chiudi l’elenco dei PDF", + "Collapse all": "Comprimi tutto", + "Collapse": "Comprimi", + "Collection": "Collezione", + "Contents": "Contenuto", + "Contrast": "Contrasto", + "Current Element": "Elemento corrente", + "Current page:": "Pagina corrente:", + "Description": "Descrizione", + "Document": "Documento", + "Download Individual Images": "Scarica le singole immagini", + "Exit fullscreen": "Esci dalla modalità a schermo intero", + "Expand all": "Espandi tutto", + "Expand": "Espandi", + "Export": "Esporta", + "First page": "Prima pagina", + "Fullscreen": "Schermo intero", + "Fulltext not available for this page": "Testo integrale non disponibile per questa pagina", + "Fulltext": "Testo integrale", + "Help": "Aiuto", + "IIIF manifest": "Manifest IIIF", + "Info": "Informazioni", + "Last page": "Ultima pagina", + "License": "Licenza", + "Loading": "Caricamento", + "Metadata": "Metadati", + "Next page": "Pagina successiva", + "Next section": "Sezione successiva", + "Other Formats": "Altri formati", + "page": "pagina", + "Page": "Pagina", + "pages": "pagine", + "Pages": "Pagine", + "PDFs for each element": "PDF per ogni elemento", + "Previous page": "Pagina precedente", + "Previous section": "Sezione precedente", + "Related Resources": "Risorse correlate", + "Renderings": "Rendering", + "Reset": "Ripristina", + "Rotate": "Ruota", + "Saturation": "Saturazione", + "Scan": "Scansione", + "Source code": "Codice sorgente", + "Table of Contents": "Indice", + "Title": "Titolo", + "Toggle double-page": "Attiva/disattiva doppia pagina", + "Toggle image filters": "Attiva/disattiva filtri immagine", + "View": "Vista", + "Zoom in": "Zoom in", + "Zoom out": "Zoom out" +} diff --git a/205/translations/nl.json b/205/translations/nl.json new file mode 100644 index 00000000..3a6f9b5d --- /dev/null +++ b/205/translations/nl.json @@ -0,0 +1,71 @@ +{ + "$language": "Nederlands", + "$copyright": "Copyright © 2017–2025 Universiteit Göttingen / Staats- en universiteitsbibliotheek Göttingen", + "$info": "TIFY is een lichtgewicht en voor mobiel geoptimaliseerde IIIF-documentviewer, uitgebracht onder de GNU Affero General Public License 3.0.", + "About TIFY": "Over TIFY", + "Brightness": "Helderheid", + "Close PDF list": "PDF-lijst sluiten", + "Collapse": "Inklappen", + "Collapse all": "Alles inklappen", + "Collection": "Collectie", + "Contents": "Inhoud", + "Contrast": "Contrast", + "Contributors": "Bijdragers", + "Could not load child manifest": "Kon het kind manifest niet laden", + "Current Element": "Huidig element", + "Current page:": "Huidige pagina:", + "Description": "Beschrijving", + "Dismiss": "Verbergen", + "Document": "Document", + "Download Individual Images": "Afzonderlijke afbeeldingen downloaden", + "Exit fullscreen": "Sluit de volledig scherm", + "Expand": "Uitklappen", + "Expand all": "Alles uitklappen", + "Export": "Export", + "Filter collection": "Collectie filter", + "Filter pages": "Filter pagina’s", + "First page": "Eerste pagina", + "Fullscreen": "Volledige scherm", + "Fulltext": "Volledige tekst", + "Fulltext not available for this page": "Volledige tekst niet beschikbaar", + "Help": "Help", + "IIIF manifest": "IIIF-Manifest", + "IIIF manifest (collection)": "IIIF-Manifest (collectie)", + "IIIF manifest (current document)": "IIIF-Manifest (document)", + "Image filters": "Afbeeldingsfilter", + "Info": "Info", + "Last page": "Laatste pagina", + "License": "Licentie", + "Loading": "Word geladen", + "Logo": "Logo", + "Metadata": "Metadata", + "Next page": "Volgende pagina", + "Next section": "Volgende sectie", + "No results": "Geen resultaten", + "Other Formats": "Andere formaten", + "page": "pagina", + "Page": "Pagina", + "pages": "pagina’s", + "Pages": "Pagina’s", + "PDFs for each element": "PDF’s voor individuele elementen", + "Previous page": "Vorige pagina", + "Previous section": "Vorige sectie", + "Related Resources": "Gerelateerde bronnen", + "Renderings": "Afbeeldingsgegevens", + "Report a bug": "Meld een fout", + "Reset": "Reset", + "Rotate": "Draaien", + "Saturation": "Verzadiging", + "Scan": "Scan", + "Source code": "Broncode", + "Table of Contents": "Inhoudsopgave", + "Title": "Titel", + "Toggle double-page": "Dubbele pagina wisselen", + "Toggle image filters": "Schakel afbeeldingsfilter in", + "Toggle page select": "Schakel paginaselectie in", + "User guide": "Handleiding", + "Version": "Versie", + "View": "Weergave", + "Zoom in": "Vergroten", + "Zoom out": "Verkleinen" +} diff --git a/205/translations/pl.json b/205/translations/pl.json new file mode 100644 index 00000000..5d3b117b --- /dev/null +++ b/205/translations/pl.json @@ -0,0 +1,55 @@ +{ + "$language": "Polski", + "About TIFY": "Więcej o TIFY", + "Brightness": "Jasność", + "Close PDF list": "Zamknij liste plików PDF", + "Collapse all": "Zwiń wszystko", + "Collapse": "Zwiń", + "Collection": "Kolekcja", + "Contents": "Zawartość", + "Contrast": "Kontrast", + "Current Element": "Obecny element", + "Current page:": "Obecna strona:", + "Description": "Opis", + "Document": "Dokument", + "Download Individual Images": "Pobierz obrazy indywidualnie", + "Exit fullscreen": "Wyjdź z trybu pełnoekranowego", + "Expand all": "Rozwiń wszystko", + "Expand": "Rozwiń", + "Export": "Eksportuj", + "First page": "Pierwsza Strona", + "Fullscreen": "Widok pełnoekranowy", + "Fulltext not available for this page": "Pełen tekst niedostępny dla tej strony", + "Fulltext": "Pełen tekst", + "Help": "Pomoc", + "IIIF manifest": "Manifest IIIF", + "Info": "Informacje", + "Last page": "Ostatnia strona", + "License": "Licencja", + "Loading": "Ładowanie", + "Metadata": "Metadane", + "Next page": "Następna strona", + "Next section": "Następna sekcja", + "Other Formats": "Inne formaty", + "page": "strona", + "Page": "Strona", + "pages": "strony", + "Pages": "Strony", + "PDFs for each element": "Pliki PDF dla każdego elementy", + "Previous page": "Poprzednia strona", + "Previous section": "Poprzednia sekcja", + "Related Resources": "Powiązane zasoby", + "Renderings": "Rendery", + "Reset": "Reset", + "Rotate": "Obróć", + "Saturation": "Saturacja", + "Scan": "Skanuj", + "Source code": "Kod źródłowy", + "Table of Contents": "Spis treści", + "Title": "Tytuł", + "Toggle double-page": "Przejdź do widoku dwóch stron", + "Toggle image filters": "Włącz filtry obrazów", + "View": "Widok", + "Zoom in": "Przybliżenie", + "Zoom out": "Oddalenie" +}