@acdh-oeaw/universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
2 lines • 266 kB
JavaScript
/*! For license information please see 2568.692e9a5962ece6f2c181.js.LICENSE.txt */
(self.webpackChunkUV=self.webpackChunkUV||[]).push([[2568],{3664:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var r=function(){function e(e){this.options=e,this.options.data=Object.assign({},this.data(),e.data)}return e.prototype._init=function(){return this.el=this.options.target,this.el?(this.el.innerHTML="",!0):(console.warn("element not found"),!1)},e.prototype.data=function(){return{}},e.prototype.on=function(e,t,n){var r=this._e||(this._e={});(r[e]||(r[e]=[])).push({fn:t,ctx:n})},e.prototype.fire=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=[].slice.call(arguments,1),i=((this._e||(this._e={}))[e]||[]).slice(),a=0,o=i.length;a<o;a++)i[a].fn.apply(i[a].ctx,r)},e.prototype._resize=function(){},e.prototype.set=function(e){},e}()},8210:(e,t,n)=>{"use strict";var r,i,a,o,l,s,u,c,f;n.d(t,{A:()=>_}),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(r||(r={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(i||(i={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.CONTENT_AS_TEXT="contentastext",e.DOCUMENT="document",e.IMAGE="image",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(a||(a={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(o||(o={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DRACO="application/draco",e.GLTF="model/gltf+json",e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.VIDEO_MP4="video/mp4",e.WEBM="video/webm"}(l||(l={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(s||(s={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(u||(u={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(c||(c={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(f||(f={}));var d,p=n(3664),h=n(4342),g=n(4692),v=(d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},d(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),_=function(e){function t(t){var n=e.call(this,t)||this;return n._data=n.data(),n._data=n.options.data,n._init(),n._resize(),n}return v(t,e),t.prototype._init=function(){var t=this;e.prototype._init.call(this),this._$element=g(this.el),this._$header=g('<div class="header"></div>'),this._$element.append(this._$header),this._$leftOptions=g('<div class="left"></div>'),this._$header.append(this._$leftOptions),this._$rightOptions=g('<div class="right"></div>'),this._$header.append(this._$rightOptions),this._$sizeDownButton=g('<input class="btn btn-default size-down" type="button" value="-" />'),this._$leftOptions.append(this._$sizeDownButton),this._$sizeRange=g('<input type="range" name="size" min="1" max="10" value="'+this.options.data.initialZoom+'" />'),this._$leftOptions.append(this._$sizeRange),this._$sizeUpButton=g('<input class="btn btn-default size-up" type="button" value="+" />'),this._$leftOptions.append(this._$sizeUpButton),this._$multiSelectOptions=g('<div class="multiSelectOptions"></div>'),this._$rightOptions.append(this._$multiSelectOptions),this._$selectAllButton=g('<div class="multiSelectAll"><input id="multiSelectAll" type="checkbox" tabindex="0" /><label for="multiSelectAll">'+this.options.data.content.selectAll+"</label></div>"),this._$multiSelectOptions.append(this._$selectAllButton),this._$selectAllButtonCheckbox=g(this._$selectAllButton.find("input:checkbox")),this._$selectButton=g('<a class="select" href="#">'+this.options.data.content.select+"</a>"),this._$multiSelectOptions.append(this._$selectButton),this._$main=g('<div class="main"></div>'),this._$element.append(this._$main),this._$thumbs=g('<div class="thumbs"></div>'),this._$main.append(this._$thumbs),this._$sizeDownButton.on("click",(function(){var e=Number(t._$sizeRange.val())-1;e>=Number(t._$sizeRange.attr("min"))&&(t._$sizeRange.val(e.toString()),t._$sizeRange.trigger("change"),t.fire(m.DECREASE_SIZE))})),this._$sizeUpButton.on("click",(function(){var e=Number(t._$sizeRange.val())+1;e<=Number(t._$sizeRange.attr("max"))&&(t._$sizeRange.val(e.toString()),t._$sizeRange.trigger("change"),t.fire(m.INCREASE_SIZE))})),this._$sizeRange.on("change",(function(){t._updateThumbs(),t._scrollToThumb(t._getSelectedThumbIndex())})),this._$selectAllButton.checkboxButton((function(e){var n=t._getMultiSelectState();n&&(e?n.selectAll(!0):n.selectAll(!1)),t.set(t.options.data)})),this._$selectButton.on("click",(function(){var e=t._getMultiSelectState();if(e){var n=e.getAllSelectedCanvases().map((function(e){return e.id}));t.fire(m.MULTISELECTION_MADE,n)}})),this._setRange(),g.templates({galleryThumbsTemplate:'\t\t\t\t<button class="{{:~galleryThumbClassName()}}" data-src="{{>uri}}" data-index="{{>index}}" data-visible="{{>visible}}" data-width="{{>width}}" data-height="{{>height}}" data-initialwidth="{{>initialWidth}}" data-initialheight="{{>initialHeight}}">\t\t\t\t\t\t<div class="wrap" style="width:{{>initialWidth}}px; height:{{>initialHeight}}px" data-link="class{merge:multiSelected toggle=\'multiSelected\'}">\t\t\t\t\t\t{^{if multiSelectEnabled}}\t\t\t\t\t\t\t\t<input id="thumb-checkbox-{{>id}}" tabindex="-1" type="checkbox" data-link="checked{:multiSelected ? \'checked\' : \'\'}" class="multiSelect" />\t\t\t\t\t\t{{/if}}\t\t\t\t\t\t</div>\t\t\t\t\t\t<div class="info">\t\t\t\t\t\t\t\t<span class="index" style="width:{{>initialWidth}}px">{{:#index + 1}}</span>\t\t\t\t\t\t\t\t<span class="label" style="width:{{>initialWidth}}px" title="{{>label}}">{{>label}} </span>\t\t\t\t\t\t\t\t<span class="searchResults" title="{{:~galleryThumbSearchResultsTitle()}}">{{>data.searchResults}}</span>\t\t\t\t\t\t</div>\t\t\t\t</button>'});var n=this;return g.views.helpers({galleryThumbClassName:function(){var e="thumb preLoad";return 0===this.data.index&&(e+=" first"),this.data.uri||(e+=" placeholder"),e},galleryThumbSearchResultsTitle:function(){var e=Number(this.data.data.searchResults);return e?e>1?h.DH.format(n.options.data.content.searchResults,e.toString()):h.DH.format(n.options.data.content.searchResult,e.toString()):null}}),this._$main.on("scroll",(function(){t._updateThumbs()}),this.options.data.scrollStopDuration),this.options.data.sizingEnabled||this._$sizeRange.hide(),!0},t.prototype.data=function(){return{chunkedResizingThreshold:400,content:{searchResult:"{0} search result",searchResults:"{0} search results",select:"Select",selectAll:"Select All"},debug:!1,helper:null,imageFadeInDuration:300,initialZoom:6,minLabelWidth:20,pageModeEnabled:!1,scrollStopDuration:100,searchResults:[],sizingEnabled:!0,thumbHeight:320,thumbLoadPadding:3,thumbWidth:200,viewingDirection:c.LEFT_TO_RIGHT}},t.prototype.set=function(e){if(this._data=Object.assign(this._data,e),this._data.helper&&void 0!==this._data.thumbWidth&&void 0!==this._data.thumbHeight&&(this._thumbs=this._data.helper.getThumbs(this._data.thumbWidth,this._data.thumbHeight)),this._data.viewingDirection&&(this._data.viewingDirection===c.BOTTOM_TO_TOP&&this._thumbs.reverse(),this._$thumbs.addClass(this._data.viewingDirection)),this._data.searchResults&&this._data.searchResults.length)for(var t=0;t<this._data.searchResults.length;t++){var n=this._data.searchResults[t],r=this._thumbs.filter((function(e){return e.index===n.canvasIndex}))[0],i=g.extend(!0,{},r.data);i.searchResults=n.rects.length,r.data=i}this._thumbsCache=null,this._createThumbs(),this._data.helper&&this.selectIndex(this._data.helper.canvasIndex);var a=this._getMultiSelectState();if(a&&a.isEnabled){for(this._$multiSelectOptions.show(),this._$thumbs.addClass("multiSelect"),t=0;t<a.canvases.length;t++){var o=a.canvases[t];r=this._getThumbByCanvas(o),this._setThumbMultiSelected(r,o.multiSelected)}for(t=0;t<a.ranges.length;t++)for(var l=a.ranges[t],s=this._getThumbsByRange(l),u=0;u<s.length;u++)r=s[u],this._setThumbMultiSelected(r,l.multiSelected)}else this._$multiSelectOptions.hide(),this._$thumbs.removeClass("multiSelect")},t.prototype._update=function(){var e=this._getMultiSelectState();e&&e.isEnabled&&(this._$selectAllButtonCheckbox.prop("checked",e.allSelected()),e.getAll().filter((function(e){return e.multiSelected})).length>0?this._$selectButton.show():this._$selectButton.hide())},t.prototype._getMultiSelectState=function(){return this._data.helper?this._data.helper.getMultiSelectState():null},t.prototype._createThumbs=function(){var e=this;if(this._thumbs){this._$thumbs.undelegate(".thumb","click"),this._$thumbs.empty();for(var t=this._getMultiSelectState(),n=[],r=0;r<this._thumbs.length;r++){var i=(s=this._thumbs[r]).width,a=s.height;s.initialWidth=i,n.push(a),s.multiSelectEnabled=!!t&&t.isEnabled}for(var o=h.eC.median(n),l=0;l<this._thumbs.length;l++){var s;(s=this._thumbs[l]).initialHeight=o}if(this._$thumbs.link(g.templates.galleryThumbsTemplate,this._thumbs),t&&!t.isEnabled)this._$thumbs.delegate(".thumb","click",(function(t){t.preventDefault();var n=g.view(this).data;e.fire(m.THUMB_SELECTED,n)}));else for(var u=this._$thumbs.find(".thumb"),c=function(){var e=f;g(u[d]).checkboxButton((function(t){var n=g.view(this).data;e._setThumbMultiSelected(n,!n.multiSelected);var r=e.options.data.helper.getCanvasRange(n.data),i=e._getMultiSelectState();i&&(r?i.selectRange(r,n.multiSelected):i.selectCanvas(n.data,n.multiSelected)),e._update(),e.fire(m.THUMB_MULTISELECTED,n)}))},f=this,d=0;d<u.length;d++)c()}},t.prototype._getThumbByCanvas=function(e){return this._thumbs.filter((function(t){return t.data.id===e.id}))[0]},t.prototype._sizeThumb=function(e){var t=e.data().initialwidth,n=e.data().initialheight,r=Number(t),i=Number(n),a=Math.floor(r*this._range),o=Math.floor(i*this._range),l=e.find(".wrap"),s=e.find(".label"),u=e.find(".index"),c=e.find(".searchResults"),f=a;this._data.searchResults&&this._data.searchResults.length&&(c.show(),f=a-c.outerWidth(),void 0!==this._data.minLabelWidth&&f<this._data.minLabelWidth?(c.hide(),f=a):c.show()),this._data.pageModeEnabled?(u.hide(),s.show()):(u.show(),s.hide()),l.outerWidth(a),l.outerHeight(o),u.outerWidth(f),s.outerWidth(f)},t.prototype._loadThumb=function(e,t){var n=e.find(".wrap");if(!n.hasClass("loading")&&!n.hasClass("loaded")){e.removeClass("preLoad");var r=e.attr("data-visible"),i=this._data.imageFadeInDuration||0;if("false"!==r){n.addClass("loading");var a=e.attr("data-src"),o=g('<img class="thumbImage" src="'+a+'" />');o.hide(),o.on("load",(function(){g(this).fadeIn(i,(function(){g(this).parent().switchClass("loading","loaded")}))})),n.prepend(o),t&&t(o)}else n.addClass("hidden")}},t.prototype._getThumbsByRange=function(e){var t=[];if(!this._data.helper)return t;for(var n=0;n<this._thumbs.length;n++){var r=this._thumbs[n],i=r.data,a=this._data.helper.getCanvasRange(i,e.path);a&&a.id===e.id&&t.push(r)}return t},t.prototype._updateThumbs=function(){var e=!!this._data.debug;this._setRange();var t=this._$main.scrollTop(),n=t+this._$main.height();e&&console.log("scrollTop %s, scrollBottom %s",t,n);for(var r=this._getAllThumbs(),i=0,a=0;a<r.length;a++){var o=g(r[a]),l=o.position().top,s=o.outerHeight(),u=l+s,c=s*this._data.thumbLoadPadding;l<=n+c&&u>=t-c?(i+=1,this._sizeThumb(o),o.addClass("insideScrollArea"),this._loadThumb(o)):o.removeClass("insideScrollArea")}e&&console.log("number of thumbs to update: "+i)},t.prototype._getSelectedThumbIndex=function(){return Number(this._$selectedThumb.data("index"))},t.prototype._getAllThumbs=function(){return this._thumbsCache||(this._thumbsCache=this._$thumbs.find(".thumb")),this._thumbsCache},t.prototype._getThumbByIndex=function(e){return this._$thumbs.find('[data-index="'+e+'"]')},t.prototype._scrollToThumb=function(e){var t=this._getThumbByIndex(e);this._$main.scrollTop(t.position().top)},t.prototype.selectIndex=function(e){this._thumbs&&this._thumbs.length&&(this._getAllThumbs().removeClass("selected"),this._$selectedThumb=this._getThumbByIndex(e),this._$selectedThumb.addClass("selected"),this._scrollToThumb(e),this._updateThumbs())},t.prototype._setRange=function(){var e=h.eC.normalise(Number(this._$sizeRange.val()),0,10);this._range=h.eC.clamp(e,.05,1)},t.prototype._setThumbMultiSelected=function(e,t){g.observable(e).setProperty("multiSelected",t)},t.prototype._resize=function(){},t}(p.$),m=function(){function e(){}return e.DECREASE_SIZE="decreaseSize",e.INCREASE_SIZE="increaseSize",e.MULTISELECTION_MADE="multiSelectionMade",e.THUMB_SELECTED="thumbSelected",e.THUMB_MULTISELECTED="thumbMultiSelected",e}()},4427:function(e,t,n){var r=n(4692);"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(6)),r(n(7)),r(n(8)),r(n(9)),r(n(10)),r(n(11)),r(n(12)),r(n(13)),r(n(14)),r(n(15)),r(n(16)),r(n(17)),r(n(18)),r(n(19)),r(n(20)),r(n(21)),r(n(22)),r(n(23)),r(n(24)),r(n(25)),r(n(26)),r(n(27)),r(n(28)),r(n(29)),r(n(30)),r(n(31)),r(n(32)),r(n(2))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(t.AnnotationMotivation||(t.AnnotationMotivation={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(t.Behavior||(t.Behavior={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.CONTENT_AS_TEXT="contentastext",e.DOCUMENT="document",e.IMAGE="image",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(t.ExternalResourceType||(t.ExternalResourceType={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(t.IIIFResourceType||(t.IIIFResourceType={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DRACO="application/draco",e.GLTF="model/gltf+json",e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.VIDEO_MP4="video/mp4",e.WEBM="video/webm"}(t.MediaType||(t.MediaType={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(t.RenderingFormat||(t.RenderingFormat={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(t.ServiceProfile||(t.ServiceProfile={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(t.ViewingDirection||(t.ViewingDirection={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(t.ViewingHint||(t.ViewingHint={}))},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{s(r.next(e))}catch(e){a(e)}}function l(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}s((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),l=n(33);n(34);var s=function(){function e(){}return e.getMediaType=function(e){return(e=(e=e.toLowerCase()).split(";")[0]).trim()},e.getImageQuality=function(e){return e===o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1||e===o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2||e===o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1||e===o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2||e===o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1||e===o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2||e===o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1||e===o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2||e===o.ServiceProfile.IMAGE_1_LEVEL_1||e===o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1||e===o.ServiceProfile.IMAGE_1_LEVEL_2||e===o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2?"native":"default"},e.getInexactLocale=function(e){return-1!==e.indexOf("-")?e.substr(0,e.indexOf("-")):e},e.getLocalisedValue=function(e,t){if(!Array.isArray(e))return e;for(var n=0;n<e.length;n++){var r=e[n];if(t===r["@language"])return r["@value"]}var i=t.substr(0,t.indexOf("-"));for(n=0;n<e.length;n++){var a=e[n];if(a["@language"]===i)return a["@value"]}return null},e.generateTreeNodeIds=function(t,n){var r;void 0===n&&(n=0),r=t.parentNode?t.parentNode.id+"-"+n:"0",t.id=r;for(var i=0;i<t.nodes.length;i++){var a=t.nodes[i];e.generateTreeNodeIds(a,i)}},e.normaliseType=function(e){return-1!==(e=e.toLowerCase()).indexOf(":")?e.split(":")[1]:e},e.normaliseUrl=function(e){return-1!==(e=e.substr(e.indexOf("://"))).indexOf("#")&&(e=e.split("#")[0]),e},e.normalisedUrlsMatch=function(t,n){return e.normaliseUrl(t)===e.normaliseUrl(n)},e.isImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},e.isLevel0ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_0)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_0))},e.isLevel1ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_1)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_1))},e.isLevel2ImageProfile=function(t){return!!(e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_COMPLIANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_0_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_CONFORMANCE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_1_PROFILE_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_LEVEL_2)||e.normalisedUrlsMatch(t,o.ServiceProfile.IMAGE_2_PROFILE_LEVEL_2))},e.parseManifest=function(e,t){return a.Deserialiser.parse(e,t)},e.checkStatus=function(e){if(e.ok)return e;var t=new Error(e.statusText);return t.response=e,Promise.reject(t)},e.loadManifest=function(t){return new Promise((function(n){fetch(t).then(e.checkStatus).then((function(e){return e.json()})).then((function(e){n(e)}))}))},e.loadExternalResourcesAuth1=function(t,n,r,i,a,o,l,s){return new Promise((function(u,c){var f=t.map((function(t){return e.loadExternalResourceAuth1(t,n,r,i,a,o,l,s)}));Promise.all(f).then((function(){u(t)})).catch((function(e){c(e)}))}))},e.loadExternalResourceAuth1=function(t,n,a,o,s,u,c,f){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,o(t)];case 1:return(r=i.sent())?[4,t.getData(r)]:[3,6];case 2:return i.sent(),t.status!==l.OK?[3,3]:[2,t];case 3:return[4,e.doAuthChain(t,n,a,s,u,c,f)];case 4:i.sent(),i.label=5;case 5:if(t.status===l.OK||t.status===l.MOVED_TEMPORARILY)return[2,t];throw e.createAuthorizationFailedError();case 6:return[4,t.getData()];case 7:return i.sent(),t.status!==l.MOVED_TEMPORARILY&&t.status!==l.UNAUTHORIZED?[3,9]:[4,e.doAuthChain(t,n,a,s,u,c,f)];case 8:i.sent(),i.label=9;case 9:if(t.status===l.OK||t.status===l.MOVED_TEMPORARILY)return[2,t];throw e.createAuthorizationFailedError()}}))}))},e.doAuthChain=function(t,n,a,o,s,u,c){return r(this,void 0,void 0,(function(){var r,f,d,p,h,g,v,_;return i(this,(function(i){switch(i.label){case 0:return t.isAccessControlled()?((r=t.externalService)&&(r.options=t.options),(f=t.kioskService)&&(f.options=t.options),(d=t.clickThroughService)&&(d.options=t.options),(p=t.loginService)&&(p.options=t.options),t.isResponseHandled||t.status!==l.MOVED_TEMPORARILY?[3,2]:[4,u(t)]):[2,t];case 1:case 3:case 6:case 10:case 14:return i.sent(),[2,t];case 2:return h=null,g=null,(h=r)?(g=h,[4,e.attemptResourceWithToken(t,a,h)]):[3,4];case 4:return(h=f)?(g=h,(v=n(h))?[4,o(v)]:[3,7]):[3,7];case 5:case 9:case 13:return i.sent(),[4,e.attemptResourceWithToken(t,a,h)];case 7:return(h=d)?(g=h,[4,s(t,h)]):[3,11];case 8:return(_=i.sent())?[4,o(_)]:[3,11];case 11:return(h=p)?(g=h,[4,s(t,h)]):[3,15];case 12:return(_=i.sent())?[4,o(_)]:[3,15];case 15:return g&&c(t,g),[2]}}))}))},e.attemptResourceWithToken=function(e,t,n){return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return(r=n.getService(o.ServiceProfile.AUTH_1_TOKEN))?[4,t(e,r)]:[3,3];case 1:return(a=i.sent())&&a.accessToken?[4,e.getData(a)]:[3,3];case 2:return i.sent(),[2,e];case 3:return[2]}}))}))},e.loadExternalResourcesAuth09=function(t,n,r,i,a,o,l,s,u,c){return new Promise((function(f,d){var p=t.map((function(t){return e.loadExternalResourceAuth09(t,n,r,i,a,o,l,s,u,c)}));Promise.all(p).then((function(){f(t)})).catch((function(e){d(e)}))}))},e.loadExternalResourceAuth09=function(t,n,r,i,a,o,s,u,c,f){return new Promise((function(d,p){f&&f.pessimisticAccessControl?t.getData().then((function(){t.isAccessControlled()?t.clickThroughService?(d(r(t)),d(i(t))):a(t).then((function(){o(t,!0).then((function(n){t.getData(n).then((function(){d(c(t))})).catch((function(t){p(e.createInternalServerError(t))}))})).catch((function(t){p(e.createInternalServerError(t))}))})).catch((function(t){p(e.createInternalServerError(t))})):d(t)})).catch((function(t){p(e.createInternalServerError(t))})):u(t,n).then((function(f){f?t.getData(f).then((function(){t.status===l.OK?d(c(t)):e.authorize(t,n,r,i,a,o,s,u).then((function(){d(c(t))})).catch((function(t){p(e.createAuthorizationFailedError())}))})).catch((function(t){p(e.createAuthorizationFailedError())})):e.authorize(t,n,r,i,a,o,s,u).then((function(){d(c(t))})).catch((function(t){p(e.createAuthorizationFailedError())}))})).catch((function(t){p(e.createAuthorizationFailedError())}))}))},e.createError=function(e,t){var n=new Error;return n.message=t,n.name=String(e),n},e.createAuthorizationFailedError=function(){return e.createError(a.StatusCode.AUTHORIZATION_FAILED,"Authorization failed")},e.createRestrictedError=function(){return e.createError(a.StatusCode.RESTRICTED,"Restricted")},e.createInternalServerError=function(t){return e.createError(a.StatusCode.INTERNAL_SERVER_ERROR,t)},e.authorize=function(t,n,r,i,a,o,s,u){return new Promise((function(c,f){t.getData().then((function(){t.isAccessControlled()?u(t,n).then((function(u){u?t.getData(u).then((function(){t.status===l.OK?c(t):e.showAuthInteraction(t,n,r,i,a,o,s,c,f)})).catch((function(t){f(e.createInternalServerError(t))})):o(t,!1).then((function(u){u?s(t,u,n).then((function(){t.getData(u).then((function(){t.status===l.OK?c(t):e.showAuthInteraction(t,n,r,i,a,o,s,c,f)})).catch((function(t){f(e.createInternalServerError(t))}))})).catch((function(t){f(e.createInternalServerError(t))})):e.showAuthInteraction(t,n,r,i,a,o,s,c,f)}))})).catch((function(t){f(e.createInternalServerError(t))})):c(t)}))}))},e.showAuthInteraction=function(t,n,r,i,a,o,s,u,c){t.status!==l.MOVED_TEMPORARILY||t.isResponseHandled?t.clickThroughService&&!t.isResponseHandled?r(t).then((function(){o(t,!0).then((function(r){s(t,r,n).then((function(){t.getData(r).then((function(){u(t)})).catch((function(t){c(e.createInternalServerError(t))}))})).catch((function(t){c(e.createInternalServerError(t))}))})).catch((function(t){c(e.createInternalServerError(t))}))})):a(t).then((function(){o(t,!0).then((function(r){s(t,r,n).then((function(){t.getData(r).then((function(){u(t)})).catch((function(t){c(e.createInternalServerError(t))}))})).catch((function(t){c(e.createInternalServerError(t))}))})).catch((function(t){c(e.createInternalServerError(t))}))})):u(t)},e.getService=function(e,t){for(var n=this.getServices(e),r=0;r<n.length;r++){var i=n[r];if(i.getProfile()===t)return i}return null},e.getResourceById=function(t,n){return e.traverseAndFind(t.__jsonld,"@id",n)},e.traverseAndFind=function(t,n,r){if(t.hasOwnProperty(n)&&t[n]===r)return t;for(var i=0;i<Object.keys(t).length;i++)if("object"==typeof t[Object.keys(t)[i]]){var a=e.traverseAndFind(t[Object.keys(t)[i]],n,r);if(null!=a)return a}},e.getServices=function(e){var t,n=[];if(!(t=e.__jsonld?e.__jsonld.service:e.service))return n;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var i=t[r];if("string"==typeof i){var o=this.getResourceById(e.options.resource,i);o&&n.push(new a.Service(o.__jsonld||o,e.options))}else n.push(new a.Service(i,e.options))}return n},e.getTemporalComponent=function(e){var t=/t=([^&]+)/g.exec(e),n=null;return t&&t[1]&&(n=t[1].split(",")),n},e}();t.Utils=s},function(e,t,n){"use strict";n.r(t),t.default=function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,a=[],o=[],l={},s=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:s,headers:{keys:function(){return a},entries:function(){return o},get:function(e){return l[e.toLowerCase()]},has:function(e){return e.toLowerCase()in l}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){a.push(t=t.toLowerCase()),o.push([t,n]),l[t]=l[t]?l[t]+","+n:n})),n(s())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)}))}},function(e,t,n){e.exports=n(5)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(0));var r=n(2);t.loadManifest=function(e){return r.Utils.loadManifest(e)},t.parseManifest=function(e,t){return r.Utils.parseManifest(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.__jsonld=e,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return e.prototype.getProperty=function(e){var t=null;return this.__jsonld&&((t=this.__jsonld[e])||(t=this.__jsonld["@"+e])),t},e}();t.JSONLDResource=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.options=n,r}return i(t,e),t.prototype.getIIIFResourceType=function(){return a.Utils.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var e=this.getProperty("label");return e?a.LanguageMap.parse(e,this.options.locale):[]},t.prototype.getDefaultLabel=function(){return a.LanguageMap.getValue(this.getLabel())},t.prototype.getMetadata=function(){var e=this.getProperty("metadata"),t=[];if(!e)return t;for(var n=0;n<e.length;n++){var r=e[n],i=new a.LabelValuePair(this.options.locale);i.parse(r),t.push(i)}return t},t.prototype.getRendering=function(e){for(var t=this.getRenderings(),n=0;n<t.length;n++){var r=t[n];if(r.getFormat()===e)return r}return null},t.prototype.getRenderings=function(){var e,t=[];if(!(e=this.__jsonld?this.__jsonld.rendering:this.rendering))return t;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var r=e[n];t.push(new a.Rendering(r,this.options))}return t},t.prototype.getService=function(e){return a.Utils.getService(this,e)},t.prototype.getServices=function(){return a.Utils.getServices(this)},t.prototype.getThumbnail=function(){var e=this.getProperty("thumbnail");return Array.isArray(e)&&(e=e[0]),e?new a.Thumbnail(e,this.options):null},t.prototype.isAnnotation=function(){return this.getIIIFResourceType()===o.IIIFResourceType.ANNOTATION},t.prototype.isCanvas=function(){return this.getIIIFResourceType()===o.IIIFResourceType.CANVAS},t.prototype.isCollection=function(){return this.getIIIFResourceType()===o.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===o.IIIFResourceType.MANIFEST},t.prototype.isRange=function(){return this.getIIIFResourceType()===o.IIIFResourceType.RANGE},t.prototype.isSequence=function(){return this.getIIIFResourceType()===o.IIIFResourceType.SEQUENCE},t}(a.JSONLDResource);t.ManifestResource=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getFormat=function(){var e=this.getProperty("format");return e?e.toLowerCase():null},t.prototype.getResources=function(){var e=[];if(!this.__jsonld.resources)return e;for(var t=0;t<this.__jsonld.resources.length;t++){var n=this.__jsonld.resources[t],r=new a.Annotation(n,this.options);e.push(r)}return e},t.prototype.getType=function(){var e=this.getProperty("type");return e?a.Utils.normaliseType(e):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t.prototype.getMaxWidth=function(){return this.getProperty("maxWidth")},t.prototype.getMaxHeight=function(){return this.getProperty("maxHeight")?null:this.getMaxWidth()},t}(a.ManifestResource);t.Resource=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.index=-1,r.isLoaded=!1;var i={defaultLabel:"-",locale:"en-GB",resource:r,pessimisticAccessControl:!1};return r.options=Object.assign(i,n),r}return i(t,e),t.prototype.getAttribution=function(){var e=this.getProperty("attribution");return e?a.LanguageMap.parse(e,this.options.locale):[]},t.prototype.getDescription=function(){var e=this.getProperty("description");return e?a.LanguageMap.parse(e,this.options.locale):[]},t.prototype.getIIIFResourceType=function(){return a.Utils.normaliseType(this.getProperty("type"))},t.prototype.getLogo=function(){var e=this.getProperty("logo");return e?"string"==typeof e?e:(Array.isArray(e)&&e.length&&(e=e[0]),e["@id"]||e.id):null},t.prototype.getLicense=function(){return a.Utils.getLocalisedValue(this.getProperty("license"),this.options.locale)},t.prototype.getNavDate=function(){return new Date(this.getProperty("navDate"))},t.prototype.getRelated=function(){return this.getProperty("related")},t.prototype.getSeeAlso=function(){return this.getProperty("seeAlso")},t.prototype.getTrackingLabel=function(){var e=this.getService(o.ServiceProfile.TRACKING_EXTENSIONS);return e?e.getProperty("trackingLabel"):""},t.prototype.getDefaultTree=function(){return this.defaultTree=new a.TreeNode("root"),this.defaultTree.data=this,this.defaultTree},t.prototype.getRequiredStatement=function(){var e=null,t=this.getProperty("requiredStatement");if(t)(e=new a.LabelValuePair(this.options.locale)).parse(t);else{var n=this.getAttribution();n&&((e=new a.LabelValuePair(this.options.locale)).value=n)}return e},t.prototype.isCollection=function(){return this.getIIIFResourceType()===o.IIIFResourceType.COLLECTION},t.prototype.isManifest=function(){return this.getIIIFResourceType()===o.IIIFResourceType.MANIFEST},t.prototype.load=function(){var e=this;return new Promise((function(t){if(e.isLoaded)t(e);else{var n=e.options;n.navDate=e.getNavDate();var r=e.__jsonld.id;r||(r=e.__jsonld["@id"]),a.Utils.loadManifest(r).then((function(r){e.parentLabel=a.LanguageMap.getValue(e.getLabel(),n.locale);var i=a.Deserialiser.parse(r,n);(e=Object.assign(e,i)).index=n.index,t(e)}))}}))},t}(a.ManifestResource);t.IIIFResource=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getBody=function(){var e=[],t=this.getProperty("body");if(t)if(Array.isArray(t))for(var n=0;n<t.length;n++)if((o=t[n]).items)for(var r=0;r<o.items.length;r++){var i=o.items[r];e.push(new a.AnnotationBody(i,this.options))}else e.push(new a.AnnotationBody(o,this.options));else if(t.items)for(n=0;n<t.items.length;n++){var o=t.items[n];e.push(new a.AnnotationBody(o,this.options))}else e.push(new a.AnnotationBody(t,this.options));return e},t.prototype.getMotivation=function(){return this.getProperty("motivation")||null},t.prototype.getOn=function(){return this.getProperty("on")},t.prototype.getTarget=function(){return this.getProperty("target")},t.prototype.getResource=function(){return new a.Resource(this.getProperty("resource"),this.options)},t}(a.ManifestResource);t.Annotation=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getFormat=function(){var e=this.getProperty("format");return e?a.Utils.getMediaType(e):null},t.prototype.getType=function(){return this.getProperty("type")?a.Utils.normaliseType(this.getProperty("type")):null},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t}(a.ManifestResource);t.AnnotationBody=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.label=t,i.options=r,i}return i(t,e),t.prototype.getIIIFResourceType=function(){return a.Utils.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){return this.label},t.prototype.getResources=function(){var e=this;return this.getProperty("resources").map((function(t){return new a.Annotation(t,e.options)}))},t.prototype.load=function(){var e=this;return new Promise((function(t,n){if(e.isLoaded)t(e);else{var r=e.__jsonld.id;r||(r=e.__jsonld["@id"]),a.Utils.loadManifest(r).then((function(n){e.__jsonld=n,e.context=e.getProperty("context"),e.id=e.getProperty("id"),e.isLoaded=!0,t(e)})).catch(n)}}))},t}(a.JSONLDResource);t.AnnotationList=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getItems=function(){return this.getProperty("items")},t}(n(0).ManifestResource);t.AnnotationPage=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getCanonicalImageUri=function(e){var t,n=null,r="default",i=e;if(this.externalResource&&this.externalResource.data&&this.externalResource.data["@id"])n=this.externalResource.data["@id"],i||(i=this.externalResource.data.width),this.externalResource.data["@context"]&&(this.externalResource.data["@context"].indexOf("/1.0/context.json")>-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(r="native");else{var o=this.getImages();if(o&&o.length){var l=o[0].getResource(),s=l.getServices();if(i||(i=l.getWidth()),s.length){var u=s[0];n=u.id,r=a.Utils.getImageQuality(u.getProfile())}else if(i===l.getWidth())return l.id}if(!n){var c=this.getProperty("thumbnail");if(c){if("string"==typeof c)return c;if(c["@id"])return c["@id"];if(c.length)return c[0].id}}}return t=i+",",n&&n.endsWith("/")&&(n=n.substr(0,n.length-1)),[n,"full",t,0,r+".jpg"].join("/")},t.prototype.getMaxDimensions=function(){var e,t=null;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(e=this.externalResource.data.profile,Array.isArray(e)&&(e=e.filter((function(e){return e.maxWidth}))[0])&&(t=new a.Size(e.maxWidth,e.maxHeight?e.maxHeight:e.maxWidth))),t},t.prototype.getContent=function(){var e=[],t=this.__jsonld.items||this.__jsonld.content;if(!t)return e;var n=null;if(t.length&&(n=new a.AnnotationPage(t[0],this.options)),!n)return e;for(var r=n.getItems(),i=0;i<r.length;i++){var o=r[i],l=new a.Annotation(o,this.options);e.push(l)}return e},t.prototype.getDuration=function(){return this.getProperty("duration")},t.prototype.getImages=function(){var e=[];if(!this.__jsonld.images)return e;for(var t=0;t<this.__jsonld.images.length;t++){var n=this.__jsonld.images[t],r=new a.Annotation(n,this.options);e.push(r)}return e},t.prototype.getIndex=function(){return this.getProperty("index")},t.prototype.getOtherContent=function(){var e=this,t=(Array.isArray(this.getProperty("otherContent"))?this.getProperty("otherContent"):[this.getProperty("otherContent")]).filter((function(e){return e&&"string"==typeof(t=e["@type"])&&t.toLowerCase()==t.toLowerCase();var t})).map((function(t,n){return new a.AnnotationList(t.label||"Annotation list "+n,t,e.options)})).map((function(e){return e.load()}));return Promise.all(t)},t.prototype.getWidth=function(){return this.getProperty("width")},t.prototype.getHeight=function(){return this.getProperty("height")},t}(a.Resource);t.Canvas=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=n(0),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.items=[],r._collections=null,r._manifests=null,t.__collection=r,r}return i(t,e),t.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.items.filter((function(e){return e.isCollection()}))},t.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.items.filter((function(e){return e.isManifest()}))},t.prototype.getCollectionByIndex=function(e){for(var t,n=this.getCollections(),r=0;r<n.length;r++){var i=n[r];i.index===e&&(t=i)}if(t)return t.options.index=e,t.load();throw new Error("Collection index not found")},t.prototype.getManifestByIndex=function(e){for(var t,n=this.getManifests(),r=0;r<n.length;r++){var i=n[r];i.index===e&&(t=i)}if(t)return t.options.index=e,t.load();throw new Error("Manifest index not found")},t.prototype.getTotalCollections=function(){return this.getCollections().length},t.prototype.getTotalManifests=function(){return this.getManifests().length},t.prototype.getTotalItems=function(){return this.items.length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):a.ViewingDirection.LEFT_TO_RIGHT},t.prototype.getDefaultTree=function(){return e.prototype.getDefaultTree.call(this),this.defaultTree.data.type=o.Utils.normaliseType(o.TreeNodeType.COLLECTION),this._parseManifests(this),this._parseCollections(this),o.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._parseManifests=function(e){if(e.getManifests()&&e.getManifests().length)for(var t=0;t<e.getManifests().length;t++){var n=e.getManifests()[t],r=n.getDefaultTree();r.label=n.parentLabel||o.LanguageMap.getValue(n.getLabel(),this.options.locale)||"manifest "+(t+1),r.navDate=n.getNavDate(),r.data.id=n.id,r.data.type=o.Utils.normaliseType(o.TreeNodeType.MANIFEST),e.defaultTree.addNode(r)}},t.prototype._parseCollections=function(e){if(e.getCollections()&&e.getCollections().length)for(var t=0;t<e.getCollections().length;t++){var n=e.getCollections()[t],r=n.getDefaultTree();r.label=n.parentLabel||o.LanguageMap.getValue(n.getLabel(),this.options.locale)||"collection "+(t+1),r.navDate=n.getNavDate(),r.data.id=n.id,r.data.type=o.Utils.normaliseType(o.TreeNodeType.COLLECTION),e.defaultTree.addNode(r)}},t}(o.IIIFResource);t.Collection=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.start=e,this.end=t}return e.prototype.getLength=function(){return this.end-this.start},e}();t.Duration=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(e){this.defaultLocale=e}return e.prototype.parse=function(e){this.resource=e,this.label=r.LanguageMap.parse(this.resource.label,this.defaultLocale),this.value=r.LanguageMap.parse(this.resource.value,this.defaultLocale)},e.prototype.getLabel=function(){return this.label?r.LanguageMap.getValue(this.label,this.defaultLocale):null},e.prototype.setLabel=function(e){var t=this;if(this.label&&this.label.length){var n=this.label.filter((function(e){return e.locale===t.defaultLocale||e.locale===r.Utils.getInexactLocale(t.defaultLocale)}))[0];n&&(n.value=e)}},e.prototype.getValue=function(){if(this.value){var e=this.defaultLocale;return this.label&&this.label.length&&this.label[0].locale&&(e=this.label[0].locale),r.LanguageMap.getValue(this.value,e)}return null},e.prototype.setValue=function(e){var t=this;if(this.value&&this.value.length){var n=this.value.filter((function(e){return e.locale===t.defaultLocale||e.locale===r.Utils.getInexactLocale(t.defaultLocale)}))[0];n&&(n.value=e)}},e}();t.LabelValuePair=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Language=function(e,t){Array.isArray(e)?1===e.length?this.value=e[0]:this.value=e.join("<br/>"):this.value=e,this.locale=t}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.parse=function(e,t){var n,r=[];if(!e)return r;if(Array.isArray(e))for(var i=0;i<e.length;i++){var o=e[i];n="string"==typeof o?new a.Language(o,t):new a.Language(o["@value"],o["@language"]||t),r.push(n)}else{if("string"==typeof e)return n=new a.Language(e,t),r.push(n),r;e["@value"]?(n=new a.Language(e["@value"],e["@language"]||t),r.push(n)):Object.keys(e).forEach((function(t){if(!e[t].length)throw new Error("language must have a value");n=new a.Language(e[t],t),r.push(n)}))}return r},t.getValue=function(e,t){if(e.length){if(t){var n=e.filter((function(e){return e.locale===t||a.Utils.getInexactLocale(e.locale)===a.Utils.getInexactLocale(t)}))[0];if(n)return n.value}return e[0].value}return null},t}(Array);t.LanguageMap=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=n(0),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;if(r.index=0,r._allRanges=null,r.items=[],r._topRanges=[],r.__jsonld.structures&&r.__jsonld.structures.length)for(var i=r._getTopRanges(),a=0;a<i.length;a++){var o=i[a];r._parseRanges(o,String(a))}return r}return i(t,e),t.prototype.getPosterCanvas=function(){var e=this.getProperty("posterCanvas");return e&&(e=new o.Canvas(e,this.options)),e},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getDefaultTree=function(){if(e.prototype.getDefaultTree.call(this),this.defaultTree.data.type=o.Utils.normaliseType(o.TreeNodeType.MANIFEST),!this.isLoaded)return this.defaultTree;var t=this.getTopRanges();return t.length&&t[0].getTree(this.defaultTree),o.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},t.prototype._getTopRanges=function(){var e=[];if(this.__jsonld.structures&&this.__jsonld.structures.length){for(var t=0;t<this.__jsonld.structures.length;t++){var n=this.__jsonld.structures[t];n.viewingHint===a.ViewingHint.TOP&&e.push(n)}if(!e.length){var r={};r.ranges=this.__jsonld.structures,e.push(r)}}return e},t.prototype.getTopRanges=function(){return this._topRanges},t.prototype._getRangeById=function(e){if(this.__jsonld.structures&&this.__jsonld.structures.length)for(var t=0;t<this.__jsonld.structures.length;t++){var n=this.__jsonld.structures[t];if(n["@id"]===e||n.id===e)return n}return null},t.prototype._parseRanges=function(e,t,n){var r,i=null;if("string"==typeof e&&(i=e,e=this._getRangeById(i)),e){(r=new o.Range(e,this.options)).parentRange=n,r.path=t,n?n.items.push(r):this._topRanges.push(r);var a=e.items||e.members;if(a)for(var l=0;l<a.length;l++){var s=a[l];if(s["@type"]&&"sc:range"===s["@type"].toLowerCase()||s.type&&"range"===s.type.toLowerCase())this._parseRanges(s,t+"/"+l,r);else if(s["@type"]&&"sc:canvas"===s["@type"].toLowerCase()||s.type&&"canvas"===s.type.toLowerCase()){r.canvases||(r.canvases=[]);var u=s.id||s["@id"];r.canvases.push(u)}}else if(e.ranges)for(l=0;l<e.ranges.length;l++)this._parseRanges(e.ranges[l],t+"/"+l,r)}else console.warn("Range:",i,"does not exist")},t.prototype.getAllRanges=function(){if(null!=this._allRanges)return this._allRanges;this._allRanges=[];for(var e=this.getTopRanges(),t=function(t){var r=e[t];r.id&&n._allRanges.push(r);var i=function(e,t){e.add(t);var n=t.getRanges();return n.length?n.reduce(i,e):e},a=Array.from(r.getRanges().reduce(i,new Set));n._allRanges=n._allRanges.concat(a)},n=this,r=0;r<e.length;r++)t(r);return this._allRanges},t.prototype.getRangeById=function(e){for(var t=this.getAllRanges(),n=0;n<t.length;n++){var r=t[n];if(r.id===e)return r}return null},t.prototype.getRangeByPath=function(e){for(var t=this.getAllRanges(),n=0;n<t.length;n++){var r=t[n];if(r.path===e)return r}return null},t.prototype.getSequences=function(){if(this.items.length)return this.items;var e=this.__jsonld.mediaSequences||this.__jsonld.sequences;if(e)for(var t=0;t<e.length;t++){var n=e[t],r=new o.Sequence(n,this.options);this.items.push(r)}else this.__jsonld.items&&(r=new o.Sequence(this.__jsonld.items,this.options),this.items.push(r));return this.items},t.prototype.getSequenceByIndex=function(e){return this.getSequences()[e]},t.prototype.getTotalSequences=function(){return this.getSequences().length},t.prototype.getManifestType=function(){var e=this.getService(a.ServiceProfile.UI_EXTENSIONS);return e?e.getProperty("manifestType"):o.ManifestType.EMPTY},t.prototype.isMultiSequence=function(){return this.getTotalSequences()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();if(e)return e===a.ViewingHint.PAGED;var t=this.getBehavior();return!!t&&t===a.Behavior.PAGED},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t}(o.IIIFResource);t.Manifest=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.EMPTY="",e.MANUSCRIPT="manuscript",e.MONOGRAPH="monograph"}(t.ManifestType||(t.ManifestType={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=n(1),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._ranges=null,r.canvases=null,r.items=[],r}return i(t,e),t.prototype.getCanvasIds=function(){return this.__jsonld.canvases?this.__jsonld.canvases:this.canvases?this.canvases:[]},t.prototype.getDuration=function(){var e,t;if(this.canvases&&this.canvases.length)for(var n=0;n<this.canvases.length;n++){var r=this.canvases[n],i=a.Utils.getTemporalComponent(r);i&&i.length>1&&(0===n&&(e=Number(i[0])),n===this.canvases.length-1&&(t=Number(i[1])))}else{var o=this.getRanges();for(n=0;n<o.length;n++){var l=o[n].getDuration();l&&(0===n&&(e=l.start),n===o.length-1&&(t=l.end))}}if(void 0!==e&&void 0!==t)return new a.Duration(e,t)},t.prototype.getRanges=function(){return this._ranges?this._ranges:this._ranges=this.items.filter((function(e){return e.isRange()}))},t.prototype.getBehavior=function(){var e=this.getProperty("behavior");return Array.isArray(e)&&(e=e[0]),e||null},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t.prototype.getTree=function(e){e.data=this,this.treeNode=e;var t=this.getRanges();if(t&&t.length)for(var n=0;n<t.length;n++){var r=t[n],i=new a.TreeNode;e.addNode(i),this._parseTreeNode(i,r)}return a.Utils.generateTreeNodeIds(e),e},t.prototype.spansTime=function(e){var t=this.getDuration();return!!(t&&e>=t.start&&e<=t.end)},t.prototype._parseTreeNode=function(e,t){e.label=a.LanguageMap.getValue(t.getLabel(),this.options.locale),e.data=t,e.data.type=a.Utils.normaliseType(a.TreeNodeType.RANGE),t.treeNode=e;var n=t.getRanges();if(n&&n.length)for(var r=0;r<n.length;r++){var i=n[r];if(i.getBehavior()!==o.Behavior.NO_NAV){var l=new a.TreeNode;e.addNode(l),this._parseTreeNode(l,i)}}},t}(a.ManifestResource);t.Range=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getFormat=function(){return this.getProperty("format")},t}(n(0).ManifestResource);t.Rendering=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),o=n(0),l=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.items=[],r._thumbnails=null,r}return i(t,e),t.prototype.getCanvases=function(){if(this.items.length)return this.items;var e=this.__jsonld.canvases||this.__jsonld.elements;if(e)for(var t=0;t<e.length;t++){var n=e[t];(r=new o.Canvas(n,this.options)).index=t,this.items.push(r)}else if(this.__jsonld)for(t=0;t<this.__jsonld.length;t++){var r;n=this.__jsonld[t],(r=new o.Canvas(n,this.options)).index=t,this.items.push(r)}return this.items},t.prototype.getCanvasById=function(e){for(var t=0;t<this.getTotalCanvases();t++){var n=this.getCanvasByIndex(t),r=o.Utils.normaliseUrl(n.id);if(o.Utils.normaliseUrl(e)===r)return n}return null},t.prototype.getCanvasByIndex=function(e){return this.getCanvases()[e]},t.prototype.getCanvasIndexById=function(e){for(var t=0;t<this.getTotalCanvases();t++)if(this.getCanvasByIndex(t).id===e)return t;return null},t.prototype.getCanvasIndexByLabel=function(e,t){e=e.trim(),isNaN(e)||(e=parseInt(e,10).toString(),t&&(e+="r"));for(var n,r,i,a=/(\d*)\D+(\d*)/,l=0;l<this.getTotalCanvases();l++){var s=this.getCanvasByIndex(l);if(o.LanguageMap.getValue(s.getLabel(),this.options.locale)===e)return l;if((n=a.exec(e))&&(r=n[1],(i=n[2])&&new RegExp("^"+r+"\\D+"+i+"$").test(s.getLabel().toString())))return l}return-1},t.prototype.getLastCanvasLabel=function(e){for(var t=this.getTotalCanvases()-1;t>=0;t--){var n=this.getCanvasByIndex(t),r=o.LanguageMap.getValue(n.getLabel(),this.options.locale);if(e){if(/^[a-zA-Z0-9]*$/.test(r))return r}else if(r)return r}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[0]+1:r[r.length-1]+1}else n=e+1;return n>this.getLastPageIndex()?-1:n},t.prototype.getPagedIndices=function(e,t){var n=[];if(t){n=this.isFirstCanvas(e)||this.isLastCanvas(e)?[e]:e%2?[e,e+1]:[e-1,e];var r=this.getViewingDirection();r&&r===a.ViewingDirection.RIGHT_TO_LEFT&&(n=n.reverse())}else n.push(e);return n},t.prototype.getPrevPageIndex=function(e,t){var n;if(t){var r=this.getPagedIndices(e),i=this.getViewingDirection();n=i&&i===a.ViewingDirection.RIGHT_TO_LEFT?r[r.length-1]-1:r[0]-1}else n=e-1;return n},t.prototype.getStartCanvasIndex=function(){var e=this.getStartCanvas();if(e)for(var t=0;t<this.getTotalCanvases();t++)if(this.getCanvasByIndex(t).id===e)return t;return 0},t.prototype.getThumbs=function(e,t){for(var n=[],r=this.getTotalCanvases(),i=0;i<r;i++){var a=this.getCanvasByIndex(i),l=new o.Thumb(e,a);n.push(l)}return n},t.prototype.getThumbnails=function(){if(null!=this._thumbnails)return this._thumbnails;this._thumbnails=[];for(var e=this.getCanvases(),t=0;t<e.length;t++){var n=e[t].getThumbnail();n&&this._thumbnails.push(n)}return this._thumbnails},t.prototype.getStartCanvas=function(){return this.getProperty("startCanvas")},t.prototype.getTotalCanvases=function(){return this.getCanvases().length},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?this.getProperty("viewingDirection"):this.options.resource.getViewingDirection?this.options.resource.getViewingDirection():null},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t.prototype.isCanvasIndexOutOfRange=function(e){return e>this.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(e){return 0===e},t.prototype.isLastCanvas=function(e){return e===this.getTotalCanvases()-1},t.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},t.prototype.isPagingEnabled=function(){var e=this.getViewingHint();return!!e&&e===a.ViewingHint.PAGED},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2==0},t}(o.ManifestResource);t.Sequence=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){}return e.parse=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),this.parseJson(e,t)},e.parseJson=function(e,t){var n;if(t&&t.navDate&&!isNaN(t.navDate.getTime())&&(e.navDate=t.navDate.toString()),e["@type"])switch(e["@type"]){case"sc:Collection":n=this.parseCollection(e,t);break;case"sc:Manifest":n=this.parseManifest(e,t);break;default:return null}else switch(e.type){case"Collection":n=this.parseCollection(e,t);break;case"Manifest":n=this.parseManifest(e,t);break;default:return null}return n.isLoaded=!0,n},e.parseCollection=function(e,t){var n=new r.Collection(e,t);return t?(n.index=t.index||0,t.resource&&(n.parentCollection=t.resource.parentCollection)):n.index=0,this.parseCollections(n,t),this.parseManifests(n,t),this.parseItems(n,t),n},e.parseCollections=function(e,t){var n;if(e.__jsonld.collections?n=e.__jsonld.collections:e.__jsonld.items&&(n=e.__jsonld.items.filter((function(e){return"collection"===e.type.toLowerCase()}))),n)for(var r=0;r<n.length;r++){t&&(t.index=r);var i=this.parseCollection(n[r],t);i.index=r,i.parentCollection=e,e.items.push(i)}},e.parseManifest=function(e,t){return new r.Manifest(e,t)},e.parseManifests=function(e,t){var n;if(e.__jsonld.manifests?n=e.__jsonld.manifests:e.__jsonld.items&&(n=e.__jsonld.items.filter((function(e){return"manifest"===e.type.toLowerCase()}))),n)for(var r=0;r<n.length;r++){var i=this.parseManifest(n[r],t);i.index=r,i.parentCollection=e,e.items.push(i)}},e.parseItem=function(e,t){if(e["@type"]){if("sc:manifest"===e["@type"].toLowerCase())return this.parseManifest(e,t);if("sc:collection"===e["@type"].toLowerCase())return this.parseCollection(e,t)}else if(e.type){if("manifest"===e.type.toLowerCase())return this.parseManifest(e,t);if("collection"===e.type.toLowerCase())return this.parseCollection(e,t)}return null},e.parseItems=function(e,t){var n=e.__jsonld.members||e.__jsonld.items;if(n)for(var r=function(r){t&&(t.index=r);var a=i.parseItem(n[r],t);return a?e.items.filter((function(e){return e.id===a.id}))[0]?"continue":(a.index=r,a.parentCollection=e,void e.items.push(a)):{value:void 0}},i=this,a=0;a<n.length;a++){var o=r(a);if("object"==typeof o)return o.value}},e}();t.Deserialiser=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),o=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getProfile=function(){var e=this.getProperty("profile");return e||(e=this.getProperty("dcterms:conformsTo")),Array.isArray(e)?e[0]:e},t.prototype.getConfirmLabel=function(){return a.Utils.getLocalisedValue(this.getProperty("confirmLabel"),this.options.locale)},t.prototype.getDescription=function(){return a.Utils.getLocalisedValue(this.getProperty("description"),this.options.locale)},t.prototype.getFailureDescription=function(){return a.Utils.getLocalisedValue(this.getProperty("failureDescription"),this.options.locale)},t.prototype.getFailureHeader=function(){return a.Utils.getLocalisedValue(this.getProperty("failureHeader"),this.options.locale)},t.prototype.getHeader=function(){return a.Utils.getLocalisedValue(this.getProperty("header"),this.options.locale)},t.prototype.getServiceLabel=function(){return a.Utils.getLocalisedValue(this.getProperty("label"),this.options.locale)},t.prototype.getInfoUri=function(){var e=this.id;return e.endsWith("/")||(e+="/"),e+"info.json"},t}(a.ManifestResource);t.Service=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Size=function(e,t){this.width=e,this.height=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.AUTHORIZATION_FAILED=1]="AUTHORIZATION_FAILED",e[e.FORBIDDEN=2]="FORBIDDEN",e[e.INTERNAL_SERVER_ERROR=3]="INTERNAL_SERVER_ERROR",e[e.RESTRICTED=4]="RESTRICTED"}(t.StatusCode||(t.StatusCode={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.Thumb=function(e,t){this.data=t,this.index=t.index,this.width=e;var n=t.getHeight()/t.getWidth();this.height=n?Math.floor(this.width*n):e,this.uri=t.getCanonicalImageUri(e),this.label=r.LanguageMap.getValue(t.getLabel())}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t}(n(0).Resource);t.Thumbnail=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(e,t){this.label=e,this.data=t||{},this.nodes=[]}return e.prototype.addNode=function(e){this.nodes.push(e),e.parentNode=this},e.prototype.isCollection=function(){return this.data.type===r.Utils.normaliseType(r.TreeNodeType.COLLECTION)},e.prototype.isManifest=function(){return this.data.type===r.Utils.normaliseType(r.TreeNodeType.MANIFEST)},e.prototype.isRange=function(){return this.data.type===r.Utils.normaliseType(r.TreeNodeType.RANGE)},e}();t.TreeNode=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range"}(t.TreeNodeType||(t.TreeNodeType={}))},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTINUE=100,t.SWITCHING_PROTOCOLS=101,t.PROCESSING=102,t.OK=200,t.CREATED=201,t.ACCEPTED=202,t.NON_AUTHORITATIVE_INFORMATION=203,t.NO_CONTENT=204,t.RESET_CONTENT=205,t.PARTIAL_CONTENT=206,t.MULTI_STATUS=207,t.MULTIPLE_CHOICES=300,t.MOVED_PERMANENTLY=301,t.MOVED_TEMPORARILY=302,t.SEE_OTHER=303,t.NOT_MODIFIED=304,t.USE_PROXY=305,t.TEMPORARY_REDIRECT=307,t.BAD_REQUEST=400,t.UNAUTHORIZED=401,t.PAYMENT_REQUIRED=402,t.FORBIDDEN=403,t.NOT_FOUND=404,t.METHOD_NOT_ALLOWED=405,t.NOT_ACCEPTABLE=406,t.PROXY_AUTHENTICATION_REQUIRED=407,t.REQUEST_TIME_OUT=408,t.CONFLICT=409,t.GONE=410,t.LENGTH_REQUIRED=411,t.PRECONDITION_FAILED=412,t.REQUEST_ENTITY_TOO_LARGE=413,t.REQUEST_URI_TOO_LARGE=414,t.UNSUPPORTED_MEDIA_TYPE=415,t.REQUESTED_RANGE_NOT_SATISFIABLE=416,t.EXPECTATION_FAILED=417,t.IM_A_TEAPOT=418,t.UNPROCESSABLE_ENTITY=422,t.LOCKED=423,t.FAILED_DEPENDENCY=424,t.UNORDERED_COLLECTION=425,t.UPGRADE_REQUIRED=426,t.PRECONDITION_REQUIRED=428,t.TOO_MANY_REQUESTS=429,t.REQUEST_HEADER_FIELDS_TOO_LARGE=431,t.INTERNAL_SERVER_ERROR=500,t.NOT_IMPLEMENTED=501,t.BAD_GATEWAY=502,t.SERVICE_UNAVAILABLE=503,t.GATEWAY_TIME_OUT=504,t.HTTP_VERSION_NOT_SUPPORTED=505,t.VARIANT_ALSO_NEGOTIATES=506,t.INSUFFICIENT_STORAGE=507,t.BANDWIDTH_LIMIT_EXCEEDED=509,t.NOT_EXTENDED=510,t.NETWORK_AUTHENTICATION_REQUIRED=511}])},function(e,t,n){e.exports=window.fetch||(window.fetch=n(3).default||n(3))}])},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTINUE=100,t.SWITCHING_PROTOCOLS=101,t.PROCESSING=102,t.OK=200,t.CREATED=201,t.ACCEPTED=202,t.NON_AUTHORITATIVE_INFORMATION=203,t.NO_CONTENT=204,t.RESET_CONTENT=205,t.PARTIAL_CONTENT=206,t.MULTI_STATUS=207,t.MULTIPLE_CHOICES=300,t.MOVED_PERMANENTLY=301,t.MOVED_TEMPORARILY=302,t.SEE_OTHER=303,t.NOT_MODIFIED=304,t.USE_PROXY=305,t.TEMPORARY_REDIRECT=307,t.BAD_REQUEST=400,t.UNAUTHORIZED=401,t.PAYMENT_REQUIRED=402,t.FORBIDDEN=403,t.NOT_FOUND=404,t.METHOD_NOT_ALLOWED=405,t.NOT_ACCEPTABLE=406,t.PROXY_AUTHENTICATION_REQUIRED=407,t.REQUEST_TIME_OUT=408,t.CONFLICT=409,t.GONE=410,t.LENGTH_REQUIRED=411,t.PRECONDITION_FAILED=412,t.REQUEST_ENTITY_TOO_LARGE=413,t.REQUEST_URI_TOO_LARGE=414,t.UNSUPPORTED_MEDIA_TYPE=415,t.REQUESTED_RANGE_NOT_SATISFIABLE=416,t.EXPECTATION_FAILED=417,t.IM_A_TEAPOT=418,t.UNPROCESSABLE_ENTITY=422,t.LOCKED=423,t.FAILED_DEPENDENCY=424,t.UNORDERED_COLLECTION=425,t.UPGRADE_REQUIRED=426,t.PRECONDITION_REQUIRED=428,t.TOO_MANY_REQUESTS=429,t.REQUEST_HEADER_FIELDS_TOO_LARGE=431,t.INTERNAL_SERVER_ERROR=500,t.NOT_IMPLEMENTED=501,t.BAD_GATEWAY=502,t.SERVICE_UNAVAILABLE=503,t.GATEWAY_TIME_OUT=504,t.HTTP_VERSION_NOT_SUPPORTED=505,t.VARIANT_ALSO_NEGOTIATES=506,t.INSUFFICIENT_STORAGE=507,t.BANDWIDTH_LIMIT_EXCEEDED=509,t.NOT_EXTENDED=510,t.NETWORK_AUTHENTICATION_REQUIRED=511}])},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";var i,a=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),l=n(5),s=function(e){function t(t){var n=e.call(this,t)||this;return n._data=n.data(),n._data=n.options.data,n._init(),n._resize(),n}return a(t,e),t.prototype._init=function(){e.prototype._init.call(this),this._$element=r(this.el);var t=this;return this._$tree=r('<ul class="tree"></ul>'),this._$element.append(this._$tree),r.templates({pageTemplate:"{^{for nodes}}\t\t\t\t\t{^{tree/}}\t\t\t\t{{/for}}",treeTemplate:'<li dir={{>dir}}>\t\t\t\t\t\t{^{if nodes && nodes.length}}\t\t\t\t\t\t\t<div class="toggle" data-link="class{merge:expanded toggle=\'expanded\'}"></div>\t\t\t\t\t\t{{else}}\t\t\t\t\t\t<div class="spacer"></div>\t\t\t\t\t\t{{/if}}\t\t\t\t\t\t{^{if multiSelectEnabled}}\t\t\t\t\t\t\t<input id="tree-checkbox-{{>id}}" type="checkbox" data-link="checked{:multiSelected ? \'checked\' : \'\'}" class="multiSelect" />\t\t\t\t\t\t{{/if}}\t\t\t\t\t\t{^{if selected}}\t\t\t\t\t\t\t<a id="tree-link-{{>id}}" href="#" title="{{>label}}" class="selected">{{>label}}</a>\t\t\t\t\t\t{{else}}\t\t\t\t\t\t\t<a id="tree-link-{{>id}}" href="#" title="{{>label}}">{{>label}}</a>\t\t\t\t\t\t{{/if}}\t\t\t\t</li>\t\t\t\t{^{if expanded}}\t\t\t\t\t<li>\t\t\t\t\t\t\t<ul>\t\t\t\t\t\t\t\t\t{^{for nodes}}\t\t\t\t\t\t\t\t\t\t{^{tree/}}\t\t\t\t\t\t\t\t\t{{/for}}\t\t\t\t\t\t\t</ul>\t\t\t\t\t</li>\t\t\t\t{{/if}}'}),r.views.tags({tree:{toggleExpanded:function(){var e=this.data;t._setNodeExpanded(e,!e.expanded)},toggleMultiSelect:function(){var e=this.data;if(t._setNodeMultiSelected(e,!e.multiSelected),e.isRange()){var n=t._getMultiSelectState();n&&n.selectRange(e.data,e.multiSelected)}t.fire(u.TREE_NODE_MULTISELECTED,e)},init:function(e,n,r){var i=e.view.data;if(this.data=i,i.dir="ltr",i.data.__jsonld.label){var a=i.data.__jsonld.label["@language"];a&&t._data.rtlLanguageCodes.includes(a.trim())&&(i.dir="rtl")}},onAfterLink:function(){var e=this;e.contents("li").first().on("click",".toggle",(function(){e.toggleExpanded()})).on("click","a",(function(n){n.preventDefault();var r=e.data;r.nodes.length&&t._data.branchNodesExpandOnClick&&e.toggleExpanded(),r.multiSelectEnabled?e.toggleMultiSelect():r.nodes.length?t._data.branchNodesSelectable&&(t.fire(u.TREE_NODE_SELECTED,r),t.selectNode(r)):(t.fire(u.TREE_NODE_SELECTED,r),t.selectNode(r))})).on("click","input.multiSelect",(function(t){e.toggleMultiSelect()}))},template:r.templates.treeTemplate}}),!0},t.prototype.set=function(e){var t=this;if(this._data=Object.assign(this._data,e),this._data.helper){this._rootNode=this._data.helper.getTree(this._data.topRangeIndex,this._data.treeSortType),this._flattenedTree=null,this._multiSelectableNodes=null,this._$tree.link(r.templates.pageTemplate,this._rootNode);var n=this._getMultiSelectState();if(n)for(var i=function(e){var t=n.ranges[e],r=a._getMultiSelectableNodes().filter((function(e){return e.data.id===t.id}))[0];r&&(a._setNodeMultiSelectEnabled(r,t.multiSelectEnabled),a._setNodeMultiSelected(r,t.multiSelected))},a=this,o=0;o<n.ranges.length;o++)i(o);this._data.autoExpand&&this.getAllNodes().forEach((function(e,n){t._setNodeExpanded(e,!0)}))}},t.prototype._getMultiSelectState=function(){return this._data.helper?this._data.helper.getMultiSelectState():null},t.prototype.data=function(){return{autoExpand:!1,branchNodesExpandOnClick:!0,branchNodesSelectable:!0,helper:null,topRangeIndex:0,treeSortType:l.TreeSortType.NONE,rtlLanguageCodes:"ar, ara, dv, div, he, heb, ur, urd"}},t.prototype.allNodesSelected=function(){var e=this._getMultiSelectableNodes(),t=this.getMultiSelectedNodes();return e.length===t.length},t.prototype._getMultiSelectableNodes=function(){var e=this;if(this._multiSelectableNodes)return this._multiSelectableNodes;var t=this.getAllNodes();return t?this._multiSelectableNodes=t.filter((function(t){return e._nodeIsMultiSelectable(t)})):[]},t.prototype._nodeIsMultiSelectable=function(e){return!!(e.data.type===o.TreeNodeType.MANIFEST&&e.nodes&&e.nodes.length>0||e.data.type===o.TreeNodeType.RANGE)},t.prototype.getAllNodes=function(){return this._flattenedTree?this._flattenedTree:this._data.helper?this._flattenedTree=this._data.helper.getFlattenedTree(this._rootNode):[]},t.prototype.getMultiSelectedNodes=function(){var e=this;return this.getAllNodes().filter((function(t){return e._nodeIsMultiSelectable(t)&&t.multiSelected}))},t.prototype.getNodeById=function(e){return this.getAllNodes().filter((function(t){return t.id===e}))[0]},t.prototype.expandParents=function(e,t){e&&e.parentNode&&(this._setNodeExpanded(e.parentNode,t),this.expandParents(e.parentNode,t))},t.prototype._setNodeSelected=function(e,t){r.observable(e).setProperty("selected",t)},t.prototype._setNodeExpanded=function(e,t){r.observable(e).setProperty("expanded",t)},t.prototype._setNodeMultiSelected=function(e,t){r.observable(e).setProperty("multiSelected",t)},t.prototype._setNodeMultiSelectEnabled=function(e,t){r.observable(e).setProperty("multiSelectEnabled",t)},t.prototype.selectPath=function(e){if(this._rootNode){var t=e.split("/");t.length>=1&&t.shift();var n=this.getNodeByPath(this._rootNode,t);this.selectNode(n)}},t.prototype.deselectCurrentNode=function(){this.selectedNode&&this._setNodeSelected(this.selectedNode,!1)},t.prototype.selectNode=function(e){this._rootNode&&(this.deselectCurrentNode(),this.selectedNode=e,this._setNodeSelected(this.selectedNode,!0))},t.prototype.expandNode=function(e,t){this._rootNode&&this._setNodeExpanded(e,t)},t.prototype.getNodeByPath=function(e,t){if(0===t.length)return e;var n=Number(t.shift()),r=e.nodes[n];return this.getNodeByPath(r,t)},t.prototype.show=function(){this._$element.show()},t.prototype.hide=function(){this._$element.hide()},t.prototype._resize=function(){},t}(n(4).BaseComponent);t.TreeComponent=s;var u=function(){function e(){}return e.TREE_NODE_MULTISELECTED="treeNodeMultiSelected",e.TREE_NODE_SELECTED="treeNodeSelected",e}();t.Events=u},function(e,t,n){"use strict";n.r(t),n.d(t,"BaseComponent",(function(){return r}));var r=function(){function e(e){this.options=e,this.options.data=Object.assign({},this.data(),e.data)}return e.prototype._init=function(){return this.el=this.options.target,this.el?(this.el.innerHTML="",!0):(console.warn("element not found"),!1)},e.prototype.data=function(){return{}},e.prototype.on=function(e,t,n){var r=this._e||(this._e={});(r[e]||(r[e]=[])).push({fn:t,ctx:n})},e.prototype.fire=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=[].slice.call(arguments,1),i=((this._e||(this._e={}))[e]||[]).slice(),a=0,o=i.length;a<o;a++)i[a].fn.apply(i[a].ctx,r)},e.prototype._resize=function(){},e.prototype.set=function(e){},e}()},function(e,t,n){"use strict";n.r(t);var r,i,a,o,l,s,u,c,f,d,p=function(e){this.isVisible=!0;var t=e.on.match(/.*xywh=(\d*),(\d*),(\d*),(\d*)/);this.x=Number(t[1]),this.y=Number(t[2]),this.width=Number(t[3]),this.height=Number(t[4]),this.chars=e.resource.chars},h=function(){function e(e,t){this.rects=[],this.canvasIndex=t,this.addRect(e)}return e.prototype.addRect=function(e){var t=new p(e);t.canvasIndex=this.canvasIndex,t.index=this.rects.length,this.rects.push(t),this.rects.sort((function(e,t){return e.index-t.index}))},e}(),g=n(0),v=function(){function e(){this.isEnabled=!1,this.ranges=[],this.canvases=[]}return e.prototype.allCanvasesSelected=function(){return this.canvases.length>0&&this.getAllSelectedCanvases().length===this.canvases.length},e.prototype.allRangesSelected=function(){return this.ranges.length>0&&this.getAllSelectedRanges().length===this.ranges.length},e.prototype.allSelected=function(){return this.allRangesSelected()&&this.allCanvasesSelected()},e.prototype.getAll=function(){return this.canvases.concat(this.ranges)},e.prototype.getAllSelectedCanvases=function(){return this.canvases.filter((function(e){return e.multiSelected}))},e.prototype.getAllSelectedRanges=function(){return this.ranges.filter((function(e){return e.multiSelected}))},e.prototype.getCanvasById=function(e){return this.canvases.filter((function(t){return g.Utils.normaliseUrl(t.id)===g.Utils.normaliseUrl(e)}))[0]},e.prototype.getCanvasesByIds=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(this.getCanvasById(r))}return t},e.prototype.getRangeCanvases=function(e){var t=e.getCanvasIds();return this.getCanvasesByIds(t)},e.prototype.selectAll=function(e){this.selectRanges(this.ranges,e),this.selectCanvases(this.canvases,e)},e.prototype.selectCanvas=function(e,t){this.canvases.filter((function(t){return t.id===e.id}))[0].multiSelected=t},e.prototype.selectAllCanvases=function(e){this.selectCanvases(this.canvases,e)},e.prototype.selectCanvases=function(e,t){for(var n=0;n<e.length;n++)e[n].multiSelected=t},e.prototype.selectRange=function(e,t){var n=this.ranges.filter((function(t){return t.id===e.id}))[0];n.multiSelected=t;var r=this.getRangeCanvases(n);this.selectCanvases(r,t)},e.prototype.selectAllRanges=function(e){this.selectRanges(this.ranges,e)},e.prototype.selectRanges=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.multiSelected=t;var i=this.getCanvasesByIds(r.getCanvasIds());this.selectCanvases(i,t)}},e.prototype.setEnabled=function(e){this.isEnabled=e;for(var t=this.getAll(),n=0;n<t.length;n++){var r=t[n];r.multiSelectEnabled=this.isEnabled,e||(r.multiSelected=!1)}},e}(),_=function(){function e(e,t){this.items=[],this.resource=e,this.label=t}return e.prototype.addItem=function(e){this.items.push(e)},e.prototype.addMetadata=function(e,t){void 0===t&&(t=!1);for(var n=0;n<e.length;n++){var r=e[n];r.isRootLevel=t,this.addItem(r)}},e}();!function(e){e.DATE="date",e.NONE="none"}(r||(r={})),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(i||(i={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(a||(a={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.CONTENT_AS_TEXT="contentastext",e.DATASET="dataset",e.DOCUMENT="document",e.IMAGE="image",e.MODEL="model",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXT="text",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(o||(o={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(l||(l={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DRACO="application/draco",e.EPUB="application/epub+zip",e.GLTF="model/gltf+json",e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.OPF="application/oebps-package+xml",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.VIDEO_MP4="video/mp4",e.WEBM="video/webm"}(s||(s={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(u||(u={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(c||(c={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(f||(f={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(d||(d={}));var m=function(){function e(){}return e.manifestNotLoaded="Manifest has not loaded yet",e}(),y=function(){function e(e){this.options=e,this.iiifResource=this.options.iiifResource,this.manifestUri=this.options.manifestUri,this.manifest=this.options.manifest,this.collectionIndex=this.options.collectionIndex||0,this.manifestIndex=this.options.manifestIndex||0,this.sequenceIndex=this.options.sequenceIndex||0,this.canvasIndex=this.options.canvasIndex||0}return e.prototype.getAutoCompleteService=function(){var e=this.getSearchService(),t=null;return e&&((t=e.getService(c.SEARCH_0_AUTO_COMPLETE))||(t=e.getService(c.SEARCH_1_AUTO_COMPLETE))),t},e.prototype.getAttribution=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getAttribution();return e?g.LanguageMap.getValue(e,this.options.locale):null},e.prototype.getCanvases=function(){return this.getCurrentSequence().getCanvases()},e.prototype.getCanvasById=function(e){return this.getCurrentSequence().getCanvasById(e)},e.prototype.getCanvasesById=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.getCanvasById(r);i&&t.push(i)}return t},e.prototype.getCanvasByIndex=function(e){return this.getCurrentSequence().getCanvasByIndex(e)},e.prototype.getCanvasIndexById=function(e){return this.getCurrentSequence().getCanvasIndexById(e)},e.prototype.getCanvasIndexByLabel=function(e){var t=this.getManifestType()===g.ManifestType.MANUSCRIPT;return this.getCurrentSequence().getCanvasIndexByLabel(e,t)},e.prototype.getCanvasRange=function(e,t){var n=this.getCanvasRanges(e);if(t){for(var r=0;r<n.length;r++){var i=n[r];if(i.path===t)return i}return null}return n[0]},e.prototype.getCanvasRanges=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);return e.ranges||(e.ranges=this.manifest.getAllRanges().filter((function(t){return t.getCanvasIds().some((function(t){return g.Utils.normaliseUrl(t)===g.Utils.normaliseUrl(e.id)}))}))),e.ranges},e.prototype.getCollectionIndex=function(e){if(!e.parentCollection||e.parentCollection.parentCollection)return e.parentCollection?e.parentCollection.index:void 0},e.prototype.getCurrentCanvas=function(){return this.getCurrentSequence().getCanvasByIndex(this.canvasIndex)},e.prototype.getCurrentSequence=function(){return this.getSequenceByIndex(this.sequenceIndex)},e.prototype.getDescription=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getDescription();return e?g.LanguageMap.getValue(e,this.options.locale):null},e.prototype.getLabel=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getLabel();return e?g.LanguageMap.getValue(e,this.options.locale):null},e.prototype.getLastCanvasLabel=function(e){return this.getCurrentSequence().getLastCanvasLabel(e)},e.prototype.getFirstPageIndex=function(){return 0},e.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},e.prototype.getLicense=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getLicense()},e.prototype.getLogo=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getLogo()},e.prototype.getManifestType=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getManifestType();return e===g.ManifestType.EMPTY&&(e=g.ManifestType.MONOGRAPH),e},e.prototype.getMetadata=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);var t=[],n=this.manifest.getMetadata(),r=new _(this.manifest),i=this.options.locale;n&&n.length&&r.addMetadata(n,!0),this.manifest.getDescription().length&&((a=new g.LabelValuePair(i)).label=[new g.Language("description",i)],a.value=this.manifest.getDescription(),a.isRootLevel=!0,r.addItem(a)),this.manifest.getAttribution().length&&((a=new g.LabelValuePair(i)).label=[new g.Language("attribution",i)],a.value=this.manifest.getAttribution(),a.isRootLevel=!0,r.addItem(a));var a,o=this.manifest.getLicense();if(o){var l={label:"license",value:e&&e.licenseFormatter?e.licenseFormatter.format(o):o};(a=new g.LabelValuePair(i)).parse(l),a.isRootLevel=!0,r.addItem(a)}return this.manifest.getLogo()&&(l={label:"logo",value:'<img src="'+this.manifest.getLogo()+'"/>'},(a=new g.LabelValuePair(i)).parse(l),a.isRootLevel=!0,r.addItem(a)),t.push(r),e?this._parseMetadataOptions(e,t):t},e.prototype.getRequiredStatement=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getRequiredStatement();return e?{label:e.getLabel(),value:e.getValue()}:null},e.prototype._parseMetadataOptions=function(e,t){var n=this.getCurrentSequence(),r=n.getMetadata();if(r&&r.length){var i=new _(n);i.addMetadata(r),t.push(i)}if(e.range){var a=this._getRangeMetadata([],e.range);a=a.reverse(),t=t.concat(a)}if(e.canvases&&e.canvases.length)for(var o=0;o<e.canvases.length;o++){var l=e.canvases[o],s=l.getMetadata();if(s&&s.length){var u=new _(l);u.addMetadata(l.getMetadata()),t.push(u)}for(var c=l.getImages(),f=0;f<c.length;f++){var d=c[f],p=d.getMetadata();if(p&&p.length){var h=new _(d);h.addMetadata(p),t.push(h)}}}return t},e.prototype._getRangeMetadata=function(e,t){var n=t.getMetadata();if(n&&n.length){var r=new _(t);r.addMetadata(n),e.push(r)}else if(t.parentRange)return this._getRangeMetadata(e,t.parentRange);return e},e.prototype.getMultiSelectState=function(){return this._multiSelectState||(this._multiSelectState=new v,this._multiSelectState.ranges=this.getRanges().slice(0),this._multiSelectState.canvases=this.getCurrentSequence().getCanvases().slice(0)),this._multiSelectState},e.prototype.getCurrentRange=function(){return this.rangeId?this.getRangeById(this.rangeId):null},e.prototype.getPosterCanvas=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getPosterCanvas()},e.prototype.getPosterImage=function(){var e=this.getPosterCanvas();if(e){var t=e.getContent();if(t&&t.length)return t[0].getBody()[0].id}return null},e.prototype.getPreviousRange=function(e){var t;if(t=e||this.getCurrentRange()){var n=this.getFlattenedTree();if(n)for(var r=0;r<n.length;r++){var i=n[r];if(i&&i.data.id===t.id){for(;r>0;)return n[--r].data;break}}}return null},e.prototype.getNextRange=function(e){var t;if(t=e||this.getCurrentRange()){var n=this.getFlattenedTree();if(n)for(var r=0;r<n.length;r++){var i=n[r];if(i&&i.data.id===t.id){for(;r<n.length-1;){var a=n[++r];if(a.data.canvases&&a.data.canvases.length)return a.data}break}}}return null},e.prototype.getFlattenedTree=function(e){var t;return(t=e||this.getTree())?this._flattenTree(t,"nodes"):null},e.prototype._flattenTree=function(e,t){var n=this,r=[e];return e[t]&&e[t].length>0?r.concat(e[t].map((function(e){return n._flattenTree(e,t)})).reduce((function(e,t){return e.concat(t)}),[])):r},e.prototype.getRanges=function(){return this.manifest.getAllRanges()},e.prototype.getRangeByPath=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getRangeByPath(e)},e.prototype.getRangeById=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getRangeById(e)},e.prototype.getRangeCanvases=function(e){var t=e.getCanvasIds();return this.getCanvasesById(t)},e.prototype.getRelated=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getRelated()},e.prototype.getSearchService=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.manifest.getService(c.SEARCH_0);return e||(e=this.manifest.getService(c.SEARCH_1)),e},e.prototype.getSeeAlso=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getSeeAlso()},e.prototype.getSequenceByIndex=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getSequenceByIndex(e)},e.prototype.getShareServiceUrl=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=null,t=this.manifest.getService(c.SHARE_EXTENSIONS);return t&&(t.length&&(t=t[0]),e=t.__jsonld.shareUrl),e},e.prototype._getSortedTreeNodesByDate=function(e,t){var n=this.getFlattenedTree(t);if(n){var r=n.filter((function(e){return e.data.type===g.TreeNodeType.MANIFEST}));this.createDecadeNodes(e,n),this.sortDecadeNodes(e),this.createYearNodes(e,n),this.sortYearNodes(e),this.createMonthNodes(e,r),this.sortMonthNodes(e),this.createDateNodes(e,r),this.pruneDecadeNodes(e)}},e.prototype.getStartCanvasIndex=function(){return this.getCurrentSequence().getStartCanvasIndex()},e.prototype.getThumbs=function(e,t){return this.getCurrentSequence().getThumbs(e,t)},e.prototype.getTopRanges=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getTopRanges()},e.prototype.getTotalCanvases=function(){return this.getCurrentSequence().getTotalCanvases()},e.prototype.getTrackingLabel=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.getTrackingLabel()},e.prototype._getTopRanges=function(){return this.iiifResource.getTopRanges()},e.prototype.getTree=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=r.NONE),!this.iiifResource)return null;var n;if(this.iiifResource.isCollection())n=this.iiifResource.getDefaultTree();else{var i=this._getTopRanges(),a=new g.TreeNode;if(a.label="root",a.data=this.iiifResource,!i.length)return a;n=i[e].getTree(a)}var o=new g.TreeNode;switch(t.toString()){case r.DATE.toString():if(this.treeHasNavDates(n)){this._getSortedTreeNodesByDate(o,n);break}default:o=n}return o},e.prototype.treeHasNavDates=function(e){var t=this.getFlattenedTree(e);return!!t&&t.some((function(e){return!isNaN(e.navDate)}))},e.prototype.getViewingDirection=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.getCurrentSequence().getViewingDirection();return e||(e=this.manifest.getViewingDirection()),e},e.prototype.getViewingHint=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.getCurrentSequence().getViewingHint();return e||(e=this.manifest.getViewingHint()),e},e.prototype.hasParentCollection=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return!!this.manifest.parentCollection},e.prototype.hasRelatedPage=function(){var e=this.getRelated();return!!e&&(e.length&&(e=e[0]),"text/html"===e.format)},e.prototype.hasResources=function(){return this.getCurrentCanvas().getResources().length>0},e.prototype.isBottomToTop=function(){var e=this.getViewingDirection();return!!e&&e===f.BOTTOM_TO_TOP},e.prototype.isCanvasIndexOutOfRange=function(e){return this.getCurrentSequence().isCanvasIndexOutOfRange(e)},e.prototype.isContinuous=function(){var e=this.getViewingHint();return!!e&&e===d.CONTINUOUS},e.prototype.isFirstCanvas=function(e){return void 0!==e?this.getCurrentSequence().isFirstCanvas(e):this.getCurrentSequence().isFirstCanvas(this.canvasIndex)},e.prototype.isHorizontallyAligned=function(){return this.isLeftToRight()||this.isRightToLeft()},e.prototype.isLastCanvas=function(e){return void 0!==e?this.getCurrentSequence().isLastCanvas(e):this.getCurrentSequence().isLastCanvas(this.canvasIndex)},e.prototype.isLeftToRight=function(){var e=this.getViewingDirection();return!!e&&e===f.LEFT_TO_RIGHT},e.prototype.isMultiCanvas=function(){return this.getCurrentSequence().isMultiCanvas()},e.prototype.isMultiSequence=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.isMultiSequence()},e.prototype.isPaged=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);var e=this.getViewingHint();return e?e===d.PAGED:this.manifest.isPagingEnabled()},e.prototype.isPagingAvailable=function(){return this.isPagingEnabled()&&this.getTotalCanvases()>2},e.prototype.isPagingEnabled=function(){if(!this.manifest)throw new Error(m.manifestNotLoaded);return this.manifest.isPagingEnabled()||this.getCurrentSequence().isPagingEnabled()},e.prototype.isRightToLeft=function(){var e=this.getViewingDirection();return!!e&&e===f.RIGHT_TO_LEFT},e.prototype.isTopToBottom=function(){var e=this.getViewingDirection();return!!e&&e===f.TOP_TO_BOTTOM},e.prototype.isTotalCanvasesEven=function(){return this.getCurrentSequence().isTotalCanvasesEven()},e.prototype.isUIEnabled=function(e){if(!this.manifest)throw new Error(m.manifestNotLoaded);var t=this.manifest.getService(c.UI_EXTENSIONS);if(t){var n=t.getProperty("disableUI");if(n&&(-1!==n.indexOf(e)||-1!==n.indexOf(e.toLowerCase())))return!1}return!0},e.prototype.isVerticallyAligned=function(){return this.isTopToBottom()||this.isBottomToTop()},e.prototype.createDateNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=this.getNodeYear(r),a=this.getNodeMonth(r),o=new g.TreeNode;o.id=r.id,o.label=this.getNodeDisplayDate(r),o.data=r.data,o.data.type=g.TreeNodeType.MANIFEST,o.data.year=i,o.data.month=a;var l=this.getDecadeNode(e,i);if(l){var s=this.getYearNode(l,i);if(s){var u=this.getMonthNode(s,a);u&&u.addNode(o)}}}},e.prototype.createDecadeNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),a=Number(i.toString().substr(0,3)+"9");if(!this.getDecadeNode(e,i)){var o=new g.TreeNode;o.label=i+" - "+a,o.navDate=r.navDate,o.data.startYear=i,o.data.endYear=a,e.addNode(o)}}}},e.prototype.createMonthNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),a=this.getNodeMonth(r),o=this.getDecadeNode(e,i),l=null;if(o&&(l=this.getYearNode(o,i)),o&&l&&!this.getMonthNode(l,a)){var s=new g.TreeNode;s.label=this.getNodeDisplayMonth(r),s.navDate=r.navDate,s.data.year=i,s.data.month=a,l.addNode(s)}}}},e.prototype.createYearNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),a=this.getDecadeNode(e,i);if(a&&!this.getYearNode(a,i)){var o=new g.TreeNode;o.label=i.toString(),o.navDate=r.navDate,o.data.year=i,a.addNode(o)}}}},e.prototype.getDecadeNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t>=r.data.startYear&&t<=r.data.endYear)return r}return null},e.prototype.getMonthNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t===this.getNodeMonth(r))return r}return null},e.prototype.getNodeDisplayDate=function(e){return e.navDate.toDateString()},e.prototype.getNodeDisplayMonth=function(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.navDate.getMonth()]},e.prototype.getNodeMonth=function(e){return e.navDate.getMonth()},e.prototype.getNodeYear=function(e){return e.navDate.getFullYear()},e.prototype.getYearNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t===this.getNodeYear(r))return r}return null},e.prototype.pruneDecadeNodes=function(e){for(var t=[],n=0;n<e.nodes.length;n++){var r=e.nodes[n];r.nodes.length||t.push(r)}for(var i=0;i<t.length;i++){var a=t[i],o=e.nodes.indexOf(a);o>-1&&e.nodes.splice(o,1)}},e.prototype.sortDecadeNodes=function(e){e.nodes=e.nodes.sort((function(e,t){return e.data.startYear-t.data.startYear}))},e.prototype.sortMonthNodes=function(e){for(var t=this,n=0;n<e.nodes.length;n++)for(var r=e.nodes[n],i=0;i<r.nodes.length;i++){var a=r.nodes[i];a.nodes=a.nodes.sort((function(e,n){return t.getNodeMonth(e)-t.getNodeMonth(n)}))}},e.prototype.sortYearNodes=function(e){for(var t=this,n=0;n<e.nodes.length;n++){var r=e.nodes[n];r.nodes=r.nodes.sort((function(e,n){return t.getNodeYear(e)-t.getNodeYear(n)}))}},e}(),E=function(){function e(e){this._options=e,this._options.locale=this._options.locale||"en-GB"}return e.prototype.bootstrap=function(e,t){var n=this;return new Promise((function(r,i){e&&t&&(r=e,i=t),g.Utils.loadManifest(n._options.manifestUri).then((function(e){n._loaded(n,e,r,i)}))}))},e.prototype._loaded=function(e,t,n,r){var i=g.Utils.parseManifest(t,{locale:e._options.locale});if(i){e._options.iiifResource||(e._options.iiifResource=i);var a=e._options.collectionIndex,o=e._options.manifestIndex;if(i.getIIIFResourceType()===l.COLLECTION){var s=i.getManifests(),u=i.getCollections();s.length||void 0!==a||(a=0),void 0!==a&&u&&u.length?i.getCollectionByIndex(a).then((function(t){t||r("Collection index not found"),0===t.getTotalManifests()&&0===o&&t.getTotalCollections()>0?(e._options.collectionIndex=0,e._options.manifestUri=t.id,e.bootstrap(n,r)):void 0!==o&&t.getManifestByIndex(o).then((function(t){e._options.manifest=t;var r=new y(e._options);n(r)}))})):i.getManifestByIndex(e._options.manifestIndex).then((function(t){e._options.manifest=t;var r=new y(e._options);n(r)}))}else{e._options.manifest=i;var c=new y(e._options);n(c)}}else console.error("Unable to load IIIF resource")},e}(),b=n(1),S=function(){function e(e,t){this.authHoldingPage=null,this.clickThroughService=null,this.externalService=null,this.isProbed=!1,this.isResponseHandled=!1,this.kioskService=null,this.loginService=null,this.logoutService=null,this.probeService=null,this.restrictedService=null,this.tokenService=null,e.externalResource=this,this.dataUri=this._getDataUri(e),this.index=e.index,this.authAPIVersion=t.authApiVersion,this._parseAuthServices(e),this._parseCanvasDimensions(e)}return e.prototype._getImageServiceDescriptor=function(e){for(var t=null,n=0;n<e.length;n++){var r=e[n],i=r.id;i.endsWith("/")||(i+="/"),g.Utils.isImageProfile(r.getProfile())&&(t=i+"info.json")}return t},e.prototype._getDataUri=function(e){var t=e.getContent(),n=e.getImages(),r=null;if(t&&t.length){var i=t[0].getBody();return i.length?(a=i[0].getServices()).length&&(r=this._getImageServiceDescriptor(a))?r:i[0].id:null}if(n&&n.length){var a,o=n[0].getResource();return(a=o.getServices()).length&&(r=this._getImageServiceDescriptor(a))?r:o.id}var l=e.getService(c.IXIF);return l?l.getInfoUri():e.id},e.prototype._parseAuthServices=function(e){if(.9===this.authAPIVersion)this.clickThroughService=g.Utils.getService(e,c.AUTH_0_CLICK_THROUGH),this.loginService=g.Utils.getService(e,c.AUTH_0_LOGIN),this.restrictedService=g.Utils.getService(e,c.AUTH_0_RESTRICTED),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(c.AUTH_0_LOGOUT),this.tokenService=this.clickThroughService.getService(c.AUTH_0_TOKEN)):this.loginService?(this.logoutService=this.loginService.getService(c.AUTH_0_LOGOUT),this.tokenService=this.loginService.getService(c.AUTH_0_TOKEN)):this.restrictedService&&(this.logoutService=this.restrictedService.getService(c.AUTH_0_LOGOUT),this.tokenService=this.restrictedService.getService(c.AUTH_0_TOKEN));else{if(void 0!==e.isCanvas&&e.isCanvas()){var t=e.getContent();if(t&&t.length){var n=t[0].getBody();n&&n.length&&(e=n[0])}}this.clickThroughService=g.Utils.getService(e,c.AUTH_1_CLICK_THROUGH),this.loginService=g.Utils.getService(e,c.AUTH_1_LOGIN),this.externalService=g.Utils.getService(e,c.AUTH_1_EXTERNAL),this.kioskService=g.Utils.getService(e,c.AUTH_1_KIOSK),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(c.AUTH_1_LOGOUT),this.tokenService=this.clickThroughService.getService(c.AUTH_1_TOKEN),this.probeService=this.clickThroughService.getService(c.AUTH_1_PROBE)):this.loginService?(this.logoutService=this.loginService.getService(c.AUTH_1_LOGOUT),this.tokenService=this.loginService.getService(c.AUTH_1_TOKEN),this.probeService=this.loginService.getService(c.AUTH_1_PROBE)):this.externalService?(this.logoutService=this.externalService.getService(c.AUTH_1_LOGOUT),this.tokenService=this.externalService.getService(c.AUTH_1_TOKEN),this.probeService=this.externalService.getService(c.AUTH_1_PROBE)):this.kioskService&&(this.logoutService=this.kioskService.getService(c.AUTH_1_LOGOUT),this.tokenService=this.kioskService.getService(c.AUTH_1_TOKEN),this.probeService=this.kioskService.getService(c.AUTH_1_PROBE))}},e.prototype._parseCanvasDimensions=function(e){var t=e.getImages();if(t&&t.length){var n=t[0].getResource();this.width=n.getWidth(),this.height=n.getHeight()}else if((t=e.getContent()).length){var r=t[0].getBody();r.length&&(this.width=r[0].getWidth(),this.height=r[0].getHeight())}},e.prototype._parseDescriptorDimensions=function(e){void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)},e.prototype.isAccessControlled=function(){return!!(this.clickThroughService||this.loginService||this.externalService||this.kioskService||this.probeService)},e.prototype.hasServiceDescriptor=function(){return!!this.dataUri&&this.dataUri.endsWith("info.json")},e.prototype.getData=function(e){var t=this;return t.data={},new Promise((function(n,r){if(t.dataUri)if(t.probeService){t.isProbed=!0;var i=new XMLHttpRequest;i.open("GET",t.probeService.id,!0),i.withCredentials=!0,i.onload=function(){var e=JSON.parse(i.responseText);unescape(e.contentLocation)!==t.dataUri?t.status=b.MOVED_TEMPORARILY:t.status=b.OK,n(t)},i.onerror=function(){t.status=i.status,n(t)},i.send()}else{var a="GET";if(!t.hasServiceDescriptor()){if(!t.isAccessControlled())return t.status=b.OK,void n(t);a="HEAD"}var o=new XMLHttpRequest;o.open(a,t.dataUri,!0),e&&o.setRequestHeader("Authorization","Bearer "+e.accessToken),o.onload=function(){var e=JSON.parse(o.responseText);if(e){var r=unescape(e["@id"]);t.data=e,t._parseAuthServices(t.data),t._parseDescriptorDimensions(t.data),r.endsWith("/info.json")&&(r=r.substr(0,r.lastIndexOf("/")));var i=t.dataUri;i&&i.endsWith("/info.json")&&(i=i.substr(0,i.lastIndexOf("/"))),r!==i&&t.loginService?t.status=b.MOVED_TEMPORARILY:t.status=b.OK,n(t)}else t.status=b.OK,n(t)},o.onerror=function(){t.status=o.status,o.responseText&&t._parseAuthServices(JSON.parse(o.responseText)),n(t)},o.send()}else r("There is no dataUri to fetch")}))},e}(),T=function(){},I=function(){},N=function(e,t){this.value=e,this.locale=t},O=function(){function e(e){this.labels=e}return e.prototype.format=function(e){return-1!=e.indexOf("<a")?e:'<a href="'+e+'">'+(this.labels[e]?this.labels[e]:e)+"</a>"},e}();n.d(t,"loadManifest",(function(){return L})),n.d(t,"AnnotationGroup",(function(){return h})),n.d(t,"AnnotationRect",(function(){return p})),n.d(t,"Bootstrapper",(function(){return E})),n.d(t,"ExternalResource",(function(){return S})),n.d(t,"Helper",(function(){return y})),n.d(t,"ILabelValuePair",(function(){return T})),n.d(t,"MetadataGroup",(function(){return _})),n.d(t,"MetadataOptions",(function(){return I})),n.d(t,"MultiSelectState",(function(){return v})),n.d(t,"Translation",(function(){return N})),n.d(t,"TreeSortType",(function(){return r})),n.d(t,"UriLabeller",(function(){return O}));var L=function(e){return new E(e).bootstrap()}}])},5903:(e,t,n)=>{"use strict";var r,i,a,o,l,s,u,c,f,d;n.d(t,{LX:()=>d,T5:()=>f}),function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(r||(r={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(i||(i={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.OA_CHOICE="oa:choice",e.CONTENT_AS_TEXT="contentastext",e.DATASET="dataset",e.DOCUMENT="document",e.IMAGE="image",e.MODEL="model",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXT="text",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(a||(a={})),function(e){e.ANNOTATION="annotation",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(o||(o={})),function(e){e.AUDIO_MP4="audio/mp4",e.CORTO="application/corto",e.DICOM="application/dicom",e.DRACO="application/draco",e.EPUB="application/epub+zip",e.GIRDER="image/vnd.kitware.girder",e.GLB="model/gltf-binary",e.GLTF="model/gltf+json",e.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',e.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG_DASH="application/dash+xml",e.OBJ="text/plain",e.OPF="application/oebps-package+xml",e.PDF="application/pdf",e.PLY="application/ply",e.THREEJS="application/vnd.threejs+json",e.USDZ="model/vnd.usd+zip",e.VIDEO_MP4="video/mp4",e.WAV="audio/wav",e.WEBM="video/webm"}(l||(l={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.PDF="application/pdf"}(s||(s={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(u||(u={})),function(e){e.IMAGE_SERVICE_2="ImageService2",e.IMAGE_SERVICE_3="ImageService3"}(c||(c={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(f||(f={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(d||(d={}))},2485:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var o=i.apply(null,n);o&&e.push(o)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)r.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},2551:(e,t,n)=>{"use strict";var r=n(6540),i=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,l={};function s(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function g(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var _=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function y(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(h,e)||!f.call(p,e)&&(d.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(_,m);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(_,m);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(_,m);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),S=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),L=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var k=Symbol.iterator;function x(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=k&&e[k]||e["@@iterator"])?e:null}var D,U=Object.assign;function V(e){if(void 0===D)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var G=!1;function F(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(1!==o||1!==l)do{if(o--,0>--l||i[o]!==a[l]){var s="\n"+i[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}}while(1<=o&&0<=l);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function H(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return F(e.type,!1);case 11:return F(e.type.render,!1);case 1:return F(e.type,!0);default:return""}}function j(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case T:return"Fragment";case S:return"Portal";case N:return"Profiler";case I:return"StrictMode";case w:return"Suspense";case A:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case O:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case M:return null!==(t=e.displayName||null)?t:j(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return j(e(t))}catch(e){}}return null}function z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return j(t);case 8:return t===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function B(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function W(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=B(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&y(e,"checked",t,!1)}function J(e,t){X(e,t);var n=B(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,B(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+B(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return U({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:B(n)}}function ae(e,t){var n=B(t.value),r=B(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function le(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?le(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,fe=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var _e=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function ye(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ee=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Te=null,Ie=null;function Ne(e){if(e=yi(e)){if("function"!=typeof Se)throw Error(a(280));var t=e.stateNode;t&&(t=bi(t),Se(e.stateNode,e.type,t))}}function Oe(e){Te?Ie?Ie.push(e):Ie=[e]:Te=e}function Le(){if(Te){var e=Te,t=Ie;if(Ie=Te=null,Ne(e),t)for(e=0;e<t.length;e++)Ne(t[e])}}function Ce(e,t){return e(t)}function we(){}var Ae=!1;function Me(e,t,n){if(Ae)return e(t,n);Ae=!0;try{return Ce(e,t,n)}finally{Ae=!1,(null!==Te||null!==Ie)&&(we(),Le())}}function Re(e,t){var n=e.stateNode;if(null===n)return null;var r=bi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(c)try{var ke={};Object.defineProperty(ke,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",ke,ke),window.removeEventListener("test",ke,ke)}catch(ce){Pe=!1}function xe(e,t,n,r,i,a,o,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var De=!1,Ue=null,Ve=!1,Ge=null,Fe={onError:function(e){De=!0,Ue=e}};function He(e,t,n,r,i,a,o,l,s){De=!1,Ue=null,xe.apply(Fe,arguments)}function je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Be(e){if(je(e)!==e)throw Error(a(188))}function $e(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Be(i),e;if(o===r)return Be(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l){for(s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?We(e):null}function We(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=We(e);if(null!==t)return t;e=e.sibling}return null}var Qe=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Ke=i.unstable_shouldYield,qe=i.unstable_requestPaint,Xe=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null,ot=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(lt(e)/st|0)|0},lt=Math.log,st=Math.LN2,ut=64,ct=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var l=o&~i;0!==l?r=ft(l):0!=(a&=o)&&(r=ft(a))}else 0!=(o=n&~i)?r=ft(o):0!==a&&(r=ft(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var yt=0;function Et(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var bt,St,Tt,It,Nt,Ot=!1,Lt=[],Ct=null,wt=null,At=null,Mt=new Map,Rt=new Map,Pt=[],kt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":wt=null;break;case"mouseover":case"mouseout":At=null;break;case"pointerover":case"pointerout":Mt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rt.delete(t.pointerId)}}function Dt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=yi(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ut(e){var t=mi(e.target);if(null!==t){var n=je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ze(n)))return e.blockedOn=t,void Nt(e.priority,(function(){Tt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=yi(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Ee=r,n.target.dispatchEvent(r),Ee=null,t.shift()}return!0}function Gt(e,t,n){Vt(e)&&n.delete(t)}function Ft(){Ot=!1,null!==Ct&&Vt(Ct)&&(Ct=null),null!==wt&&Vt(wt)&&(wt=null),null!==At&&Vt(At)&&(At=null),Mt.forEach(Gt),Rt.forEach(Gt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,Ot||(Ot=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function jt(e){function t(t){return Ht(t,e)}if(0<Lt.length){Ht(Lt[0],e);for(var n=1;n<Lt.length;n++){var r=Lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Ht(Ct,e),null!==wt&&Ht(wt,e),null!==At&&Ht(At,e),Mt.forEach(t),Rt.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Ut(n),null===n.blockedOn&&Pt.shift()}var zt=E.ReactCurrentBatchConfig,Bt=!0;function $t(e,t,n,r){var i=yt,a=zt.transition;zt.transition=null;try{yt=1,Qt(e,t,n,r)}finally{yt=i,zt.transition=a}}function Wt(e,t,n,r){var i=yt,a=zt.transition;zt.transition=null;try{yt=4,Qt(e,t,n,r)}finally{yt=i,zt.transition=a}}function Qt(e,t,n,r){if(Bt){var i=Kt(e,t,n,r);if(null===i)Br(e,t,r,Yt,n),xt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=Dt(Ct,e,t,n,r,i),!0;case"dragenter":return wt=Dt(wt,e,t,n,r,i),!0;case"mouseover":return At=Dt(At,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Mt.set(a,Dt(Mt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Rt.set(a,Dt(Rt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(xt(e,r),4&t&&-1<kt.indexOf(e)){for(;null!==i;){var a=yi(i);if(null!==a&&bt(a),null===(a=Kt(e,t,n,r))&&Br(e,t,r,Yt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Br(e,t,r,null,n)}}var Yt=null;function Kt(e,t,n,r){if(Yt=null,null!==(e=mi(e=be(r))))if(null===(t=je(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ze(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Xt=null,Jt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Jt,r=n.length,i="value"in Xt?Xt.value:Xt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return U(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,ln,sn,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),fn=U({},un,{view:0,detail:0}),dn=an(fn),pn=U({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sn&&(sn&&"mousemove"===e.type?(on=e.screenX-sn.screenX,ln=e.screenY-sn.screenY):ln=on=0,sn=e),on)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),hn=an(pn),gn=an(U({},pn,{dataTransfer:0})),vn=an(U({},fn,{relatedTarget:0})),_n=an(U({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=U({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yn=an(mn),En=an(U({},un,{data:0})),bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Tn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Tn[e])&&!!t[e]}function Nn(){return In}var On=U({},fn,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ln=an(On),Cn=an(U({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wn=an(U({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn})),An=an(U({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=U({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=an(Mn),Pn=[9,13,27,32],kn=c&&"CompositionEvent"in window,xn=null;c&&"documentMode"in document&&(xn=document.documentMode);var Dn=c&&"TextEvent"in window&&!xn,Un=c&&(!kn||xn&&8<xn&&11>=xn),Vn=String.fromCharCode(32),Gn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var jn=!1,zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Bn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function $n(e,t,n,r){Oe(r),0<(t=Wr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Qn=null;function Yn(e){Vr(e,0)}function Kn(e){if(Q(Ei(e)))return e}function qn(e,t){if("change"===e)return t}var Xn=!1;if(c){var Jn;if(c){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"==typeof er.oninput}Jn=Zn}else Jn=!1;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Qn=Wn=null)}function nr(e){if("value"===e.propertyName&&Kn(Qn)){var t=[];$n(t,Qn,e,be(e)),Me(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Qn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Qn)}function ar(e,t){if("click"===e)return Kn(t)}function or(e,t){if("input"===e||"change"===e)return Kn(t)}var lr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function sr(e,t){if(lr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!f.call(t,i)||!lr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=c&&"documentMode"in document&&11>=document.documentMode,vr=null,_r=null,mr=null,yr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==vr||vr!==Y(r)||(r="selectionStart"in(r=vr)&&pr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&sr(mr,r)||(mr=r,0<(r=Wr(_r,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},Tr={},Ir={};function Nr(e){if(Tr[e])return Tr[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ir)return Tr[e]=n[t];return e}c&&(Ir=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Or=Nr("animationend"),Lr=Nr("animationiteration"),Cr=Nr("animationstart"),wr=Nr("transitionend"),Ar=new Map,Mr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Ar.set(e,t),s(t,[e])}for(var Pr=0;Pr<Mr.length;Pr++){var kr=Mr[Pr];Rr(kr.toLowerCase(),"on"+(kr[0].toUpperCase()+kr.slice(1)))}Rr(Or,"onAnimationEnd"),Rr(Lr,"onAnimationIteration"),Rr(Cr,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(wr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(xr));function Ur(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,l,s,u){if(He.apply(this,arguments),De){if(!De)throw Error(a(198));var c=Ue;De=!1,Ue=null,Ve||(Ve=!0,Ge=c)}}(r,t,void 0,e),e.currentTarget=null}function Vr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&i.isPropagationStopped())break e;Ur(i,l,u),a=s}else for(o=0;o<r.length;o++){if(s=(l=r[o]).instance,u=l.currentTarget,l=l.listener,s!==a&&i.isPropagationStopped())break e;Ur(i,l,u),a=s}}}if(Ve)throw e=Ge,Ve=!1,Ge=null,e}function Gr(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(zr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),zr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function jr(e){if(!e[Hr]){e[Hr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Dr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,Fr("selectionchange",!1,t))}}function zr(e,t,n,r){switch(qt(t)){case 1:var i=$t;break;case 4:i=Wt;break;default:i=Qt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Br(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var l=r.stateNode.containerInfo;if(l===i||8===l.nodeType&&l.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==l;){if(null===(o=mi(l)))return;if(5===(s=o.tag)||6===s){r=a=o;continue e}l=l.parentNode}}r=r.return}Me((function(){var r=a,i=be(n),o=[];e:{var l=Ar.get(e);if(void 0!==l){var s=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":s=Ln;break;case"focusin":u="focus",s=vn;break;case"focusout":u="blur",s=vn;break;case"beforeblur":case"afterblur":s=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=wn;break;case Or:case Lr:case Cr:s=_n;break;case wr:s=An;break;case"scroll":s=dn;break;case"wheel":s=Rn;break;case"copy":case"cut":case"paste":s=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Cn}var c=!!(4&t),f=!c&&"scroll"===e,d=c?null!==l?l+"Capture":null:l;c=[];for(var p,h=r;null!==h;){var g=(p=h).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==d&&null!=(g=Re(h,d))&&c.push($r(h,g,p))),f)break;h=h.return}0<c.length&&(l=new s(l,u,null,n,i),o.push({event:l,listeners:c}))}}if(!(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Ee||!(u=n.relatedTarget||n.fromElement)||!mi(u)&&!u[hi])&&(s||l)&&(l=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,s?(s=r,null!==(u=(u=n.relatedTarget||n.toElement)?mi(u):null)&&(u!==(f=je(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=hn,g="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Cn,g="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==s?l:Ei(s),p=null==u?l:Ei(u),(l=new c(g,h+"leave",s,n,i)).target=f,l.relatedTarget=p,g=null,mi(i)===r&&((c=new c(d,h+"enter",u,n,i)).target=p,c.relatedTarget=f,g=c),f=g,s&&u)e:{for(d=u,h=0,p=c=s;p;p=Qr(p))h++;for(p=0,g=d;g;g=Qr(g))p++;for(;0<h-p;)c=Qr(c),h--;for(;0<p-h;)d=Qr(d),p--;for(;h--;){if(c===d||null!==d&&c===d.alternate)break e;c=Qr(c),d=Qr(d)}c=null}else c=null;null!==s&&Yr(o,l,s,c,!1),null!==u&&null!==f&&Yr(o,f,u,c,!0)}if("select"===(s=(l=r?Ei(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var v=qn;else if(Bn(l))if(Xn)v=or;else{v=ir;var _=rr}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(v=ar);switch(v&&(v=v(e,r))?$n(o,v,n,i):(_&&_(e,l,r),"focusout"===e&&(_=l._wrapperState)&&_.controlled&&"number"===l.type&&ee(l,"number",l.value)),_=r?Ei(r):window,e){case"focusin":(Bn(_)||"true"===_.contentEditable)&&(vr=_,_r=r,mr=null);break;case"focusout":mr=_r=vr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,Er(o,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Er(o,n,i)}var m;if(kn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else jn?Fn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Un&&"ko"!==n.locale&&(jn||"onCompositionStart"!==y?"onCompositionEnd"===y&&jn&&(m=en()):(Jt="value"in(Xt=i)?Xt.value:Xt.textContent,jn=!0)),0<(_=Wr(r,y)).length&&(y=new En(y,e,null,n,i),o.push({event:y,listeners:_}),(m||null!==(m=Hn(n)))&&(y.data=m))),(m=Dn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Gn=!0,Vn);case"textInput":return(e=t.data)===Vn&&Gn?null:e;default:return null}}(e,n):function(e,t){if(jn)return"compositionend"===e||!kn&&Fn(e,t)?(e=en(),Zt=Jt=Xt=null,jn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Un&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Wr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=m)}Vr(o,t)}))}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Re(e,n))&&r.unshift($r(e,a,i)),null!=(a=Re(e,t))&&r.push($r(e,a,i))),e=e.return}return r}function Qr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,i?null!=(s=Re(n,a))&&o.unshift($r(n,s,l)):i||null!=(s=Re(n,a))&&o.push($r(n,s,l))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Kr=/\r\n?/g,qr=/\u0000|\uFFFD/g;function Xr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace(qr,"")}function Jr(e,t,n){if(t=Xr(t),Xr(e)!==t&&n)throw Error(a(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,oi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(li)}:ri;function li(e){setTimeout((function(){throw e}))}function si(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void jt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);jt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fi=Math.random().toString(36).slice(2),di="__reactFiber$"+fi,pi="__reactProps$"+fi,hi="__reactContainer$"+fi,gi="__reactEvents$"+fi,vi="__reactListeners$"+fi,_i="__reactHandles$"+fi;function mi(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[di])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function yi(e){return!(e=e[di]||e[hi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function bi(e){return e[pi]||null}var Si=[],Ti=-1;function Ii(e){return{current:e}}function Ni(e){0>Ti||(e.current=Si[Ti],Si[Ti]=null,Ti--)}function Oi(e,t){Ti++,Si[Ti]=e.current,e.current=t}var Li={},Ci=Ii(Li),wi=Ii(!1),Ai=Li;function Mi(e,t){var n=e.type.contextTypes;if(!n)return Li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ri(e){return null!=e.childContextTypes}function Pi(){Ni(wi),Ni(Ci)}function ki(e,t,n){if(Ci.current!==Li)throw Error(a(168));Oi(Ci,t),Oi(wi,n)}function xi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,z(e)||"Unknown",i));return U({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Li,Ai=Ci.current,Oi(Ci,e),Oi(wi,wi.current),!0}function Ui(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=xi(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,Ni(wi),Ni(Ci),Oi(Ci,e)):Ni(wi),Oi(wi,n)}var Vi=null,Gi=!1,Fi=!1;function Hi(e){null===Vi?Vi=[e]:Vi.push(e)}function ji(){if(!Fi&&null!==Vi){Fi=!0;var e=0,t=yt;try{var n=Vi;for(yt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Vi=null,Gi=!1}catch(t){throw null!==Vi&&(Vi=Vi.slice(e+1)),Qe(Ze,ji),t}finally{yt=t,Fi=!1}}return null}var zi=[],Bi=0,$i=null,Wi=0,Qi=[],Yi=0,Ki=null,qi=1,Xi="";function Ji(e,t){zi[Bi++]=Wi,zi[Bi++]=$i,$i=e,Wi=t}function Zi(e,t,n){Qi[Yi++]=qi,Qi[Yi++]=Xi,Qi[Yi++]=Ki,Ki=e;var r=qi;e=Xi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-ot(t)+i|n<<i|r,Xi=a+e}else qi=1<<a|n<<i|r,Xi=e}function ea(e){null!==e.return&&(Ji(e,1),Zi(e,1,0))}function ta(e){for(;e===$i;)$i=zi[--Bi],zi[Bi]=null,Wi=zi[--Bi],zi[Bi]=null;for(;e===Ki;)Ki=Qi[--Yi],Qi[Yi]=null,Xi=Qi[--Yi],Qi[Yi]=null,qi=Qi[--Yi],Qi[Yi]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function la(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ki?{id:qi,overflow:Xi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function sa(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(ia){var t=ra;if(t){var n=t;if(!la(e,t)){if(sa(e))throw Error(a(418));t=ui(n.nextSibling);var r=na;t&&la(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(sa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function fa(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(sa(e))throw da(),Error(a(418));for(;t;)oa(e,t),t=ui(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ui(e.stateNode.nextSibling):null;return!0}function da(){for(var e=ra;e;)e=ui(e.nextSibling)}function pa(){ra=na=null,ia=!1}function ha(e){null===aa?aa=[e]:aa.push(e)}var ga=E.ReactCurrentBatchConfig;function va(e,t){if(e&&e.defaultProps){for(var n in t=U({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var _a=Ii(null),ma=null,ya=null,Ea=null;function ba(){Ea=ya=ma=null}function Sa(e){var t=_a.current;Ni(_a),e._currentValue=t}function Ta(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ia(e,t){ma=e,Ea=ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(El=!0),e.firstContext=null)}function Na(e){var t=e._currentValue;if(Ea!==e)if(e={context:e,memoizedValue:t,next:null},null===ya){if(null===ma)throw Error(a(308));ya=e,ma.dependencies={lanes:0,firstContext:e}}else ya=ya.next=e;return t}var Oa=null;function La(e){null===Oa?Oa=[e]:Oa.push(e)}function Ca(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,La(t)):(n.next=i.next,i.next=n),t.interleaved=n,wa(e,r)}function wa(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Aa=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ka(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&ws){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wa(e,n)}return null===(i=r.interleaved)?(t.next=t,La(r)):(t.next=i.next,i.next=t),r.interleaved=t,wa(e,n)}function xa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Da(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ua(e,t,n,r){var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var s=l,u=s.next;s.next=null,null===o?a=u:o.next=u,o=s;var c=e.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s)}if(null!==a){var f=i.baseState;for(o=0,c=u=s=null,l=a;;){var d=l.lane,p=l.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var h=e,g=l;switch(d=t,p=n,g.tag){case 1:if("function"==typeof(h=g.payload)){f=h.call(p,f,d);break e}f=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=g.payload)?h.call(p,f,d):h))break e;f=U({},f,d);break e;case 2:Aa=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[l]:d.push(l))}else p={eventTime:p,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=p,s=f):c=c.next=p,o|=d;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(d=l).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(s=f),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Us|=o,e.lanes=o,e.memoizedState=f}}function Va(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Ga=(new r.Component).refs;function Fa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:U({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ha={isMounted:function(e){return!!(e=e._reactInternals)&&je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),a=Pa(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=ka(e,a,i))&&(ru(t,e,i,r),xa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tu(),i=nu(e),a=Pa(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=ka(e,a,i))&&(ru(t,e,i,r),xa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tu(),r=nu(e),i=Pa(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=ka(e,i,r))&&(ru(t,e,r,n),xa(t,e,r))}};function ja(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&sr(n,r)&&sr(i,a))}function za(e,t,n){var r=!1,i=Li,a=t.contextType;return"object"==typeof a&&null!==a?a=Na(a):(i=Ri(t)?Ai:Ci.current,a=(r=null!=(r=t.contextTypes))?Mi(e,i):Li),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ha,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ba(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ha.enqueueReplaceState(t,t.state,null)}function $a(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Ga,Ma(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Na(a):(a=Ri(t)?Ai:Ci.current,i.context=Mi(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Fa(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Ha.enqueueReplaceState(i,i.state,null),Ua(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Wa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Ga&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Qa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ya(e){return(0,e._init)(e._payload)}function Ka(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=ku(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function l(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Vu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===T?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===R&&Ya(a)===t.type)?((r=i(t,n.props)).ref=Wa(e,t,n),r.return=e,r):((r=xu(n.type,n.key,n.props,null,e.mode,r)).ref=Wa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Du(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Vu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(n=xu(t.type,t.key,t.props,null,e.mode,n)).ref=Wa(e,null,t),n.return=e,n;case S:return(t=Gu(t,e.mode,n)).return=e,t;case R:return d(e,(0,t._init)(t._payload),n)}if(te(t)||x(t))return(t=Du(t,e.mode,n,null)).return=e,t;Qa(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===i?u(e,t,n,r):null;case S:return n.key===i?c(e,t,n,r):null;case R:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||x(n))return null!==i?null:f(e,t,n,r,null);Qa(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case R:return h(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||x(r))return f(t,e=e.get(n)||null,r,i,null);Qa(t,r)}return null}function g(i,a,l,s){for(var u=null,c=null,f=a,g=a=0,v=null;null!==f&&g<l.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var _=p(i,f,l[g],s);if(null===_){null===f&&(f=v);break}e&&f&&null===_.alternate&&t(i,f),a=o(_,a,g),null===c?u=_:c.sibling=_,c=_,f=v}if(g===l.length)return n(i,f),ia&&Ji(i,g),u;if(null===f){for(;g<l.length;g++)null!==(f=d(i,l[g],s))&&(a=o(f,a,g),null===c?u=f:c.sibling=f,c=f);return ia&&Ji(i,g),u}for(f=r(i,f);g<l.length;g++)null!==(v=h(f,i,g,l[g],s))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),a=o(v,a,g),null===c?u=v:c.sibling=v,c=v);return e&&f.forEach((function(e){return t(i,e)})),ia&&Ji(i,g),u}function v(i,l,s,u){var c=x(s);if("function"!=typeof c)throw Error(a(150));if(null==(s=c.call(s)))throw Error(a(151));for(var f=c=null,g=l,v=l=0,_=null,m=s.next();null!==g&&!m.done;v++,m=s.next()){g.index>v?(_=g,g=null):_=g.sibling;var y=p(i,g,m.value,u);if(null===y){null===g&&(g=_);break}e&&g&&null===y.alternate&&t(i,g),l=o(y,l,v),null===f?c=y:f.sibling=y,f=y,g=_}if(m.done)return n(i,g),ia&&Ji(i,v),c;if(null===g){for(;!m.done;v++,m=s.next())null!==(m=d(i,m.value,u))&&(l=o(m,l,v),null===f?c=m:f.sibling=m,f=m);return ia&&Ji(i,v),c}for(g=r(i,g);!m.done;v++,m=s.next())null!==(m=h(g,i,v,m.value,u))&&(e&&null!==m.alternate&&g.delete(null===m.key?v:m.key),l=o(m,l,v),null===f?c=m:f.sibling=m,f=m);return e&&g.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),c}return function e(r,a,o,s){if("object"==typeof o&&null!==o&&o.type===T&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case b:e:{for(var u=o.key,c=a;null!==c;){if(c.key===u){if((u=o.type)===T){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===R&&Ya(u)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=Wa(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===T?((a=Du(o.props.children,r.mode,s,o.key)).return=r,r=a):((s=xu(o.type,o.key,o.props,null,r.mode,s)).ref=Wa(r,a,o),s.return=r,r=s)}return l(r);case S:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Gu(o,r.mode,s)).return=r,r=a}return l(r);case R:return e(r,a,(c=o._init)(o._payload),s)}if(te(o))return g(r,a,o,s);if(x(o))return v(r,a,o,s);Qa(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Vu(o,r.mode,s)).return=r,r=a),l(r)):n(r,a)}}var qa=Ka(!0),Xa=Ka(!1),Ja={},Za=Ii(Ja),eo=Ii(Ja),to=Ii(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Oi(to,t),Oi(eo,e),Oi(Za,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ni(Za),Oi(Za,t)}function io(){Ni(Za),Ni(eo),Ni(to)}function ao(e){no(to.current);var t=no(Za.current),n=se(t,e.type);t!==n&&(Oi(eo,e),Oi(Za,n))}function oo(e){eo.current===e&&(Ni(Za),Ni(eo))}var lo=Ii(0);function so(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uo=[];function co(){for(var e=0;e<uo.length;e++)uo[e]._workInProgressVersionPrimary=null;uo.length=0}var fo=E.ReactCurrentDispatcher,po=E.ReactCurrentBatchConfig,ho=0,go=null,vo=null,_o=null,mo=!1,yo=!1,Eo=0,bo=0;function So(){throw Error(a(321))}function To(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function Io(e,t,n,r,i,o){if(ho=o,go=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fo.current=null===e||null===e.memoizedState?ll:sl,e=n(r,i),yo){o=0;do{if(yo=!1,Eo=0,25<=o)throw Error(a(301));o+=1,_o=vo=null,t.updateQueue=null,fo.current=ul,e=n(r,i)}while(yo)}if(fo.current=ol,t=null!==vo&&null!==vo.next,ho=0,_o=vo=go=null,mo=!1,t)throw Error(a(300));return e}function No(){var e=0!==Eo;return Eo=0,e}function Oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===_o?go.memoizedState=_o=e:_o=_o.next=e,_o}function Lo(){if(null===vo){var e=go.alternate;e=null!==e?e.memoizedState:null}else e=vo.next;var t=null===_o?go.memoizedState:_o.next;if(null!==t)_o=t,vo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(vo=e).memoizedState,baseState:vo.baseState,baseQueue:vo.baseQueue,queue:vo.queue,next:null},null===_o?go.memoizedState=_o=e:_o=_o.next=e}return _o}function Co(e,t){return"function"==typeof t?t(e):t}function wo(e){var t=Lo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=vo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=l=null,u=null,c=o;do{var f=c.lane;if((ho&f)===f)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(s=u=d,l=r):u=u.next=d,go.lanes|=f,Us|=f}c=c.next}while(null!==c&&c!==o);null===u?l=r:u.next=s,lr(r,t.memoizedState)||(El=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,go.lanes|=o,Us|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ao(e){var t=Lo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var l=i=i.next;do{o=e(o,l.action),l=l.next}while(l!==i);lr(o,t.memoizedState)||(El=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mo(){}function Ro(e,t){var n=go,r=Lo(),i=t(),o=!lr(r.memoizedState,i);if(o&&(r.memoizedState=i,El=!0),r=r.queue,Bo(xo.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==_o&&1&_o.memoizedState.tag){if(n.flags|=2048,Go(9,ko.bind(null,n,r,i,t),void 0,null),null===As)throw Error(a(349));30&ho||Po(n,t,i)}return i}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=go.updateQueue)?(t={lastEffect:null,stores:null},go.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ko(e,t,n,r){t.value=n,t.getSnapshot=r,Do(t)&&Uo(e)}function xo(e,t,n){return n((function(){Do(t)&&Uo(e)}))}function Do(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch(e){return!0}}function Uo(e){var t=wa(e,1);null!==t&&ru(t,e,1,-1)}function Vo(e){var t=Oo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:e},t.queue=e,e=e.dispatch=nl.bind(null,go,e),[t.memoizedState,e]}function Go(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=go.updateQueue)?(t={lastEffect:null,stores:null},go.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fo(){return Lo().memoizedState}function Ho(e,t,n,r){var i=Oo();go.flags|=e,i.memoizedState=Go(1|t,n,void 0,void 0===r?null:r)}function jo(e,t,n,r){var i=Lo();r=void 0===r?null:r;var a=void 0;if(null!==vo){var o=vo.memoizedState;if(a=o.destroy,null!==r&&To(r,o.deps))return void(i.memoizedState=Go(t,n,a,r))}go.flags|=e,i.memoizedState=Go(1|t,n,a,r)}function zo(e,t){return Ho(8390656,8,e,t)}function Bo(e,t){return jo(2048,8,e,t)}function $o(e,t){return jo(4,2,e,t)}function Wo(e,t){return jo(4,4,e,t)}function Qo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Yo(e,t,n){return n=null!=n?n.concat([e]):null,jo(4,4,Qo.bind(null,t,e),n)}function Ko(){}function qo(e,t){var n=Lo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xo(e,t){var n=Lo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&To(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Jo(e,t,n){return 21&ho?(lr(n,t)||(n=gt(),go.lanes|=n,Us|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,El=!0),e.memoizedState=n)}function Zo(e,t){var n=yt;yt=0!==n&&4>n?n:4,e(!0);var r=po.transition;po.transition={};try{e(!1),t()}finally{yt=n,po.transition=r}}function el(){return Lo().memoizedState}function tl(e,t,n){var r=nu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rl(e)?il(t,n):null!==(n=Ca(e,t,n,r))&&(ru(n,e,r,tu()),al(n,t,r))}function nl(e,t,n){var r=nu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rl(e))il(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,lr(l,o)){var s=t.interleaved;return null===s?(i.next=i,La(t)):(i.next=s.next,s.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ca(e,t,i,r))&&(ru(n,e,r,i=tu()),al(n,t,r))}}function rl(e){var t=e.alternate;return e===go||null!==t&&t===go}function il(e,t){yo=mo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function al(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var ol={readContext:Na,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useInsertionEffect:So,useLayoutEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useMutableSource:So,useSyncExternalStore:So,useId:So,unstable_isNewReconciler:!1},ll={readContext:Na,useCallback:function(e,t){return Oo().memoizedState=[e,void 0===t?null:t],e},useContext:Na,useEffect:zo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ho(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ho(4,2,e,t)},useMemo:function(e,t){var n=Oo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Oo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=tl.bind(null,go,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Oo().memoizedState=e},useState:Vo,useDebugValue:Ko,useDeferredValue:function(e){return Oo().memoizedState=e},useTransition:function(){var e=Vo(!1),t=e[0];return e=Zo.bind(null,e[1]),Oo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=go,i=Oo();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===As)throw Error(a(349));30&ho||Po(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,zo(xo.bind(null,r,o,e),[e]),r.flags|=2048,Go(9,ko.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Oo(),t=As.identifierPrefix;if(ia){var n=Xi;t=":"+t+"R"+(n=(qi&~(1<<32-ot(qi)-1)).toString(32)+n),0<(n=Eo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=bo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sl={readContext:Na,useCallback:qo,useContext:Na,useEffect:Bo,useImperativeHandle:Yo,useInsertionEffect:$o,useLayoutEffect:Wo,useMemo:Xo,useReducer:wo,useRef:Fo,useState:function(){return wo(Co)},useDebugValue:Ko,useDeferredValue:function(e){return Jo(Lo(),vo.memoizedState,e)},useTransition:function(){return[wo(Co)[0],Lo().memoizedState]},useMutableSource:Mo,useSyncExternalStore:Ro,useId:el,unstable_isNewReconciler:!1},ul={readContext:Na,useCallback:qo,useContext:Na,useEffect:Bo,useImperativeHandle:Yo,useInsertionEffect:$o,useLayoutEffect:Wo,useMemo:Xo,useReducer:Ao,useRef:Fo,useState:function(){return Ao(Co)},useDebugValue:Ko,useDeferredValue:function(e){var t=Lo();return null===vo?t.memoizedState=e:Jo(t,vo.memoizedState,e)},useTransition:function(){return[Ao(Co)[0],Lo().memoizedState]},useMutableSource:Mo,useSyncExternalStore:Ro,useId:el,unstable_isNewReconciler:!1};function cl(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function fl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function dl(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var pl="function"==typeof WeakMap?WeakMap:Map;function hl(e,t,n){(n=Pa(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){$s||($s=!0,Ws=r),dl(0,t)},n}function gl(e,t,n){(n=Pa(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){dl(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){dl(0,t),"function"!=typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ou.bind(null,e,t,n),t.then(e,e))}function _l(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ml(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Pa(-1,1)).tag=2,ka(n,t,1))),n.lanes|=1),e)}var yl=E.ReactCurrentOwner,El=!1;function bl(e,t,n,r){t.child=null===e?Xa(t,null,n,r):qa(t,e.child,n,r)}function Sl(e,t,n,r,i){n=n.render;var a=t.ref;return Ia(t,i),r=Io(e,t,n,r,a,i),n=No(),null===e||El?(ia&&n&&ea(t),t.flags|=1,bl(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$l(e,t,i))}function Tl(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Pu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=xu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Il(e,t,a,r,i))}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:sr)(o,r)&&e.ref===t.ref)return $l(e,t,i)}return t.flags|=1,(e=ku(a,r)).ref=t.ref,e.return=t,t.child=e}function Il(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(sr(a,r)&&e.ref===t.ref){if(El=!1,t.pendingProps=r=a,!(e.lanes&i))return t.lanes=e.lanes,$l(e,t,i);131072&e.flags&&(El=!0)}}return Ll(e,t,n,r,i)}function Nl(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oi(ks,Ps),Ps|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Oi(ks,Ps),Ps|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oi(ks,Ps),Ps|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Oi(ks,Ps),Ps|=r;return bl(e,t,i,n),t.child}function Ol(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ll(e,t,n,r,i){var a=Ri(n)?Ai:Ci.current;return a=Mi(t,a),Ia(t,i),n=Io(e,t,n,r,a,i),r=No(),null===e||El?(ia&&r&&ea(t),t.flags|=1,bl(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,$l(e,t,i))}function Cl(e,t,n,r,i){if(Ri(n)){var a=!0;Di(t)}else a=!1;if(Ia(t,i),null===t.stateNode)Bl(e,t),za(t,n,r),$a(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,l=t.memoizedProps;o.props=l;var s=o.context,u=n.contextType;u="object"==typeof u&&null!==u?Na(u):Mi(t,u=Ri(n)?Ai:Ci.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l!==r||s!==u)&&Ba(t,o,r,u),Aa=!1;var d=t.memoizedState;o.state=d,Ua(t,r,o,i),s=t.memoizedState,l!==r||d!==s||wi.current||Aa?("function"==typeof c&&(Fa(t,n,c,r),s=t.memoizedState),(l=Aa||ja(t,n,l,r,d,s,u))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=u,r=l):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ra(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:va(t.type,l),o.props=u,f=t.pendingProps,d=o.context,s="object"==typeof(s=n.contextType)&&null!==s?Na(s):Mi(t,s=Ri(n)?Ai:Ci.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(l!==f||d!==s)&&Ba(t,o,r,s),Aa=!1,d=t.memoizedState,o.state=d,Ua(t,r,o,i);var h=t.memoizedState;l!==f||d!==h||wi.current||Aa?("function"==typeof p&&(Fa(t,n,p,r),h=t.memoizedState),(u=Aa||ja(t,n,u,r,d,h,s)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,s),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,s)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=s,r=u):("function"!=typeof o.componentDidUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return wl(e,t,n,r,a,i)}function wl(e,t,n,r,i,a){Ol(e,t);var o=!!(128&t.flags);if(!r&&!o)return i&&Ui(t,n,!1),$l(e,t,a);r=t.stateNode,yl.current=t;var l=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=qa(t,e.child,null,a),t.child=qa(t,null,l,a)):bl(e,t,l,a),t.memoizedState=r.state,i&&Ui(t,n,!0),t.child}function Al(e){var t=e.stateNode;t.pendingContext?ki(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ki(0,t.context,!1),ro(e,t.containerInfo)}function Ml(e,t,n,r,i){return pa(),ha(i),t.flags|=256,bl(e,t,n,r),t.child}var Rl,Pl,kl,xl,Dl={dehydrated:null,treeContext:null,retryLane:0};function Ul(e){return{baseLanes:e,cachePool:null,transitions:null}}function Vl(e,t,n){var r,i=t.pendingProps,o=lo.current,l=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(l=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Oi(lo,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,l?(i=t.mode,l=t.child,s={mode:"hidden",children:s},1&i||null===l?l=Uu(s,i,0,null):(l.childLanes=0,l.pendingProps=s),e=Du(e,i,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ul(n),t.memoizedState=Dl,e):Gl(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,l){if(n)return 256&t.flags?(t.flags&=-257,Fl(e,t,l,r=fl(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Uu({mode:"visible",children:r.children},i,0,null),(o=Du(o,i,l,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&qa(t,e.child,null,l),t.child.memoizedState=Ul(l),t.memoizedState=Dl,o);if(!(1&t.mode))return Fl(e,t,l,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,Fl(e,t,l,r=fl(o=Error(a(419)),r,void 0))}if(s=!!(l&e.childLanes),El||s){if(null!==(r=As)){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|l)?0:i)&&i!==o.retryLane&&(o.retryLane=i,wa(e,i),ru(r,e,i,-1))}return vu(),Fl(e,t,l,r=fl(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ui(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Qi[Yi++]=qi,Qi[Yi++]=Xi,Qi[Yi++]=Ki,qi=e.id,Xi=e.overflow,Ki=t),(t=Gl(t,r.children)).flags|=4096,t)}(e,t,s,i,r,o,n);if(l){l=i.fallback,s=t.mode,r=(o=e.child).sibling;var u={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=ku(o,u)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==r?l=ku(r,l):(l=Du(l,s,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,i=l,l=t.child,s=null===(s=e.child.memoizedState)?Ul(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Dl,i}return e=(l=e.child).sibling,i=ku(l,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Gl(e,t){return(t=Uu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fl(e,t,n,r){return null!==r&&ha(r),qa(t,e.child,null,n),(e=Gl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Hl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ta(e.return,t,n)}function jl(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function zl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(bl(e,t,r.children,n),2&(r=lo.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Hl(e,n,t);else if(19===e.tag)Hl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Oi(lo,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===so(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jl(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===so(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jl(t,!0,n,null,a);break;case"together":jl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Bl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $l(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=ku(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ku(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Wl(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ql(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Yl(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ql(t),null;case 1:case 17:return Ri(t.type)&&Pi(),Ql(t),null;case 3:return r=t.stateNode,io(),Ni(wi),Ni(Ci),co(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==aa&&(lu(aa),aa=null))),Pl(e,t),Ql(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)kl(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Ql(t),null}if(e=no(Za.current),fa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[di]=t,r[pi]=o,e=!!(1&t.mode),n){case"dialog":Gr("cancel",r),Gr("close",r);break;case"iframe":case"object":case"embed":Gr("load",r);break;case"video":case"audio":for(i=0;i<xr.length;i++)Gr(xr[i],r);break;case"source":Gr("error",r);break;case"img":case"image":case"link":Gr("error",r),Gr("load",r);break;case"details":Gr("toggle",r);break;case"input":q(r,o),Gr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Gr("invalid",r);break;case"textarea":ie(r,o),Gr("invalid",r)}for(var s in me(n,o),i=null,o)if(o.hasOwnProperty(s)){var u=o[s];"children"===s?"string"==typeof u?r.textContent!==u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",""+u]):l.hasOwnProperty(s)&&null!=u&&"onScroll"===s&&Gr("scroll",r)}switch(n){case"input":W(r),Z(r,o,!0);break;case"textarea":W(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=le(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[di]=t,e[pi]=r,Rl(e,t,!1,!1),t.stateNode=e;e:{switch(s=ye(n,r),n){case"dialog":Gr("cancel",e),Gr("close",e),i=r;break;case"iframe":case"object":case"embed":Gr("load",e),i=r;break;case"video":case"audio":for(i=0;i<xr.length;i++)Gr(xr[i],e);i=r;break;case"source":Gr("error",e),i=r;break;case"img":case"image":case"link":Gr("error",e),Gr("load",e),i=r;break;case"details":Gr("toggle",e),i=r;break;case"input":q(e,r),i=K(e,r),Gr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=U({},r,{value:void 0}),Gr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Gr("invalid",e)}for(o in me(n,i),u=i)if(u.hasOwnProperty(o)){var c=u[o];"style"===o?ve(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(l.hasOwnProperty(o)?null!=c&&"onScroll"===o&&Gr("scroll",e):null!=c&&y(e,o,c,s))}switch(n){case"input":W(e),Z(e,r,!1);break;case"textarea":W(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+B(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ql(t),null;case 6:if(e&&null!=t.stateNode)xl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=no(to.current),no(Za.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[di]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[di]=t,t.stateNode=r}return Ql(t),null;case 13:if(Ni(lo),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&1&t.mode&&!(128&t.flags))da(),pa(),t.flags|=98560,o=!1;else if(o=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[di]=t}else pa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ql(t),o=!1}else null!==aa&&(lu(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&lo.current?0===xs&&(xs=3):vu())),null!==t.updateQueue&&(t.flags|=4),Ql(t),null);case 4:return io(),Pl(e,t),null===e&&jr(t.stateNode.containerInfo),Ql(t),null;case 10:return Sa(t.type._context),Ql(t),null;case 19:if(Ni(lo),null===(o=t.memoizedState))return Ql(t),null;if(r=!!(128&t.flags),null===(s=o.rendering))if(r)Wl(o,!1);else{if(0!==xs||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=so(e))){for(t.flags|=128,Wl(o,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Oi(lo,1&lo.current|2),t.child}e=e.sibling}null!==o.tail&&Xe()>zs&&(t.flags|=128,r=!0,Wl(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=so(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Wl(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!ia)return Ql(t),null}else 2*Xe()-o.renderingStartTime>zs&&1073741824!==n&&(t.flags|=128,r=!0,Wl(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,n=lo.current,Oi(lo,r?1&n|2:1&n),t):(Ql(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ps)&&(Ql(t),6&t.subtreeFlags&&(t.flags|=8192)):Ql(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Kl(e,t){switch(ta(t),t.tag){case 1:return Ri(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Ni(wi),Ni(Ci),co(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Ni(lo),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));pa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ni(lo),null;case 4:return io(),null;case 10:return Sa(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Rl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Pl=function(){},kl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no(Za.current);var a,o=null;switch(n){case"input":i=K(e,i),r=K(e,r),o=[];break;case"select":i=U({},i,{value:void 0}),r=U({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Zr)}for(c in me(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(o=o||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(o=o||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Gr("scroll",e),o||s===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},xl=function(e,t,n,r){n!==r&&(t.flags|=4)};var ql=!1,Xl=!1,Jl="function"==typeof WeakSet?WeakSet:Set,Zl=null;function es(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Nu(e,t,n)}else n.current=null}function ts(e,t,n){try{n()}catch(n){Nu(e,t,n)}}var ns=!1;function rs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&ts(t,n,a)}i=i.next}while(i!==r)}}function is(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function as(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function os(e){var t=e.alternate;null!==t&&(e.alternate=null,os(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[pi],delete t[gi],delete t[vi],delete t[_i]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ls(e){return 5===e.tag||3===e.tag||4===e.tag}function ss(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ls(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function us(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(us(e,t,n),e=e.sibling;null!==e;)us(e,t,n),e=e.sibling}function cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cs(e,t,n),e=e.sibling;null!==e;)cs(e,t,n),e=e.sibling}var fs=null,ds=!1;function ps(e,t,n){for(n=n.child;null!==n;)hs(e,t,n),n=n.sibling}function hs(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xl||es(n,t);case 6:var r=fs,i=ds;fs=null,ps(e,t,n),ds=i,null!==(fs=r)&&(ds?(e=fs,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fs.removeChild(n.stateNode));break;case 18:null!==fs&&(ds?(e=fs,n=n.stateNode,8===e.nodeType?si(e.parentNode,n):1===e.nodeType&&si(e,n),jt(e)):si(fs,n.stateNode));break;case 4:r=fs,i=ds,fs=n.stateNode.containerInfo,ds=!0,ps(e,t,n),fs=r,ds=i;break;case 0:case 11:case 14:case 15:if(!Xl&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(2&a||4&a)&&ts(n,t,o),i=i.next}while(i!==r)}ps(e,t,n);break;case 1:if(!Xl&&(es(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Nu(n,t,e)}ps(e,t,n);break;case 21:ps(e,t,n);break;case 22:1&n.mode?(Xl=(r=Xl)||null!==n.memoizedState,ps(e,t,n),Xl=r):ps(e,t,n);break;default:ps(e,t,n)}}function gs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Jl),t.forEach((function(t){var r=wu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 5:fs=s.stateNode,ds=!1;break e;case 3:case 4:fs=s.stateNode.containerInfo,ds=!0;break e}s=s.return}if(null===fs)throw Error(a(160));hs(o,l,i),fs=null,ds=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){Nu(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)_s(t,e),t=t.sibling}function _s(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vs(t,e),ms(e),4&r){try{rs(3,e,e.return),is(3,e)}catch(t){Nu(e,e.return,t)}try{rs(5,e,e.return)}catch(t){Nu(e,e.return,t)}}break;case 1:vs(t,e),ms(e),512&r&&null!==n&&es(n,n.return);break;case 5:if(vs(t,e),ms(e),512&r&&null!==n&&es(n,n.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(t){Nu(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,l=null!==n?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===s&&"radio"===o.type&&null!=o.name&&X(i,o),ye(s,l);var c=ye(s,o);for(l=0;l<u.length;l+=2){var f=u[l],d=u[l+1];"style"===f?ve(i,d):"dangerouslySetInnerHTML"===f?fe(i,d):"children"===f?de(i,d):y(i,f,d,c)}switch(s){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?ne(i,!!o.multiple,h,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[pi]=o}catch(t){Nu(e,e.return,t)}}break;case 6:if(vs(t,e),ms(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){Nu(e,e.return,t)}}break;case 3:if(vs(t,e),ms(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{jt(t.containerInfo)}catch(t){Nu(e,e.return,t)}break;case 4:default:vs(t,e),ms(e);break;case 13:vs(t,e),ms(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(js=Xe())),4&r&&gs(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Xl=(c=Xl)||f,vs(t,e),Xl=c):vs(t,e),ms(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&1&e.mode)for(Zl=e,f=e.child;null!==f;){for(d=Zl=f;null!==Zl;){switch(h=(p=Zl).child,p.tag){case 0:case 11:case 14:case 15:rs(4,p,p.return);break;case 1:es(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Nu(r,n,e)}}break;case 5:es(p,p.return);break;case 22:if(null!==p.memoizedState){Ss(d);continue}}null!==h?(h.return=p,Zl=h):Ss(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,l=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,s.style.display=ge("display",l))}catch(t){Nu(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Nu(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vs(t,e),ms(e),4&r&&gs(e);case 21:}}function ms(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ls(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(de(i,""),r.flags&=-33),cs(e,ss(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;us(e,ss(e),o);break;default:throw Error(a(161))}}catch(t){Nu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ys(e,t,n){Zl=e,Es(e,t,n)}function Es(e,t,n){for(var r=!!(1&e.mode);null!==Zl;){var i=Zl,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||ql;if(!o){var l=i.alternate,s=null!==l&&null!==l.memoizedState||Xl;l=ql;var u=Xl;if(ql=o,(Xl=s)&&!u)for(Zl=i;null!==Zl;)s=(o=Zl).child,22===o.tag&&null!==o.memoizedState?Ts(i):null!==s?(s.return=o,Zl=s):Ts(i);for(;null!==a;)Zl=a,Es(a,t,n),a=a.sibling;Zl=i,ql=l,Xl=u}bs(e)}else 8772&i.subtreeFlags&&null!==a?(a.return=i,Zl=a):bs(e)}}function bs(e){for(;null!==Zl;){var t=Zl;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Xl||is(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xl)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:va(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Va(t,o,r);break;case 3:var l=t.updateQueue;if(null!==l){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Va(t,l,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&jt(d)}}}break;default:throw Error(a(163))}Xl||512&t.flags&&as(t)}catch(e){Nu(t,t.return,e)}}if(t===e){Zl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zl=n;break}Zl=t.return}}function Ss(e){for(;null!==Zl;){var t=Zl;if(t===e){Zl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zl=n;break}Zl=t.return}}function Ts(e){for(;null!==Zl;){var t=Zl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{is(4,t)}catch(e){Nu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Nu(t,i,e)}}var a=t.return;try{as(t)}catch(e){Nu(t,a,e)}break;case 5:var o=t.return;try{as(t)}catch(e){Nu(t,o,e)}}}catch(e){Nu(t,t.return,e)}if(t===e){Zl=null;break}var l=t.sibling;if(null!==l){l.return=t.return,Zl=l;break}Zl=t.return}}var Is,Ns=Math.ceil,Os=E.ReactCurrentDispatcher,Ls=E.ReactCurrentOwner,Cs=E.ReactCurrentBatchConfig,ws=0,As=null,Ms=null,Rs=0,Ps=0,ks=Ii(0),xs=0,Ds=null,Us=0,Vs=0,Gs=0,Fs=null,Hs=null,js=0,zs=1/0,Bs=null,$s=!1,Ws=null,Qs=null,Ys=!1,Ks=null,qs=0,Xs=0,Js=null,Zs=-1,eu=0;function tu(){return 6&ws?Xe():-1!==Zs?Zs:Zs=Xe()}function nu(e){return 1&e.mode?2&ws&&0!==Rs?Rs&-Rs:null!==ga.transition?(0===eu&&(eu=gt()),eu):0!==(e=yt)?e:e=void 0===(e=window.event)?16:qt(e.type):1}function ru(e,t,n,r){if(50<Xs)throw Xs=0,Js=null,Error(a(185));_t(e,n,r),2&ws&&e===As||(e===As&&(!(2&ws)&&(Vs|=n),4===xs&&su(e,Rs)),iu(e,r),1===n&&0===ws&&!(1&t.mode)&&(zs=Xe()+500,Gi&&ji()))}function iu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),l=1<<o,s=i[o];-1===s?l&n&&!(l&r)||(i[o]=pt(l,t)):s<=t&&(e.expiredLanes|=l),a&=~l}}(e,t);var r=dt(e,e===As?Rs:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){Gi=!0,Hi(e)}(uu.bind(null,e)):Hi(uu.bind(null,e)),oi((function(){!(6&ws)&&ji()})),n=null;else{switch(Et(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Au(n,au.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function au(e,t){if(Zs=-1,eu=0,6&ws)throw Error(a(327));var n=e.callbackNode;if(Tu()&&e.callbackNode!==n)return null;var r=dt(e,e===As?Rs:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=_u(e,r);else{t=r;var i=ws;ws|=2;var o=gu();for(As===e&&Rs===t||(Bs=null,zs=Xe()+500,pu(e,t));;)try{yu();break}catch(t){hu(e,t)}ba(),Os.current=o,ws=i,null!==Ms?t=0:(As=null,Rs=0,t=xs)}if(0!==t){if(2===t&&0!==(i=ht(e))&&(r=i,t=ou(e,i)),1===t)throw n=Ds,pu(e,0),su(e,r),iu(e,Xe()),n;if(6===t)su(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!lr(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=_u(e,r),2===t&&(o=ht(e),0!==o&&(r=o,t=ou(e,o))),1!==t)))throw n=Ds,pu(e,0),su(e,r),iu(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:Su(e,Hs,Bs);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=js+500-Xe())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){tu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(Su.bind(null,e,Hs,Bs),t);break}Su(e,Hs,Bs);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-ot(r);o=1<<l,(l=t[l])>i&&(i=l),r&=~o}if(r=i,10<(r=(120>(r=Xe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ns(r/1960))-r)){e.timeoutHandle=ri(Su.bind(null,e,Hs,Bs),r);break}Su(e,Hs,Bs);break;default:throw Error(a(329))}}}return iu(e,Xe()),e.callbackNode===n?au.bind(null,e):null}function ou(e,t){var n=Fs;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=_u(e,t))&&(t=Hs,Hs=n,null!==t&&lu(t)),e}function lu(e){null===Hs?Hs=e:Hs.push.apply(Hs,e)}function su(e,t){for(t&=~Gs,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function uu(e){if(6&ws)throw Error(a(327));Tu();var t=dt(e,0);if(!(1&t))return iu(e,Xe()),null;var n=_u(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=ou(e,r))}if(1===n)throw n=Ds,pu(e,0),su(e,t),iu(e,Xe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Su(e,Hs,Bs),iu(e,Xe()),null}function cu(e,t){var n=ws;ws|=1;try{return e(t)}finally{0===(ws=n)&&(zs=Xe()+500,Gi&&ji())}}function fu(e){null!==Ks&&0===Ks.tag&&!(6&ws)&&Tu();var t=ws;ws|=1;var n=Cs.transition,r=yt;try{if(Cs.transition=null,yt=1,e)return e()}finally{yt=r,Cs.transition=n,!(6&(ws=t))&&ji()}}function du(){Ps=ks.current,Ni(ks)}function pu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Ms)for(n=Ms.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Pi();break;case 3:io(),Ni(wi),Ni(Ci),co();break;case 5:oo(r);break;case 4:io();break;case 13:case 19:Ni(lo);break;case 10:Sa(r.type._context);break;case 22:case 23:du()}n=n.return}if(As=e,Ms=e=ku(e.current,null),Rs=Ps=t,xs=0,Ds=null,Gs=Vs=Us=0,Hs=Fs=null,null!==Oa){for(t=0;t<Oa.length;t++)if(null!==(r=(n=Oa[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Oa=null}return e}function hu(e,t){for(;;){var n=Ms;try{if(ba(),fo.current=ol,mo){for(var r=go.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}mo=!1}if(ho=0,_o=vo=go=null,yo=!1,Eo=0,Ls.current=null,null===n||null===n.return){xs=1,Ds=t,Ms=null;break}e:{var o=e,l=n.return,s=n,u=t;if(t=Rs,s.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,f=s,d=f.tag;if(!(1&f.mode||0!==d&&11!==d&&15!==d)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=_l(l);if(null!==h){h.flags&=-257,ml(h,l,s,0,t),1&h.mode&&vl(o,c,t),u=c;var g=(t=h).updateQueue;if(null===g){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}if(!(1&t)){vl(o,c,t),vu();break e}u=Error(a(426))}else if(ia&&1&s.mode){var _=_l(l);if(null!==_){!(65536&_.flags)&&(_.flags|=256),ml(_,l,s,0,t),ha(cl(u,s));break e}}o=u=cl(u,s),4!==xs&&(xs=2),null===Fs?Fs=[o]:Fs.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Da(o,hl(0,u,t));break e;case 1:s=u;var m=o.type,y=o.stateNode;if(!(128&o.flags||"function"!=typeof m.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Qs&&Qs.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,Da(o,gl(o,s,t));break e}}o=o.return}while(null!==o)}bu(n)}catch(e){t=e,Ms===n&&null!==n&&(Ms=n=n.return);continue}break}}function gu(){var e=Os.current;return Os.current=ol,null===e?ol:e}function vu(){0!==xs&&3!==xs&&2!==xs||(xs=4),null===As||!(268435455&Us)&&!(268435455&Vs)||su(As,Rs)}function _u(e,t){var n=ws;ws|=2;var r=gu();for(As===e&&Rs===t||(Bs=null,pu(e,t));;)try{mu();break}catch(t){hu(e,t)}if(ba(),ws=n,Os.current=r,null!==Ms)throw Error(a(261));return As=null,Rs=0,xs}function mu(){for(;null!==Ms;)Eu(Ms)}function yu(){for(;null!==Ms&&!Ke();)Eu(Ms)}function Eu(e){var t=Is(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?bu(e):Ms=t,Ls.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Kl(n,t)))return n.flags&=32767,void(Ms=n);if(null===e)return xs=6,void(Ms=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Yl(n,t,Ps)))return void(Ms=n);if(null!==(t=t.sibling))return void(Ms=t);Ms=t=e}while(null!==t);0===xs&&(xs=5)}function Su(e,t,n){var r=yt,i=Cs.transition;try{Cs.transition=null,yt=1,function(e,t,n,r){do{Tu()}while(null!==Ks);if(6&ws)throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===As&&(Ms=As=null,Rs=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Ys||(Ys=!0,Au(tt,(function(){return Tu(),null}))),o=!!(15990&n.flags),15990&n.subtreeFlags||o){o=Cs.transition,Cs.transition=null;var l=yt;yt=1;var s=ws;ws|=4,Ls.current=null,function(e,t){if(ei=Bt,pr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var l=0,s=-1,u=-1,c=0,f=0,d=e,p=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=l+i),d!==o||0!==r&&3!==d.nodeType||(u=l+r),3===d.nodeType&&(l+=d.nodeValue.length),null!==(h=d.firstChild);)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=l),p===o&&++f===r&&(u=l),null!==(h=d.nextSibling))break;p=(d=p).parentNode}d=h}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Bt=!1,Zl=t;null!==Zl;)if(e=(t=Zl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Zl=e;else for(;null!==Zl;){t=Zl;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var v=g.memoizedProps,_=g.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:va(t.type,v),_);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var E=t.stateNode.containerInfo;1===E.nodeType?E.textContent="":9===E.nodeType&&E.documentElement&&E.removeChild(E.documentElement);break;default:throw Error(a(163))}}catch(e){Nu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Zl=e;break}Zl=t.return}g=ns,ns=!1}(e,n),_s(n,e),hr(ti),Bt=!!ei,ti=ei=null,e.current=n,ys(n,e,i),qe(),ws=s,yt=l,Cs.transition=o}else e.current=n;if(Ys&&(Ys=!1,Ks=e,qs=i),0===(o=e.pendingLanes)&&(Qs=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),iu(e,Xe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if($s)throw $s=!1,e=Ws,Ws=null,e;!!(1&qs)&&0!==e.tag&&Tu(),1&(o=e.pendingLanes)?e===Js?Xs++:(Xs=0,Js=e):Xs=0,ji()}(e,t,n,r)}finally{Cs.transition=i,yt=r}return null}function Tu(){if(null!==Ks){var e=Et(qs),t=Cs.transition,n=yt;try{if(Cs.transition=null,yt=16>e?16:e,null===Ks)var r=!1;else{if(e=Ks,Ks=null,qs=0,6&ws)throw Error(a(331));var i=ws;for(ws|=4,Zl=e.current;null!==Zl;){var o=Zl,l=o.child;if(16&Zl.flags){var s=o.deletions;if(null!==s){for(var u=0;u<s.length;u++){var c=s[u];for(Zl=c;null!==Zl;){var f=Zl;switch(f.tag){case 0:case 11:case 15:rs(8,f,o)}var d=f.child;if(null!==d)d.return=f,Zl=d;else for(;null!==Zl;){var p=(f=Zl).sibling,h=f.return;if(os(f),f===c){Zl=null;break}if(null!==p){p.return=h,Zl=p;break}Zl=h}}}var g=o.alternate;if(null!==g){var v=g.child;if(null!==v){g.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(null!==v)}}Zl=o}}if(2064&o.subtreeFlags&&null!==l)l.return=o,Zl=l;else e:for(;null!==Zl;){if(2048&(o=Zl).flags)switch(o.tag){case 0:case 11:case 15:rs(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,Zl=m;break e}Zl=o.return}}var y=e.current;for(Zl=y;null!==Zl;){var E=(l=Zl).child;if(2064&l.subtreeFlags&&null!==E)E.return=l,Zl=E;else e:for(l=y;null!==Zl;){if(2048&(s=Zl).flags)try{switch(s.tag){case 0:case 11:case 15:is(9,s)}}catch(e){Nu(s,s.return,e)}if(s===l){Zl=null;break e}var b=s.sibling;if(null!==b){b.return=s.return,Zl=b;break e}Zl=s.return}}if(ws=i,ji(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{yt=n,Cs.transition=t}}return!1}function Iu(e,t,n){e=ka(e,t=hl(0,t=cl(n,t),1),1),t=tu(),null!==e&&(_t(e,1,t),iu(e,t))}function Nu(e,t,n){if(3===e.tag)Iu(e,e,n);else for(;null!==t;){if(3===t.tag){Iu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Qs||!Qs.has(r))){t=ka(t,e=gl(t,e=cl(n,e),1),1),e=tu(),null!==t&&(_t(t,1,e),iu(t,e));break}}t=t.return}}function Ou(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tu(),e.pingedLanes|=e.suspendedLanes&n,As===e&&(Rs&n)===n&&(4===xs||3===xs&&(130023424&Rs)===Rs&&500>Xe()-js?pu(e,0):Gs|=n),iu(e,t)}function Lu(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=tu();null!==(e=wa(e,t))&&(_t(e,t,n),iu(e,n))}function Cu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Lu(e,n)}function wu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Lu(e,n)}function Au(e,t){return Qe(e,t)}function Mu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new Mu(e,t,n,r)}function Pu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ku(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xu(e,t,n,r,i,o){var l=2;if(r=e,"function"==typeof e)Pu(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case T:return Du(n.children,i,o,t);case I:l=8,i|=8;break;case N:return(e=Ru(12,n,t,2|i)).elementType=N,e.lanes=o,e;case w:return(e=Ru(13,n,t,i)).elementType=w,e.lanes=o,e;case A:return(e=Ru(19,n,t,i)).elementType=A,e.lanes=o,e;case P:return Uu(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case O:l=10;break e;case L:l=9;break e;case C:l=11;break e;case M:l=14;break e;case R:l=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ru(l,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Du(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Uu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Vu(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Gu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Hu(e,t,n,r,i,a,o,l,s){return e=new Fu(e,t,n,l,s),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ru(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(a),e}function ju(e){if(!e)return Li;e:{if(je(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Ri(n))return xi(e,n,t)}return t}function zu(e,t,n,r,i,a,o,l,s){return(e=Hu(n,r,!0,e,0,a,0,l,s)).context=ju(null),n=e.current,(a=Pa(r=tu(),i=nu(n))).callback=null!=t?t:null,ka(n,a,i),e.current.lanes=i,_t(e,i,r),iu(e,r),e}function Bu(e,t,n,r){var i=t.current,a=tu(),o=nu(i);return n=ju(n),null===t.context?t.context=n:t.pendingContext=n,(t=Pa(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ka(i,t,o))&&(ru(e,i,o,a),xa(e,i,o)),o}function $u(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Wu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Qu(e,t){Wu(e,t),(e=e.alternate)&&Wu(e,t)}Is=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||wi.current)El=!0;else{if(!(e.lanes&n||128&t.flags))return El=!1,function(e,t,n){switch(t.tag){case 3:Al(t),pa();break;case 5:ao(t);break;case 1:Ri(t.type)&&Di(t);break;case 4:ro(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Oi(_a,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Oi(lo,1&lo.current),t.flags|=128,null):n&t.child.childLanes?Vl(e,t,n):(Oi(lo,1&lo.current),null!==(e=$l(e,t,n))?e.sibling:null);Oi(lo,1&lo.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return zl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oi(lo,lo.current),r)break;return null;case 22:case 23:return t.lanes=0,Nl(e,t,n)}return $l(e,t,n)}(e,t,n);El=!!(131072&e.flags)}else El=!1,ia&&1048576&t.flags&&Zi(t,Wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Bl(e,t),e=t.pendingProps;var i=Mi(t,Ci.current);Ia(t,n),i=Io(null,t,r,e,i,n);var o=No();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(o=!0,Di(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ma(t),i.updater=Ha,t.stateNode=i,i._reactInternals=t,$a(t,r,e,n),t=wl(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),bl(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Bl(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Pu(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===M)return 14}return 2}(r),e=va(r,e),i){case 0:t=Ll(null,t,r,e,n);break e;case 1:t=Cl(null,t,r,e,n);break e;case 11:t=Sl(null,t,r,e,n);break e;case 14:t=Tl(null,t,r,va(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ll(e,t,r,i=t.elementType===r?i:va(r,i),n);case 1:return r=t.type,i=t.pendingProps,Cl(e,t,r,i=t.elementType===r?i:va(r,i),n);case 3:e:{if(Al(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Ra(e,t),Ua(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ml(e,t,r,n,i=cl(Error(a(423)),t));break e}if(r!==i){t=Ml(e,t,r,n,i=cl(Error(a(424)),t));break e}for(ra=ui(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Xa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pa(),r===i){t=$l(e,t,n);break e}bl(e,t,r,n)}t=t.child}return t;case 5:return ao(t),null===e&&ua(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,l=i.children,ni(r,i)?l=null:null!==o&&ni(r,o)&&(t.flags|=32),Ol(e,t),bl(e,t,l,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Vl(e,t,n);case 4:return ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=qa(t,null,r,n):bl(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Sl(e,t,r,i=t.elementType===r?i:va(r,i),n);case 7:return bl(e,t,t.pendingProps,n),t.child;case 8:case 12:return bl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Oi(_a,r._currentValue),r._currentValue=l,null!==o)if(lr(o.value,l)){if(o.children===i.children&&!wi.current){t=$l(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){l=o.child;for(var u=s.firstContext;null!==u;){if(u.context===r){if(1===o.tag){(u=Pa(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),Ta(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(10===o.tag)l=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(l=o.return))throw Error(a(341));l.lanes|=n,null!==(s=l.alternate)&&(s.lanes|=n),Ta(l,n,t),l=o.sibling}else l=o.child;if(null!==l)l.return=o;else for(l=o;null!==l;){if(l===t){l=null;break}if(null!==(o=l.sibling)){o.return=l.return,l=o;break}l=l.return}o=l}bl(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ia(t,n),r=r(i=Na(i)),t.flags|=1,bl(e,t,r,n),t.child;case 14:return i=va(r=t.type,t.pendingProps),Tl(e,t,r,i=va(r.type,i),n);case 15:return Il(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:va(r,i),Bl(e,t),t.tag=1,Ri(r)?(e=!0,Di(t)):e=!1,Ia(t,n),za(t,r,i),$a(t,r,i,n),wl(null,t,r,!0,e,n);case 19:return zl(e,t,n);case 22:return Nl(e,t,n)}throw Error(a(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Xu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zu(){}function ec(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var l=i;i=function(){var e=$u(o);l.call(e)}}Bu(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=$u(o);a.call(e)}}var o=zu(t,r,e,0,null,!1,0,"",Zu);return e._reactRootContainer=o,e[hi]=o.current,jr(8===e.nodeType?e.parentNode:e),fu(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var l=r;r=function(){var e=$u(s);l.call(e)}}var s=Hu(e,0,!1,null,0,!1,0,"",Zu);return e._reactRootContainer=s,e[hi]=s.current,jr(8===e.nodeType?e.parentNode:e),fu((function(){Bu(t,s,n,r)})),s}(n,t,e,i,r);return $u(o)}qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Bu(e,t,null,null)},qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fu((function(){Bu(null,e,null,null)})),t[hi]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=It();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&Ut(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(mt(t,1|n),iu(t,Xe()),!(6&ws)&&(zs=Xe()+500,ji()))}break;case 13:fu((function(){var t=wa(e,1);if(null!==t){var n=tu();ru(t,e,1,n)}})),Qu(e,1)}},St=function(e){if(13===e.tag){var t=wa(e,134217728);null!==t&&ru(t,e,134217728,tu()),Qu(e,134217728)}},Tt=function(e){if(13===e.tag){var t=nu(e),n=wa(e,t);null!==n&&ru(n,e,t,tu()),Qu(e,t)}},It=function(){return yt},Nt=function(e,t){var n=yt;try{return yt=e,t()}finally{yt=n}},Se=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=bi(r);if(!i)throw Error(a(90));Q(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=cu,we=fu;var tc={usingClientEntryPoint:!1,Events:[yi,Ei,bi,Oe,Le,cu]},nc={findFiberByHostInstance:mi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),at=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xu(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xu(e))throw Error(a(299));var n=!1,r="",i=Yu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Hu(e,1,!1,null,0,n,0,r,i),e[hi]=t.current,jr(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=$e(t))?null:e.stateNode},t.flushSync=function(e){return fu(e)},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xu(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",l=Yu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError)),t=zu(t,null,e,1,null!=n?n:null,i,0,o,l),e[hi]=t.current,jr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new qu(t)},t.render=function(e,t,n){if(!Ju(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(a(40));return!!e._reactRootContainer&&(fu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[hi]=null}))})),!0)},t.unstable_batchedUpdates=cu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},5338:(e,t,n)=>{"use strict";var r=n(961);t.H=r.createRoot,r.hydrateRoot},961:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(2551)},5287:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function _(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function m(){}function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=_.prototype;var E=y.prototype=new m;E.constructor=y,g(E,_.prototype),E.isPureReactComponent=!0;var b=Array.isArray,S=Object.prototype.hasOwnProperty,T={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r){var i,a={},o=null,l=null;if(null!=t)for(i in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(o=""+t.key),t)S.call(t,i)&&!I.hasOwnProperty(i)&&(a[i]=t[i]);var s=arguments.length-2;if(1===s)a.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===a[i]&&(a[i]=s[i]);return{$$typeof:n,type:e,key:o,ref:l,props:a,_owner:T.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var L=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function w(e,t,i,a,o){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return o=o(s=e),e=""===a?"."+C(s,0):a,b(o)?(i="",null!=e&&(i=e.replace(L,"$&/")+"/"),w(o,t,i,"",(function(e){return e}))):null!=o&&(O(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(L,"$&/")+"/")+e)),t.push(o)),1;if(s=0,a=""===a?".":a+":",b(e))for(var u=0;u<e.length;u++){var c=a+C(l=e[u],u);s+=w(l,t,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=w(l=l.value,t,i,c=a+C(l,u++),o);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function A(e,t,n){if(null==e)return e;var r=[],i=0;return w(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function M(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R={current:null},P={transition:null},k={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:P,ReactCurrentOwner:T};function x(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=_,t.Fragment=i,t.Profiler=o,t.PureComponent=y,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,t.act=x,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),a=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=T.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)S.call(t,u)&&!I.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];i.children=s}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:l}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=N,t.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=x,t.useCallback=function(e,t){return R.current.useCallback(e,t)},t.useContext=function(e){return R.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return R.current.useDeferredValue(e)},t.useEffect=function(e,t){return R.current.useEffect(e,t)},t.useId=function(){return R.current.useId()},t.useImperativeHandle=function(e,t,n){return R.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return R.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return R.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return R.current.useMemo(e,t)},t.useReducer=function(e,t,n){return R.current.useReducer(e,t,n)},t.useRef=function(e){return R.current.useRef(e)},t.useState=function(e){return R.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return R.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return R.current.useTransition()},t.version="18.3.1"},6540:(e,t,n)=>{"use strict";e.exports=n(5287)},7463:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>a(s,n))u<i&&0>a(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],f=1,d=null,p=3,h=!1,g=!1,v=!1,_="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function E(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function b(e){if(v=!1,E(e),!g)if(null!==r(u))g=!0,P(S);else{var t=r(c);null!==t&&k(b,t.startTime-e)}}function S(e,n){g=!1,v&&(v=!1,m(O),O=-1),h=!0;var a=p;try{for(E(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!w());){var o=d.callback;if("function"==typeof o){d.callback=null,p=d.priorityLevel;var l=o(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?d.callback=l:d===r(u)&&i(u),E(n)}else i(u);d=r(u)}if(null!==d)var s=!0;else{var f=r(c);null!==f&&k(b,f.startTime-n),s=!1}return s}finally{d=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var T,I=!1,N=null,O=-1,L=5,C=-1;function w(){return!(t.unstable_now()-C<L)}function A(){if(null!==N){var e=t.unstable_now();C=e;var n=!0;try{n=N(!0,e)}finally{n?T():(I=!1,N=null)}}else I=!1}if("function"==typeof y)T=function(){y(A)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,R=M.port2;M.port1.onmessage=A,T=function(){R.postMessage(null)}}else T=function(){_(A,0)};function P(e){N=e,I||(I=!0,T())}function k(e,n){O=_((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,P(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(v?(m(O),O=-1):v=!0,k(b,a-o))):(e.sortIndex=l,n(u,e),g||h||(g=!0,P(S))),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},9982:(e,t,n)=>{"use strict";e.exports=n(7463)},5692:(e,t,n)=>{"use strict";n.d(t,{Wx:()=>u});var r=n(6540),i=(Object.defineProperty,new Map),a=new WeakMap,o=0,l=void 0;function s(e,t,n={},r=l){if(void 0===window.IntersectionObserver&&void 0!==r){const i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:s,observer:u,elements:c}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(a.has(n)||(o+=1,a.set(n,o.toString())),a.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=i.get(t);if(!n){const r=new Map;let a;const o=new IntersectionObserver((t=>{t.forEach((t=>{var n;const i=t.isIntersecting&&a.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=r.get(t.target))||n.forEach((e=>{e(i,t)}))}))}),e);a=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},i.set(t,n)}return n}(n),f=c.get(e)||[];return c.has(e)||c.set(e,f),f.push(t),u.observe(e),function(){f.splice(f.indexOf(t),1),0===f.length&&(c.delete(e),u.unobserve(e)),0===c.size&&(u.disconnect(),i.delete(s))}}function u({threshold:e,delay:t,trackVisibility:n,rootMargin:i,root:a,triggerOnce:o,skip:l,initialInView:u,fallbackInView:c,onChange:f}={}){var d;const[p,h]=r.useState(null),g=r.useRef(),[v,_]=r.useState({inView:!!u,entry:void 0});g.current=f,r.useEffect((()=>{if(l||!p)return;let r;return r=s(p,((e,t)=>{_({inView:e,entry:t}),g.current&&g.current(e,t),t.isIntersecting&&o&&r&&(r(),r=void 0)}),{root:a,rootMargin:i,threshold:e,trackVisibility:n,delay:t},c),()=>{r&&r()}}),[Array.isArray(e)?e.toString():e,p,a,i,o,l,n,c,t]);const m=null==(d=v.entry)?void 0:d.target,y=r.useRef();p||!m||o||l||y.current===m||(y.current=m,_({inView:!!u,entry:void 0}));const E=[h,v.inView,v.entry];return E.ref=E[0],E.inView=E[1],E.entry=E[2],E}r.Component}}]);