"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"==("undefined"==typeof module?"undefined":_typeof(module))&&"object"==_typeof(module.exports)?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("Viewer requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:void 0,function(m,e){function a(e){return we.call(e).slice(8,-1).toLowerCase()}function u(e){return"string"==typeof e}function f(e){return"number"==typeof e&&!isNaN(e)}function o(e){return void 0===e}function r(e){return"object"==(void 0===e?"undefined":_typeof(e))&&null!==e}function v(e){return"function"===a(e)}function s(e,t){return t=0<=t?t:0,Array.from?Array.from(e).slice(t):be.call(e,t)}function l(i,e){var n=-1;return e.indexOf?e.indexOf(i):(g(e,function(e,t){return e===i?(n=t,!1):void 0}),n)}function c(e){return u(e)&&(e=e.trim?e.trim():e.replace(i,"1")),e}function g(e,t){var i,n;if(e&&v(t))if(function(e){return Array.isArray?Array.isArray(e):"array"===a(e)}(e)||f(e.length))for(n=0,i=e.length;n'+n+''))}),e.innerHTML=l.join(""),g(Y(e,"img"),function(e){D(e,"filled",!0),E(e,te,d(o.loadImage,o),!0)}),o.items=Y(e,"li"),r.transition&&E(s,se,function(){b(e,Z)},!0)},renderList:function(e){var t=this,i=e||t.index,n=t.items[i].offsetWidth||30,a=n+1;h(t.list,{width:a*t.length,marginLeft:(t.viewerData.width-n)/2-a*i})},resetList:function(){X(this.list),y(this.list,Z),h({marginLeft:0})},initImage:function(s){var l=this,u=l.options,e=l.image,t=l.viewerData,i=l.footer.offsetHeight,c=t.width,d=he(t.height-i,i),h=l.imageData||{};n(e,function(e,t){var i,n,a=e/t,o=c,r=d;c=r.length||r.isViewed&&e===r.index||!1===I(s,re)||(a=z(n=Y(i=r.items[e],"img")[0],"originalUrl"),o=n.getAttribute("alt"),(t=C.createElement("img")).src=a,t.alt=o,r.image=t,r.isViewed&&y(r.items[r.index],j),b(i,j),r.isViewed=!1,r.index=e,r.imageData=null,b(u,U),X(u),S(u,t),r.renderList(),X(l),E(s,se,function(){var e=r.imageData,t=e.naturalWidth,i=e.naturalHeight;V(l,o+" ("+t+" × "+i+")")},!0),t.complete?r.load():(E(t,te,d(r.load,r),!0),r.timeout&&clearTimeout(r.timeout),r.timeout=setTimeout(function(){y(t,U),r.timeout=!1},1e3))),r},prev:function(){return this.view(he(this.index-1,0)),this},next:function(){return this.view(de(this.index+1,this.length-1)),this},move:function(e,t){var i=this.imageData;return this.moveTo(o(e)?e:i.left+Number(e),o(t)?t:i.top+Number(t)),this},moveTo:function(e,t){var i=this,n=i.imageData,a=!1;return o(t)&&(t=e),e=Number(e),t=Number(t),i.isViewed&&!i.isPlayed&&i.options.movable&&(f(e)&&(n.left=e,a=!0),f(t)&&(n.top=t,a=!0),a&&i.renderImage()),i},zoom:function(e,t,i){var n=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,t,i),this},zoomTo:function(e,t,i,n){var a,o,r,s,l=this,u=l.options,c=.01,d=100,h=l.imageData;return f(e=he(0,e))&&l.isViewed&&!l.isPlayed&&(n||u.zoomable)&&(n||(c=he(c,u.minZoomRatio),d=de(d,u.maxZoomRatio),e=de(he(e,c),d)),.95me(l)&&(1
';var ye=m.Viewer;return A.noConflict=function(){return m.Viewer=ye,A},A.setDefaults=function(e){w(A.DEFAULTS,e)},"function"==typeof define&&define.amd&&define("viewer",[],function(){return A}),e||(m.Viewer=A),A});