universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
1 lines • 97.3 kB
JavaScript
"use strict";(self.webpackChunkUV=self.webpackChunkUV||[]).push([[429],{9594:(t,e,n)=>{n.d(e,{M:()=>l});var i,o=n(4194),s=n(9323),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=n(4692),l=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.create=function(){var e,n=this;this.setConfig("settingsDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_SETTINGS_DIALOGUE,this.closeCommand=o.b.HIDE_SETTINGS_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){e=t,n.open()})),this.extensionHost.subscribe(this.closeCommand,(function(){e&&e.focus(),n.close()})),this.$title=r('<div role="heading" class="heading"></div>'),this.$content.append(this.$title),this.$scroll=r('<div class="scroll"></div>'),this.$content.append(this.$scroll),this.$version=r('<div class="version"></div>'),this.$content.append(this.$version),this.$website=r('<div class="website"></div>'),this.$content.append(this.$website),this.$locale=r('<div class="setting locale"></div>'),this.$scroll.append(this.$locale),this.$localeLabel=r('<label for="locale">'+this.content.locale+"</label>"),this.$locale.append(this.$localeLabel),this.$localeDropDown=r('<select id="locale"></select>'),this.$locale.append(this.$localeDropDown),this.$title.text(this.content.title),this.$website.html(this.content.website),this.$website.targetBlank(),this._createLocalesMenu(),this._createAccessibilityMenu(),this.$element.hide()},e.prototype.getSettings=function(){return this.extension.getSettings()},e.prototype.updateSettings=function(t){this.extension.updateSettings(t),this.extensionHost.publish(o.b.UPDATE_SETTINGS,t)},e.prototype.open=function(){t.prototype.open.call(this),this.$version.text("v4.2.0")},e.prototype._createLocalesMenu=function(){var t=this,e=this.extension.data.locales;if(e&&e.length>1){for(var n=0;n<e.length;n++){var i=e[n];this.$localeDropDown.append('<option value="'+i.name+'">'+i.label+"</option>")}this.$localeDropDown.val(e[0].name)}else this.$locale.hide();this.$localeDropDown.change((function(){t.extension.changeLocale(t.$localeDropDown.val())}))},e.prototype.resize=function(){t.prototype.resize.call(this)},e.prototype._createAccessibilityMenu=function(){var t=this;this.$reducedAnimation=r('<div class="setting reducedAnimation"></div>'),this.$scroll.append(this.$reducedAnimation),this.$reducedAnimationCheckbox=r('<input id="reducedAnimation" type="checkbox" tabindex="0" />'),this.$reducedAnimation.append(this.$reducedAnimationCheckbox),this.$reducedAnimationLabel=r('<label for="reducedAnimation">'+this.content.reducedMotion+"</label>"),this.$reducedAnimation.append(this.$reducedAnimationLabel);var e=this.getSettings();e.animationDuration&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(e.animationDuration,"ms")),e.reducedAnimation?(document.documentElement.style.setProperty("--uv-animation","0"),this.$reducedAnimationCheckbox.prop("checked",!0)):(document.documentElement.style.setProperty("--uv-animation","1"),this.$reducedAnimationCheckbox.removeAttr("checked")),this.$reducedAnimationCheckbox.change((function(){var e={};t.$reducedAnimationCheckbox.is(":checked")?(e.reducedAnimation=!0,document.documentElement.style.setProperty("--uv-animation","0")):(e.reducedAnimation=!1,document.documentElement.style.setProperty("--uv-animation","1")),t.updateSettings(e)}))},e}(s.X)},4792:(t,e,n)=>{n.d(e,{C:()=>c});var i,o=n(4342),s=n(4194),a=n(9323),r=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=n(4692),c=function(t){function e(e){var n=t.call(this,e)||this;return n.copyToClipboardEnabled=!0,n.isShareViewVisible=!1,n.shareManifestsEnabled=!1,n.isEmbedViewVisible=!1,n.aspectRatio=.75,n.maxWidth=8e3,n.maxHeight=n.maxWidth*n.aspectRatio,n.minWidth=200,n.minHeight=n.minWidth*n.aspectRatio,n}return r(e,t),e.prototype.create=function(){var e,n,i=this;this.setConfig("shareDialogue"),t.prototype.create.call(this),this.$element.attr("role","region"),this.$element.attr("aria-label",this.content.share),this.openCommand=s.b.SHOW_SHARE_DIALOGUE,this.closeCommand=s.b.HIDE_SHARE_DIALOGUE,this.shareManifestsEnabled=this.options.shareManifestsEnabled||!1,this.extensionHost.subscribe(this.openCommand,(function(t){n=t,i.open(t)})),this.extensionHost.subscribe(this.closeCommand,(function(){n&&n.focus(),i.close()})),this.extensionHost.subscribe(s.b.SHOW_EMBED_DIALOGUE,(function(t){i.open(t),t&&l(t).is(".embed.btn")&&setTimeout((function(){i.$embedCode.focus()}),2)}));var a=l('<div role="heading" class="heading">'.concat(this.content.share,"</div>"));this.$content.append(a),this.$urlSection=l('<div class="share__section"><label class="share__label" for="embedCode">'.concat(this.content.shareLink,"</label></div>"));var r=this.getShareUrl();this.$urlInput=l('<input class="copy-input" id="urlInput" type="text" value="'.concat(r,'" readonly/>')),this.$urlInput.focus((function(){l(this).select()})),this.$urlSection.append(this.$urlInput),this.$content.append(this.$urlSection),this.$manifestSection=l('<div class="share__section"><label class="share__label" for="manifestCode">'.concat(this.content.iiif,"</label></div>"));var c=this.extension.getIIIFShareUrl(this.shareManifestsEnabled);this.$manifestInput=l('<input class="copy-input" id="manifestInput" type="text" value="'.concat(c,'" readonly/>')),this.$manifestInput.focus((function(){l(this).select()})),this.$manifestSection.append(this.$manifestInput),this.$content.append(this.$manifestSection),this.$embedSection=l('<div class="share__section"><label class="share__label" for="embedCode">'.concat(this.content.embed,"</label></div>")),this.$embedCode=l('<input class="copy-input" id="embedCode" type="text" readonly/>'),this.$embedCode.focus((function(){l(this).select()})),this.$embedSection.append(this.$embedCode),this.$content.append(this.$embedSection),this.$customSize=l('<div class="customSize"></div>'),this.$size=l('<label for="size" class="size">'.concat(this.content.size,"</label>")),this.$customSize.append(this.$size),this.$customSizeDropDown=l('<select class="embed-size-select" id="size" aria-label="'.concat(this.content.size,'"></select>')),this.$customSizeDropDown.append('<option value="small" data-width="560" data-height="420">560 x 420</option>'),this.$customSizeDropDown.append('<option value="medium" data-width="640" data-height="480">640 x 480</option>'),this.$customSizeDropDown.append('<option value="large" data-width="800" data-height="600">800 x 600</option>'),this.$customSizeDropDown.append('<option value="custom">'.concat(this.content.customSize,"</option>")),this.$customSizeDropDown.change((function(){i.update()})),this.$customSize.append(this.$customSizeDropDown),this.$widthInput=l('<input class="width" type="text" maxlength="10" aria-label="'.concat(this.content.width,'"/>')),this.$widthInput.on("keydown",(function(t){return o.FQ.numericalInput(t)})),this.$widthInput.change((function(){i.updateHeightRatio(),i.update()})),this.$customSize.append(this.$widthInput),this.$embedSection.append(this.$customSize),this.$x=l('<span class="x">x</span>'),this.$customSize.append(this.$x),this.$heightInput=l('<input class="height" type="text" maxlength="10" aria-label="'.concat(this.content.height,'"/>')),this.$heightInput.on("keydown",(function(t){return o.FQ.numericalInput(t)})),this.$heightInput.change((function(){i.updateWidthRatio(),i.update()})),this.$customSize.append(this.$heightInput);var h=l('<div class="iiif-section"></div>');this.$iiifButton=l('<a class="imageBtn iiif" href="'.concat(c,'" title="').concat(this.content.iiif,'" target="_blank"></a>')),h.append(this.$iiifButton),this.$content.append(h),this.$termsOfUseButton=l('<a href="#">'.concat(null===(e=this.extension.data.config)||void 0===e?void 0:e.content.termsOfUse,"</a>")),h.append(this.$termsOfUseButton),this.shareManifestsEnabled?this.$manifestSection.show():this.$manifestSection.hide(),o.YA.getBool(this.config.options.embedEnabled,!1)?this.$embedSection.show():this.$embedSection.hide(),this.onAccessibleClick(this.$termsOfUseButton,(function(){i.extensionHost.publish(s.b.SHOW_TERMS_OF_USE)})),o.YA.getBool(this.config.options.copyToClipboardEnabled,!0)&&(this.addCopyButton(this.$urlInput),this.addCopyButton(this.$embedCode),this.addCopyButton(this.$manifestInput)),this.$element.hide(),this.update()},e.prototype.open=function(e){t.prototype.open.call(this,e),this.update()},e.prototype.getShareUrl=function(){return this.extension.getShareUrl()},e.prototype.isShareAvailable=function(){return!!this.getShareUrl()},e.prototype.addCopyButton=function(t){var e=l('<button class="copyBtn" aria-label="'.concat(this.content.copyToClipboard,'">').concat(this.content.copyBtn,"</button>"));this.onAccessibleClick(e,(function(){o.B0.copy(t.val()),t.focus()}),!0,!0);var n=l('<div class="copy-group"></div>');n.append(e),n.insertBefore(t),t.insertBefore(e)},e.prototype.update=function(){this.isShareAvailable()?this.$urlSection.show():this.$urlSection.hide();var t=this.getSelectedSize();"custom"===t.val()?(this.$widthInput.show(),this.$x.show(),this.$heightInput.show()):(this.$widthInput.hide(),this.$x.hide(),this.$heightInput.hide(),this.currentWidth=Number(t.data("width")),this.currentHeight=Number(t.data("height")),this.$widthInput.val(String(this.currentWidth)),this.$heightInput.val(String(this.currentHeight))),this.updateShareOptions(),this.updateTermsOfUseButton()},e.prototype.updateShareOptions=function(){var t=this.getShareUrl();t&&this.$urlInput.val(t)},e.prototype.getSelectedSize=function(){return this.$customSizeDropDown.find(":selected")},e.prototype.updateWidthRatio=function(){this.currentHeight=Number(this.$heightInput.val()),this.currentHeight<this.minHeight?(this.currentHeight=this.minHeight,this.$heightInput.val(String(this.currentHeight))):this.currentHeight>this.maxHeight&&(this.currentHeight=this.maxHeight,this.$heightInput.val(String(this.currentHeight))),this.currentWidth=Math.floor(this.currentHeight/this.aspectRatio),this.$widthInput.val(String(this.currentWidth))},e.prototype.updateHeightRatio=function(){this.currentWidth=Number(this.$widthInput.val()),this.currentWidth<this.minWidth?(this.currentWidth=this.minWidth,this.$widthInput.val(String(this.currentWidth))):this.currentWidth>this.maxWidth&&(this.currentWidth=this.maxWidth,this.$widthInput.val(String(this.currentWidth))),this.currentHeight=Math.floor(this.currentWidth*this.aspectRatio),this.$heightInput.val(String(this.currentHeight))},e.prototype.updateTermsOfUseButton=function(){var t,e=this.extension.helper.getRequiredStatement();o.YA.getBool(null===(t=this.extension.data.config)||void 0===t?void 0:t.options.termsOfUseEnabled,!0)&&e&&e.value?this.$termsOfUseButton.show():this.$termsOfUseButton.hide()},e.prototype.close=function(){t.prototype.close.call(this)},e.prototype.resize=function(){this.setDockedPosition()},e}(a.X)},6192:(t,e,n)=>{n.d(e,{Q:()=>f});var i,o=n(4194),s=n(4342),a=n(8719),r=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){return t.call(this,e,!1,!1)||this}return r(e,t),e.prototype.create=function(){t.prototype.create.call(this)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),s.YA.getBool(this.extension.getSettings().rightPanelOpen,this.options.panelOpen)&&this.toggle(!0),this.extensionHost.subscribe(o.b.TOGGLE_EXPAND_RIGHT_PANEL,(function(){e.isFullyExpanded?e.collapseFull():e.expandFull()})),this.extensionHost.subscribe(o.b.TOGGLE_RIGHT_PANEL,(function(){e.toggle()})),this.extensionHost.subscribe(o.b.TOGGLE_LEFT_PANEL,(function(){e.extension.isMetric("sm")&&e.isExpanded&&e.toggle(!0)}))},e.prototype.getTargetWidth=function(){return this.isExpanded?this.options.panelCollapsedWidth:this.options.panelExpandedWidth},e.prototype.getTargetLeft=function(){return this.isExpanded?this.$element.parent().width()-this.options.panelCollapsedWidth:this.$element.parent().width()-this.options.panelExpandedWidth},e.prototype.toggleFinish=function(){var e=this;t.prototype.toggleFinish.call(this),this.isExpanded?this.extensionHost.publish(o.b.OPEN_RIGHT_PANEL):this.extensionHost.publish(o.b.CLOSE_RIGHT_PANEL),this.extension.updateSettings({rightPanelOpen:this.isExpanded}),setTimeout((function(){e.$element.toggleClass("open-finished")}),100)},e.prototype.resize=function(){t.prototype.resize.call(this)},e.prototype.toggle=function(e){this.isExpanded?this.$element.parent().removeClass("rightPanelOpen"):this.$element.parent().addClass("rightPanelOpen"),t.prototype.toggle.call(this,e)},e.prototype.expandFull=function(){t.prototype.expandFull.call(this)},e}(a.k),c=n(41),h=n(1539),u=n(4995),p=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),d=n(4692),f=function(t){function e(e){return t.call(this,e)||this}return p(e,t),e.prototype.create=function(){var e=this;this.setConfig("moreInfoRightPanel"),t.prototype.create.call(this),this.extensionHost.subscribe(o.b.CANVAS_INDEX_CHANGE,(function(){e.databind()})),this.extensionHost.subscribe(o.b.RANGE_CHANGE,(function(){e.databind()})),this.setTitle(this.config.content.title),this.$metadata=d('<article class="iiif-metadata-component"></article>'),this.$main.append(this.$metadata),this.metadataComponent=new u.MetadataComponent({target:this.$metadata[0],data:this._getData()}),this.metadataComponent.on("iiifViewerLinkClicked",(function(t){var n=s.f.getHashParameterFromString("rid",t),i=s.f.getHashParameterFromString("t",t);if(n&&null===i&&(a=e.extension.helper.getRangeById(n))&&e.extensionHost.publish(o.b.RANGE_CHANGE,a),null!==i){var a,r=Number(i);Number.isNaN(r)||(n?(a=e.extension.helper.getRangeById(n))&&e.extensionHost.publish(o.b.RANGE_TIME_CHANGE,{rangeId:a.id,time:r}):e.extensionHost.publish(o.b.CURRENT_TIME_CHANGE,r))}}),!1)},e.prototype.toggleFinish=function(){t.prototype.toggleFinish.call(this),this.databind()},e.prototype.databind=function(){this.metadataComponent.set(this._getData())},e.prototype._getCurrentRange=function(){return this.extension.helper.getCurrentRange()},e.prototype._getData=function(){var t=this.extension.getCurrentCanvases();return{canvasDisplayOrder:this.config.options.canvasDisplayOrder,canvases:t,canvasExclude:this.config.options.canvasExclude,canvasLabels:this.extension.getCanvasLabels(this.content.page),content:this.config.content,copiedMessageDuration:2e3,copyToClipboardEnabled:s.YA.getBool(this.config.options.copyToClipboardEnabled,!1),helper:this.extension.helper,licenseFormatter:new h.k9(this.content.license?this.content.license:{}),limit:this.config.options.textLimit||4,limitType:u.LimitType.LINES,limitToRange:s.YA.getBool(this.config.options.limitToRange,!1),manifestDisplayOrder:this.config.options.manifestDisplayOrder,manifestExclude:this.config.options.manifestExclude,range:this._getCurrentRange(),rtlLanguageCodes:this.config.options.rtlLanguageCodes,sanitizer:function(t){return(0,c.aj)(t)},showAllLanguages:this.config.options.showAllLanguages}},e.prototype.resize=function(){t.prototype.resize.call(this),this.$main.height(this.$element.height()-this.$top.height()-this.$main.verticalMargins()),this.$main.attr("tabindex",0),this.$main.attr("aria-label",this.config.content.title),this.$metadata.height()<=this.$main.height()&&(this.$main.removeAttr("tabindex"),this.$main.removeAttr("aria-label"))},e}(l)},8719:(t,e,n)=>{n.d(e,{k:()=>l});var i,o=n(4342),s=n(4598),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=n(4692),l=function(t){function e(e,n,i){void 0===n&&(n=!1),void 0===i&&(i=!0);var o=t.call(this,e,n,i)||this;return o.isExpanded=!1,o.isFullyExpanded=!1,o.isUnopened=!0,o.autoToggled=!1,o.expandFullEnabled=!0,o}return a(e,t),e.prototype.create=function(){var e=this;t.prototype.create.call(this),this.$top=r('<div class="top"></div>'),this.$element.append(this.$top),this.$title=r('<h2 class="title"></h2>'),this.$top.append(this.$title),this.$expandFullButton=r('<a class="expandFullButton" tabindex="0"></a>'),this.$top.append(this.$expandFullButton),o.YA.getBool(this.config.options.expandFullEnabled,!0)||this.$expandFullButton.hide(),this.$collapseButton=r('<button role="button" class="collapseButton" tabindex="0"></button>'),this.$top.append(this.$collapseButton),this.$closed=r('<div class="closed"></div>'),this.$element.append(this.$closed),this.$expandButton=r('<button role="button" class="expandButton" tabindex="0"></button>'),this.$expandButton.prop("title",this.content.expand),this.$closed.append(this.$expandButton),this.$closedTitle=r('<a class="title"></a>'),this.$closed.append(this.$closedTitle),this.$main=r('<div class="main"></div>'),this.$element.append(this.$main),this.onAccessibleClick(this.$expandButton,(function(){e.toggle()})),this.$expandFullButton.on("click",(function(){e.expandFull()})),this.$closedTitle.on("click",(function(){e.toggle()})),this.$title.on("click",(function(){e.isFullyExpanded?e.collapseFull():e.toggle()})),this.onAccessibleClick(this.$collapseButton,(function(){e.isFullyExpanded?e.collapseFull():e.toggle()}))},e.prototype.init=function(){t.prototype.init.call(this)},e.prototype.setTitle=function(t){this.$title.text(t),this.$closedTitle.text(t)},e.prototype.toggle=function(t){var e,n,i=this,o=this.extension.getSettings(),s=o.reducedAnimation,a=document.documentElement.style.getPropertyValue("--uv-animation-duration");this.options.panelAnimationDuration&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(this.options.panelAnimationDuration,"ms")),this.autoToggled=!!t,this.$element.toggleClass("open"),this.isExpanded&&(this.$top.attr("aria-hidden","true"),this.$main.attr("aria-hidden","true"),this.$closed.attr("aria-hidden","false"));var r=0;s||(r=(null!==(n=null!==(e=this.options.panelAnimationDuration)&&void 0!==e?e:o.animationDuration)&&void 0!==n?n:250)+50),setTimeout((function(){i.toggled(),a&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(a))}),r)},e.prototype.toggled=function(){this.toggleStart(),this.isExpanded=!this.isExpanded,this.isExpanded&&(this.$top.attr("aria-hidden","false"),this.$main.attr("aria-hidden","false"),this.$closed.attr("aria-hidden","true")),this.toggleFinish(),this.isUnopened=!1},e.prototype.expandFull=function(){var t,e,n=this,i=this.extension.getSettings(),o=i.reducedAnimation,s=document.documentElement.style.getPropertyValue("--uv-animation-duration");this.options.panelAnimationDuration&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(2*this.options.panelAnimationDuration,"ms")),this.expandFullStart();var a=0;o||(a=(null!==(e=null!==(t=this.options.panelAnimationDuration)&&void 0!==t?t:i.animationDuration)&&void 0!==e?e:250)+50,a*=2),setTimeout((function(){n.isExpanded||n.toggled(),n.expandFullFinish(),s&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(s))}),a)},e.prototype.collapseFull=function(){var t,e,n=this,i=this.extension.getSettings(),o=i.reducedAnimation,s=document.documentElement.style.getPropertyValue("--uv-animation-duration");this.options.panelAnimationDuration&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(2*this.options.panelAnimationDuration,"ms")),this.collapseFullStart();var a=0;o||(a=(null!==(e=null!==(t=this.options.panelAnimationDuration)&&void 0!==t?t:i.animationDuration)&&void 0!==e?e:250)+50,a*=2),setTimeout((function(){n.collapseFullFinish(),s&&document.documentElement.style.setProperty("--uv-animation-duration","".concat(s))}),a)},e.prototype.getTargetWidth=function(){return 0},e.prototype.getTargetLeft=function(){return 0},e.prototype.getFullTargetWidth=function(){return 0},e.prototype.getFullTargetLeft=function(){return 0},e.prototype.toggleStart=function(){},e.prototype.toggleFinish=function(){this.isExpanded&&!this.autoToggled?this.focusCollapseButton():this.focusExpandButton()},e.prototype.expandFullStart=function(){},e.prototype.expandFullFinish=function(){this.isFullyExpanded=!0,this.$expandFullButton.hide()},e.prototype.collapseFullStart=function(){},e.prototype.collapseFullFinish=function(){this.isFullyExpanded=!1,this.expandFullEnabled&&this.$expandFullButton.show(),this.focusExpandFullButton()},e.prototype.focusExpandButton=function(){var t=this;setTimeout((function(){t.$expandButton.focus()}),1)},e.prototype.focusExpandFullButton=function(){var t=this;setTimeout((function(){t.$expandFullButton.focus()}),1)},e.prototype.focusCollapseButton=function(){var t=this;setTimeout((function(){t.$collapseButton.focus()}),1)},e.prototype.resize=function(){t.prototype.resize.call(this),this.$main.height(this.$element.height()-this.$top.outerHeight(!0))},e}(s.P)},8566:(t,e,n)=>{n.d(e,{H:()=>z});var i,o=n(4194),s=function(t,e){this.informationType=t,this.param=e},a=n(3115),r=function(){function t(){}return t.FORBIDDEN="forbiddenResourceMessage",t}(),l=n(6346),c=n(4342),h=n(2325),u=n(1123),p=n(4692),d=function(){function t(){}return t.loadExternalResources=function(e,n){return new Promise((function(i){l.Utils.loadExternalResourcesAuth09(e,n,t.clickThrough,t.restricted,t.login,t.getAccessToken,t.storeAccessToken,t.getStoredAccessToken,t.handleExternalResourceResponse).then((function(t){i(t)})).catch((function(e){switch(e.name){case l.StatusCode.AUTHORIZATION_FAILED.toString():t.publish(o.b.LOGIN_FAILED);break;case l.StatusCode.FORBIDDEN.toString():t.publish(o.b.FORBIDDEN);break;case l.StatusCode.RESTRICTED.toString():break;default:t.publish(o.b.SHOW_MESSAGE,[e.message||e])}}))}))},t.clickThrough=function(e){return new Promise((function(n){t.publish(o.b.SHOW_CLICKTHROUGH_DIALOGUE,[{resource:e,acceptCallback:function(){if(e.clickThroughService)var i=window.open(e.clickThroughService.id),s=window.setInterval((function(){i&&i.closed&&(window.clearInterval(s),t.publish(o.b.CLICKTHROUGH),n())}),500)}}])}))},t.restricted=function(e){return new Promise((function(n,i){t.publish(o.b.SHOW_RESTRICTED_DIALOGUE,[{resource:e,acceptCallback:function(){t.publish(u.s.LOAD_FAILED),i(e)}}])}))},t.login=function(e){return new Promise((function(n){var i={};e.status===h.FORBIDDEN&&(i.warningMessage=r.FORBIDDEN,i.showCancelButton=!0),console.log("login"),t.publish(o.b.SHOW_LOGIN_DIALOGUE,[{resource:e,loginCallback:function(){if(e.loginService)var i=window.open(e.loginService.id+"?t="+(new Date).getTime()),s=window.setInterval((function(){i&&i.closed&&(window.clearInterval(s),t.publish(o.b.LOGIN),n())}),500)},logoutCallback:function(){if(e.logoutService)var i=window.open(e.logoutService.id+"?t="+(new Date).getTime()),s=window.setInterval((function(){i&&i.closed&&(window.clearInterval(s),t.publish(o.b.LOGOUT),n())}),500)},options:i}])}))},t.getAccessToken=function(t,e){return new Promise((function(n,i){if(t.tokenService){var o=t.tokenService.id,s=o+"|"+(new Date).getTime(),a=function(t){window.removeEventListener("message",a);var o=t.data;o.error?i(e?o.errorDescription:void 0):n(o)};window.addEventListener("message",a,!1);var r=o+"?messageId="+s;p("#commsFrame").prop("src",r)}else i("Token service not found")}))},t.storeAccessToken=function(t,e,n){return new Promise((function(i,o){t.tokenService?(c.wc.set(t.tokenService.id,e,e.expiresIn,n),i()):o("Token service not found")}))},t.getStoredAccessToken=function(t,e){return new Promise((function(n,i){var o=[],s=null;if(t.tokenService&&(s=c.wc.get(t.tokenService.id,e)),s)o.push(s);else for(var a=c.f.getUrlParts(t.dataUri).hostname,r=c.wc.getItems(e),l=0;l<r.length;l++)(s=r[l]).key.includes(a)&&o.push(s);(o=o.sort((function(t,e){return t.expiresAt-e.expiresAt}))).length&&n(o[o.length-1].value)}))},t.handleExternalResourceResponse=function(e){return new Promise((function(n,i){if(e.isResponseHandled=!0,e.status===h.OK)n(e);else if(e.status===h.MOVED_TEMPORARILY)n(e),t.publish(o.b.RESOURCE_DEGRADED,[e]);else if(e.error.status===h.UNAUTHORIZED||e.error.status===h.INTERNAL_SERVER_ERROR)i(e.error.statusText);else if(e.error.status===h.FORBIDDEN){var s=new Error;s.message="Forbidden",s.name=l.StatusCode.FORBIDDEN.toString(),i(s)}else i(e.error.statusText)}))},t.handleDegraded=function(e){var n=new s(a.J.DEGRADED_RESOURCE,e);t.publish(o.b.SHOW_INFORMATION,[n])},t}(),f=n(41),g=n(4692),b=function(){function t(){}return t.loadExternalResources=function(e,n,i){return new Promise((function(s){t.storageStrategy=n,e=e.map((function(t){return t.authAPIVersion=1,t.options=i,t})),l.Utils.loadExternalResourcesAuth1(e,t.openContentProviderInteraction,t.openTokenService,t.getStoredAccessToken,t.userInteractedWithContentProvider,t.getContentProviderInteraction,t.handleMovedTemporarily,t.showOutOfOptionsMessages).then((function(t){s(t)})).catch((function(e){switch(e.name){case l.StatusCode.AUTHORIZATION_FAILED.toString():t.publish(o.b.LOGIN_FAILED);break;case l.StatusCode.FORBIDDEN.toString():t.publish(o.b.FORBIDDEN);break;case l.StatusCode.RESTRICTED.toString():break;default:t.publish(o.b.SHOW_MESSAGE,[e.message||e])}}))}))},t.getCookieServiceUrl=function(e){return e.id+"?origin="+t.getOrigin()},t.openContentProviderInteraction=function(e){var n=t.getCookieServiceUrl(e);return window.open(n)},t.getOrigin=function(t){var e=window.location;return t&&((e=document.createElement("a")).href=t),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")},t.userInteractedWithContentProvider=function(t){return new Promise((function(e){var n=window.setInterval((function(){t.closed&&(window.clearInterval(n),e(!0))}),500)}))},t.handleMovedTemporarily=function(e){return new Promise((function(n){t.showDegradedMessage(e),e.isResponseHandled=!0,n()}))},t.showDegradedMessage=function(e){if(e.kioskService)t.publish(o.b.OPEN_EXTERNAL_RESOURCE,[[e]]);else{var n=new s(a.J.DEGRADED_RESOURCE,e);t.publish(o.b.SHOW_INFORMATION,[n])}},t.storeAccessToken=function(e,n){return new Promise((function(i,o){e.tokenService?(c.wc.set(e.tokenService.id,n,n.expiresIn||3600,t.storageStrategy),i()):o("Token service not found")}))},t.getStoredAccessToken=function(e){return new Promise((function(n,i){var o=[],s=null;if(e.tokenService&&(s=c.wc.get(e.tokenService.id,t.storageStrategy)),s)o.push(s);else for(var a=c.f.getUrlParts(e.dataUri).hostname,r=c.wc.getItems(t.storageStrategy),l=0;l<r.length;l++)(s=r[l]).key.includes(a)&&o.push(s);var h=null;(o=o.sort((function(t,e){return t.expiresAt-e.expiresAt}))).length&&(h=o[o.length-1].value),n(h)}))},t.getContentProviderInteraction=function(e,n){return new Promise((function(i){e.isResponseHandled&&!e.authHoldingPage?(t.showDegradedMessage(e),i(null)):e.authHoldingPage?(e.authHoldingPage.location.href=t.getCookieServiceUrl(n),i(e.authHoldingPage)):t.publish(o.b.SHOW_AUTH_DIALOGUE,[{service:n,closeCallback:function(){i(null)},confirmCallback:function(){var e=t.openContentProviderInteraction(n);i(e)},cancelCallback:function(){i(null)}}])}))},t.openTokenService=function(e,n){return new Promise((function(i,o){var s=t.getOrigin(n.id),a=(new Date).getTime();t.messages[a]={resolve:i,reject:o,serviceOrigin:s,resource:e},window.addEventListener("message",t.receiveToken,!1);var r=n.id+"?messageId="+a+"&origin="+t.getOrigin();g("#commsFrame").prop("src",r),setTimeout((function(){t.messages[a]&&(t.messages[a].reject("Message unhandled after 5000ms, rejecting"),delete t.messages[a])}),5e3)}))},t.receiveToken=function(e){if(e.data.hasOwnProperty("messageId")){var n=t.messages[e.data.messageId];n&&e.origin==n.serviceOrigin&&t.storeAccessToken(n.resource,e.data).then((function(){n.resolve(e.data),delete t.messages[e.data.messageId]}))}},t.showOutOfOptionsMessages=function(e,n){if(e.status!=h.MOVED_TEMPORARILY){var i="";n.getFailureHeader()&&(i+="<p>"+n.getFailureHeader()+"</p>"),n.getFailureDescription()&&(i+=n.getFailureDescription()),t.publish(o.b.SHOW_MESSAGE,[(0,f.aj)(i)])}},t.messages={},t}(),m=n(9323),v=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$=n(4692),y=function(t){function e(e){return t.call(this,e)||this}return v(e,t),e.prototype.create=function(){var e=this;this.setConfig("authDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_AUTH_DIALOGUE,this.closeCommand=o.b.HIDE_AUTH_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){var n=Array.isArray(t)?t[0]:t;e.closeCallback=n.closeCallback,e.confirmCallback=n.confirmCallback,e.cancelCallback=n.cancelCallback,e.service=n.service,e.open()})),this.extensionHost.subscribe(this.closeCommand,(function(){e.close()})),this.$title=$('<div role="heading" class="heading"></div>'),this.$content.append(this.$title),this.$content.append(' <div> <p class="message scroll"></p> </div>'),this.$buttons.prepend(this._buttonsToAdd()),this.$message=this.$content.find(".message"),this.$confirmButton=this.$buttons.find(".confirm"),this.$confirmButton.text(this.content.confirm),this.$cancelButton=this.$buttons.find(".close"),this.$cancelButton.text(this.content.cancel),this.$element.hide(),this.$confirmButton.on("click",(function(t){t.preventDefault(),e.confirmCallback&&e.confirmCallback(),e.close()})),this.$cancelButton.on("click",(function(t){t.preventDefault(),e.cancelCallback&&e.cancelCallback(),e.close()}))},e.prototype.open=function(){if(this.service){t.prototype.open.call(this);var e=this.service.getHeader(),n=this.service.getDescription(),i=this.service.getConfirmLabel();e&&this.$title.text((0,f.aj)(e)),n&&(this.$message.html((0,f.aj)(n)),this.$message.targetBlank(),this.$message.find("a").on("click",(function(){var t=$(this).attr("href");this.extensionHost.publish(o.b.EXTERNAL_LINK_CLICKED,t)}))),i&&this.$confirmButton.text((0,f.aj)(i)),this.resize()}else console.error("NO SERVICE")},e.prototype.resize=function(){t.prototype.resize.call(this)},e.prototype._buttonsToAdd=function(){var t='<a class="confirm btn btn-primary" href="#" target="_parent"></a>';return this.options.topCloseButtonEnabled&&(t+='<button class="close btn btn-default"></button>'),t},e}(m.X),E=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=n(4692),w=function(t){function e(e){return t.call(this,e)||this}return E(e,t),e.prototype.create=function(){var e=this;this.setConfig("clickThroughDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_CLICKTHROUGH_DIALOGUE,this.closeCommand=o.b.HIDE_CLICKTHROUGH_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){e.acceptCallback=t.acceptCallback,e.resource=t.resource,e.open()})),this.extensionHost.subscribe(this.closeCommand,(function(){e.close()})),this.$title=x('<div role="heading" class="heading"></div>'),this.$content.append(this.$title),this.$content.append(' <div> <p class="message scroll"></p> <div class="buttons"> <a class="acceptTerms btn btn-primary" href="#" target="_parent"></a> </div> </div>'),this.$message=this.$content.find(".message"),this.$acceptTermsButton=this.$content.find(".acceptTerms"),this.$acceptTermsButton.text("Accept Terms and Open"),this.$element.hide(),this.$acceptTermsButton.on("click",(function(t){t.preventDefault(),e.close(),e.extensionHost.publish(o.b.ACCEPT_TERMS),e.acceptCallback&&e.acceptCallback()}))},e.prototype.open=function(){t.prototype.open.call(this),this.resource.clickThroughService&&(this.$title.text(this.resource.clickThroughService.getProperty("label")),this.$message.html(this.resource.clickThroughService.getProperty("description")),this.$message.targetBlank()),this.$message.find("a").on("click",(function(){var t=x(this).attr("href");this.extensionHost.publish(o.b.EXTERNAL_LINK_CLICKED,t)})),this.resize()},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(m.X),C=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),O=n(4692),_=function(t){function e(e){return t.call(this,e)||this}return C(e,t),e.prototype.create=function(){var e=this;this.setConfig("loginDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_LOGIN_DIALOGUE,this.closeCommand=o.b.HIDE_LOGIN_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){e.loginCallback=t.loginCallback,e.logoutCallback=t.logoutCallback,e.options=t.options,e.resource=t.resource,e.open()})),this.extensionHost.subscribe(this.closeCommand,(function(){e.close()})),this.$title=O('<div role="heading" class="heading"></div>'),this.$content.append(this.$title),this.$content.append(' <div> <p class="message scroll"></p> <div class="buttons"> <a class="logout btn btn-primary" href="#" target="_parent"></a> <a class="login btn btn-primary" href="#" target="_parent"></a> <a class="cancel btn btn-primary" href="#"></a> </div> </div>'),this.$message=this.$content.find(".message"),this.$loginButton=this.$content.find(".login"),this.$loginButton.text(this.content.login),this.$logoutButton=this.$content.find(".logout"),this.$logoutButton.text(this.content.logout),this.$cancelButton=this.$content.find(".cancel"),this.$cancelButton.text(this.content.cancel),this.$element.hide(),this.$loginButton.on("click",(function(t){t.preventDefault(),e.close(),e.loginCallback&&e.loginCallback()})),this.$logoutButton.on("click",(function(t){t.preventDefault(),e.close(),e.logoutCallback&&e.logoutCallback()})),this.$cancelButton.on("click",(function(t){t.preventDefault(),e.close()})),this.updateLogoutButton()},e.prototype.open=function(){t.prototype.open.call(this);var e="";this.resource.loginService&&(this.$title.text(this.resource.loginService.getProperty("label")),e=this.resource.loginService.getProperty("description")),this.options.warningMessage&&(e='<span class="warning">'+this.extension.data.config.content[this.options.warningMessage]+'</span><span class="description">'+e+"</span>"),this.updateLogoutButton(),this.$message.html(e),this.$message.targetBlank(),this.$message.find("a").on("click",(function(){var t=O(this).attr("href");this.extensionHost.publish(o.b.EXTERNAL_LINK_CLICKED,t)})),this.options.showCancelButton?this.$cancelButton.show():this.$cancelButton.hide(),this.resize()},e.prototype.updateLogoutButton=function(){this.extension.isLoggedIn?this.$logoutButton.show():this.$logoutButton.hide()},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(m.X),S=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),A=n(4692),I=function(t){function e(e){return t.call(this,e)||this}return S(e,t),e.prototype.create=function(){var e=this;this.setConfig("restrictedDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_RESTRICTED_DIALOGUE,this.closeCommand=o.b.HIDE_RESTRICTED_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){e.acceptCallback=t.acceptCallback,e.options=t.options,e.resource=t.resource,e.open()})),this.extensionHost.subscribe(this.closeCommand,(function(){e.close()})),this.$title=A('<div role="heading" class="heading"></div>'),this.$content.append(this.$title),this.$content.append(' <div> <p class="message scroll"></p> <div class="buttons"> <a class="cancel btn btn-primary" href="#" target="_parent"></a> </div> </div>'),this.$message=this.$content.find(".message"),this.$message.targetBlank(),this.$cancelButton=this.$content.find(".cancel"),this.$cancelButton.text(this.content.cancel),this.$element.hide(),this.$cancelButton.on("click",(function(t){t.preventDefault(),e.close()}))},e.prototype.open=function(){t.prototype.open.call(this),this.isAccepted=!1;var e="";this.resource.restrictedService&&(this.$title.text(this.resource.restrictedService.getProperty("label")),e=this.resource.restrictedService.getProperty("description")),this.$message.html(e),this.$message.targetBlank(),this.$message.find("a").on("click",(function(){var t=A(this).attr("href");this.extensionHost.publish(o.b.EXTERNAL_LINK_CLICKED,t)})),this.resize()},e.prototype.close=function(){t.prototype.close.call(this),!this.isAccepted&&this.acceptCallback&&(this.isAccepted=!0,this.acceptCallback())},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(m.X),T=n(4598),B=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),H=n(4692),P=function(t){function e(e){return t.call(this,e)||this}return B(e,t),e.prototype.create=function(){var e=this;this.setConfig("genericDialogue"),t.prototype.create.call(this),this.openCommand=o.b.SHOW_GENERIC_DIALOGUE,this.closeCommand=o.b.HIDE_GENERIC_DIALOGUE,this.extensionHost.subscribe(this.openCommand,(function(t){e.acceptCallback=t.acceptCallback,e.showMessage(t)})),this.extensionHost.subscribe(this.closeCommand,(function(){e.close()})),this.$message=H("<p></p>"),this.$content.append(this.$message),this.$acceptButton=H('\n <button class="btn btn-primary accept default">\n '.concat(this.content.ok,"\n </button>\n ")),this.$buttons.append(this.$acceptButton),this.$buttons.find(".close").hide(),this.$acceptButton.onPressed((function(){e.accept()})),this.returnFunc=function(){e.isActive&&e.accept()},this.$element.hide()},e.prototype.accept=function(){this.extensionHost.publish(o.b.CLOSE_ACTIVE_DIALOGUE),this.acceptCallback&&this.acceptCallback()},e.prototype.showMessage=function(t){this.$message.html(t.message),t.buttonText?this.$acceptButton.text(t.buttonText):this.$acceptButton.text(this.content.ok),!1===t.allowClose&&this.disableClose(),this.open()},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(m.X),D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=n(4692),R=function(t){function e(e){return t.call(this,e,!0,!0)||this}return D(e,t),e.prototype.create=function(){var e=this;t.prototype.create.call(this),this.extensionHost.subscribe(o.b.SHOW_OVERLAY,(function(){e.$overlays.show()})),this.extensionHost.subscribe(o.b.HIDE_OVERLAY,(function(){e.$overlays.hide()})),this.$element.append('<a class="sr-only" href="#download-btn">'+this.extension.data.config.content.skipToDownload+"</a>"),this.$headerPanel=k('<div class="headerPanel"></div>'),this.$element.append(this.$headerPanel),this.$mainPanel=k('<div class="mainPanel"></div>'),this.$element.append(this.$mainPanel),this.$centerPanel=k('<div class="centerPanel"></div>'),this.$centerPanel.append('<h2 class="sr-only">'+this.extension.data.config.content.mediaViewer+"</h2>"),this.$mainPanel.append(this.$centerPanel),this.$leftPanel=k('<div class="leftPanel"></div>'),this.$mainPanel.append(this.$leftPanel),this.$rightPanel=k('<div class="rightPanel"></div>'),this.$mainPanel.append(this.$rightPanel),this.$footerPanel=k('<div class="footerPanel"></div>'),this.$element.append(this.$footerPanel),this.$mobileFooterPanel=k('<div class="mobileFooterPanel"></div>'),this.$element.append(this.$mobileFooterPanel),this.$overlays=k('<div class="overlays"></div>'),this.$element.append(this.$overlays),this.$overlays.hide(),this.$genericDialogue=k('<div class="overlay genericDialogue" aria-hidden="true"></div>'),this.$overlays.append(this.$genericDialogue),this.$overlays.on("click",(function(t){k(t.target).hasClass("overlays")&&(t.preventDefault(),e.extensionHost.publish(o.b.CLOSE_ACTIVE_DIALOGUE))})),new P(this.$genericDialogue)},e.prototype.resize=function(){var e=this;t.prototype.resize.call(this),setTimeout((function(){e.$overlays.width(e.extension.width()),e.$overlays.height(e.extension.height())}),1);var n=this.$element.height()-parseInt(this.$mainPanel.css("paddingTop"))-((0,f.zN)(this.$headerPanel)?this.$headerPanel.height():0)-((0,f.zN)(this.$footerPanel)?this.$footerPanel.height():0)-((0,f.zN)(this.$mobileFooterPanel)?this.$mobileFooterPanel.height():0);this.$mainPanel.height(n)},e}(T.P),L=n(1539),N=n(3957),F=n(8847),G=function(t,e,n,i){return new(n||(n=Promise))((function(o,s){function a(t){try{l(i.next(t))}catch(t){s(t)}}function r(t){try{l(i.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,r)}l((i=i.apply(t,e||[])).next())}))},U=function(t,e){var n,i,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=r(0),a.throw=r(1),a.return=r(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function r(r){return function(l){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,r[0]&&(s=0)),s;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,i=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==r[0]&&2!==r[0])){s=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){s.label=r[1];break}if(6===r[0]&&s.label<o[1]){s.label=o[1],o=r;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(r);break}o[2]&&s.ops.pop(),s.trys.pop();continue}r=e.call(t,s)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}},M=n(4692),z=function(){function t(){this.annotations=[],this.isCreated=!1,this.isLoggedIn=!1,this.metrics=[],this.shifted=!1,this.tabbing=!1,this.locales={},this.defaultConfig={},this.localeLoaders={"en-GB":function(){return n.e(3708).then(n.t.bind(n,3708,19))},"cy-GB":function(){return n.e(4429).then(n.t.bind(n,4429,19))},"fr-FR":function(){return n.e(9044).then(n.t.bind(n,9044,19))},"pl-PL":function(){return n.e(8136).then(n.t.bind(n,8136,19))},"sv-SE":function(){return n.e(1831).then(n.t.bind(n,1831,19))}}}return t.prototype.create=function(){var t=this,e=this;if(this.browserDetect=new W,this.browserDetect.init(),d.publish=this.extensionHost.publish.bind(this.extensionHost),b.publish=this.extensionHost.publish.bind(this.extensionHost),this.$element=M(this.extensionHost.options.target),this.$element.data("component",this.extensionHost),this._parseMetrics(),this._updateMetric(),this._initLocales(),this.$element.empty(),this.$element.removeClass(),this.$element.addClass("uv-iiif-extension-host"),this.$element.addClass("loading"),this.data.locales?(this.$element.addClass(this.data.locales[0].name.toLowerCase()),this.$element.prop("lang",this.data.locales[0].name.substring(0,2))):this.$element.prop("lang",f.q[0].name.substring(0,2)),this.isRightPanelEnabled()&&this.$element.addClass("right-panel-enabled"),this.isLeftPanelEnabled()&&this.$element.addClass("left-panel-enabled"),this.isFooterPanelEnabled()&&this.$element.addClass("footer-panel-enabled"),this.$element.addClass(this.type.name),this.$element.addClass("browser-"+this.browserDetect.browser),this.$element.addClass("browser-version-"+this.browserDetect.version),this.$element.prop("tabindex",-1),this.data.embedded&&this.$element.addClass("embedded"),this.isMobile()&&this.$element.addClass("mobile"),c.jj.supportsFullscreen()&&this.$element.addClass("fullscreen-supported"),this.isFullScreen()&&this.$element.addClass("fullscreen"),this.$element.on("mousemove",(function(e){t.mouseX=e.pageX,t.mouseY=e.pageY})),!this.data.isReload){var n=c.jj.getHiddenProp();if(n){var i=n.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(i,(function(){c.jj.isHidden()||t.resize()}))}c.YA.getBool(this.data.config.options.dropEnabled,!0)&&this.$element.on("drop",(function(e){e.preventDefault();var n=e.originalEvent.dataTransfer.getData("URL"),i=c.f.getUrlParts(n),o=c.f.getQuerystringParameterFromString("manifest",i.search);if(o||(o=c.f.getQuerystringParameterFromString("collection",i.search)),o){t.fire(u.s.DROP,o);var s={};s.iiifManifestId=o,t.reload(s)}})),this.$element.on("dragover",(function(t){t.preventDefault()})),this.$element.on("keyup keydown",(function(e){t.shifted=e.shiftKey,t.tabbing=e.keyCode===F.G.Tab})),this.$element.on("keydown",(function(n){var i=null,s=!0;n.ctrlKey||n.altKey||n.shiftKey||(n.keyCode===F.G.Enter&&(i=o.b.RETURN,s=!1),n.keyCode===F.G.Escape&&(i=o.b.ESCAPE),n.keyCode===F.G.PageUp&&(i=o.b.PAGE_UP),n.keyCode===F.G.PageDown&&(i=o.b.PAGE_DOWN),n.keyCode===F.G.End&&(i=o.b.END),n.keyCode===F.G.Home&&(i=o.b.HOME),n.keyCode!==F.G.NumpadPlus&&171!==n.keyCode&&n.keyCode!==F.G.Equals||(i=o.b.PLUS,s=!1),n.keyCode!==F.G.NumpadMinus&&173!==n.keyCode&&n.keyCode!==F.G.Dash||(i=o.b.MINUS,s=!1),e.useArrowKeysToNavigate()&&(n.keyCode===F.G.LeftArrow&&(i=o.b.LEFT_ARROW),n.keyCode===F.G.UpArrow&&(i=o.b.UP_ARROW),n.keyCode===F.G.RightArrow&&(i=o.b.RIGHT_ARROW),n.keyCode===F.G.DownArrow&&(i=o.b.DOWN_ARROW))),i&&(s&&n.preventDefault(),t.extensionHost.publish(i))}))}this.extensionHost.subscribe(u.s.EXIT_FULLSCREEN,(function(){t.isOverlayActive()&&t.extensionHost.publish(o.b.ESCAPE),t.extensionHost.publish(o.b.ESCAPE),t.extensionHost.publish(u.s.RESIZE)})),this.$element.append('<iframe id="commsFrame"></iframe>'),this.extensionHost.subscribeAll((function(e,n){[u.s.LOAD,u.s.DROP,u.s.TOGGLE_FULLSCREEN,u.s.EXTERNAL_RESOURCE_OPENED,u.s.RELOAD].includes(e)||t.fire(e,n)})),this.extensionHost.subscribe(u.s.EXTERNAL_RESOURCE_OPENED,(function(){t.fire(u.s.EXTERNAL_RESOURCE_OPENED)})),this.extensionHost.subscribe(o.b.LOGIN_FAILED,(function(){t.showMessage(t.data.config.content.authorisationFailedMessage)})),this.extensionHost.subscribe(o.b.LOGIN,(function(){t.isLoggedIn=!0})),this.extensionHost.subscribe(o.b.LOGOUT,(function(){t.isLoggedIn=!1})),this.extensionHost.subscribe(o.b.BOOKMARK,(function(){t.bookmark()})),this.extensionHost.subscribe(o.b.CANVAS_INDEX_CHANGE,(function(e){t.data.canvasIndex=e,t.lastCanvasIndex=t.helper.canvasIndex,t.helper.canvasIndex=e})),this.extensionHost.subscribe(o.b.CLOSE_LEFT_PANEL,(function(){e.$element.hasClass("loading")&&e.$element.removeClass("loading"),t.resize()})),this.extensionHost.subscribe(o.b.CLOSE_RIGHT_PANEL,(function(){t.resize()})),this.extensionHost.subscribe(o.b.COLLECTION_INDEX_CHANGE,(function(e){t.data.collectionIndex=e})),this.extensionHost.subscribe(u.s.CREATED,(function(){t.isCreated=!0})),this.extensionHost.subscribe(o.b.ESCAPE,(function(){t.isFullScreen()&&!t.isOverlayActive()&&t.extensionHost.publish(u.s.TOGGLE_FULLSCREEN)})),this.extensionHost.subscribe(u.s.LOAD,(function(){setTimeout((function(){t.extensionHost.publish(u.s.RESIZE),t.fire(u.s.LOAD,t.helper.getCurrentCanvas().id),t.$element.removeClass("loading")}),100)})),this.extensionHost.subscribe(o.b.FEEDBACK,(function(){t.feedback()})),this.extensionHost.subscribe(o.b.FORBIDDEN,(function(){t.extensionHost.publish(o.b.OPEN_EXTERNAL_RESOURCE)})),this.extensionHost.subscribe(u.s.LOAD_FAILED,(function(){null==!e.lastCanvasIndex&&e.lastCanvasIndex!==e.helper.canvasIndex&&t.extensionHost.publish(o.b.CANVAS_INDEX_CHANGE,e.lastCanvasIndex)})),this.extensionHost.subscribe(o.b.MANIFEST_INDEX_CHANGE,(function(e){t.data.manifestIndex=e})),this.extensionHost.subscribe(o.b.OPEN,(function(){var e=c.DH.format(t.data.config.options.openTemplate,t.helper.manifestUri);window.open(e)})),this.extensionHost.subscribe(o.b.OPEN_LEFT_PANEL,(function(){t.$element.hasClass("loading")||t.resize()})),this.extensionHost.subscribe(o.b.OPEN_RIGHT_PANEL,(function(){t.$element.hasClass("loading")||t.resize()})),this.extensionHost.subscribe(o.b.RANGE_CHANGE,(function(e){e?(t.data.rangeId=e.id,t.helper.rangeId=e.id):(t.data.rangeId=void 0,t.helper.rangeId=void 0)})),this.extensionHost.subscribe(o.b.RESOURCE_DEGRADED,(function(t){d.handleDegraded(t)})),this.extensionHost.subscribe(o.b.SHOW_MESSAGE,(function(e){t.showMessage(e)})),this.extensionHost.subscribe(o.b.SHOW_TERMS_OF_USE,(function(){var e=t.helper.getLicense();if(!e){var n=t.helper.getRequiredStatement();n&&n.value&&(e=n.value)}e&&t.showMessage(e)})),this.extensionHost.subscribe(u.s.TOGGLE_FULLSCREEN,(function(){var e=t.data.config.options.overrideFullScreen;t.extensionHost.isFullScreen=!t.extensionHost.isFullScreen,e||(M("#top").focus(),t.extensionHost.isFullScreen?t.$element.addClass("fullscreen"):t.$element.removeClass("fullscreen")),t.fire(u.s.TOGGLE_FULLSCREEN,{isFullScreen:t.extensionHost.isFullScreen,overrideFullScreen:e})})),this.shell=new R(this.$element),this.createModules(),this.extensionHost.publish(u.s.RESIZE),setTimeout((function(){t.render(),t.extensionHost.publish(u.s.CREATED),t._setDefaultFocus()}),1)},t.prototype.loadConfig=function(t,e){return G(this,void 0,void 0,(function(){return U(this,(function(e){return[2,this.translateLocale(this.defaultConfig,t)]}))}))},t.prototype.translateLocale=function(t,e){return G(this,void 0,void 0,(function(){var n,i,o,s,a;return U(this,(function(r){switch(r.label){case 0:return[4,(this.localeLoaders[e]||this.localeLoaders["en-GB"])()];case 1:for(o in n=r.sent()||{},i=JSON.stringify(t),n)s=o.replace("$",""),a=new RegExp("\\$".concat(s,"\\b"),"g"),i=i.replace(a,n[o]);return[2,i=JSON.parse(i)]}}))}))},t.prototype.createModules=function(){this.$authDialogue=M('<div class="overlay auth" aria-hidden="true"></div>'),this.shell.$overlays.append(this.$authDialogue),this.authDialogue=new y(this.$authDialogue),this.$clickThroughDialogue=M('<div class="overlay clickthrough" aria-hidden="true"></div>'),this.shell.$overlays.append(this.$clickThroughDialogue),this.clickThroughDialogue=new w(this.$clickThroughDialogue),this.$restrictedDialogue=M('<div class="overlay login" aria-hidden="true"></div>'),this.shell.$overlays.append(this.$restrictedDialogue),this.restrictedDialogue=new I(this.$restrictedDialogue),this.$loginDialogue=M('<div class="overlay login" aria-hidden="true"></div>'),this.shell.$overlays.append(this.$loginDialogue),this.loginDialogue=new _(this.$loginDialogue)},t.prototype._setDefaultFocus=function(){var t=this;setTimeout((function(){t.data.config.options.allowStealFocus&&M("[tabindex=0]").focus()}),1)},t.prototype.width=function(){return this.$element.width()},t.prototype.height=function(){return this.$element.height()},t.prototype.exitFullScreen=function(){this.extensionHost.publish(u.s.EXIT_FULLSCREEN)},t.prototype.fire=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.data.debug&&console.log(t,arguments[1]),this.extensionHost.fire(t,arguments[1])},t.prototype.redirect=function(t){this.fire(o.b.REDIRECT,t)},t.prototype.refresh=function(){this.fire(o.b.REFRESH,null)},t.prototype.render=function(){if(this.isCreated&&this.data.collectionIndex===this.helper.collectionIndex||this.extensionHost.publish(o.b.COLLECTION_INDEX_CHANGE,this.data.collectionIndex),this.isCreated&&this.data.manifestIndex===this.helper.manifestIndex||void 0!==this.data.iiifManifestId&&this.extensionHost.publish(o.b.MANIFEST_INDEX_CHANGE,this.data.manifestIndex),this.isCreated&&this.data.canvasIndex===this.helper.canvasIndex||(void 0===this.data.canvasIndex&&(this.data.canvasIndex=0),this.data.canvasId&&(this.data.canvasIndex=this.helper.canvasIndex),this.extensionHost.publish(o.b.CANVAS_INDEX_CHANGE,this.data.canvasIndex)),(!this.isCreated||this.data.rangeId!==this.helper.rangeId)&&this.data.rangeId){var t=this.helper.getRangeById(this.data.rangeId);t?this.extensionHost.publish(o.b.RANGE_CHANGE,t):console.warn("range id not found:",this.data.rangeId)}},t.prototype._initLocales=function(){var t=this.data.config.localisation.locales.slice(0),e=this.data.locales,n=[];e?(e.forEach((function(e){var i=t.filter((function(t){return t.name===e.name}));if(i.length){var o=i[0];e.label&&(o.label=e.label),o.added=!0,n.push(o)}})),c.YA.getBool(this.data.config.options.limitLocales,!1)||t.forEach((function(t){t.added||n.push(t),delete t.added})),this.data.locales=n):console.warn("No locales configured")},t.prototype._parseMetrics=function(){var t=this.data.config.options.metrics;if(t)for(var e=0;e<t.length;e++){var n=t[e];this.metrics.push(n)}},t.prototype._updateMetric=function(){for(var t=this.metrics.length-1;t>=0;t--){var e=this.metrics[t];if(window.innerWidth>=e.minWidth){if(this.metric!==e.type){this.metric=e.type;for(var n=0;n<this.metrics.length;n++)this.$element.removeClass(this.metrics[n].type);this.$element.addClass(e.type),this.extensionHost.publish(o.b.METRIC_CHANGE)}break}}},t.prototype.resize=function(){this._updateMetric(),this.extensionHost.publish(u.s.RESIZE)},t.prototype.reload=function(t){this.extensionHost.publish(u.s.RELOAD,t)},t.prototype.isSeeAlsoEnabled=function(){return!1!==this.data.config.options.seeAlsoEnabled},t.prototype.getShareUrl=function(){if(!this.data.embedded)return c.jj.isInIFrame()?parent.document.location.href:document.location.href;if(this.helper.hasRelatedPage()){var t=this.helper.getRelated();return t&&t.length&&(t=t[0]),t["@id"]}var e=this.helper.manifest;return e&&e.getHomepage()||null},t.prototype.getIIIFShareUrl=function(t){var e;return void 0===t&&(t=!1),t&&(e=this.helper.manifest?this.helper.manifest.id:this.helper.manifestUri),"".concat(e,"?manifest=").concat(e)},t.prototype.getDomain=function(){return c.f.getUrlParts(this.helper.manifestUri).host},t.prototype.getSettings=function(){if(c.YA.getBool(this.data.config.options.saveUserSettings,!1)){var t=c.wc.get("uv.settings",c.eL.LOCAL);if(t)return M.extend(this.data.config.options,t.value)}return this.data.config.options},t.prototype.updateSettings=function(t){if(c.YA.getBool(this.data.config.options.saveUserSettings,!1)){var e=c.wc.get("uv.settings",c.eL.LOCAL);e&&(t=M.extend(e.value,t)),c.wc.set("uv.settings",t,31536e4,c.eL.LOCAL)}this.data.config.options=M.extend(this.data.config.options,t)},t.prototype.getLocale=function(){return this.helper.options.locale},t.prototype.getSharePreview=function(){var t=this.helper.getLabel(),e=this.helper.getCurrentCanvas(),n=e.getProperty("thumbnail");return n&&"string"==typeof n||(n=e.getCanonicalImageUri(this.data.config.options.bookmarkThumbWidth)),{title:t,image:n}},t.prototype.getAppUri=function(){var t,e,n,i=this.data.config.modules.shareDialogue.options,o=null!==(t=null==i?void 0:i.embedHost)&&void 0!==t?t:"".concat(window.location.protocol,"//").concat(window.location.hostname),s=null!==(e=null==i?void 0:i.embedPort)&&void 0!==e?e:window.location.port,a=null!==(n=null==i?void 0:i.embedPath)&&void 0!==n?n:"/uv.html";return"".concat(o).concat(s?":".concat(s):"").concat(a)},t.prototype.buildEmbedScript=function(t,e,n,i){var o,s,a=this.getAppUri(),r=null!==(o=this.helper.getLabel())&&void 0!==o?o:"";return(null!==(s=null==i?void 0:i.size)&&void 0!==s?s:0)>0&&(a+="#?".concat(i.toString())),c.DH.format(t,a,e.toString(),n.toString(),r)},t.prototype.getPagedIndices=function(t){return void 0===t&&(t=this.helper.canvasIndex),[t]},t.prototype.getCurrentCanvases=function(){for(var t=this.getPagedIndices(this.helper.canvasIndex),e=[],n=0;n<t.length;n++){var i=t[n],o=this.helper.getCanvasByIndex(i);o&&e.push(o)}return e},t.prototype.getCanvasLabels=function(t){var e=this.getPagedIndices(),n="";if(1===e.length)n=t;else for(var i=1;i<=e.length;i++)n.length&&(n+=","),n+=t+" "+i;return n},t.prototype.getCurrentCanvasRange=function(){return this.helper.getCanvasRange(this.helper.getCurrentCanvas())},t.prototype.getExternalResources=function(t){var e=this,n=this.getPagedIndices(),i=[];n.forEach((function(n){var o,s=e.helper.getCanvasByIndex(n);if(o=s.externalResource?s.externalResource:new L.Yw(s,{authApiVersion:e.data.config.options.authAPIVersion}),t){var a=t.find((function(t){return t.dataUri===o.dataUri}));a?i.push(a):i.push(o)}else i.push(o)}));var o=this.data.config.options.tokenStorage,s=this.data.config.options.authAPIVersion;return new Promise(1===s?function(t){var n={locale:e.helper.options.locale};b.loadExternalResources(i,o,n).then((function(n){e.resources=n.map((function(t){return e._prepareResourceData(t)})),t(e.resources)}))}:function(t){d.loadExternalResources(i,o).then((function(n){e.resources=n.map((function(t){return e._prepareResourceData(t)})),t(e.resources)}))})},t.prototype._prepareResourceData=function(t){return t.data.hasServiceDescriptor=t.hasServiceDescriptor(),t.hasServiceDescriptor()||(t.data.id=t.dataUri,t.data.width=t.width,t.data.height=t.height),t.data.index=t.index,c.Rb.toPlainObject(t.data)},t.prototype.getMediaFormats=function(t){var e=t.getContent();return e&&e.length?e[0].getBody():[{id:t.id,type:t.getType(),getFormat:function(){return""}}]},t.prototype.viewCanvas=function(t){this.helper.isCanvasIndexOutOfRange(t)?this.showMessage(this.data.config.content.canvasIndexOutOfRange):this.extensionHost.publish(o.b.OPEN_EXTERNAL_RESOURCE)},t.prototype.showMessage=function(t,e,n,i){this.closeActiveDialogue(),this.extensionHost.publish(o.b.SHOW_GENERIC_DIALOGUE,{message:t,acceptCallback:e,buttonText:n,allowClose:i})},t.prototype.closeActiveDialogue=function(){this.extensionHost.publish(o.b.CLOSE_ACTIVE_DIALOGUE)},t.prototype.isOverlayActive=function(){return(0,f.zN)(this.shell.$overlays)},t.prototype.isDesktopMetric=function(){return"lg"===this.metric||"xl"===this.metric},t.prototype.isMobileMetric=function(){return"sm"===this.metric||"md"===this.metric},t.prototype.isMetric=function(t){var e=this;return"string"==typeof t?this.metric===t:t.some((function(t){return e.metric===t}))},t.prototype.viewManifest=function(t){var e={};e.iiifManifestId=this.helper.manifestUri,e.collectionIndex=this.helper.getCollectionIndex(t),e.manifestIndex=t.index,e.canvasIndex=0,this.reload(e)},t.prototype.viewCollection=function(t){var e={};e.iiifManifestId=t.parentCollection?t.parentCollection.id:this.helper.manifestUri,e.collectionIndex=t.index,e.manifestIndex=0,e.canvasIndex=0,this.reload(e)},t.prototype.isFullScreen=function(){return this.extensionHost.isFullScreen},t.prototype.isHeaderPanelEnabled=function(){return c.YA.getBool(this.data.config.options.headerPanelEnabled,!0)},t.prototype.isLeftPanelEnabled=function(){if(c.YA.getBool(this.data.config.options.leftPanelEnabled,!0)){if(this.helper.hasParentCollection())return!0;if(this.helper.isMultiCanvas()){var t=this.helper.getViewingHint();if(!t||t&&t!==N.LX.CONTINUOUS)return!0}}return!1},t.prototype.isRightPanelEnabled=function(){return c.YA.getBool(this.data.config.options.rightPanelEnabled,!0)},t.prototype.isFooterPanelEnabled=function(){return c.YA.getBool(this.data.config.options.footerPanelEnabled,!0)},t.prototype.isMobile=function(){var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|android|ipad|playbook|silk|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},t.prototype.useArrowKeysToNavigate=function(){return c.YA.getBool(this.data.config.options.useArrowKeysToNavigate,!0)},t.prototype.bookmark=function(){},t.prototype.feedback=function(){this.fire(o.b.FEEDBACK,this.data)},t.prototype.getAlternateLocale=function(){var t=null;return this.data.locales&&this.data.locales.length>1&&(t=this.data.locales[1]),t},t.prototype.getSerializedLocales=function(){return this.data.locales?this.serializeLocales(this.data.locales):null},t.prototype.serializeLocales=function(t){for(var e="",n=0;n<t.length;n++){var i=t[n];n>0&&(e+=","),e+=i.name,i.label&&(e+=":"+i.label)}return e},t.prototype.changeLocale=function(t){var e={};if(this.data.locales){e.locales=this.data.locales.slice(0);var n=e.locales.findIndex((function(e){return e.name===t}));e.locales.splice(0,0,e.locales.splice(n,1)[0]),this.reload(e)}},t.prototype.dispose=function(){var t;null===(t=this.store)||void 0===t||t.setState(null)},t}(),W=function(){function t(){this.dataBrowser=[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer"},{string:navigator.userAgent,subString:"Trident",identity:"Explorer"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Safari",identity:"Safari"},{string:navigator.userAgent,subString:"Opera",identity:"Opera"}]}return t.prototype.init=function(){this.browser=this.searchString(this.dataBrowser)||"Other",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"Unknown","Explorer"==this.browser&&"7"==this.version&&navigator.userAgent.match(/Trident/i)&&(this.version=this.searchVersionIE())},t.prototype.searchString=function(t){for(var e=0;e<t.length;e++){var n=t[e].string;if(this.versionSearchString=t[e].subString,-1!=n.indexOf(t[e].subString))return t[e].identity}},t.prototype.searchVersion=function(t){var e=t.indexOf(this.versionSearchString);if(-1!=e)return parseFloat(t.substring(e+this.versionSearchString.length+1))},t.prototype.searchVersionIE=function(){var t=navigator.userAgent.toString().toLowerCase(),e=/(trident)(?:.*rv:([\w.]+))?/.exec(t)||/(msie) ([\w.]+)/.exec(t)||["",null,-1],n="unknown";return null!==e&&3===e.length&&e[2]&&(n=e[2].split(".")[0]),n},t}()},4598:(t,e,n)=>{n.d(e,{P:()=>c});var i,o=n(4342),s=n(1123),a=function(){function t(t,e,n){this.isResized=!1,this.$element=t,this.fitToParentWidth=e||!1,this.fitToParentHeight=n||!1,this.create()}return t.prototype.create=function(){var t,e=this;null===(t=this.extensionHost)||void 0===t||t.subscribe(s.s.RESIZE,(function(){e.resize()}))},t.prototype.whenResized=function(t){var e=this;o.jg.waitFor((function(){return e.isResized}),t)},t.prototype.onAccessibleClick=function(t,e,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1),n&&t.on("click",(function(t){e(t)})),t.on("keydown",(function(t){var n="A"===t.target.nodeName&&!i;(32===t.which&&!n||13===t.which)&&(t.preventDefault(),e(t))}))},t.prototype.resize=function(){var t=this.$element.parent();this.fitToParentWidth&&this.$element.width(t.width()),this.fitToParentHeight&&this.$element.height(t.height()),this.isResized=!0},t}(),r=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=n(4692),c=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return r(e,t),e.prototype.create=function(){this.extensionHost=this.$element.closest(".uv-iiif-extension-host").data("component"),t.prototype.create.call(this),this.extension=this.extensionHost.extension,this.config={},this.config.content={},this.config.options={};var e=this;e.modules&&e.modules.length&&(e.modules=e.modules.reverse(),e.modules.forEach((function(t){e.config=l.extend(!0,e.config,e.extension.data.config.modules[t])}))),this.content=this.config.content,this.options=this.config.options},e.prototype.init=function(){},e.prototype.setConfig=function(t){this.modules||(this.modules=[]),this.modules.push(t)},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(a)},5620:(t,e,n)=>{n.d(e,{w:()=>u});var i,o=n(4194),s=n(4598),a=n(6030),r=n(41),l=n(4342),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),h=n(4692),u=function(t){function e(e){var n=t.call(this,e,!1,!0)||this;return n.subtitleExpanded=!1,n.isAttributionOpen=!1,n.attributionExplicitlyClosed=!1,n.attributionPosition=a.y.BOTTOM_LEFT,n.isAttributionLoaded=!1,n}return c(e,t),e.prototype.create=function(){var e=this;t.prototype.create.call(this),this.$title=h('<h1 class="title"></h1>'),this.$element.append(this.$title),this.$subtitle=h('<div class="subtitle">\n <div class="wrapper">\n <button type="button" class="expand-btn" aria-label="Expand">\n <span aria-hidden="true">+</span>\n </button>\n <span class="text"></span>\n </div>\n </div>'),this.$element.append(this.$subtitle),this.$subtitleWrapper=this.$subtitle.find(".wrapper"),this.$subtitleExpand=this.$subtitle.find(".expand-btn"),this.$subtitleText=this.$subtitle.find(".text"),this.$content=h('<div id="content" class="content"></div>'),this.$element.append(this.$content),this.$attribution=h('\n <div class="attribution">\n <div class="header">\n <div class="title"></div>\n <button type="button" class="close">\n <span aria-hidden="true">×</span>\n </button>\n </div>\n <div class="main">\n <div class="attribution-text"></div>\n <div class="license"></div>\n <div class="logo"></div>\n </div>\n </div>\n '),this.$attribution.find(".header .title").text(this.content.attribution),this.$content.append(this.$attribution),this.closeAttribution(),this.$closeAttributionButton=this.$attribution.find(".header .close"),this.$closeAttributionButton.attr("aria-label",this.content.closeAttribution),this.$closeAttributionButton.on("click",(function(t){t.preventDefault(),e.closeAttribution(!0)})),this.$subtitleExpand.on("click",(function(t){t.preventDefault(),e.subtitleExpanded=!e.subtitleExpanded,e.subtitleExpanded?(e.$subtitleWrapper.addClass("expanded"),e.$subtitleExpand.text("-")):(e.$subtitleWrapper.removeClass("expanded"),e.$subtitleExpand.text("+")),e.resize()})),l.YA.getBool(this.options.titleEnabled,!0)?this.$title.show():this.$title.hide(),l.YA.getBool(this.options.subtitleEnabled,!1)?this.$subtitle.show():this.$subtitle.hide(),this.whenResized((function(){e.updateRequiredStatement()})),this.extensionHost.subscribe(o.b.RANGE_CHANGE,(function(){e.updateRequiredStatement()})),this.extensionHost.subscribe(o.b.CANVAS_INDEX_CHANGE,(function(){e.updateRequiredStatement()})),this.extensionHost.subscribe(o.b.MANIFEST_INDEX_CHANGE,(function(){e.updateRequiredStatement()}))},e.prototype.openAttribution=function(){this.attributionExplicitlyClosed||(this.$attribution.show(),this.isAttributionOpen=!0)},e.prototype.closeAttribution=function(t){void 0===t&&(t=!1),this.attributionExplicitlyClosed=this.attributionExplicitlyClosed||t,this.$attribution.hide(),this.isAttributionOpen=!1},e.prototype.updateRequiredStatement=function(){var t=this;if(!this.isAttributionLoaded){var e=l.YA.getBool(this.config.options.mostSpecificRequiredStatement,!1),n=e?this.extension.helper.getMostSpecificRequiredStatement():this.extension.helper.getRequiredStatement(),i=l.YA.getBool(this.options.requiredStatementEnabled,!0);if(n&&n.value&&i){this.openAttribution();var o=this.$attribution.find(".title"),s=this.$attribution.find(".attribution-text"),a=this.$attribution.find(".license"),c=this.$attribution.find(".logo");if(n.label){var h=(0,r.aj)(n.label);o.html(h)}else o.text(this.content.attribution);if(n.value){var u=(0,r.aj)(n.value);s.html(u);var p=function(){return t.resize()};s.find("img").one("load",(function(){t.resize()})).each((function(){this.complete&&p()})),s.find("img").one("error",(function(){p()})),s.targetBlank()}a.hide(),c.hide(),this.resize(),e||(this.isAttributionLoaded=!0)}}},e.prototype.resize=function(){var e,n;t.prototype.resize.call(this),e=this.options&&!1===this.options.titleEnabled||!(0,r.zN)(this.$title)?0:this.$title.outerHeight(!0),n=this.options&&!1===this.options.subtitleEnabled||!(0,r.zN)(this.$subtitle)?0:this.$subtitle.outerHeight(!0),this.$content.height(this.$element.height()-e-n),this.$content.width(this.$element.width());var i=this.$attribution.find(".attribution-text");if(i.css("maxHeight","calc(".concat(this.$content.height(),"px - 100px)")),i.css("overflow-y","auto"),this.$attribution&&this.isAttributionOpen){switch(this.attributionPosition){case a.y.BOTTOM_LEFT:this.$attribution.css("bottom",0),this.$attribution.css("left",0);break;case a.y.BOTTOM_RIGHT:this.$attribution.css("bottom",0),this.$attribution.css("right",0)}this.$content.width()<=this.$attribution.width()?this.$attribution.hide():this.$attribution.show()}this.subtitle&&this.options.subtitleEnabled?(this.$subtitleText.html((0,r.aj)(this.subtitle.replace(/<br\s*[\/]?>/gi,"; "))),this.$subtitleText.removeClass("elided"),this.$subtitle.show(),this.$subtitleWrapper.css("max-height",this.$content.height()+this.$subtitle.outerHeight()),this.$subtitleWrapper.width(this.$content.width()),this.subtitleExpanded?this.$subtitleText.width(this.$content.width()-this.$subtitleText.horizontalMargins()-2):(this.$subtitleText.width("auto"),this.$subtitleWrapper.width("auto"),this.$subtitleExpand.hide(),this.$subtitleText.width()>this.$content.width()&&(this.$subtitleExpand.show(),this.$subtitleText.addClass("elided"),this.$subtitleText.width(this.$content.width()-(this.$subtitleExpand.outerWidth()+this.$subtitleText.horizontalMargins()))))):this.$subtitle.hide()},e}(s.P)},9323:(t,e,n)=>{n.d(e,{X:()=>c});var i,o=n(4598),s=n(4194),a=n(4342),r=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=n(4692),c=function(t){function e(e){var n=t.call(this,e,!1,!1)||this;return n.allowClose=!0,n.isActive=!1,n.isUnopened=!0,n}return r(e,t),e.prototype.create=function(){var e=this;this.setConfig("dialogue"),t.prototype.create.call(this),this.extensionHost.subscribe(s.b.CLOSE_ACTIVE_DIALOGUE,(function(){e.isActive&&e.allowClose&&e.close()})),this.extensionHost.subscribe(s.b.ESCAPE,(function(){e.isActive&&e.allowClose&&e.close()})),this.$top=l('<div class="top"></div>'),this.$element.append(this.$top),this.$closeButton=l('<button type="button" class="btn btn-default close" tabindex="0">'+this.content.close+"</button>"),this.$middle=l('<div class="middle"></div>'),this.$element.append(this.$middle),this.$content=l('<div class="content"></div>'),this.$middle.append(this.$content),this.$buttons=l('<div class="buttons"></div>'),this.$middle.append(this.$buttons),this.$bottom=l('<div class="bottom"></div>'),this.$element.append(this.$bottom),this.options.topCloseButtonEnabled?this.$top.append(this.$closeButton):this.$buttons.append(this.$closeButton),this.$closeButton.on("click",(function(t){t.preventDefault(),e.close()})),this.returnFunc=this.close},e.prototype.enableClose=function(){this.allowClose=!0,this.$closeButton.show()},e.prototype.disableClose=function(){this.allowClose=!1,this.$closeButton.hide()},e.prototype.setDockedPosition=function(){var t=Math.floor(this.extension.height()-this.$element.outerHeight(!0)),e=0,n=0,i=0;if(this.$triggerButton){t=this.$triggerButton.offset().top-this.extension.$element.offset().top-this.$element.outerHeight(!0)+4;var o=this.$triggerButton.offset().left-this.extension.$element.offset().left;i=a.eC.normalise(o,0,this.extension.width()),e=Math.floor(this.extension.width()*i-this.$element.width()*i)+2,n=Math.floor(this.$element.width()*i)}this.$bottom.css("backgroundPosition",n+"px 0px"),this.$element.css({top:t,left:e})},e.prototype.open=function(t){var e=this;this.extensionHost.publish(s.b.CLOSE_ACTIVE_DIALOGUE),this.$element.attr("aria-hidden","false"),this.$element.show(),t?(this.$triggerButton=l(t),this.$bottom.show()):this.$bottom.hide(),this.isActive=!0,setTimeout((function(){var t=e.$element.find(".default");if(t.length)t.focus();else{var n=e.$element.find("input:visible, select:visible").first();n.length?n.focus():e.$closeButton.focus()}}),1),this.$element.on("keydown",(function(t){return e.handleKeydown(t)})),this.extensionHost.publish(s.b.SHOW_OVERLAY),this.isUnopened&&(this.isUnopened=!1,this.afterFirstOpen()),this.resize()},e.prototype.afterFirstOpen=function(){},e.prototype.close=function(){this.isActive&&(this.$element.attr("aria-hidden","true"),this.$element.hide(),this.isActive=!1,this.$element.off("keydown"),this.extensionHost.publish(this.closeCommand),this.extensionHost.publish(s.b.HIDE_OVERLAY))},e.prototype.resize=function(){t.prototype.resize.call(this),this.$element.css({top:Math.floor(this.extension.height()/2-this.$element.height()/2),left:Math.floor(this.extension.width()/2-this.$element.width()/2)})},e.prototype.handleKeydown=function(t){if("Tab"===t.key){var e=this.$element.find('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select, [tabindex="0"]').filter(":visible"),n=e.first()[0],i=e.last()[0],o=document.activeElement;t.shiftKey?o===n&&(t.preventDefault(),i.focus()):o===i&&(t.preventDefault(),n.focus())}},e}(o.P)},6830:(t,e,n)=>{n.d(e,{A:()=>h});var i,o=n(4194),s=n(4598),a=n(4342),r=n(1123),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),c=n(4692),h=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.create=function(){var e=this;this.setConfig("footerPanel"),t.prototype.create.call(this),this.extensionHost.subscribe(r.s.TOGGLE_FULLSCREEN,(function(){e.updateFullScreenButton(),e.extensionHost.isFullScreen||setTimeout((function(){e.resize()}),1001)})),this.extensionHost.subscribe(o.b.METRIC_CHANGE,(function(){e.updateMinimisedButtons(),e.updateMoreInfoButton()})),this.extensionHost.subscribe(o.b.SETTINGS_CHANGE,(function(){e.updateDownloadButton()})),this.$options=c('<div class="options"></div>'),this.$element.append(this.$options),this.$leftOptions=c('<div class="left-options"></div>'),this.$options.prepend(this.$leftOptions),this.$mainOptions=c('<div class="main-options"></div>'),this.$options.append(this.$mainOptions),this.$rightOptions=c('<div class="right-options"></div>'),this.$options.append(this.$rightOptions),this.$feedbackButton=c('\n <button class="feedback btn imageBtn" title="'.concat(this.content.feedback,'">\n <i class="uv-icon uv-icon-feedback" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.feedback,"</span>\n </button>\n ")),this.$mainOptions.prepend(this.$feedbackButton),this.$openButton=c('\n <button class="open btn imageBtn" title="'.concat(this.content.open,'">\n <i class="uv-icon-open" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.open,"</span>\n </button>\n ")),this.$mainOptions.prepend(this.$openButton),this.$bookmarkButton=c('\n <button class="bookmark btn imageBtn" title="'.concat(this.content.bookmark,'">\n <i class="uv-icon uv-icon-bookmark" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.bookmark,"</span>\n </button>\n ")),this.$mainOptions.prepend(this.$bookmarkButton),this.$shareButton=c('\n <button class="share btn imageBtn" title="'.concat(this.content.share,'">\n <i class="uv-icon uv-icon-share" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.share,"</span>\n </button>\n ")),this.$mainOptions.append(this.$shareButton),this.$embedButton=c('\n <button class="embed btn imageBtn" title="'.concat(this.content.embed,'">\n <i class="uv-icon uv-icon-embed" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.embed,"</span>\n </button>\n ")),this.$mainOptions.append(this.$embedButton),this.$downloadButton=c('\n <button class="download btn imageBtn" title="'.concat(this.content.download,'" id="download-btn">\n <i class="uv-icon uv-icon-download" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.download,"</span>\n </button>\n ")),this.$mainOptions.prepend(this.$downloadButton),this.$fullScreenBtn=c('\n <button class="fullScreen btn imageBtn" title="'.concat(this.content.fullScreen,'">\n <i class="uv-icon uv-icon-fullscreen" aria-hidden="true"></i>\n <span class="sr-only">').concat(this.content.fullScreen,"</span>\n </button>\n ")),this.$mainOptions.append(this.$fullScreenBtn),this.$moreInfoButton=c('\n <button class="moreInfo btn imageBtn" title="'.concat(0!==c(".mainPanel.rightPanelOpen").length?this.content.closeRightPanel:this.content.openRightPanel,'">\n <i class="uv-icon uv-icon-more-info" aria-hidden="true"></i>\n <span class="sr-only">').concat(0!==c(".mainPanel.rightPanelOpen").length?this.content.closeRightPanel:this.content.openRightPanel,"</span>\n </button>\n ")),this.$rightOptions.append(this.$moreInfoButton),this.$toggleLeftPanelButton=c('\n <button class="toggleLeftPanelButton btn imageBtn" title="'.concat(0!==c(".mainPanel.leftPanelOpen").length?this.content.closeLeftPanel:this.content.openLeftPanel,'">\n <i class="uv-icon uv-icon-toggle-left-panel" aria-hidden="true"></i>\n <span class="sr-only">').concat(0!==c(".mainPanel.leftPanelOpen").length?this.content.closeLeftPanel:this.content.openLeftPanel,"</span>\n </button>\n ")),this.$leftOptions.append(this.$toggleLeftPanelButton),"none"!==c(".leftPanel").css("display")&&0!==c(".leftPanel").contents().length||this.$toggleLeftPanelButton.hide(),this.$openButton.onPressed((function(){e.extensionHost.publish(o.b.OPEN)})),this.$feedbackButton.onPressed((function(){e.extensionHost.publish(o.b.FEEDBACK)})),this.$bookmarkButton.onPressed((function(){e.extensionHost.publish(o.b.BOOKMARK)})),this.$shareButton.onPressed((function(){e.extensionHost.publish(o.b.SHOW_SHARE_DIALOGUE,e.$shareButton)})),this.$embedButton.onPressed((function(){e.extensionHost.publish(o.b.SHOW_EMBED_DIALOGUE,e.$embedButton)})),this.$downloadButton.onPressed((function(){e.extensionHost.publish(o.b.SHOW_DOWNLOAD_DIALOGUE,e.$downloadButton)})),this.$moreInfoButton.onPressed((function(){e.extensionHost.publish(o.b.TOGGLE_RIGHT_PANEL,e.$moreInfoButton);var t=0!==c(".mainPanel.rightPanelOpen").length?e.content.closeRightPanel:e.content.openRightPanel;e.$moreInfoButton.attr("title",t),e.$moreInfoButton.find(".sr-only").text(t)})),this.$toggleLeftPanelButton.onPressed((function(){e.extensionHost.publish(o.b.TOGGLE_LEFT_PANEL,e.$moreInfoButton);var t=0!==c(".mainPanel.leftPanelOpen").length?e.content.closeLeftPanel:e.content.openLeftPanel;e.$toggleLeftPanelButton.attr("title",t),e.$toggleLeftPanelButton.find(".sr-only").text(t)})),this.onAccessibleClick(this.$fullScreenBtn,(function(t){t.preventDefault(),e.extensionHost.publish(r.s.TOGGLE_FULLSCREEN)}),!0),a.YA.getBool(this.options.embedEnabled,!0)||this.$embedButton.hide(),this.updateMoreInfoButton(),this.updateOpenButton(),this.updateFeedbackButton(),this.updateBookmarkButton(),this.updateEmbedButton(),this.updateDownloadButton(),this.updateFullScreenButton(),this.updateShareButton(),this.updateMinimisedButtons()},e.prototype.updateMinimisedButtons=function(){a.YA.getBool(this.options.minimiseButtons,!1)||!this.extension.isDesktopMetric()?this.$options.find("span").addClass("sr-only"):this.$options.find("span").removeClass("sr-only")},e.prototype.updateMoreInfoButton=function(){},e.prototype.updateOpenButton=function(){a.YA.getBool(this.options.openEnabled,!1)&&a.jj.isInIFrame()?this.$openButton.show():this.$openButton.hide()},e.prototype.updateFullScreenButton=function(){a.YA.getBool(this.options.fullscreenEnabled,!0)&&a.jj.supportsFullscreen()?this.extension.isFullScreen()?(this.$fullScreenBtn.switchClass("fullScreen","exitFullscreen"),this.$fullScreenBtn.find("i").switchClass("uv-icon-fullscreen","uv-icon-exit-fullscreen"),this.$fullScreenBtn.attr("title",this.content.exitFullScreen),c(this.$fullScreenBtn[0].firstChild.nextSibling.nextSibling).replaceWith(this.content.exitFullScreen)):(this.$fullScreenBtn.switchClass("exitFullscreen","fullScreen"),this.$fullScreenBtn.find("i").switchClass("uv-icon-exit-fullscreen","uv-icon-fullscreen"),this.$fullScreenBtn.attr("title",this.content.fullScreen),c(this.$fullScreenBtn[0].firstChild.nextSibling.nextSibling).replaceWith(this.content.fullScreen)):this.$fullScreenBtn.hide()},e.prototype.updateEmbedButton=function(){this.extension.helper.isUIEnabled("embed")&&a.YA.getBool(this.options.embedEnabled,!1)?this.extension.isMobile()||this.$embedButton.show():this.$embedButton.hide()},e.prototype.updateShareButton=function(){this.extension.helper.isUIEnabled("share")&&a.YA.getBool(this.options.shareEnabled,!0)?this.$shareButton.show():this.$shareButton.hide()},e.prototype.updateDownloadButton=function(){a.YA.getBool(this.options.downloadEnabled,!0)?this.$downloadButton.show():this.$downloadButton.hide()},e.prototype.updateFeedbackButton=function(){a.YA.getBool(this.options.feedbackEnabled,!1)?this.$feedbackButton.show():this.$feedbackButton.hide()},e.prototype.updateBookmarkButton=function(){a.YA.getBool(this.options.bookmarkEnabled,!1)?this.$bookmarkButton.show():this.$bookmarkButton.hide()},e.prototype.resize=function(){t.prototype.resize.call(this)},e}(s.P)},2050:(t,e,n)=>{n.d(e,{e:()=>f});var i,o=n(4194),s=n(4598),a=function(t,e){this.message=t,this.actions=e},r=function(){},l=n(3115),c=function(){function t(t){this.extension=t}return t.prototype.Get=function(t){var e=this;switch(t.informationType){case l.J.AUTH_CORS_ERROR:return new a(this.extension.data.config.content.authCORSError,[]);case l.J.DEGRADED_RESOURCE:var n=[],i=new r,s=void 0;(s=t.param.loginService?t.param.loginService.getConfirmLabel():t.param.kioskService.getConfirmLabel())||(s=this.extension.data.config.content.fallbackDegradedLabel||"login"),i.label=s;var c=t.param;i.action=function(){t.param.loginService&&(c.authHoldingPage=window.open("","_blank")),e.extension.extensionHost.publish(o.b.HIDE_INFORMATION),e.extension.extensionHost.publish(o.b.OPEN_EXTERNAL_RESOURCE,[[c]])},n.push(i);var h=void 0;return(h=t.param.loginService?t.param.loginService.getServiceLabel():t.param.kioskService.getServiceLabel())||(h=this.extension.data.config.content.fallbackDegradedMessage),new a(h,n)}},t}(),h=n(4342),u=n(41),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=n(4692),f=function(t){function e(e){return t.call(this,e,!1,!1)||this}return p(e,t),e.prototype.create=function(){var e=this;this.setConfig("headerPanel"),t.prototype.create.call(this),this.extensionHost.subscribe(o.b.SHOW_INFORMATION,(function(t){e.showInformation(Array.isArray(t)?t[0]:t)})),this.extensionHost.subscribe(o.b.HIDE_INFORMATION,(function(){e.hideInformation()})),this.$options=d('<div class="options"></div>'),this.$element.append(this.$options),this.$centerOptions=d('<div class="centerOptions"></div>'),this.$options.append(this.$centerOptions),this.$rightOptions=d('<div class="rightOptions"></div>'),this.$options.append(this.$rightOptions),this.$localeToggleButton=d('<a class="localeToggle" tabindex="0"></a>'),this.$rightOptions.append(this.$localeToggleButton),this.$settingsButton=d('\n <button class="btn imageBtn settings" tabindex="0" title="'.concat(this.content.settings,'">\n <i class="uv-icon-settings" aria-hidden="true"></i>\n </button>\n ')),this.$settingsButton.attr("title",this.content.settings),this.$rightOptions.append(this.$settingsButton),this.$helpButton=d('\n <a class="btn imageBtn help" tabindex="0" title="'.concat(this.content.help,'" role="button">\n <i class="uv-icon-help" aria-hidden="true"></i>\n </a>\n ')),this.$rightOptions.append(this.$helpButton),this.$informationBox=d('<div class="informationBox" aria-hidden="true"> <div class="message"></div> <div class="actions"></div> <button type="button" class="close"> <span aria-hidden="true">×</span> </button> </div>'),this.$element.append(this.$informationBox),this.$informationBox.hide();var n=this.$informationBox.find(".close");n.attr("aria-label",this.content.close),n.attr("title",this.content.close),n.on("click",(function(t){t.preventDefault(),e.extensionHost.publish(o.b.HIDE_INFORMATION)})),this.$localeToggleButton.on("click",(function(){e.extension.changeLocale(String(e.$localeToggleButton.data("locale")))})),this.$settingsButton.onPressed((function(){e.extensionHost.publish(o.b.SHOW_SETTINGS_DIALOGUE,e.$settingsButton)})),h.YA.getBool(this.options.centerOptionsEnabled,!0)||this.$centerOptions.hide(),this.updateLocaleToggle(),this.updateSettingsButton()},e.prototype.updateLocaleToggle=function(){if(this.localeToggleIsVisible()){var t=this.extension.getAlternateLocale(),e=t.name.split("-")[0].toUpperCase();this.$localeToggleButton.data("locale",t.name),this.$localeToggleButton.attr("title",t.label),this.$localeToggleButton.text(e)}else this.$localeToggleButton.hide()},e.prototype.updateSettingsButton=function(){h.YA.getBool(this.options.settingsButtonEnabled,!0)?this.$settingsButton.show():this.$settingsButton.hide()},e.prototype.localeToggleIsVisible=function(){var t=this.extension.data.locales;return!!t&&t.length>1&&h.YA.getBool(this.options.localeToggleEnabled,!1)},e.prototype.showInformation=function(t){var e=new c(this.extension);if(this.information=e.Get(t),this.information){this.$informationBox.find(".message").html(this.information.message).find("a").attr("target","_top");var n=this.$informationBox.find(".actions");n.empty();for(var i=0;i<this.information.actions.length;i++){var s=this.information.actions[i],a=d('<a href="#" class="btn btn-default">'+s.label+"</a>");a.on("click",s.action),n.append(a)}this.extensionHost.publish(o.b.MESSAGE_DISPLAYED,this.information),this.$informationBox.attr("aria-hidden","false"),this.$informationBox.show(),this.$element.addClass("showInformation"),this.extension.resize()}},e.prototype.hideInformation=function(){this.$element.removeClass("showInformation"),this.$informationBox.attr("aria-hidden","true"),this.$informationBox.hide(),this.extension.resize()},e.prototype.getSettings=function(){return this.extension.getSettings()},e.prototype.updateSettings=function(t){this.extension.updateSettings(t),this.extensionHost.publish(o.b.UPDATE_SETTINGS,t)},e.prototype.resize=function(){var e=this;t.prototype.resize.call(this);var n=this.$element.width()/2-this.$centerOptions.outerWidth()/2;if(this.$centerOptions.css({left:n}),(0,u.zN)(this.$informationBox)){var i=this.$informationBox.find(".actions"),o=this.$informationBox.find(".message");o.width(Math.floor(this.$element.width())-Math.ceil(o.horizontalMargins())-Math.ceil(i.outerWidth(!0))-Math.ceil(this.$informationBox.find(".close").outerWidth(!0))-2),this.information&&o.text(this.information.message)}this.$helpButton.onPressed((function(){window.open(e.options.helpUrl)})),this.options.helpEnabled&&this.options.helpUrl?this.$helpButton.show():this.$helpButton.hide(),this.extension.isMobileMetric()?this.localeToggleIsVisible()&&this.$localeToggleButton.hide():this.localeToggleIsVisible()&&this.$localeToggleButton.show()},e}(s.P)},3115:(t,e,n)=>{var i;n.d(e,{J:()=>i}),function(t){t[t.AUTH_CORS_ERROR=0]="AUTH_CORS_ERROR",t[t.DEGRADED_RESOURCE=1]="DEGRADED_RESOURCE"}(i||(i={}))},2668:(t,e,n)=>{n.d(e,{W:()=>l});var i,o=n(4342),s=n(4194),a=n(8719),r=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){return t.call(this,e,!1,!1)||this}return r(e,t),e.prototype.create=function(){var e=this;t.prototype.create.call(this),this.extensionHost.subscribe(s.b.TOGGLE_EXPAND_LEFT_PANEL,(function(){e.isFullyExpanded?e.collapseFull():e.expandFull()}))},e.prototype.init=function(){var e=this;t.prototype.init.call(this),o.YA.getBool(this.extension.getSettings().leftPanelOpen,this.options.panelOpen&&!this.extension.isMetric("sm"))&&this.toggle(!0),this.extensionHost.subscribe(s.b.TOGGLE_LEFT_PANEL,(function(){e.toggle()})),this.extensionHost.subscribe(s.b.TOGGLE_RIGHT_PANEL,(function(){e.extension.isMetric("sm")&&e.isExpanded&&e.toggle(!0)})),this.extensionHost.subscribe(s.b.THUMB_SELECTED,(function(){e.extension.isMetric("sm")&&e.toggle()}))},e.prototype.getTargetWidth=function(){return this.isFullyExpanded||!this.isExpanded?this.options.panelExpandedWidth:this.options.panelCollapsedWidth},e.prototype.getFullTargetWidth=function(){return this.$element.parent().width()},e.prototype.toggleFinish=function(){t.prototype.toggleFinish.call(this),this.isExpanded?this.extensionHost.publish(s.b.OPEN_LEFT_PANEL):this.extensionHost.publish(s.b.CLOSE_LEFT_PANEL),this.extension.updateSettings({leftPanelOpen:this.isExpanded}),this.$element.toggleClass("open-finished")},e.prototype.resize=function(){t.prototype.resize.call(this)},e.prototype.toggle=function(e){this.isExpanded?this.$element.parent().removeClass("leftPanelOpen"):this.$element.parent().addClass("leftPanelOpen"),t.prototype.toggle.call(this,e)},e.prototype.expandFull=function(){this.$element.parent().addClass("leftPanelOpenFull"),this.$element.addClass("open"),t.prototype.expandFull.call(this)},e.prototype.collapseFull=function(){this.$element.parent().removeClass("leftPanelOpenFull"),this.$element.parent().hasClass("leftPanelOpen")||this.$element.parent().addClass("leftPanelOpen"),t.prototype.collapseFull.call(this)},e}(a.k)},6030:(t,e,n)=>{var i;n.d(e,{y:()=>i}),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_CENTER=1]="TOP_CENTER",t[t.TOP_RIGHT=2]="TOP_RIGHT",t[t.CENTER_LEFT=3]="CENTER_LEFT",t[t.CENTER=4]="CENTER",t[t.CENTER_RIGHT=5]="CENTER_RIGHT",t[t.BOTTOM_LEFT=6]="BOTTOM_LEFT",t[t.BOTTOM_CENTER=7]="BOTTOM_CENTER",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(i||(i={}))}}]);