/*! * viewer.js v1.10.5 * https://fengyuanchen.github.io/viewerjs * * copyright 2015-present chen fengyuan * released under the mit license * * date: 2022-04-05t08:21:02.491z */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalthis?globalthis:t||self).viewer=e()}(this,function(){"use strict";function s(e,t){var i,n=object.keys(e);return object.getownpropertysymbols&&(i=object.getownpropertysymbols(e),t&&(i=i.filter(function(t){return object.getownpropertydescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function q(n){for(var t=1;t=this.length||this.viewed&&t===this.index)return this;if(!this.isshown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var e=this.element,n=this.options,o=this.title,s=this.canvas,a=this.items[t],r=a.queryselector("img"),h=y(r,"originalurl"),l=r.getattribute("alt"),c=document.createelement("img");if(s(n.inheritedattributes,function(t){var e=r.getattribute(t);null!==e&&c.setattribute(t,e)}),c.src=h,c.alt=l,a(n.view)&&m(e,"view",n.view,{once:!0}),!1===p(e,"view",{originalimage:this.images[t],index:t,image:c})||!this.isshown||this.hiding||this.played)return this;function u(){var t=i.imagedata,e=array.isarray(n.title)?n.title[1]:n.title;o.innerhtml=e(e=a(e)?e.call(i,c,t):"".concat(l," (").concat(t.naturalwidth," × ").concat(t.naturalheight,")"))?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):e}var d,m,h=this.items[this.index];h&&(f(h,f),h.removeattribute("aria-selected")),r(a,f),a.setattribute("aria-selected",!0),n.focus&&a.focus(),this.image=c,this.viewed=!1,this.index=t,this.imagedata={},r(c,p),n.loading&&r(s,b),s.innerhtml="",s.appendchild(c),this.renderlist(),o.innerhtml="";return m(e,z,u,{once:!0}),this.viewing={abort:function(){x(e,z,u),c.complete?i.imagerendering?i.imagerendering.abort():i.imageinitializing&&i.imageinitializing.abort():(c.src="",x(c,y,d),i.timeout&&cleartimeout(i.timeout))}},c.complete?this.load():(m(c,y,d=function(){x(c,x,m),i.load()},{once:!0}),m(c,x,m=function(){x(c,y,d),i.timeout&&(cleartimeout(i.timeout),i.timeout=!1),f(c,p),n.loading&&f(i.canvas,b)},{once:!0}),this.timeout&&cleartimeout(this.timeout),this.timeout=settimeout(function(){f(c,p),i.timeout=!1},1e3)),this},prev:function(){var t=this.index-1;return t<0&&(t=0math.abs(r)&&(this.pointers={},1
',d=(i=d.queryselector(".".concat(g,"-container"))).queryselector(".".concat(g,"-title")),n=i.queryselector(".".concat(g,"-toolbar")),m=i.queryselector(".".concat(g,"-navbar")),o=i.queryselector(".".concat(g,"-button")),a=i.queryselector(".".concat(g,"-canvas")),this.parent=e,this.viewer=i,this.title=d,this.toolbar=n,this.navbar=m,this.button=o,this.canvas=a,this.footer=i.queryselector(".".concat(g,"-footer")),this.tooltipbox=i.queryselector(".".concat(g,"-tooltip")),this.player=i.queryselector(".".concat(g,"-player")),this.list=i.queryselector(".".concat(g,"-list")),i.id="".concat(g).concat(this.id),d.id="".concat(g,"title").concat(this.id),r(d,s.title?tt(array.isarray(s.title)?s.title[0]:s.title):v),r(m,s.navbar?tt(s.navbar):v),n(o,v,!s.button),s.keyboard&&o.setattribute("tabindex",0),s.backdrop&&(r(i,"".concat(g,"-backdrop")),s.inline||"static"===s.backdrop||bt(a,ct,"hide")),e(s.classname)&&s.classname&&s.classname.split(ut).foreach(function(t){r(i,t)}),s.toolbar?(r=document.createelement("ul"),h=i(s.toolbar),l=dt.slice(0,3),c=dt.slice(7,9),u=dt.slice(9),h||r(n,tt(s.toolbar)),s(h?s.toolbar:dt,function(t,e){var i,n=h&&i(t),e=h?pt(e):t,o=n&&!d(t.show)?t.show:t;!o||!s.zoomable&&-1!==l.indexof(e)||!s.rotatable&&-1!==c.indexof(e)||!s.scalable&&-1!==u.indexof(e)||(i=n&&!d(t.size)?t.size:t,n=n&&!d(t.click)?t.click:t,t=document.createelement("li"),s.keyboard&&t.setattribute("tabindex",0),t.setattribute("role","button"),r(t,"".concat(g,"-").concat(e)),a(n)||bt(t,ct,e),t(o)&&r(t,tt(o)),-1!==["small","large"].indexof(i)?r(t,"".concat(g,"-").concat(i)):"play"===e&&r(t,"".concat(g,"-large")),a(n)&&m(t,w,n),r.appendchild(t))}),n.appendchild(r)):r(n,v),s.rotatable||(r(d=n.queryselectorall('li[class*="rotate"]'),p),s(d,function(t){n.appendchild(t)})),s.inline?(r(o,v),c(i,{zindex:s.zindexinline}),"static"===window.getcomputedstyle(e).position&&c(e,{position:"relative"}),e.insertbefore(i,t.nextsibling)):(r(o,j),r(i,b),r(i,h),r(i,v),c(i,{zindex:s.zindex}),(m=(m=e(m=s.container)?t.ownerdocument.queryselector(m):m)||this.body).appendchild(i)),s.inline&&(this.render(),this.bind(),this.isshown=!0),this.ready=!0,a(s.ready)&&m(t,rt,s.ready,{once:!0}),!1===p(t,rt)?this.ready=!1:this.ready&&s.inline&&this.view(this.index))}}])&&r(t.prototype,e),i&&r(t,i),object.defineproperty(t,"prototype",{writable:!1}),o}();return o(e.prototype,i,t,at,st,ot),e});