/*! * viewer.js v1.11.3 * https://fengyuanchen.github.io/viewerjs * * copyright 2015-present chen fengyuan * released under the mit license * * date: 2023-03-05t07:01:17.741z */ !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)){if(!this.isshown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var e,n,o,s=this.element,a=this.options,r=this.title,l=this.canvas,h=this.items[t],c=h.queryselector("img"),u=n(c,"originalurl"),d=c.getattribute("alt"),m=document.createelement("img");a(a.inheritedattributes,function(t){var e=c.getattribute(t);null!==e&&m.setattribute(t,e)}),m.src=u,m.alt=d,i(a.view)&&x(s,"view",a.view,{once:!0}),!1===p(s,"view",{originalimage:this.images[t],index:t,image:m})||!this.isshown||this.hiding||this.played||((u=this.items[this.index])&&(m(u,f),u.removeattribute("aria-selected")),r(h,f),h.setattribute("aria-selected",!0),a.focus&&h.focus(),this.image=m,this.viewed=!1,this.index=t,this.imagedata={},r(m,p),a.loading&&r(l,b),l.innerhtml="",l.appendchild(m),this.renderlist(),r.innerhtml="",x(s,z,e=function(){var t=i.imagedata,e=array.isarray(a.title)?a.title[1]:a.title;r.innerhtml=t(e=i(e)?e.call(i,m,t):"".concat(d," (").concat(t.naturalwidth," × ").concat(t.naturalheight,")"))?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):e},{once:!0}),this.viewing={abort:function(){y(s,z,e),m.complete?i.imagerendering?i.imagerendering.abort():i.imageinitializing&&i.imageinitializing.abort():(m.src="",y(m,y,n),i.timeout&&cleartimeout(i.timeout))}},m.complete?this.load():(x(m,y,n=function(){y(m,x,o),i.load()},{once:!0}),x(m,x,o=function(){y(m,y,n),i.timeout&&(cleartimeout(i.timeout),i.timeout=!1),m(m,p),a.loading&&m(i.canvas,b)},{once:!0}),this.timeout&&cleartimeout(this.timeout),this.timeout=settimeout(function(){m(m,p),i.timeout=!1},1e3)))}return 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),f(o,v,!s.button),s.keyboard&&o.setattribute("tabindex",0),s.backdrop&&(r(i,"".concat(g,"-backdrop")),s.inline||"static"===s.backdrop||pt(a,ht,"hide")),t(s.classname)&&s.classname&&s.classname.split(ct).foreach(function(t){r(i,t)}),s.toolbar?(r=document.createelement("ul"),l=s(s.toolbar),h=ut.slice(0,3),c=ut.slice(7,9),u=ut.slice(9),l||r(n,tt(s.toolbar)),a(l?s.toolbar:ut,function(t,e){var i,n=l&&s(t),e=l?vt(e):t,o=n&&!d(t.show)?t.show:t;!o||!s.zoomable&&-1!==h.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)),i(n)||pt(t,ht,e),e(o)&&r(t,tt(o)),-1!==["small","large"].indexof(i)?r(t,"".concat(g,"-").concat(i)):"play"===e&&r(t,"".concat(g,"-large")),i(n)&&x(t,w,n),r.appendchild(t))}),n.appendchild(r)):r(n,v),s.rotatable||(r(d=n.queryselectorall('li[class*="rotate"]'),p),a(d,function(t){n.appendchild(t)})),s.inline?(r(o,u),c(i,{zindex:s.zindexinline}),"static"===window.getcomputedstyle(e).position&&c(e,{position:"relative"}),e.insertbefore(i,t.nextsibling)):(r(o,h),r(i,v),r(i,b),r(i,v),c(i,{zindex:s.zindex}),(m=(m=t(m=s.container)?t.ownerdocument.queryselector(m):m)||this.body).appendchild(i)),s.inline&&(this.render(),this.bind(),this.isshown=!0),this.ready=!0,i(s.ready)&&x(t,"ready",s.ready,{once:!0}),!1===p(t,"ready")?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,st,it,at),e});