From 08ee2e81cea3765652646f9039156b758fd58b4f Mon Sep 17 00:00:00 2001 From: TessavWalstijn Date: Sat, 4 Nov 2023 11:36:15 +0100 Subject: [PATCH] Merge branch 'main' of https://github.com/vitec-memorix/maniiifision --- assets/AudioViewer-442cf80f.js | 1 + assets/GalleryView-fd154492.js | 1 + assets/OpenSeadragonViewer-ae031a02.js | 11 ++ assets/SelectCollection-1cd7a2d7.js | 1 + assets/VideoViewer-6e91373b.js | 1 + assets/WindowViewer-d9f1a515.js | 1 + assets/WorkspaceArea-e4600548.js | 19 ++ assets/index-20109f1f.js | 249 +++++++++++++++++++++++++ assets/index-de385847.css | 1 + index.html | 15 ++ maniiifision-icon.svg | 70 +++++++ maniiifision.svg | 70 +++++++ miiif-icon.svg | 55 ++++++ vite.svg | 1 + 14 files changed, 496 insertions(+) create mode 100644 assets/AudioViewer-442cf80f.js create mode 100644 assets/GalleryView-fd154492.js create mode 100644 assets/OpenSeadragonViewer-ae031a02.js create mode 100644 assets/SelectCollection-1cd7a2d7.js create mode 100644 assets/VideoViewer-6e91373b.js create mode 100644 assets/WindowViewer-d9f1a515.js create mode 100644 assets/WorkspaceArea-e4600548.js create mode 100644 assets/index-20109f1f.js create mode 100644 assets/index-de385847.css create mode 100644 index.html create mode 100644 maniiifision-icon.svg create mode 100644 maniiifision.svg create mode 100644 miiif-icon.svg create mode 100644 vite.svg diff --git a/assets/AudioViewer-442cf80f.js b/assets/AudioViewer-442cf80f.js new file mode 100644 index 0000000..b181c90 --- /dev/null +++ b/assets/AudioViewer-442cf80f.js @@ -0,0 +1 @@ +import{a2 as i,r as s,a4 as m,a5 as w,a6 as g,w as v,a7 as _,au as b,bE as O,cN as R}from"./index-20109f1f.js";function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},u(t)}var d=function(t){j(n,t);var e=I(n);function n(){return P(this,n),e.apply(this,arguments)}return E(n,[{key:"render",value:function(){var o=this.props,c=o.captions,l=o.classes,y=o.audioOptions,h=o.audioResources;return i.createElement("div",{className:l.container},i.createElement("audio",Object.assign({className:l.audio},y),h.map(function(a){return i.createElement(s.Fragment,{key:a.id},i.createElement("source",{src:a.id,type:a.getFormat()}))}),c.map(function(a){return i.createElement(s.Fragment,{key:a.id},i.createElement("track",{src:a.id,label:a.getDefaultLabel(),srcLang:a.getProperty("language")}))})))}}]),n}(s.Component);d.defaultProps={audioOptions:{},audioResources:[],captions:[]};var V=function(e,n){var r=n.windowId;return{audioOptions:b(e).audioOptions,audioResources:O(e,{windowId:r})||[],captions:R(e,{windowId:r})||[]}},x=function(){return{audio:{width:"100%"},container:{alignItems:"center",display:"flex",width:"100%"}}},A=m(_(),v(x),g(V,null),w("AudioViewer"));const C=A(d);export{C as default}; diff --git a/assets/GalleryView-fd154492.js b/assets/GalleryView-fd154492.js new file mode 100644 index 0000000..f6facb4 --- /dev/null +++ b/assets/GalleryView-fd154492.js @@ -0,0 +1 @@ +import{be as W,r as f,w as _,d as F,f as x,g as G,bd as K,a2 as u,cO as B,aC as w,cP as H,bw as $,b3 as M,a4 as T,a6 as k,cQ as L,cR as Q,cS as U,cT as X,cU as Y,au as J,aQ as Z,cV as ee,cW as te,cX as ne,P as re,a5 as ae,b7 as oe,cY as ie}from"./index-20109f1f.js";import{d as se}from"./WorkspaceArea-e4600548.js";const ce=W(f.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));var le=function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:e.palette.type==="light"?e.palette.grey[400]:e.palette.grey[600]},circle:{},circular:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4},fallback:{width:"75%",height:"75%"}}};function ue(t){var e=t.src,n=t.srcSet,r=f.useState(!1),a=r[0],o=r[1];return f.useEffect(function(){if(!(!e&&!n)){o(!1);var c=!0,s=new Image;return s.src=e,s.srcSet=n,s.onload=function(){c&&o("loaded")},s.onerror=function(){c&&o("error")},function(){c=!1}}},[e,n]),a}var fe=f.forwardRef(function(e,n){var r=e.alt,a=e.children,o=e.classes,c=e.className,s=e.component,i=s===void 0?"div":s,l=e.imgProps,d=e.sizes,p=e.src,h=e.srcSet,P=e.variant,q=P===void 0?"circular":P,V=F(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),v=null,z=ue({src:p,srcSet:h}),I=p||h,S=I&&z!=="error";return S?v=f.createElement("img",x({alt:r,src:p,srcSet:h,sizes:d,className:o.img},l)):a!=null?v=a:I&&r?v=r[0]:v=f.createElement(ce,{className:o.fallback}),f.createElement(i,x({className:G(o.root,o.system,o[q],c,!S&&o.colorDefault),ref:n},V),v)});const A=_(le,{name:"MuiAvatar"})(fe);function de(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},g(t)}var N=function(t){he(n,t);var e=ve(n);function n(r){var a;return de(this,n),a=e.call(this,r),a.state={requestedAnnotations:!1},a.handleSelect=a.handleSelect.bind(y(a)),a.handleKey=a.handleKey.bind(y(a)),a.handleIntersection=a.handleIntersection.bind(y(a)),a}return pe(n,[{key:"handleSelect",value:function(){var a=this.props,o=a.canvas,c=a.selected,s=a.setCanvas,i=a.focusOnCanvas;c?i():s(o.id)}},{key:"handleKey",value:function(a){var o=this.props,c=o.canvas,s=o.setCanvas,i=o.focusOnCanvas;this.keys={enter:"Enter",space:" "},this.chars={enter:13,space:32};var l=a.key===this.keys.enter||a.which===this.chars.enter||a.key===this.keys.space||a.which===this.chars.space;l?i():s(c.id)}},{key:"handleIntersection",value:function(a){var o=a.isIntersecting,c=this.props,s=c.annotationsCount,i=c.requestCanvasAnnotations,l=this.state.requestedAnnotations;!o||s===void 0||s>0||l||(this.setState({requestedAnnotations:!0}),i())}},{key:"render",value:function(){var a=this.props,o=a.annotationsCount,c=a.searchAnnotationsCount,s=a.canvas,i=a.classes,l=a.config,d=a.selected,p=new K(s);return u.createElement(B,{onChange:this.handleIntersection},u.createElement("div",{key:s.index,className:w(i.galleryViewItem,d?i.selected:"",c>0?i.hasAnnotations:""),onClick:this.handleSelect,onKeyUp:this.handleKey,role:"button",tabIndex:0},u.createElement(H,{resource:s,labelled:!0,variant:"outside",maxWidth:l.width,maxHeight:l.height,style:{margin:"0 auto",maxWidth:"".concat(Math.ceil(l.height*p.aspectRatio),"px")}},u.createElement("div",{className:i.chips},c>0&&u.createElement($,{avatar:u.createElement(A,{className:i.avatar,classes:{circle:i.avatarIcon}},u.createElement(M,{fontSize:"small"})),label:c,className:w(i.searchChip),size:"small"}),(o||0)>0&&u.createElement($,{avatar:u.createElement(A,{className:i.avatar,classes:{circle:i.avatarIcon}},u.createElement(se,{className:i.annotationIcon})),label:o,className:w(i.annotationsChip),size:"small"})))))}}]),n}(f.Component);N.defaultProps={annotationsCount:void 0,config:{height:100,width:null},requestCanvasAnnotations:function(){},searchAnnotationsCount:0,selected:!1};function R(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function b(t){for(var e=1;e0;return{annotationsCount:function(){if(i){var l=Y(e,{canvasId:r.id});return l.reduce(function(d,p){return d+p.resources.filter(function(h){return h.targetId===r.id}).length},0)}}(),config:J(e).galleryView,searchAnnotationsCount:s.length,selected:o&&o.id===r.id}},Oe=function(e,n){var r=n.canvas;n.id;var a=n.windowId;return{focusOnCanvas:function(){return e(Z(a,"single"))},requestCanvasAnnotations:function(){return e(ee(a,r.id))},setCanvas:function(){for(var c=arguments.length,s=new Array(c),i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},m(t)}var D=function(t){Se(n,t);var e=xe(n);function n(){return Pe(this,n),e.apply(this,arguments)}return Ie(n,[{key:"render",value:function(){var a=this.props,o=a.canvases,c=a.classes,s=a.viewingDirection,i=a.windowId,l=s==="right-to-left"?"rtl":"ltr";return u.createElement(re,{component:"section",dir:l,square:!0,elevation:0,className:c.galleryContainer,id:"".concat(i,"-gallery")},o.map(function(d){return u.createElement(_e,{key:d.id,windowId:i,canvas:d})}))}}]),n}(f.Component);D.defaultProps={classes:{},viewingDirection:""};var Re=function(e,n){var r=n.windowId;return{canvases:oe(e,{windowId:r}),viewingDirection:ie(e,{windowId:r})}},je=function(e){return{galleryContainer:{alignItems:"flex-start",display:"flex",flexDirection:"row",flexWrap:"wrap",overflowX:"hidden",overflowY:"scroll",padding:"50px 0 50px 20px",width:"100%"}}},Te=T(_(je),k(Re),ae("GalleryView"));const De=Te(D);export{De as default}; diff --git a/assets/OpenSeadragonViewer-ae031a02.js b/assets/OpenSeadragonViewer-ae031a02.js new file mode 100644 index 0000000..a98431a --- /dev/null +++ b/assets/OpenSeadragonViewer-ae031a02.js @@ -0,0 +1,11 @@ +import{aM as commonjsGlobal,cf as getDefaultExportFromCjs,d5 as _baseEach,d6 as isArrayLike_1,d7 as isSymbol_1,bZ as _arrayMap,bX as _baseGet,b_ as _baseIteratee,d8 as _baseUnary,d9 as identity_1,da as isArray_1,db as eq_1,dc as _isIndex,c6 as isObject_1,co as _baseFlatten,cl as _baseRest,cn as _baseDifference,dd as _baseUniq,de as _arrayFilter,cp as isArrayLikeObject_1,a2 as React,df as debounce,cS as flatten,dg as ReactDOM,r as reactExports,a4 as compose,a5 as withPlugins,a6 as connect,a7 as withTranslation,cU as getPresentAnnotationsOnSelectedCanvases,dh as getCurrentCanvasWorld,au as getConfig,cT as getCompanionWindowsForContent,b9 as getWindow,di as getTheme,cR as getSearchAnnotationsForWindow,dj as getSelectedAnnotationId,dk as deselectAnnotation,dl as hoverAnnotation,dm as selectAnnotation,dn as OSDReferences,aC as classNames,aw as ns,ay as PluginHook,w as withStyles,dp as selectInfoResponses,c$ as getCanvasLabel,cQ as getCurrentCanvas,dq as getVisibleCanvasNonTiledResources,bk as getViewer,cZ as updateViewport}from"./index-20109f1f.js";import{i as isEqual}from"./WorkspaceArea-e4600548.js";var openseadragon={exports:{}};(function(module){//! openseadragon 2.4.2 +//! Built on 2020-03-05 +//! Git commit: v2.4.2-0-c450749 +//! http://openseadragon.github.io +//! License: http://openseadragon.github.io/license/ +function OpenSeadragon(e){return new OpenSeadragon.Viewer(e)}(function(e){e.version={versionStr:"2.4.2",major:parseInt("2",10),minor:parseInt("4",10),revision:parseInt("2",10)};var t={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},i=Object.prototype.toString,n=Object.prototype.hasOwnProperty;e.isFunction=function(r){return e.type(r)==="function"},e.isArray=Array.isArray||function(r){return e.type(r)==="array"},e.isWindow=function(r){return r&&typeof r=="object"&&"setInterval"in r},e.type=function(r){return r==null?String(r):t[i.call(r)]||"object"},e.isPlainObject=function(r){if(!r||OpenSeadragon.type(r)!=="object"||r.nodeType||e.isWindow(r)||r.constructor&&!n.call(r,"constructor")&&!n.call(r.constructor.prototype,"isPrototypeOf"))return!1;var o;for(var a in r)o=a;return o===void 0||n.call(r,o)},e.isEmptyObject=function(r){for(var o in r)return!1;return!0},e.freezeObject=function(r){return Object.freeze?e.freezeObject=Object.freeze:e.freezeObject=function(o){return o},e.freezeObject(r)},e.supportsCanvas=function(){var r=document.createElement("canvas");return!!(e.isFunction(r.getContext)&&r.getContext("2d"))}(),e.isCanvasTainted=function(r){var o=!1;try{r.getContext("2d").getImageData(0,0,1,1)}catch{o=!0}return o},e.pixelDensityRatio=function(){if(e.supportsCanvas){var r=document.createElement("canvas").getContext("2d"),o=window.devicePixelRatio||1,a=r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return Math.max(o,1)/a}else return 1}()})(OpenSeadragon),function($){$.extend=function(){var e,t,i,n,r,o,a=arguments[0]||{},s=arguments.length,f=!1,d=1;for(typeof a=="boolean"&&(f=a,a=arguments[1]||{},d=2),typeof a!="object"&&!OpenSeadragon.isFunction(a)&&(a={}),s===d&&(a=this,--d);d=i.x&&t.x=i.y},getEvent:function(e){return e?$.getEvent=function(t){return t}:$.getEvent=function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if(typeof e.pageX=="number")$.getMousePosition=function(t){var i=new $.Point;return t=$.getEvent(t),i.x=t.pageX,i.y=t.pageY,i};else if(typeof e.clientX=="number")$.getMousePosition=function(t){var i=new $.Point;return t=$.getEvent(t),i.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,i};else throw new Error("Unknown event mouse position, no known technique.");return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if(typeof window.pageXOffset=="number")$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(t.scrollLeft||t.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else if(e.scrollLeft||e.scrollTop)$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)};else return new $.Point(0,0);return $.getPageScroll()},setPageScroll:function(e){if(typeof window.scrollTo<"u")$.setPageScroll=function(n){window.scrollTo(n.x,n.y)};else{var t=$.getPageScroll();if(t.x===e.x&&t.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var i=$.getPageScroll();if(i.x!==t.x&&i.y!==t.y){$.setPageScroll=function(n){document.body.scrollLeft=n.x,document.body.scrollTop=n.y};return}if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,i=$.getPageScroll(),i.x!==t.x&&i.y!==t.y){$.setPageScroll=function(n){document.documentElement.scrollLeft=n.x,document.documentElement.scrollTop=n.y};return}$.setPageScroll=function(n){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if(typeof window.innerWidth=="number")$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(t.clientWidth||t.clientHeight)$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)};else throw new Error("Unknown window size, no known technique.");return $.getWindowSize()},makeCenteredNode:function(e){e=$.getElement(e);var t=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(t[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(t[1].style,{display:"table-row"}),$.extend(t[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),t[0].appendChild(t[1]),t[1].appendChild(t[2]),t[2].appendChild(e),t[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return new Date().getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(t){var i=$.makeNeutralElement("img");return i.src=t,i},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(t){var i=$.makeNeutralElement("img"),n=null;return n=$.makeNeutralElement("span"),n.style.display="inline-block",i.onload=function(){n.style.width=n.style.width||i.width+"px",n.style.height=n.style.height||i.height+"px",i.onload=null,i=null},i.src=t,n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')",n}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,i){var n,r;e=$.getElement(e),i&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(n=Math.round(100*t),r="alpha(opacity="+n+")",e.style.filter=r):e.style.filter=""},setElementTouchActionNone:function(e){e=$.getElement(e),typeof e.style.touchAction<"u"?e.style.touchAction="none":typeof e.style.msTouchAction<"u"&&(e.style.msTouchAction="none")},addClass:function(e,t){e=$.getElement(e),e.className?(" "+e.className+" ").indexOf(" "+t+" ")===-1&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(n,r,o){return n.indexOf(r,o)}:this.indexOf=function(n,r,o){var a,s=o||0,f;if(!n)throw new TypeError;if(f=n.length,f===0||s>=f)return-1;for(s<0&&(s=f-Math.abs(s)),a=s;a=200&&s.status<300||s.status===0&&a!=="http:"&&a!=="https:"?t(s):($.console.log("AJAX request returned %d: %s",s.status,e),$.isFunction(i)&&i(s)))};try{if(s.open("GET",e,!0),o&&(s.responseType=o),r)for(var f in r)Object.prototype.hasOwnProperty.call(r,f)&&r[f]&&s.setRequestHeader(f,r[f]);n&&(s.withCredentials=!0),s.send(null)}catch(T){var d=T.message,g=$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10;if(g&&typeof T.number<"u"&&T.number==-2147024891&&(d+=` +See http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain`),$.console.log("%s while making AJAX request: %s",T.name,d),s.onreadystatechange=function(){},window.XDomainRequest){var w=new window.XDomainRequest;if(w){w.onload=function(C){$.isFunction(t)&&t({responseText:w.responseText,status:200,statusText:"OK"})},w.onerror=function(C){$.isFunction(i)&&i({responseText:w.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{w.open("GET",e),w.send()}catch{$.isFunction(i)&&i(s,T)}}}else $.isFunction(i)&&i(s,T)}return s},jsonp:function(e){var t,i=e.url,n=document.head||document.getElementsByTagName("head")[0]||document.documentElement,r=e.callbackName||"openseadragon"+$.now(),o=window[r],a="$1"+r+"$2",s=e.param||"callback",f=e.callback;i=i.replace(/(\=)\?(&|$)|\?\?/i,a),i+=(/\?/.test(i)?"&":"?")+s+"="+r,window[r]=function(d){if(o)window[r]=o;else try{delete window[r]}catch{}f&&$.isFunction(f)&&f(d)},t=document.createElement("script"),(e.async!==void 0||e.async!==!1)&&(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=i,t.onload=t.onreadystatechange=function(d,g){(g||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,n&&t.parentNode&&n.removeChild(t),t=void 0)},n.insertBefore(t,n.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(t){var i=null,n;return n=new DOMParser,i=n.parseFromString(t,"text/xml"),i};else if(window.ActiveXObject)$.parseXml=function(t){var i=null;return i=new ActiveXObject("Microsoft.XMLDOM"),i.async=!1,i.loadXML(t),i};else throw new Error("Browser doesn't support XML DOM.");return $.parseXml(e)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(e){return e=e||"",!!FILEFORMATS[e.toLowerCase()]}});var nullfunction=function(e){};$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};(function(){var e=navigator.appVersion,t=navigator.userAgent,i;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(t.substring(t.indexOf("MSIE")+5,t.indexOf(";",t.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(t.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(t.substring(t.indexOf("Firefox")+8))):t.indexOf("Safari")>=0?($.Browser.vendor=t.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(t.substring(t.substring(0,t.indexOf("Safari")).lastIndexOf("/")+1,t.indexOf("Safari")))):(i=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"),i.exec(t)!==null&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1))));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e);break}var n=window.location.search.substring(1),r=n.split("&"),o,a,s;for(s=0;s0){var f=o.substring(0,a),d=o.substring(a+1);try{URLPARAMS[f]=decodeURIComponent(d)}catch{$.console.error("Ignoring malformed URL parameter: %s=%s",f,d)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,i=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&i)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return i.apply(e,arguments)};else{var n=[],r=[],o=0,a;$.requestAnimationFrame=function(s){return n.push([++o,s]),a||(a=setInterval(function(){if(n.length){var f=$.now(),d=r;for(r=n,n=d;r.length;)r.shift()[1](f)}else clearInterval(a),a=void 0},1e3/50)),o},$.cancelAnimationFrame=function(s){var f,d;for(f=0,d=n.length;f8||"onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=function(){var c=document.createElement("div");return e.isFunction(c.setCapture)&&e.isFunction(c.releaseCapture)}(),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],e.MouseTracker.wheelEventName=="DOMMouseScroll"&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||e.Browser.vendor!==e.BROWSERS.IE)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),e.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):(e.MouseTracker.havePointerEvents=!1,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?(e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),e.MouseTracker.haveMouseEnter=!0):(e.MouseTracker.subscribeEvents.push("mouseover","mouseout"),e.MouseTracker.haveMouseEnter=!1),e.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.maxTouchPoints=10),e.MouseTracker.GesturePointList=function(c){this._gPoints=[],this.type=c,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(c){return this._gPoints.push(c)},removeById:function(c){var u,m=this._gPoints.length;for(u=0;u1&&(this.type==="mouse"||this.type==="pen")&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};function n(c){var u=i[c.hash],m,v=u.activePointersLists.length;for(m=0;m0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",u.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",u.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",u.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",u.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",u.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",u.touchendcaptured,!0),u.activePointersLists[m].captureCount=0);for(m=0;m0){for(v=0;v0&&(fe(c,u,L,0),m.captureCount=1,f(c,m.type),he(c,u,L))}}function Te(c,u){var m,v,O,L=u.changedTouches.length,H=[],B,W=c.getActivePointersListByType("touch");for(m=e.now(),W.getLength()>u.touches.length-L&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),ce(c,u,W)),v=0;v"u")return ce(c,u,L),!1;for(X=0;X"u"?!0:i.attachToViewer,this.autoFade=typeof i.autoFade>"u"?!0:i.autoFade,this.element=t,this.anchor=i.anchor,this.container=n,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top=typeof i.top=="number"?i.top+"px":i.top,this.wrapper.style.left=typeof i.left=="number"?i.left+"px":i.left,this.wrapper.style.height=typeof i.height=="number"?i.height+"px":i.height,this.wrapper.style.width=typeof i.width=="number"?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor==e.ControlAnchor.TOP_RIGHT||this.anchor==e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):r.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return this.wrapper.style.display!="none"},setVisible:function(t){this.wrapper.style.display=t?this.anchor==e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor==e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(OpenSeadragon),function(e){e.ControlDock=function(i){var n=["topleft","topright","bottomright","bottomleft"],r,o;for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(Math.random()*1e6),container:e.makeNeutralElement("div"),controls:[]},i),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),o=0;o=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:r=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:r=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:r=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:r=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:r=this.container,i.style.margin="0px",i.style.padding="0px";break;default:case e.ControlAnchor.NONE:r=this.container,i.style.margin="0px",i.style.padding="0px";break}this.controls.push(new e.Control(i,n,r)),i.style.display="inline-block"}},removeControl:function(i){i=e.getElement(i);var n=t(this,i);return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var i;for(i=this.controls.length-1;i>=0;i--)if(this.controls[i].isVisible())return!0;return!1},setControlsEnabled:function(i){var n;for(n=this.controls.length-1;n>=0;n--)this.controls[n].setVisible(i);return this}};function t(i,n){var r=i.controls,o;for(o=r.length-1;o>=0;o--)if(r[o].element==n)return o;return-1}}(OpenSeadragon),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(e){var t={},i=1;e.Viewer=function(l){var p=arguments,_=this,R;if(e.isPlainObject(l)||(l={id:p[0],xmlPath:p.length>1?p[1]:void 0,prefixUrl:p.length>2?p[2]:void 0,controls:p.length>3?p[3]:void 0,overlays:p.length>4?p[4]:void 0}),l.config&&(e.extend(!0,l,l.config),delete l.config),e.extend(!0,this,{id:l.id,hash:l.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,l),typeof this.hash>"u")throw new Error("A hash must be defined, either by specifying options.id or options.hash.");for(typeof t[this.hash]<"u"&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(M){var q=e.getString("Errors.OpenFailed",M.eventSource,M.message);_._showMessage(q)}),e.ControlDock.call(this,l),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(M){M.width="100%",M.height="100%",M.overflow="hidden",M.position="absolute",M.top="0px",M.left="0px"}(this.canvas.style),e.setElementTouchActionNone(this.canvas),l.tabIndex!==""&&(this.canvas.tabIndex=l.tabIndex===void 0?0:l.tabIndex),this.container.className="openseadragon-container",function(M){M.width="100%",M.height="100%",M.position="relative",M.overflow="hidden",M.left="0px",M.top="0px",M.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:e.delegate(this,P),keyHandler:e.delegate(this,A),clickHandler:e.delegate(this,h),dblClickHandler:e.delegate(this,y),dragHandler:e.delegate(this,x),dragEndHandler:e.delegate(this,S),enterHandler:e.delegate(this,E),exitHandler:e.delegate(this,b),pressHandler:e.delegate(this,D),releaseHandler:e.delegate(this,I),nonPrimaryPressHandler:e.delegate(this,k),nonPrimaryReleaseHandler:e.delegate(this,U),scrollHandler:e.delegate(this,Z),pinchHandler:e.delegate(this,F)}),this.outerTracker=new e.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,V),exitHandler:e.delegate(this,te)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(M){_.source=_.world.getItemAt(0).source,t[_.hash].forceRedraw=!0,_._updateRequestId||(_._updateRequestId=s(_,ie))}),this.world.addHandler("remove-item",function(M){_.world.getItemCount()?_.source=_.world.getItemAt(0).source:_.source=null,t[_.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(M){_.viewport&&_.viewport._setContentBounds(_.world.getHomeBounds(),_.world.getContentFactor())}),this.world.addHandler("item-index-change",function(M){_.source=_.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:l.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),this.drawer.canRotate()||(this.rotateLeft&&(R=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(R,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(R=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(R,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),R=0;R-1&&l.index=0&&l=0)return this;var q=o(this,M);return this.currentOverlays.push(q),q.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:l,location:M.location,placement:M.placement}),this},updateOverlay:function(l,p,_){var R;return l=e.getElement(l),R=a(this.currentOverlays,l),R>=0&&(this.currentOverlays[R].update(p,_),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:l,location:p,placement:_})),this},removeOverlay:function(l){var p;return l=e.getElement(l),p=a(this.currentOverlays,l),p>=0&&(this.currentOverlays[p].destroy(),this.currentOverlays.splice(p,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:l})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(l){var p;return l=e.getElement(l),p=a(this.currentOverlays,l),p>=0?this.currentOverlays[p]:null},_updateSequenceButtons:function(l){this.nextButton&&(!this.tileSources||this.tileSources.length-1===l?this.navPrevNextWrap||this.nextButton.disable():this.nextButton.enable()),this.previousButton&&(l>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(l){this._hideMessage();var p=e.makeNeutralElement("div");p.appendChild(document.createTextNode(l)),this.messageDiv=e.makeCenteredNode(p),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var l=this.messageDiv;l&&(l.parentNode.removeChild(l),delete this.messageDiv)},gestureSettingsByDeviceType:function(l){switch(l){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var l,p=this.currentOverlays.length;for(l=0;l1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex))}else e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}});function n(l){return l=e.getElement(l),new e.Point(l.clientWidth===0?1:l.clientWidth,l.clientHeight===0?1:l.clientHeight)}function r(l,p,_,R,M){var q=l;if(e.type(p)=="string"){if(p.match(/^\s*<.*>\s*$/))p=e.parseXml(p);else if(p.match(/^\s*[\{\[].*[\}\]]\s*$/))try{var z=e.parseJSON(p);p=z}catch{}}function Q(ee,J){ee.ready?R(ee):(ee.addHandler("ready",function(){R(ee)}),ee.addHandler("open-failed",function(j){M({message:j.message,source:J})}))}setTimeout(function(){if(e.type(p)=="string")p=new e.TileSource({url:p,crossOriginPolicy:_.crossOriginPolicy!==void 0?_.crossOriginPolicy:l.crossOriginPolicy,ajaxWithCredentials:l.ajaxWithCredentials,ajaxHeaders:l.ajaxHeaders,useCanvas:l.useCanvas,success:function(se){R(se.tileSource)}}),p.addHandler("open-failed",function(se){M(se)});else if(e.isPlainObject(p)||p.nodeType)if(p.crossOriginPolicy===void 0&&(_.crossOriginPolicy!==void 0||l.crossOriginPolicy!==void 0)&&(p.crossOriginPolicy=_.crossOriginPolicy!==void 0?_.crossOriginPolicy:l.crossOriginPolicy),p.ajaxWithCredentials===void 0&&(p.ajaxWithCredentials=l.ajaxWithCredentials),p.useCanvas===void 0&&(p.useCanvas=l.useCanvas),e.isFunction(p.getTileUrl)){var ee=new e.TileSource(p);ee.getTileUrl=p.getTileUrl,R(ee)}else{var J=e.TileSource.determineType(q,p);if(!J){M({message:"Unable to load TileSource",source:p});return}var j=J.prototype.configure.apply(q,[p]);Q(new J(j),p)}else Q(p,p)})}function o(l,p){if(p instanceof e.Overlay)return p;var _=null;if(p.element)_=e.getElement(p.element);else{var R=p.id?p.id:"openseadragon-overlay-"+Math.floor(Math.random()*1e7);_=e.getElement(p.id),_||(_=document.createElement("a"),_.href="#/overlay/"+R),_.id=R,e.addClass(_,p.className?p.className:"openseadragon-overlay")}var M=p.location,q=p.width,z=p.height;if(!M){var Q=p.x,ee=p.y;if(p.px!==void 0){var J=l.viewport.imageToViewportRectangle(new e.Rect(p.px,p.py,q||0,z||0));Q=J.x,ee=J.y,q=q!==void 0?J.width:void 0,z=z!==void 0?J.height:void 0}M=new e.Point(Q,ee)}var j=p.placement;return j&&e.type(j)==="string"&&(j=e.Placement[p.placement.toUpperCase()]),new e.Overlay({element:_,location:M,placement:j,onDraw:p.onDraw,checkResize:p.checkResize,width:q,height:z,rotationMode:p.rotationMode})}function a(l,p){var _;for(_=l.length-1;_>=0;_--)if(l[_].element===p)return _;return-1}function s(l,p){return e.requestAnimationFrame(function(){p(l)})}function f(l){e.requestAnimationFrame(function(){g(l)})}function d(l){l.autoHideControls&&(l.controlsShouldFade=!0,l.controlsFadeBeginTime=e.now()+l.controlsFadeDelay,window.setTimeout(function(){f(l)},l.controlsFadeDelay))}function g(l){var p,_,R,M;if(l.controlsShouldFade){for(p=e.now(),_=p-l.controlsFadeBeginTime,R=1-_/l.controlsFadeLength,R=Math.min(1,R),R=Math.max(0,R),M=l.controls.length-1;M>=0;M--)l.controls[M].autoFade&&l.controls[M].setOpacity(R);R>0&&f(l)}}function w(l){var p;for(l.controlsShouldFade=!1,p=l.controls.length-1;p>=0;p--)l.controls[p].setOpacity(1)}function T(){w(this)}function C(){d(this)}function P(l){var p={originalEvent:l.originalEvent,preventDefaultAction:l.preventDefaultAction,preventVerticalPan:l.preventVerticalPan,preventHorizontalPan:l.preventHorizontalPan};if(this.raiseEvent("canvas-key",p),!p.preventDefaultAction&&!l.ctrl&&!l.alt&&!l.meta)switch(l.keyCode){case 38:return p.preventVerticalPan||(l.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return p.preventVerticalPan||(l.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return p.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return p.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}else return!0}function A(l){var p={originalEvent:l.originalEvent,preventDefaultAction:l.preventDefaultAction,preventVerticalPan:l.preventVerticalPan,preventHorizontalPan:l.preventHorizontalPan};if(this.raiseEvent("canvas-key",p),!p.preventDefaultAction&&!l.ctrl&&!l.alt&&!l.meta)switch(l.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return p.preventVerticalPan||(l.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return p.preventVerticalPan||(l.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return p.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return p.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}else return!0}function h(l){var p,_=document.activeElement==this.canvas;_||this.canvas.focus(),this.viewport.flipped&&(l.position.x=this.viewport.getContainerSize().x-l.position.x);var R={tracker:l.eventSource,position:l.position,quick:l.quick,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:l.preventDefaultAction};this.raiseEvent("canvas-click",R),!R.preventDefaultAction&&this.viewport&&l.quick&&(p=this.gestureSettingsByDeviceType(l.pointerType),p.clickToZoom&&(this.viewport.zoomBy(l.shift?1/this.zoomPerClick:this.zoomPerClick,p.zoomToRefPoint?this.viewport.pointFromPixel(l.position,!0):null),this.viewport.applyConstraints()))}function y(l){var p,_={tracker:l.eventSource,position:l.position,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:l.preventDefaultAction};this.raiseEvent("canvas-double-click",_),!_.preventDefaultAction&&this.viewport&&(p=this.gestureSettingsByDeviceType(l.pointerType),p.dblClickToZoom&&(this.viewport.zoomBy(l.shift?1/this.zoomPerClick:this.zoomPerClick,p.zoomToRefPoint?this.viewport.pointFromPixel(l.position,!0):null),this.viewport.applyConstraints()))}function x(l){var p,_={tracker:l.eventSource,position:l.position,delta:l.delta,speed:l.speed,direction:l.direction,shift:l.shift,originalEvent:l.originalEvent,preventDefaultAction:l.preventDefaultAction};if(this.raiseEvent("canvas-drag",_),!_.preventDefaultAction&&this.viewport){if(p=this.gestureSettingsByDeviceType(l.pointerType),this.panHorizontal||(l.delta.x=0),this.panVertical||(l.delta.y=0),this.viewport.flipped&&(l.delta.x=-l.delta.x),this.constrainDuringPan){var R=this.viewport.deltaPointsFromPixels(l.delta.negate());this.viewport.centerSpringX.target.value+=R.x,this.viewport.centerSpringY.target.value+=R.y;var M=this.viewport.getBounds(),q=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=R.x,this.viewport.centerSpringY.target.value-=R.y,M.x!=q.x&&(l.delta.x=0),M.y!=q.y&&(l.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(l.delta.negate()),p.flickEnabled&&!this.constrainDuringPan)}}function S(l){if(!l.preventDefaultAction&&this.viewport){var p=this.gestureSettingsByDeviceType(l.pointerType);if(p.flickEnabled&&l.speed>=p.flickMinSpeed){var _=0;this.panHorizontal&&(_=p.flickMomentum*l.speed*Math.cos(l.direction));var R=0;this.panVertical&&(R=p.flickMomentum*l.speed*Math.sin(l.direction));var M=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),q=this.viewport.pointFromPixel(new e.Point(M.x-_,M.y-R));this.viewport.panTo(q,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:l.eventSource,position:l.position,speed:l.speed,direction:l.direction,shift:l.shift,originalEvent:l.originalEvent})}function E(l){this.raiseEvent("canvas-enter",{tracker:l.eventSource,pointerType:l.pointerType,position:l.position,buttons:l.buttons,pointers:l.pointers,insideElementPressed:l.insideElementPressed,buttonDownAny:l.buttonDownAny,originalEvent:l.originalEvent})}function b(l){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:l.eventSource,pointerType:l.pointerType,position:l.position,buttons:l.buttons,pointers:l.pointers,insideElementPressed:l.insideElementPressed,buttonDownAny:l.buttonDownAny,originalEvent:l.originalEvent})}function D(l){this.raiseEvent("canvas-press",{tracker:l.eventSource,pointerType:l.pointerType,position:l.position,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElementReleased,originalEvent:l.originalEvent})}function I(l){this.raiseEvent("canvas-release",{tracker:l.eventSource,pointerType:l.pointerType,position:l.position,insideElementPressed:l.insideElementPressed,insideElementReleased:l.insideElementReleased,originalEvent:l.originalEvent})}function k(l){this.raiseEvent("canvas-nonprimary-press",{tracker:l.eventSource,position:l.position,pointerType:l.pointerType,button:l.button,buttons:l.buttons,originalEvent:l.originalEvent})}function U(l){this.raiseEvent("canvas-nonprimary-release",{tracker:l.eventSource,position:l.position,pointerType:l.pointerType,button:l.button,buttons:l.buttons,originalEvent:l.originalEvent})}function F(l){var p,_,R,M;if(!l.preventDefaultAction&&this.viewport&&(p=this.gestureSettingsByDeviceType(l.pointerType),p.pinchToZoom&&(_=this.viewport.pointFromPixel(l.center,!0),R=this.viewport.pointFromPixel(l.lastCenter,!0),M=R.minus(_),this.panHorizontal||(M.x=0),this.panVertical||(M.y=0),this.viewport.zoomBy(l.distance/l.lastDistance,_,!0),p.zoomToRefPoint&&this.viewport.panBy(M,!0),this.viewport.applyConstraints()),p.pinchRotate)){var q=Math.atan2(l.gesturePoints[0].currentPos.y-l.gesturePoints[1].currentPos.y,l.gesturePoints[0].currentPos.x-l.gesturePoints[1].currentPos.x),z=Math.atan2(l.gesturePoints[0].lastPos.y-l.gesturePoints[1].lastPos.y,l.gesturePoints[0].lastPos.x-l.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+(q-z)*(180/Math.PI))}return this.raiseEvent("canvas-pinch",{tracker:l.eventSource,gesturePoints:l.gesturePoints,lastCenter:l.lastCenter,center:l.center,lastDistance:l.lastDistance,distance:l.distance,shift:l.shift,originalEvent:l.originalEvent}),!1}function Z(l){var p,_,R,M;if(R=e.now(),M=R-this._lastScrollTime,M>this.minScrollDeltaTime){if(this._lastScrollTime=R,this.viewport.flipped&&(l.position.x=this.viewport.getContainerSize().x-l.position.x),!l.preventDefaultAction&&this.viewport&&(p=this.gestureSettingsByDeviceType(l.pointerType),p.scrollToZoom&&(_=Math.pow(this.zoomPerScroll,l.scroll),this.viewport.zoomBy(_,p.zoomToRefPoint?this.viewport.pointFromPixel(l.position,!0):null),this.viewport.applyConstraints())),this.raiseEvent("canvas-scroll",{tracker:l.eventSource,position:l.position,scroll:l.scroll,shift:l.shift,originalEvent:l.originalEvent}),p&&p.scrollToZoom)return!1}else if(p=this.gestureSettingsByDeviceType(l.pointerType),p&&p.scrollToZoom)return!1}function V(l){t[this.hash].mouseInside=!0,w(this),this.raiseEvent("container-enter",{tracker:l.eventSource,position:l.position,buttons:l.buttons,pointers:l.pointers,insideElementPressed:l.insideElementPressed,buttonDownAny:l.buttonDownAny,originalEvent:l.originalEvent})}function te(l){l.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||d(this)),this.raiseEvent("container-exit",{tracker:l.eventSource,position:l.position,buttons:l.buttons,pointers:l.pointers,insideElementPressed:l.insideElementPressed,buttonDownAny:l.buttonDownAny,originalEvent:l.originalEvent})}function ie(l){oe(l),l.isOpen()?l._updateRequestId=s(l,ie):l._updateRequestId=!1}function oe(l){if(!l._opening){if(l.autoResize){var p=n(l.container),_=t[l.hash].prevContainerSize;if(!p.equals(_)){var R=l.viewport;if(l.preserveImageSizeOnResize){var M=_.x/p.x,q=R.getZoom()*M,z=R.getCenter();R.resize(p,!1),R.zoomTo(q,null,!0),R.panTo(z,!0)}else{var Q=R.getBounds();R.resize(p,!0),R.fitBoundsWithConstraints(Q,!0)}t[l.hash].prevContainerSize=p,t[l.hash].forceRedraw=!0}}var ee=l.viewport.update(),J=l.world.update()||ee;ee&&l.raiseEvent("viewport-change"),l.referenceStrip&&(J=l.referenceStrip.update(l.viewport)||J),!t[l.hash].animating&&J&&(l.raiseEvent("animation-start"),w(l)),(J||t[l.hash].forceRedraw||l.world.needsDraw())&&(ne(l),l._drawOverlays(),l.navigator&&l.navigator.update(l.viewport),t[l.hash].forceRedraw=!1,J&&l.raiseEvent("animation")),t[l.hash].animating&&!J&&(l.raiseEvent("animation-finish"),t[l.hash].mouseInside||d(l)),t[l.hash].animating=J}}function ne(l){l.imageLoader.clear(),l.drawer.clear(),l.world.draw(),l.raiseEvent("update-viewport",{})}function N(l,p){return l?l+p:p}function ae(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,de(this)}function ue(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,de(this)}function we(){t[this.hash].zooming=!1}function de(l){e.requestAnimationFrame(e.delegate(l,me))}function me(){var l,p,_;t[this.hash].zooming&&this.viewport&&(l=e.now(),p=l-t[this.hash].lastZoomTime,_=Math.pow(t[this.hash].zoomFactor,p/1e3),this.viewport.zoomBy(_),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=l,de(this))}function ce(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function Te(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function xe(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function Se(){this.viewport&&this.viewport.goHome()}function ve(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function Pe(){if(this.viewport){var l=this.viewport.getRotation();this.viewport.flipped?l=e.positiveModulo(l+this.rotationIncrement,360):l=e.positiveModulo(l-this.rotationIncrement,360),this.viewport.setRotation(l)}}function _e(){if(this.viewport){var l=this.viewport.getRotation();this.viewport.flipped?l=e.positiveModulo(l-this.rotationIncrement,360):l=e.positiveModulo(l+this.rotationIncrement,360),this.viewport.setRotation(l)}}function ye(){this.viewport.toggleFlip()}function Ee(){var l=this._sequenceIndex-1;this.navPrevNextWrap&&l<0&&(l+=this.tileSources.length),this.goToPage(l)}function Ce(){var l=this._sequenceIndex+1;this.navPrevNextWrap&&l>=this.tileSources.length&&(l=0),this.goToPage(l)}}(OpenSeadragon),function(e){e.Navigator=function(s){var f=s.viewer,d=this,g,w;s.id?(this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&(s.position=="BOTTOM_RIGHT"?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:s.position=="BOTTOM_LEFT"?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:s.position=="TOP_RIGHT"?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:s.position=="TOP_LEFT"?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:s.position=="ABSOLUTE"&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:s.autoResize,minZoomImageRatio:1,background:s.background,opacity:s.opacity,borderColor:s.borderColor,displayRegionColor:s.displayRegionColor}),s.minPixelRatio=this.minPixelRatio=f.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(this.borderWidth*2,this.borderWidth*2).minus(this.fudge),s.controlOptions.anchor!=e.ControlAnchor.NONE&&function(P,A){P.margin="0px",P.border=A+"px solid "+s.borderColor,P.padding="0px",P.background=s.background,P.opacity=s.opacity,P.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(P,A){P.position="relative",P.top="0px",P.left="0px",P.fontSize="0px",P.overflow="hidden",P.border=A+"px solid "+s.displayRegionColor,P.margin="0px",P.padding="0px",P.background="transparent",P.float="left",P.cssFloat="left",P.styleFloat="left",P.zIndex=999999999,P.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",f.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!=e.ControlAnchor.NONE,s.width&&s.height?(this.setWidth(s.width),this.setHeight(s.height)):this._resizeWithViewer&&(g=e.getElementSize(f.element),this.element.style.height=Math.round(g.y*s.sizeRatio)+"px",this.element.style.width=Math.round(g.x*s.sizeRatio)+"px",this.oldViewerSize=g,w=e.getElementSize(this.element),this.elementArea=w.x*w.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);function T(P){o(d.displayRegionContainer,P),o(d.displayRegion,-P),d.viewport.setRotation(P)}if(s.navigatorRotate){var C=s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0;T(C),s.viewer.addHandler("rotate",function(P){T(P.degrees)})}this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,r)}),this.addHandler("reset-size",function(){d.viewport&&d.viewport.goHome(!0)}),f.world.addHandler("item-index-change",function(P){window.setTimeout(function(){var A=d.world.getItemAt(P.previousIndex);d.world.setItemIndex(A,P.newIndex)},1)}),f.world.addHandler("remove-item",function(P){var A=P.item,h=d._getMatchingItem(A);h&&d.world.removeItem(h)}),this.update(f.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var s=new e.Point(this.container.clientWidth===0?1:this.container.clientWidth,this.container.clientHeight===0?1:this.container.clientHeight);s.equals(this.oldContainerSize)||(this.viewport.resize(s,!0),this.viewport.goHome(!0),this.oldContainerSize=s,this.drawer.clear(),this.world.draw())}},setWidth:function(s){this.width=s,this.element.style.width=typeof s=="number"?s+"px":s,this._resizeWithViewer=!1},setHeight:function(s){this.height=s,this.element.style.height=typeof s=="number"?s+"px":s,this._resizeWithViewer=!1},setFlip:function(s){return this.viewport.setFlip(s),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(s){a(this.displayRegion,s),a(this.canvas,s),a(this.element,s)},update:function(s){var f,d,g,w,T,C;if(f=e.getElementSize(this.viewer.element),this._resizeWithViewer&&f.x&&f.y&&!f.equals(this.oldViewerSize)&&(this.oldViewerSize=f,this.maintainSizeRatio||!this.elementArea?(d=f.x*this.sizeRatio,g=f.y*this.sizeRatio):(d=Math.sqrt(this.elementArea*(f.x/f.y)),g=this.elementArea/d),this.element.style.width=Math.round(d)+"px",this.element.style.height=Math.round(g)+"px",this.elementArea||(this.elementArea=d*g),this.updateSize()),s&&this.viewport){w=s.getBoundsNoRotate(!0),T=this.viewport.pixelFromPointNoRotate(w.getTopLeft(),!1),C=this.viewport.pixelFromPointNoRotate(w.getBottomRight(),!1).minus(this.totalBorderWidths);var P=this.displayRegion.style;P.display=this.world.getItemCount()?"block":"none",P.top=Math.round(T.y)+"px",P.left=Math.round(T.x)+"px";var A=Math.abs(T.x-C.x),h=Math.abs(T.y-C.y);P.width=Math.round(Math.max(A,0))+"px",P.height=Math.round(Math.max(h,0))+"px"}},addTiledImage:function(s){var f=this,d=s.originalTiledImage;delete s.original;var g=e.extend({},s,{success:function(w){var T=w.item;T._originalForNavigator=d,f._matchBounds(T,d,!0);function C(){f._matchBounds(T,d)}function P(){f._matchOpacity(T,d)}function A(){f._matchCompositeOperation(T,d)}d.addHandler("bounds-change",C),d.addHandler("clip-change",C),d.addHandler("opacity-change",P),d.addHandler("composite-operation-change",A)}});return e.Viewer.prototype.addTiledImage.apply(this,[g])},_getMatchingItem:function(s){for(var f=this.world.getItemCount(),d,g=0;g1||n.y>1));i++);return i-1},getTileAtPoint:function(i,n){var r=n.x>=0&&n.x<=1&&n.y>=0&&n.y<=1/this.aspectRatio;e.console.assert(r,"[TileSource.getTileAtPoint] must be called with a valid point.");var o=this.dimensions.x*this.getLevelScale(i),a=n.x*o,s=n.y*o,f=Math.floor(a/this.getTileWidth(i)),d=Math.floor(s/this.getTileHeight(i));n.x>=1&&(f=this.getNumTiles(i).x-1);var g=1e-15;return n.y>=1/this.aspectRatio-g&&(d=this.getNumTiles(i).y-1),new e.Point(f,d)},getTileBounds:function(i,n,r,o){var a=this.dimensions.times(this.getLevelScale(i)),s=this.getTileWidth(i),f=this.getTileHeight(i),d=n===0?0:s*n-this.tileOverlap,g=r===0?0:f*r-this.tileOverlap,w=s+(n===0?1:2)*this.tileOverlap,T=f+(r===0?1:2)*this.tileOverlap,C=1/a.x;return w=Math.min(w,a.x-d),T=Math.min(T,a.y-g),o?new e.Rect(0,0,w,T):new e.Rect(d*C,g*C,w*C,T*C)},getImageInfo:function(i){var n=this,r,o,a,s,f,d,g;i&&(f=i.split("/"),d=f[f.length-1],g=d.lastIndexOf("."),g>-1&&(f[f.length-1]=d.slice(0,g))),o=function(w){typeof w=="string"&&(w=e.parseXml(w));var T=e.TileSource.determineType(n,w,i);if(!T){n.raiseEvent("open-failed",{message:"Unable to load TileSource",source:i});return}s=T.prototype.configure.apply(n,[w,i]),s.ajaxWithCredentials===void 0&&(s.ajaxWithCredentials=n.ajaxWithCredentials),a=new T(s),n.ready=!0,n.raiseEvent("ready",{tileSource:a})},i.match(/\.js$/)?(r=i.split("/").pop().replace(".js",""),e.jsonp({url:i,async:!1,callbackName:r,callback:o})):e.makeAjaxRequest({url:i,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(w){var T=t(w);o(T)},error:function(w,T){var C;try{C="HTTP "+w.status+" attempting to load TileSource"}catch{var P;typeof T>"u"||!T.toString?P="Unknown error":P=T.toString(),C=P+" attempting to load TileSource"}n.raiseEvent("open-failed",{message:C,source:i})}})},supports:function(i,n){return!1},configure:function(i,n){throw new Error("Method not implemented.")},getTileUrl:function(i,n,r){throw new Error("Method not implemented.")},getTileAjaxHeaders:function(i,n,r){return{}},tileExists:function(i,n,r){var o=this.getNumTiles(i);return i>=this.minLevel&&i<=this.maxLevel&&n>=0&&r>=0&&n=0;T--)for(C=this.displayRects[T],P=C.minLevel;P<=C.maxLevel;P++)this._levelRects[P]||(this._levelRects[P]=[]),this._levelRects[P].push(C);e.TileSource.apply(this,[A])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(n,r){var o;return n.Image?o=n.Image.xmlns:n.documentElement&&(n.documentElement.localName=="Image"||n.documentElement.tagName=="Image")&&(o=n.documentElement.namespaceURI),o=(o||"").toLowerCase(),o.indexOf("schemas.microsoft.com/deepzoom/2008")!==-1||o.indexOf("schemas.microsoft.com/deepzoom/2009")!==-1},configure:function(n,r){var o;return e.isPlainObject(n)?o=i(this,n):o=t(this,n),r&&!o.tilesUrl&&(o.tilesUrl=r.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),r.search(/\.(dzi|xml|js)\?/)!=-1?o.queryParams=r.match(/\?.*/):o.queryParams=""),o},getTileUrl:function(n,r,o){return[this.tilesUrl,n,"/",r,"_",o,".",this.fileFormat,this.queryParams].join("")},tileExists:function(n,r,o){var a=this._levelRects[n],s,f,d,g,w,T,C;if(this.minLevel&&nthis.maxLevel)return!1;if(!a||!a.length)return!0;for(C=a.length-1;C>=0;C--)if(s=a[C],!(ns.maxLevel)&&(f=this.getLevelScale(n),d=s.x*f,g=s.y*f,w=d+s.width*f,T=g+s.height*f,d=Math.floor(d/this._tileWidth),g=Math.floor(g/this._tileWidth),w=Math.ceil(w/this._tileWidth),T=Math.ceil(T/this._tileWidth),d<=r&&r0?o.tileSize=Math.max.apply(null,w):o.tileSize=d}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,o.levels=i(this),e.extend(!0,o,{width:o.levels[o.levels.length-1].width,height:o.levels[o.levels.length-1].height,tileSize:Math.max(o.height,o.width),tileOverlap:0,minLevel:0,maxLevel:o.levels.length-1}),this.levels=o.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!o.maxLevel&&!this.emulateLegacyImagePyramid)if(!this.scale_factors)o.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)));else{var C=Math.max.apply(null,this.scale_factors);o.maxLevel=Math.round(Math.log(C)*Math.LOG2E)}e.TileSource.apply(this,[o])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(o,a){return o.protocol&&o.protocol=="http://iiif.io/api/image"||o["@context"]&&(o["@context"]=="http://library.stanford.edu/iiif/image-api/1.1/context.json"||o["@context"]=="http://iiif.io/api/image/1/context.json")||o.profile&&o.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")===0||o.identifier&&o.width&&o.height?!0:!!(o.documentElement&&o.documentElement.tagName=="info"&&o.documentElement.namespaceURI=="http://library.stanford.edu/iiif/image-api/ns/")},configure:function(o,a){if(e.isPlainObject(o)){if(!o["@context"])o["@context"]="http://iiif.io/api/image/1.0/context.json",o["@id"]=a.replace("/info.json",""),o.version=1;else{var f=o["@context"];if(Array.isArray(f)){for(var d=0;d0&&o>=this.minLevel&&o<=this.maxLevel&&(a=this.levels[o].width/this.levels[this.maxLevel].width),a}return e.TileSource.prototype.getLevelScale.call(this,o)},getNumTiles:function(o){if(this.emulateLegacyImagePyramid){var a=this.getLevelScale(o);return a?new e.Point(1,1):new e.Point(0,0)}return e.TileSource.prototype.getNumTiles.call(this,o)},getTileAtPoint:function(o,a){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,o,a)},getTileUrl:function(o,a,s){if(this.emulateLegacyImagePyramid){var f=null;return this.levels.length>0&&o>=this.minLevel&&o<=this.maxLevel&&(f=this.levels[o].url),f}var d="0",g=Math.pow(.5,this.maxLevel-o),w=Math.ceil(this.width*g),T=Math.ceil(this.height*g),C,P,A,h,y,x,S,E,b,D,I,k,U,F;return C=this.getTileWidth(o),P=this.getTileHeight(o),A=Math.ceil(C/g),h=Math.ceil(P/g),this.version===1?U="native."+this.tileFormat:U="default."+this.tileFormat,w1&&o.profile[1].supports&&(d=o.profile[1].supports.indexOf("sizeByW")!==-1),o.version===3&&o.extraFeatures&&(d=o.extraFeatures.indexOf("sizeByWh")!==-1),!f||d}function i(o){for(var a=[],s=0;sf?d=s/256:d=f/256,a.maxLevel=Math.ceil(Math.log(d)/Math.log(2))-1,a.tileSize=256,a.width=s,a.height=f,e.TileSource.apply(this,[a])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(t,i){return t.type&&t.type=="tiledmapservice"},configure:function(t,i){return t},getTileUrl:function(t,i,n){var r=this.getNumTiles(t).y-1;return this.tilesUrl+t+"/"+i+"/"+(r-n)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(t){t.tileSize=256;var i={x:t.width,y:t.height};for(t.imageSizes=[{x:t.width,y:t.height}],t.gridSize=[this._getGridSize(t.width,t.height,t.tileSize)];parseInt(i.x,10)>t.tileSize||parseInt(i.y,10)>t.tileSize;)i.x=Math.floor(i.x/2),i.y=Math.floor(i.y/2),t.imageSizes.push({x:i.x,y:i.y}),t.gridSize.push(this._getGridSize(i.x,i.y,t.tileSize));t.imageSizes.reverse(),t.gridSize.reverse(),t.minLevel=0,t.maxLevel=t.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[t])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(t,i,n){return{x:Math.ceil(t/n),y:Math.ceil(i/n)}},_calculateAbsoluteTileNumber:function(t,i,n){for(var r=0,o={},a=0;a0?(a=o.levels[o.levels.length-1].width,s=o.levels[o.levels.length-1].height):(a=0,s=0,e.console.error("No supported image formats found")),e.extend(!0,o,{width:a,height:s,tileSize:Math.max(s,a),tileOverlap:0,minLevel:0,maxLevel:o.levels.length>0?o.levels.length-1:0}),e.TileSource.apply(this,[o]),this.levels=o.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(r,o){return r.type&&r.type=="legacy-image-pyramid"||r.documentElement&&r.documentElement.getAttribute("type")=="legacy-image-pyramid"},configure:function(r,o){var a;return e.isPlainObject(r)?a=n(this,r):a=i(this,r),a},getLevelScale:function(r){var o=NaN;return this.levels.length>0&&r>=this.minLevel&&r<=this.maxLevel&&(o=this.levels[r].width/this.levels[this.maxLevel].width),o},getNumTiles:function(r){var o=this.getLevelScale(r);return o?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(r,o,a){var s=null;return this.levels.length>0&&r>=this.minLevel&&r<=this.maxLevel&&(s=this.levels[r].url),s}});function t(r){var o=[],a,s;for(s=0;s");return o.sort(function(f,d){return f.height-d.height})}function i(r,o){if(!o||!o.documentElement)throw new Error(e.getString("Errors.Xml"));var a=o.documentElement,s=a.tagName,f=null,d=[],g,w;if(s=="image")try{for(f={type:a.getAttribute("type"),levels:[]},d=a.getElementsByTagName("level"),w=0;w=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i},getNumTiles:function(t){var i=this.getLevelScale(t);return i?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(t,i,n){var r=null;return t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].url),r},getContext2D:function(t,i,n){var r=null;return t>=this.minLevel&&t<=this.maxLevel&&(r=this.levels[t].context2D),r},_buildLevels:function(){var t=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var i=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,n=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,r=document.createElement("canvas"),o=r.getContext("2d");if(r.width=i,r.height=n,o.drawImage(this._image,0,0,i,n),t[0].context2D=o,delete this._image,e.isCanvasTainted(r))return t;for(;i>=2&&n>=2;){i=Math.floor(i/2),n=Math.floor(n/2);var a=document.createElement("canvas"),s=a.getContext("2d");a.width=i,a.height=n,s.drawImage(r,0,0,i,n),t.splice(0,0,{context2D:s,width:i,height:n}),r=a,o=s}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,i,n,r){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(s){var f=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},s),this.element=s.element||e.makeNeutralElement("div"),s.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor==e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(d){d.insideElementPressed?(o(f,e.ButtonState.DOWN),f.raiseEvent("enter",{originalEvent:d.originalEvent})):d.buttonDownAny||o(f,e.ButtonState.HOVER)},focusHandler:function(d){this.enterHandler(d),f.raiseEvent("focus",{originalEvent:d.originalEvent})},exitHandler:function(d){a(f,e.ButtonState.GROUP),d.insideElementPressed&&f.raiseEvent("exit",{originalEvent:d.originalEvent})},blurHandler:function(d){this.exitHandler(d),f.raiseEvent("blur",{originalEvent:d.originalEvent})},pressHandler:function(d){o(f,e.ButtonState.DOWN),f.raiseEvent("press",{originalEvent:d.originalEvent})},releaseHandler:function(d){d.insideElementPressed&&d.insideElementReleased?(a(f,e.ButtonState.HOVER),f.raiseEvent("release",{originalEvent:d.originalEvent})):d.insideElementPressed?a(f,e.ButtonState.GROUP):o(f,e.ButtonState.HOVER)},clickHandler:function(d){d.quick&&f.raiseEvent("click",{originalEvent:d.originalEvent})},keyHandler:function(d){return d.keyCode===13?(f.raiseEvent("click",{originalEvent:d.originalEvent}),f.raiseEvent("release",{originalEvent:d.originalEvent}),!1):!0}}),a(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){o(this,e.ButtonState.GROUP)},notifyGroupExit:function(){a(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}});function t(s){e.requestAnimationFrame(function(){i(s)})}function i(s){var f,d,g;s.shouldFade&&(f=e.now(),d=f-s.fadeBeginTime,g=1-d/s.fadeLength,g=Math.min(1,g),g=Math.max(0,g),s.imgGroup&&e.setElementOpacity(s.imgGroup,g,!0),g>0&&t(s))}function n(s){s.shouldFade=!0,s.fadeBeginTime=e.now()+s.fadeDelay,window.setTimeout(function(){t(s)},s.fadeDelay)}function r(s){s.shouldFade=!1,s.imgGroup&&e.setElementOpacity(s.imgGroup,1,!0)}function o(s,f){s.element.disabled||(f>=e.ButtonState.GROUP&&s.currentState==e.ButtonState.REST&&(r(s),s.currentState=e.ButtonState.GROUP),f>=e.ButtonState.HOVER&&s.currentState==e.ButtonState.GROUP&&(s.imgHover&&(s.imgHover.style.visibility=""),s.currentState=e.ButtonState.HOVER),f>=e.ButtonState.DOWN&&s.currentState==e.ButtonState.HOVER&&(s.imgDown&&(s.imgDown.style.visibility=""),s.currentState=e.ButtonState.DOWN))}function a(s,f){s.element.disabled||(f<=e.ButtonState.HOVER&&s.currentState==e.ButtonState.DOWN&&(s.imgDown&&(s.imgDown.style.visibility="hidden"),s.currentState=e.ButtonState.HOVER),f<=e.ButtonState.GROUP&&s.currentState==e.ButtonState.HOVER&&(s.imgHover&&(s.imgHover.style.visibility="hidden"),s.currentState=e.ButtonState.GROUP),f<=e.ButtonState.REST&&s.currentState==e.ButtonState.GROUP&&(n(s),s.currentState=e.ButtonState.REST))}}(OpenSeadragon),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var i=this.buttons.concat([]),n=this,r;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(this.element.style.display="inline-block",r=0;r=270?(a=this.getTopRight(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(a=this.getBottomRight(),this.x=a.x,this.y=a.y,this.degrees-=180):this.degrees>=90&&(a=this.getBottomLeft(),this.x=a.x,this.y=a.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},e.Rect.fromSummits=function(t,i,n){var r=t.distanceTo(i),o=t.distanceTo(n),a=i.minus(t),s=Math.atan(a.y/a.x);return a.x<0?s+=Math.PI:a.y<0&&(s+=2*Math.PI),new e.Rect(t.x,t.y,r,o,s/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var i=this.getBoundingBox(),n=t.getBoundingBox(),r=Math.min(i.x,n.x),o=Math.min(i.y,n.y),a=Math.max(i.x+i.width,n.x+n.width),s=Math.max(i.y+i.height,n.y+n.height);return new e.Rect(r,o,a-r,s-o)},intersection:function(t){var i=1e-10,n=[],r=this.getTopLeft();t.containsPoint(r,i)&&n.push(r);var o=this.getTopRight();t.containsPoint(o,i)&&n.push(o);var a=this.getBottomLeft();t.containsPoint(a,i)&&n.push(a);var s=this.getBottomRight();t.containsPoint(s,i)&&n.push(s);var f=t.getTopLeft();this.containsPoint(f,i)&&n.push(f);var d=t.getTopRight();this.containsPoint(d,i)&&n.push(d);var g=t.getBottomLeft();this.containsPoint(g,i)&&n.push(g);var w=t.getBottomRight();this.containsPoint(w,i)&&n.push(w);for(var T=this._getSegments(),C=t._getSegments(),P=0;Pb&&(b=U.x),U.yI&&(I=U.y)}return new e.Rect(E,D,b-E,I-D)},_getSegments:function(){var t=this.getTopLeft(),i=this.getTopRight(),n=this.getBottomLeft(),r=this.getBottomRight();return[[t,i],[i,r],[r,n],[n,t]]},rotate:function(t,i){if(t=e.positiveModulo(t,360),t===0)return this.clone();i=i||this.getCenter();var n=this.getTopLeft().rotate(t,i),r=this.getTopRight().rotate(t,i),o=r.minus(n);o=o.apply(function(s){var f=1e-15;return Math.abs(s)=-i&&(t.x-r.x)*a.x+(t.y-r.y)*a.y<=i&&(t.x-n.x)*s.x+(t.y-n.y)*s.y>=-i&&(t.x-o.x)*s.x+(t.y-o.y)*s.y<=i},toString:function(){return"["+Math.round(this.x*100)/100+", "+Math.round(this.y*100)/100+", "+Math.round(this.width*100)/100+"x"+Math.round(this.height*100)/100+", "+Math.round(this.degrees*100)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};e.ReferenceStrip=function(d){var g=this,w=d.viewer,T=e.getElementSize(w.element),C,P,A;for(d.id||(d.id="referencestrip-"+e.now(),this.element=e.makeNeutralElement("div"),this.element.id=d.id,this.element.className="referencestrip"),d=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.referenceStripSizeRatio,position:e.DEFAULT_SETTINGS.referenceStripPosition,scroll:e.DEFAULT_SETTINGS.referenceStripScroll,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold},d,{element:this.element,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1}),e.extend(this,d),t[this.id]={animating:!1},this.minPixelRatio=this.viewer.minPixelRatio,P=this.element.style,P.marginTop="0px",P.marginRight="0px",P.marginBottom="0px",P.marginLeft="0px",P.left="0px",P.bottom="0px",P.border="0px",P.background="#000",P.position="relative",e.setElementTouchActionNone(this.element),e.setElementOpacity(this.element,.8),this.viewer=w,this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,i),scrollHandler:e.delegate(this,n),enterHandler:e.delegate(this,o),exitHandler:e.delegate(this,a),keyDownHandler:e.delegate(this,s),keyHandler:e.delegate(this,f)}),d.width&&d.height?(this.element.style.width=d.width+"px",this.element.style.height=d.height+"px",w.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):d.scroll=="horizontal"?(this.element.style.width=T.x*d.sizeRatio*w.tileSources.length+12*w.tileSources.length+"px",this.element.style.height=T.y*d.sizeRatio+"px",w.addControl(this.element,{anchor:e.ControlAnchor.BOTTOM_LEFT})):(this.element.style.height=T.y*d.sizeRatio*w.tileSources.length+12*w.tileSources.length+"px",this.element.style.width=T.x*d.sizeRatio+"px",w.addControl(this.element,{anchor:e.ControlAnchor.TOP_LEFT})),this.panelWidth=T.x*this.sizeRatio+8,this.panelHeight=T.y*this.sizeRatio+8,this.panels=[],this.miniViewers={},A=0;AP+w.x-this.panelWidth?(h=Math.min(h,T-w.x),this.element.style.marginLeft=-h+"px",r(this,w.x,-h)):hA+w.y-this.panelHeight?(h=Math.min(h,C-w.y),this.element.style.marginTop=-h+"px",r(this,w.y,-h)):h0?g>-(T-P.x)&&(this.element.style.marginLeft=g+d.delta.x*2+"px",r(this,P.x,g+d.delta.x*2)):-d.delta.x<0&&g<0&&(this.element.style.marginLeft=g+d.delta.x*2+"px",r(this,P.x,g+d.delta.x*2)):-d.delta.y>0?w>-(C-P.y)&&(this.element.style.marginTop=w+d.delta.y*2+"px",r(this,P.y,w+d.delta.y*2)):-d.delta.y<0&&w<0&&(this.element.style.marginTop=w+d.delta.y*2+"px",r(this,P.y,w+d.delta.y*2))),!1}function n(d){var g=Number(this.element.style.marginLeft.replace("px","")),w=Number(this.element.style.marginTop.replace("px","")),T=Number(this.element.style.width.replace("px","")),C=Number(this.element.style.height.replace("px","")),P=e.getElementSize(this.viewer.canvas);return this.element&&(this.scroll=="horizontal"?d.scroll>0?g>-(T-P.x)&&(this.element.style.marginLeft=g-d.scroll*60+"px",r(this,P.x,g-d.scroll*60)):d.scroll<0&&g<0&&(this.element.style.marginLeft=g-d.scroll*60+"px",r(this,P.x,g-d.scroll*60)):d.scroll<0?w>P.y-C&&(this.element.style.marginTop=w+d.scroll*60+"px",r(this,P.y,w+d.scroll*60)):d.scroll>0&&w<0&&(this.element.style.marginTop=w+d.scroll*60+"px",r(this,P.y,w+d.scroll*60))),!1}function r(d,g,w){var T,C,P,A,h,y,x;for(d.scroll=="horizontal"?T=d.panelWidth:T=d.panelHeight,C=Math.ceil(g/T)+5,P=Math.ceil((Math.abs(w)+g)/T)+1,C=P-C,C=C<0?0:C,y=C;y1?n[1].springStiffness:5,animationTime:n.length>1?n[1].animationTime:1.5}),e.console.assert(typeof i.springStiffness=="number"&&i.springStiffness!==0,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert(typeof i.animationTime=="number"&&i.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),i.exponential&&(this._exponential=!0,delete i.exponential),e.extend(!0,this,i),this.current={value:typeof this.initial=="number"?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||this.current.value!==0,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(i){e.console.assert(!this._exponential||i!==0,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=i,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(i){e.console.assert(!this._exponential||i!==0,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=i,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(i){this.start.value+=i,this.target.value+=i,this._exponential&&(e.console.assert(this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(i){this._exponential=i,this._exponential&&(e.console.assert(this.current.value!==0&&this.target.value!==0&&this.start.value!==0,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=e.now();var i,n;this._exponential?(i=this.start._logValue,n=this.target._logValue):(i=this.start.value,n=this.target.value);var r=this.current.time>=this.target.time?n:i+(n-i)*t(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),o=this.current.value;return this._exponential?this.current.value=Math.exp(r):this.current.value=r,o!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}};function t(i,n){return(1-Math.exp(i*-n))/(1-Math.exp(-i))}}(OpenSeadragon),function(e){function t(n){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},n),this.image=null}t.prototype={errorMsg:null,start:function(){var n=this,r=this.abort;this.image=new Image,this.image.onload=function(){n.finish(!0)},this.image.onabort=this.image.onerror=function(){n.errorMsg="Image load aborted",n.finish(!1)},this.jobId=window.setTimeout(function(){n.errorMsg="Image load exceeded timeout ("+n.timeout+" ms)",n.finish(!1)},this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(o){var a;try{a=new window.Blob([o.response])}catch(g){var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(g.name==="TypeError"&&s){var f=new s;f.append(o.response),a=f.getBlob()}}a.size===0&&(n.errorMsg="Empty image response.",n.finish(!1));var d=(window.URL||window.webkitURL).createObjectURL(a);n.image.src=d},error:function(o){n.errorMsg="Image load aborted - XHR error",n.finish(!1)}}),this.abort=function(){n.request.abort(),typeof r=="function"&&r()}):(this.crossOriginPolicy!==!1&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(n){this.image.onload=this.image.onerror=this.image.onabort=null,n||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(n){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},n)},e.ImageLoader.prototype={addJob:function(n){var r=this,o=function(f){i(r,f,n.callback)},a={src:n.src,loadWithAjax:n.loadWithAjax,ajaxHeaders:n.loadWithAjax?n.ajaxHeaders:null,crossOriginPolicy:n.crossOriginPolicy,ajaxWithCredentials:n.ajaxWithCredentials,callback:o,abort:n.abort,timeout:this.timeout},s=new t(a);!this.jobLimit||this.jobsInProgress0&&(a=n.jobQueue.shift(),a.start(),n.jobsInProgress++),o(r.image,r.errorMsg,r.request)}}(OpenSeadragon),function(e){e.Tile=function(t,i,n,r,o,a,s,f,d,g){this.level=t,this.x=i,this.y=n,this.bounds=r,this.sourceBounds=g,this.exists=o,this.url=a,this.context2D=s,this.loadWithAjax=f,this.ajaxHeaders=d,this.ajaxHeaders?this.cacheKey=this.url+"+"+JSON.stringify(this.ajaxHeaders):this.cacheKey=this.url,this.loaded=!1,this.loading=!1,this.element=null,this.imgElement=null,this.image=null,this.style=null,this.position=null,this.size=null,this.blendStart=null,this.opacity=null,this.squaredDistance=null,this.visibility=null,this.beingDrawn=!1,this.lastTouchTime=0,this.isRightMost=!1,this.isBottomMost=!1},e.Tile.prototype={toString:function(){return this.level+"/"+this.x+"_"+this.y},_hasTransparencyChannel:function(){return!!this.context2D||this.url.match(".png")},drawHTML:function(t){if(!this.cacheImageRecord){e.console.warn("[Tile.drawHTML] attempting to draw tile %s when it's not cached",this.toString());return}if(!this.loaded){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}this.element||(this.element=e.makeNeutralElement("div"),this.imgElement=this.cacheImageRecord.getImage().cloneNode(),this.imgElement.style.msInterpolationMode="nearest-neighbor",this.imgElement.style.width="100%",this.imgElement.style.height="100%",this.style=this.element.style,this.style.position="absolute"),this.element.parentNode!=t&&t.appendChild(this.element),this.imgElement.parentNode!=this.element&&this.element.appendChild(this.imgElement),this.style.top=this.position.y+"px",this.style.left=this.position.x+"px",this.style.height=this.size.y+"px",this.style.width=this.size.x+"px",e.setElementOpacity(this.element,this.opacity)},drawCanvas:function(t,i,n,r){var o=this.position.times(e.pixelDensityRatio),a=this.size.times(e.pixelDensityRatio),s;if(!this.context2D&&!this.cacheImageRecord){e.console.warn("[Tile.drawCanvas] attempting to draw tile %s when it's not cached",this.toString());return}if(s=this.context2D||this.cacheImageRecord.getRenderedContext(),!this.loaded||!s){e.console.warn("Attempting to draw tile %s when it's not yet loaded.",this.toString());return}t.save(),t.globalAlpha=this.opacity,typeof n=="number"&&n!==1&&(o=o.times(n),a=a.times(n)),r instanceof e.Point&&(o=o.plus(r)),t.globalAlpha===1&&this._hasTransparencyChannel()&&t.clearRect(o.x,o.y,a.x,a.y),i({context:t,tile:this,rendered:s});var f,d;this.sourceBounds?(f=Math.min(this.sourceBounds.width,s.canvas.width),d=Math.min(this.sourceBounds.height,s.canvas.height)):(f=s.canvas.width,d=s.canvas.height),t.drawImage(s.canvas,0,0,f,d,o.x,o.y,a.x,a.y),t.restore()},getScaleForEdgeSmoothing:function(){var t;if(this.cacheImageRecord)t=this.cacheImageRecord.getRenderedContext();else if(this.context2D)t=this.context2D;else return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached",this.toString()),1;return t.canvas.width/(this.size.x*e.pixelDensityRatio)},getTranslationForEdgeSmoothing:function(t,i,n){var r=Math.max(1,Math.ceil((n.x-i.x)/2)),o=Math.max(1,Math.ceil((n.y-i.y)/2));return new e.Point(r,o).minus(this.position.times(e.pixelDensityRatio).times(t||1).apply(function(a){return a%1}))},unload:function(){this.imgElement&&this.imgElement.parentNode&&this.imgElement.parentNode.removeChild(this.imgElement),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.imgElement=null,this.loaded=!1,this.loading=!1}}}(OpenSeadragon),function(e){e.OverlayPlacement=e.Placement,e.OverlayRotationMode=e.freezeObject({NO_ROTATION:1,EXACT:2,BOUNDING_BOX:3}),e.Overlay=function(t,i,n){var r;e.isPlainObject(t)?r=t:r={element:t,location:i,placement:n},this.element=r.element,this.style=r.element.style,this._init(r)},e.Overlay.prototype={_init:function(t){this.location=t.location,this.placement=t.placement===void 0?e.Placement.TOP_LEFT:t.placement,this.onDraw=t.onDraw,this.checkResize=t.checkResize===void 0?!0:t.checkResize,this.width=t.width===void 0?null:t.width,this.height=t.height===void 0?null:t.height,this.rotationMode=t.rotationMode||e.OverlayRotationMode.EXACT,this.location instanceof e.Rect&&(this.width=this.location.width,this.height=this.location.height,this.location=this.location.getTopLeft(),this.placement=e.Placement.TOP_LEFT),this.scales=this.width!==null&&this.height!==null,this.bounds=new e.Rect(this.location.x,this.location.y,this.width,this.height),this.position=this.location},adjust:function(t,i){var n=e.Placement.properties[this.placement];n&&(n.isHorizontallyCentered?t.x-=i.x/2:n.isRight&&(t.x-=i.x),n.isVerticallyCentered?t.y-=i.y/2:n.isBottom&&(t.y-=i.y))},destroy:function(){var t=this.element,i=this.style;t.parentNode&&(t.parentNode.removeChild(t),t.prevElementParent&&(i.display="none",document.body.appendChild(t))),this.onDraw=null,i.top="",i.left="",i.position="",this.width!==null&&(i.width=""),this.height!==null&&(i.height="");var n=e.getCssPropertyWithVendorPrefix("transformOrigin"),r=e.getCssPropertyWithVendorPrefix("transform");n&&r&&(i[n]="",i[r]="")},drawHTML:function(t,i){var n=this.element;n.parentNode!==t&&(n.prevElementParent=n.parentNode,n.prevNextSibling=n.nextSibling,t.appendChild(n),this.style.position="absolute",this.size=e.getElementSize(n));var r=this._getOverlayPositionAndSize(i),o=r.position,a=this.size=r.size,s=r.rotate;if(this.onDraw)this.onDraw(o,a,this.element);else{var f=this.style;f.left=o.x+"px",f.top=o.y+"px",this.width!==null&&(f.width=a.x+"px"),this.height!==null&&(f.height=a.y+"px");var d=e.getCssPropertyWithVendorPrefix("transformOrigin"),g=e.getCssPropertyWithVendorPrefix("transform");d&&g&&(s?(f[d]=this._getTransformOrigin(),f[g]="rotate("+s+"deg)"):(f[d]="",f[g]="")),f.display!=="none"&&(f.display="block")}},_getOverlayPositionAndSize:function(t){var i=t.pixelFromPoint(this.location,!0),n=this._getSizeInPixels(t);this.adjust(i,n);var r=0;if(t.degrees&&this.rotationMode!==e.OverlayRotationMode.NO_ROTATION)if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX&&this.width!==null&&this.height!==null){var o=new e.Rect(i.x,i.y,n.x,n.y),a=this._getBoundingBox(o,t.degrees);i=a.getTopLeft(),n=a.getSize()}else r=t.degrees;return{position:i,size:n,rotate:r}},_getSizeInPixels:function(t){var i=this.size.x,n=this.size.y;if(this.width!==null||this.height!==null){var r=t.deltaPixelsFromPointsNoRotate(new e.Point(this.width||0,this.height||0),!0);this.width!==null&&(i=r.x),this.height!==null&&(n=r.y)}if(this.checkResize&&(this.width===null||this.height===null)){var o=this.size=e.getElementSize(this.element);this.width===null&&(i=o.x),this.height===null&&(n=o.y)}return new e.Point(i,n)},_getBoundingBox:function(t,i){var n=this._getPlacementPoint(t);return t.rotate(i,n).getBoundingBox()},_getPlacementPoint:function(t){var i=new e.Point(t.x,t.y),n=e.Placement.properties[this.placement];return n&&(n.isHorizontallyCentered?i.x+=t.width/2:n.isRight&&(i.x+=t.width),n.isVerticallyCentered?i.y+=t.height/2:n.isBottom&&(i.y+=t.height)),i},_getTransformOrigin:function(){var t="",i=e.Placement.properties[this.placement];return i&&(i.isLeft?t="left":i.isRight&&(t="right"),i.isTop?t+=" top":i.isBottom&&(t+=" bottom")),t},update:function(t,i){var n=e.isPlainObject(t)?t:{location:t,placement:i};this._init({location:n.location||this.location,placement:n.placement!==void 0?n.placement:this.placement,onDraw:n.onDraw||this.onDraw,checkResize:n.checkResize||this.checkResize,width:n.width!==void 0?n.width:this.width,height:n.height!==void 0?n.height:this.height,rotationMode:n.rotationMode||this.rotationMode})},getBounds:function(t){e.console.assert(t,"A viewport must now be passed to Overlay.getBounds.");var i=this.width,n=this.height;if(i===null||n===null){var r=t.deltaPointsFromPixelsNoRotate(this.size,!0);i===null&&(i=r.x),n===null&&(n=r.y)}var o=this.location.clone();return this.adjust(o,new e.Point(i,n)),this._adjustBoundsForRotation(t,new e.Rect(o.x,o.y,i,n))},_adjustBoundsForRotation:function(t,i){if(!t||t.degrees===0||this.rotationMode===e.OverlayRotationMode.EXACT)return i;if(this.rotationMode===e.OverlayRotationMode.BOUNDING_BOX){if(this.width===null||this.height===null)return i;var n=this._getOverlayPositionAndSize(t);return t.viewerElementToViewportRectangle(new e.Rect(n.position.x,n.position.y,n.size.x,n.size.y))}return i.rotate(-t.degrees,this._getPlacementPoint(i))}}}(OpenSeadragon),function(e){e.Drawer=function(t){e.console.assert(t.viewer,"[Drawer] options.viewer is required");var i=arguments;if(e.isPlainObject(t)||(t={source:i[0],viewport:i[1],element:i[2]}),e.console.assert(t.viewport,"[Drawer] options.viewport is required"),e.console.assert(t.element,"[Drawer] options.element is required"),t.source&&e.console.error("[Drawer] options.source is no longer accepted; use TiledImage instead"),this.viewer=t.viewer,this.viewport=t.viewport,this.debugGridColor=typeof t.debugGridColor=="string"?[t.debugGridColor]:t.debugGridColor||e.DEFAULT_SETTINGS.debugGridColor,t.opacity&&e.console.error("[Drawer] options.opacity is no longer accepted; set the opacity on the TiledImage instead"),this.useCanvas=e.supportsCanvas&&(this.viewer?this.viewer.useCanvas:!0),this.container=e.getElement(t.element),this.canvas=e.makeNeutralElement(this.useCanvas?"canvas":"div"),this.context=this.useCanvas?this.canvas.getContext("2d"):null,this.sketchCanvas=null,this.sketchContext=null,this.element=this.container,this.container.dir="ltr",this.useCanvas){var n=this._calculateCanvasSize();this.canvas.width=n.x,this.canvas.height=n.y}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.position="absolute",e.setElementOpacity(this.canvas,this.opacity,!0),this.container.style.textAlign="left",this.container.appendChild(this.canvas),this._imageSmoothingEnabled=!0},e.Drawer.prototype={addOverlay:function(t,i,n,r){return e.console.error("drawer.addOverlay is deprecated. Use viewer.addOverlay instead."),this.viewer.addOverlay(t,i,n,r),this},updateOverlay:function(t,i,n){return e.console.error("drawer.updateOverlay is deprecated. Use viewer.updateOverlay instead."),this.viewer.updateOverlay(t,i,n),this},removeOverlay:function(t){return e.console.error("drawer.removeOverlay is deprecated. Use viewer.removeOverlay instead."),this.viewer.removeOverlay(t),this},clearOverlays:function(){return e.console.error("drawer.clearOverlays is deprecated. Use viewer.clearOverlays instead."),this.viewer.clearOverlays(),this},viewportCoordToDrawerCoord:function(t){var i=this.viewport.pixelFromPointNoRotate(t,!0);return new e.Point(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio)},clipWithPolygons:function(t,i){if(this.useCanvas){var n=this._getContext(i);n.beginPath(),t.forEach(function(r){r.forEach(function(o,a){n[a===0?"moveTo":"lineTo"](o.x,o.y)})}),n.clip()}},setOpacity:function(t){e.console.error("drawer.setOpacity is deprecated. Use tiledImage.setOpacity instead.");for(var i=this.viewer.world,n=0;ni&&(i=r)}return i},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var t=this._calculateCanvasSize();if((this.canvas.width!=t.x||this.canvas.height!=t.y)&&(this.canvas.width=t.x,this.canvas.height=t.y,this._updateImageSmoothingEnabled(this.context),this.sketchCanvas!==null)){var i=this._calculateSketchCanvasSize();this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(t,i){if(this.useCanvas){var n=this._getContext(t);if(i)n.clearRect(i.x,i.y,i.width,i.height);else{var r=n.canvas;n.clearRect(0,0,r.width,r.height)}}},viewportToDrawerRectangle:function(t){var i=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),n=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},drawTile:function(t,i,n,r,o){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(i,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(n);r=r||1,t.drawCanvas(a,i,r,o)}else t.drawHTML(this.canvas)},_getContext:function(t){var i=this.context;if(t){if(this.sketchCanvas===null){this.sketchCanvas=document.createElement("canvas");var n=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=n.x,this.sketchCanvas.height=n.y,this.sketchContext=this.sketchCanvas.getContext("2d"),this.viewport.getRotation()===0){var r=this;this.viewer.addHandler("rotate",function o(){if(r.viewport.getRotation()!==0){r.viewer.removeHandler("rotate",o);var a=r._calculateSketchCanvasSize();r.sketchCanvas.width=a.x,r.sketchCanvas.height=a.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}i=this.sketchContext}return i},saveContext:function(t){this.useCanvas&&this._getContext(t).save()},restoreContext:function(t){this.useCanvas&&this._getContext(t).restore()},setClip:function(t,i){if(this.useCanvas){var n=this._getContext(i);n.beginPath(),n.rect(t.x,t.y,t.width,t.height),n.clip()}},drawRectangle:function(t,i,n){if(this.useCanvas){var r=this._getContext(n);r.save(),r.fillStyle=i,r.fillRect(t.x,t.y,t.width,t.height),r.restore()}},blendSketch:function(t,i,n,r){var o=t;if(e.isPlainObject(o)||(o={opacity:t,scale:i,translate:n,compositeOperation:r}),!(!this.useCanvas||!this.sketchCanvas)){t=o.opacity,r=o.compositeOperation;var a=o.bounds;if(this.context.save(),this.context.globalAlpha=t,r&&(this.context.globalCompositeOperation=r),a)a.x<0&&(a.width+=a.x,a.x=0),a.x+a.width>this.canvas.width&&(a.width=this.canvas.width-a.x),a.y<0&&(a.height+=a.y,a.y=0),a.y+a.height>this.canvas.height&&(a.height=this.canvas.height-a.y),this.context.drawImage(this.sketchCanvas,a.x,a.y,a.width,a.height,a.x,a.y,a.width,a.height);else{i=o.scale||1,n=o.translate;var s=n instanceof e.Point?n:new e.Point(0,0),f=0,d=0;if(n){var g=this.sketchCanvas.width-this.canvas.width,w=this.sketchCanvas.height-this.canvas.height;f=Math.round(g/2),d=Math.round(w/2)}this.context.drawImage(this.sketchCanvas,s.x-f*i,s.y-d*i,(this.canvas.width+2*f)*i,(this.canvas.height+2*d)*i,-f,-d,this.canvas.width+2*f,this.canvas.height+2*d)}this.context.restore()}},drawDebugInfo:function(t,i,n,r){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(r)%this.debugGridColor.length,a=this.context;a.save(),a.lineWidth=2*e.pixelDensityRatio,a.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",a.strokeStyle=this.debugGridColor[o],a.fillStyle=this.debugGridColor[o],this.viewport.degrees!==0&&this._offsetForRotation({degrees:this.viewport.degrees}),r.getRotation(!0)%360!==0&&this._offsetForRotation({degrees:r.getRotation(!0),point:r.viewport.pixelFromPointNoRotate(r._getRotationPoint(!0),!0)}),r.viewport.degrees===0&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),a.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var s=(t.position.x+t.size.x/2)*e.pixelDensityRatio,f=(t.position.y+t.size.y/2)*e.pixelDensityRatio;a.translate(s,f),a.rotate(Math.PI/180*-this.viewport.degrees),a.translate(-s,-f),t.x===0&&t.y===0&&(a.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),a.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),a.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),a.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),a.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),a.fillText("Order: "+n+" of "+i,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),a.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),a.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),this.viewport.degrees!==0&&this._restoreRotationChanges(),r.getRotation(!0)%360!==0&&this._restoreRotationChanges(),r.viewport.degrees===0&&r.getRotation(!0)%360===0&&r._drawer.viewer.viewport.getFlip()&&r._drawer._flip(),a.restore()}},debugRect:function(t){if(this.useCanvas){var i=this.context;i.save(),i.lineWidth=2*e.pixelDensityRatio,i.strokeStyle=this.debugGridColor[0],i.fillStyle=this.debugGridColor[0],i.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),i.restore()}},setImageSmoothingEnabled:function(t){this.useCanvas&&(this._imageSmoothingEnabled=t,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(t){t.msImageSmoothingEnabled=this._imageSmoothingEnabled,t.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var i=this._getContext(t).canvas;return new e.Point(i.width,i.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.save(),n.translate(i.x,i.y),this.viewer.viewport.flipped?(n.rotate(Math.PI/180*-t.degrees),n.scale(-1,1)):n.rotate(Math.PI/180*t.degrees),n.translate(-i.x,-i.y)},_flip:function(t){t=t||{};var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.translate(i.x,0),n.scale(-1,1),n.translate(-i.x,0)},_restoreRotationChanges:function(t){var i=this._getContext(t);i.restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,i=this.viewport.getContainerSize();return{x:Math.round(i.x*t),y:Math.round(i.y*t)}},_calculateSketchCanvasSize:function(){var t=this._calculateCanvasSize();if(this.viewport.getRotation()===0)return t;var i=Math.ceil(Math.sqrt(t.x*t.x+t.y*t.y));return{x:i,y:i}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var i=arguments;i.length&&i[0]instanceof e.Point&&(t={containerSize:i[0],contentSize:i[1],config:i[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,i){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,i)},_setContentBounds:function(t,i){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var t=this._contentAspectRatio/this.getAspectRatio(),i;return this.homeFillsViewer?i=t>=1?t:1:i=t>=1?1:t,i/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),n=i/this.getAspectRatio();return new e.Rect(t.x-i/2,t.y-n/2,i,n)},goHome:function(t){return this.viewer&&this.viewer.raiseEvent("home",{immediately:t}),this.fitBounds(this.getHomeBounds(),t)},getMinZoom:function(){var t=this.getHomeZoom(),i=this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*t;return i},getMaxZoom:function(){var t=this.maxZoomLevel;return t||(t=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x,t/=this._contentBounds.width),Math.max(t,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert(e.type(t)==="object","[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(t){return this.getBoundsNoRotate(t).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var i=this.getCenter(t),n=1/this.getZoom(t),r=n/this.getAspectRatio();return new e.Rect(i.x-n/2,i.y-r/2,n,r)},getBoundsWithMargins:function(t){return this.getBoundsNoRotateWithMargins(t).rotate(-this.getRotation(),this.getCenter(t))},getBoundsNoRotateWithMargins:function(t){var i=this.getBoundsNoRotate(t),n=this._containerInnerSize.x*this.getZoom(t);return i.x-=this._margins.left/n,i.y-=this._margins.top/n,i.width+=(this._margins.left+this._margins.right)/n,i.height+=(this._margins.top+this._margins.bottom)/n,i},getCenter:function(t){var i=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value),r,o,a,s,f,d,g,w;return t?i:this.zoomPoint?(r=this.pixelFromPoint(this.zoomPoint,!0),o=this.getZoom(),a=1/o,s=a/this.getAspectRatio(),f=new e.Rect(i.x-a/2,i.y-s/2,a,s),d=this._pixelFromPoint(this.zoomPoint,f),g=d.minus(r),w=g.divide(this._containerInnerSize.x*o),n.plus(w)):n},getZoom:function(t){return t?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(t){return Math.max(Math.min(t,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var i=new e.Rect(t.x,t.y,t.width,t.height);if(!this.wrapHorizontal){var n=this.visibilityRatio*i.width,r=i.x+i.width,o=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,a=this._contentBoundsNoRotate.x-r+n,s=o-i.x-n;n>this._contentBoundsNoRotate.width?i.x+=(a+s)/2:s<0?i.x+=s:a>0&&(i.x+=a)}if(!this.wrapVertical){var f=this.visibilityRatio*i.height,d=i.y+i.height,g=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,w=this._contentBoundsNoRotate.y-d+f,T=g-i.y-f;f>this._contentBoundsNoRotate.height?i.y+=(w+T)/2:T<0?i.y+=T:w>0&&(i.y+=w)}return i},_raiseConstraintsEvent:function(t){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:t})},applyConstraints:function(t){var i=this.getZoom(),n=this._applyZoomConstraints(i);i!==n&&this.zoomTo(n,this.zoomPoint,t);var r=this.getBoundsNoRotate(),o=this._applyBoundaryConstraints(r);return this._raiseConstraintsEvent(t),(r.x!==o.x||r.y!==o.y||t)&&this.fitBounds(o.rotate(-this.getRotation()),t),this},ensureVisible:function(t){return this.applyConstraints(t)},_fitBounds:function(t,i){i=i||{};var n=i.immediately||!1,r=i.constraints||!1,o=this.getAspectRatio(),a=t.getCenter(),s=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=a.x-s.width/2,s.y=a.y-s.height/2;var f=1/s.width;if(r){var d=s.getAspectRatio(),g=this._applyZoomConstraints(f);f!==g&&(f=g,s.width=1/f,s.x=a.x-s.width/2,s.height=s.width/d,s.y=a.y-s.height/2),s=this._applyBoundaryConstraints(s),a=s.getCenter(),this._raiseConstraintsEvent(n)}if(n)return this.panTo(a,!0),this.zoomTo(f,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var w=this.getBounds(),T=this.getZoom();if(T===0||Math.abs(f/T-1)<1e-8)return this.zoomTo(f,!0),this.panTo(a,n);s=s.rotate(-this.getRotation());var C=s.getTopLeft().times(f).minus(w.getTopLeft().times(T)).divide(f-T);return this.zoomTo(f,C,n)},fitBounds:function(t,i){return this._fitBounds(t,{immediately:i,constraints:!1})},fitBoundsWithConstraints:function(t,i){return this._fitBounds(t,{immediately:i,constraints:!0})},fitVertically:function(t){var i=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,t)},fitHorizontally:function(t){var i=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,t)},getConstrainedBounds:function(t){var i,n;return i=this.getBounds(t),n=this._applyBoundaryConstraints(i),n},panBy:function(t,i){var n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(n.plus(t),i)},panTo:function(t,i){return i?(this.centerSpringX.resetTo(t.x),this.centerSpringY.resetTo(t.y)):(this.centerSpringX.springTo(t.x),this.centerSpringY.springTo(t.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:t,immediately:i}),this},zoomBy:function(t,i,n){return this.zoomTo(this.zoomSpring.target.value*t,i,n)},zoomTo:function(t,i,n){var r=this;return this.zoomPoint=i instanceof e.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,n?this._adjustCenterSpringsForZoomPoint(function(){r.zoomSpring.resetTo(t)}):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:i,immediately:n}),this},setRotation:function(t){return!this.viewer||!this.viewer.drawer.canRotate()?this:(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t}),this)},getRotation:function(){return this.degrees},resize:function(t,i){var n=this.getBoundsNoRotate(),r=n,o;return this.containerSize.x=t.x,this.containerSize.y=t.y,this._updateContainerInnerSize(),i&&(o=t.x/this.containerSize.x,r.width=n.width*o,r.height=r.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:t,maintain:i}),this.fitBounds(r,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var t=this;this._adjustCenterSpringsForZoomPoint(function(){t.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var i=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,i},_adjustCenterSpringsForZoomPoint:function(t){if(this.zoomPoint){var i=this.pixelFromPoint(this.zoomPoint,!0);t();var n=this.pixelFromPoint(this.zoomPoint,!0),r=n.minus(i),o=this.deltaPointsFromPixels(r,!0);this.centerSpringX.shiftBy(o.x),this.centerSpringY.shiftBy(o.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else t()},deltaPixelsFromPointsNoRotate:function(t,i){return t.times(this._containerInnerSize.x*this.getZoom(i))},deltaPixelsFromPoints:function(t,i){return this.deltaPixelsFromPointsNoRotate(t.rotate(this.getRotation()),i)},deltaPointsFromPixelsNoRotate:function(t,i){return t.divide(this._containerInnerSize.x*this.getZoom(i))},deltaPointsFromPixels:function(t,i){return this.deltaPointsFromPixelsNoRotate(t,i).rotate(-this.getRotation())},pixelFromPointNoRotate:function(t,i){return this._pixelFromPointNoRotate(t,this.getBoundsNoRotate(i))},pixelFromPoint:function(t,i){return this._pixelFromPoint(t,this.getBoundsNoRotate(i))},_pixelFromPointNoRotate:function(t,i){return t.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(t,i){return this._pixelFromPointNoRotate(t.rotate(this.getRotation(),this.getCenter(!0)),i)},pointFromPixelNoRotate:function(t,i){var n=this.getBoundsNoRotate(i);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/n.width).plus(n.getTopLeft())},pointFromPixel:function(t,i){return this.pointFromPixelNoRotate(t,i).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/n,i*this._contentSizeNoRotate.x/n)},viewportToImageCoordinates:function(t,i){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(n===1){var r=this.viewer.world.getItemAt(0);return r.viewportToImageCoordinates(t,i,!0)}}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*n,i/this._contentSizeNoRotate.x*n)},imageToViewportCoordinates:function(t,i){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(n===1){var r=this.viewer.world.getItemAt(0);return r.imageToViewportCoordinates(t,i,!0)}}var o=this._imageToViewportDelta(t,i);return o.x+=this._contentBoundsNoRotate.x,o.y+=this._contentBoundsNoRotate.y,o},imageToViewportRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(a===1){var s=this.viewer.world.getItemAt(0);return s.imageToViewportRectangle(t,i,n,r,!0)}}var f=this.imageToViewportCoordinates(o.x,o.y),d=this._imageToViewportDelta(o.width,o.height);return new e.Rect(f.x,f.y,d.x,d.y,o.degrees)},viewportToImageRectangle:function(t,i,n,r){var o=t;if(o instanceof e.Rect||(o=new e.Rect(t,i,n,r)),this.viewer){var a=this.viewer.world.getItemCount();if(a>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(a===1){var s=this.viewer.world.getItemAt(0);return s.viewportToImageRectangle(t,i,n,r,!0)}}var f=this.viewportToImageCoordinates(o.x,o.y),d=this._viewportToImageDelta(o.width,o.height);return new e.Rect(f.x,f.y,d.x,d.y,o.degrees)},viewerElementToImageCoordinates:function(t){var i=this.pointFromPixel(t,!0);return this.viewportToImageCoordinates(i)},imageToViewerElementCoordinates:function(t){var i=this.imageToViewportCoordinates(t);return this.pixelFromPoint(i,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer.");var i=this.imageToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(t){return this.pointFromPixel(t,!0)},viewportToViewerElementCoordinates:function(t){return this.pixelFromPoint(t,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer.");var i=this.viewportToViewerElementCoordinates(t);return i.plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(i===1){var n=this.viewer.world.getItemAt(0);return n.viewportToImageZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,s=o/r*a;return t*s},imageToViewportZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(i===1){var n=this.viewer.world.getItemAt(0);return n.imageToViewportZoom(t)}}var r=this._contentSizeNoRotate.x,o=this._containerInnerSize.x,a=this._contentBoundsNoRotate.width,s=r/o/a;return t*s},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(t){return this.flipped===t?this:(this.flipped=t,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:t}),this)}}}(OpenSeadragon),function(e){e.TiledImage=function(h){var y=this;e.console.assert(h.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(h.drawer,"[TiledImage] options.drawer is required"),e.console.assert(h.viewer,"[TiledImage] options.viewer is required"),e.console.assert(h.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(h.source,"[TiledImage] options.source is required"),e.console.assert(!h.clip||h.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=h.tileCache,delete h.tileCache,this._drawer=h.drawer,delete h.drawer,this._imageLoader=h.imageLoader,delete h.imageLoader,h.clip instanceof e.Rect&&(this._clip=h.clip.clone()),delete h.clip;var x=h.x||0;delete h.x;var S=h.y||0;delete h.y,this.normHeight=h.source.dimensions.y/h.source.dimensions.x,this.contentAspectX=h.source.dimensions.x/h.source.dimensions.y;var E=1;h.width?(E=h.width,delete h.width,h.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete h.height)):h.height&&(E=h.height/this.normHeight,delete h.height);var b=h.fitBounds;delete h.fitBounds;var D=h.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete h.fitBoundsPlacement;var I=h.degrees||0;delete h.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation},h),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:x,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:S,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:E,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:I,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),b&&this.fitBounds(b,D,!0),this._drawingHandler=function(k){y.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:y},k))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(h){h!==this._fullyLoaded&&(this._fullyLoaded=h,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var h=this._xSpring.update(),y=this._ySpring.update(),x=this._scaleSpring.update(),S=this._degreesSpring.update();return h||y||x||S?(this._updateForScale(),this._needsDraw=!0,!0):!1},draw:function(){this.opacity!==0||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(h){return this.getBoundsNoRotate(h).rotate(this.getRotation(h),this._getRotationPoint(h))},getBoundsNoRotate:function(h){return h?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(h){var y=this.getBoundsNoRotate(h);if(this._clip){var x=h?this._worldWidthCurrent:this._worldWidthTarget,S=x/this.source.dimensions.x,E=this._clip.times(S);y=new e.Rect(y.x+E.x,y.y+E.y,E.width,E.height)}return y.rotate(this.getRotation(h),this._getRotationPoint(h))},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(h,y,x){var S=x?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(h*(this.source.dimensions.x/S),y*(this.source.dimensions.y*this.contentAspectX/S))},viewportToImageCoordinates:function(h,y,x){var S;return h instanceof e.Point?(x=y,S=h):S=new e.Point(h,y),S=S.rotate(-this.getRotation(x),this._getRotationPoint(x)),x?this._viewportToImageDelta(S.x-this._xSpring.current.value,S.y-this._ySpring.current.value):this._viewportToImageDelta(S.x-this._xSpring.target.value,S.y-this._ySpring.target.value)},_imageToViewportDelta:function(h,y,x){var S=x?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(h/this.source.dimensions.x*S,y/this.source.dimensions.y/this.contentAspectX*S)},imageToViewportCoordinates:function(h,y,x){h instanceof e.Point&&(x=y,y=h.y,h=h.x);var S=this._imageToViewportDelta(h,y);return x?(S.x+=this._xSpring.current.value,S.y+=this._ySpring.current.value):(S.x+=this._xSpring.target.value,S.y+=this._ySpring.target.value),S.rotate(this.getRotation(x),this._getRotationPoint(x))},imageToViewportRectangle:function(h,y,x,S,E){var b=h;b instanceof e.Rect?E=y:b=new e.Rect(h,y,x,S);var D=this.imageToViewportCoordinates(b.getTopLeft(),E),I=this._imageToViewportDelta(b.width,b.height,E);return new e.Rect(D.x,D.y,I.x,I.y,b.degrees+this.getRotation(E))},viewportToImageRectangle:function(h,y,x,S,E){var b=h;h instanceof e.Rect?E=y:b=new e.Rect(h,y,x,S);var D=this.viewportToImageCoordinates(b.getTopLeft(),E),I=this._viewportToImageDelta(b.width,b.height,E);return new e.Rect(D.x,D.y,I.x,I.y,b.degrees-this.getRotation(E))},viewerElementToImageCoordinates:function(h){var y=this.viewport.pointFromPixel(h,!0);return this.viewportToImageCoordinates(y)},imageToViewerElementCoordinates:function(h){var y=this.imageToViewportCoordinates(h);return this.viewport.pixelFromPoint(y,!0)},windowToImageCoordinates:function(h){var y=h.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(y)},imageToWindowCoordinates:function(h){var y=this.imageToViewerElementCoordinates(h);return y.plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(h){var y=this._scaleSpring.current.value;return h=h.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((h.x-this._xSpring.current.value)/y,(h.y-this._ySpring.current.value)/y,h.width/y,h.height/y,h.degrees)},viewportToImageZoom:function(h){var y=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return y*h},imageToViewportZoom:function(h){var y=this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x;return h/y},setPosition:function(h,y){var x=this._xSpring.target.value===h.x&&this._ySpring.target.value===h.y;if(y){if(x&&this._xSpring.current.value===h.x&&this._ySpring.current.value===h.y)return;this._xSpring.resetTo(h.x),this._ySpring.resetTo(h.y),this._needsDraw=!0}else{if(x)return;this._xSpring.springTo(h.x),this._ySpring.springTo(h.y),this._needsDraw=!0}x||this._raiseBoundsChange()},setWidth:function(h,y){this._setScale(h,y)},setHeight:function(h,y){this._setScale(h/this.normHeight,y)},setCroppingPolygons:function(h){var y=function(S){return S instanceof e.Point||typeof S.x=="number"&&typeof S.y=="number"},x=function(S){return S.map(function(E){try{if(y(E))return{x:E.x,y:E.y};throw new Error}catch{throw new Error("A Provided cropping polygon point is not supported")}})};try{if(!e.isArray(h))throw new Error("Provided cropping polygon is not an array");this._croppingPolygons=h.map(function(S){return x(S)})}catch(S){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(S),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(h,y,x){y=y||e.Placement.CENTER;var S=e.Placement.properties[y],E=this.contentAspectX,b=0,D=0,I=1,k=1;if(this._clip&&(E=this._clip.getAspectRatio(),I=this._clip.width/this.source.dimensions.x,k=this._clip.height/this.source.dimensions.y,h.getAspectRatio()>E?(b=this._clip.x/this._clip.height*h.height,D=this._clip.y/this._clip.height*h.height):(b=this._clip.x/this._clip.width*h.width,D=this._clip.y/this._clip.width*h.width)),h.getAspectRatio()>E){var U=h.height/k,F=0;S.isHorizontallyCentered?F=(h.width-h.height*E)/2:S.isRight&&(F=h.width-h.height*E),this.setPosition(new e.Point(h.x-b+F,h.y-D),x),this.setHeight(U,x)}else{var Z=h.width/I,V=0;S.isVerticallyCentered?V=(h.height-h.width/E)/2:S.isBottom&&(V=h.height-h.width/E),this.setPosition(new e.Point(h.x-b,h.y-D+V),x),this.setWidth(Z,x)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(h){e.console.assert(!h||h instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),h instanceof e.Rect?this._clip=h.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(h){h!==this.opacity&&(this.opacity=h,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(h){this._preload=!!h,this._needsDraw=!0},getRotation:function(h){return h?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(h,y){this._degreesSpring.target.value===h&&this._degreesSpring.isAtTargetValue()||(y?this._degreesSpring.resetTo(h):this._degreesSpring.springTo(h),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(h){return this.getBoundsNoRotate(h).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(h){h!==this.compositeOperation&&(this.compositeOperation=h,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(h,y){var x=this._scaleSpring.target.value===h;if(y){if(x&&this._scaleSpring.current.value===h)return;this._scaleSpring.resetTo(h),this._updateForScale(),this._needsDraw=!0}else{if(x)return;this._scaleSpring.springTo(h),this._updateForScale(),this._needsDraw=!0}x||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var h=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),y=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,x=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(y/this.minPixelRatio)/Math.log(2))));return x=Math.max(x,this.source.minLevel||0),h=Math.min(h,x),{lowestLevel:h,highestLevel:x}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;){var h=this.lastDrawn.pop();h.beingDrawn=!1}var y=this.viewport,x=this._viewportToTiledImageRectangle(y.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var S=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(x=x.intersection(S),x===null)return}for(var E=this._getLevelsInterval(),b=E.lowestLevel,D=E.highestLevel,I=null,k=!1,U=e.now(),F=D;F>=b;F--){var Z=!1,V=y.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(F),!0).x*this._scaleSpring.current.value;if(F===b||!k&&V>=this.minPixelRatio)Z=!0,k=!0;else if(!k)continue;var te=y.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(F),!1).x*this._scaleSpring.current.value,ie=y.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,oe=this.immediateRender?1:ie,ne=Math.min(1,(V-.5)/.5),N=oe/Math.abs(oe-te);if(I=t(this,k,Z,F,ne,N,x,U,I),d(this.coverage,F))break}P(this,this.lastDrawn),I&&!I.context2D?(r(this,I,U),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(this._tilesLoading===0)},_getCornerTiles:function(h,y,x){var S,E;this.wrapHorizontal?(S=e.positiveModulo(y.x,1),E=e.positiveModulo(x.x,1)):(S=Math.max(0,y.x),E=Math.min(1,x.x));var b,D,I=1/this.source.aspectRatio;this.wrapVertical?(b=e.positiveModulo(y.y,I),D=e.positiveModulo(x.y,I)):(b=Math.max(0,y.y),D=Math.min(I,x.y));var k=this.source.getTileAtPoint(h,new e.Point(S,b)),U=this.source.getTileAtPoint(h,new e.Point(E,D)),F=this.source.getNumTiles(h);return this.wrapHorizontal&&(k.x+=F.x*Math.floor(y.x),U.x+=F.x*Math.floor(x.x)),this.wrapVertical&&(k.y+=F.y*Math.floor(y.y/I),U.y+=F.y*Math.floor(x.y/I)),{topLeft:k,bottomRight:U}}});function t(h,y,x,S,E,b,D,I,k){var U=D.getBoundingBox().getTopLeft(),F=D.getBoundingBox().getBottomRight();h.viewer&&h.viewer.raiseEvent("update-level",{tiledImage:h,havedrawn:y,level:S,opacity:E,visibility:b,drawArea:D,topleft:U,bottomright:F,currenttime:I,best:k}),T(h.coverage,S),T(h.loadingCoverage,S);for(var Z=h._getCornerTiles(S,U,F),V=Z.topLeft,te=Z.bottomRight,ie=h.source.getNumTiles(S),oe=h.viewport.pixelFromPoint(h.viewport.getCenter()),ne=V.x;ne<=te.x;ne++)for(var N=V.y;N<=te.y;N++){if(!h.wrapHorizontal&&!h.wrapVertical){var ae=h.source.getTileBounds(S,ne,N);if(D.intersection(ae)===null)continue}k=i(h,x,y,ne,N,S,E,b,oe,ie,I,k)}return k}function i(h,y,x,S,E,b,D,I,k,U,F,Z){var V=n(S,E,b,h,h.source,h.tilesMatrix,F,U,h._worldWidthCurrent,h._worldHeightCurrent),te=x;h.viewer&&h.viewer.raiseEvent("update-tile",{tiledImage:h,tile:V}),w(h.coverage,b,S,E,!1);var ie=V.loaded||V.loading||g(h.loadingCoverage,b,S,E);if(w(h.loadingCoverage,b,S,E,ie),!V.exists||(y&&!te&&(g(h.coverage,b,S,E)?w(h.coverage,b,S,E,!0):te=!0),!te))return Z;if(s(V,h.source.tileOverlap,h.viewport,k,I,h),!V.loaded)if(V.context2D)a(h,V);else{var oe=h._tileCache.getImageRecord(V.cacheKey);if(oe){var ne=oe.getImage();a(h,V,ne)}}if(V.loaded){var N=f(h,V,S,E,b,D,F);N&&(h._needsDraw=!0)}else V.loading?h._tilesLoading++:ie||(Z=C(Z,V));return Z}function n(h,y,x,S,E,b,D,I,k,U){var F,Z,V,te,ie,oe,ne,N,ae;return b[x]||(b[x]={}),b[x][h]||(b[x][h]={}),b[x][h][y]||(F=(I.x+h%I.x)%I.x,Z=(I.y+y%I.y)%I.y,V=E.getTileBounds(x,F,Z),te=E.getTileBounds(x,F,Z,!0),ie=E.tileExists(x,F,Z),oe=E.getTileUrl(x,F,Z),S.loadTilesWithAjax?(ne=E.getTileAjaxHeaders(x,F,Z),e.isPlainObject(S.ajaxHeaders)&&(ne=e.extend({},S.ajaxHeaders,ne))):ne=null,N=E.getContext2D?E.getContext2D(x,F,Z):void 0,V.x+=(h-F)/I.x,V.y+=U/k*((y-Z)/I.y),ae=new e.Tile(x,h,y,V,ie,oe,N,S.loadTilesWithAjax,ne,te),F===I.x-1&&(ae.isRightMost=!0),Z===I.y-1&&(ae.isBottomMost=!0),b[x][h][y]=ae),ae=b[x][h][y],ae.lastTouchTime=D,ae}function r(h,y,x){y.loading=!0,h._imageLoader.addJob({src:y.url,loadWithAjax:y.loadWithAjax,ajaxHeaders:y.ajaxHeaders,crossOriginPolicy:h.crossOriginPolicy,ajaxWithCredentials:h.ajaxWithCredentials,callback:function(S,E,b){o(h,y,x,S,E,b)},abort:function(){y.loading=!1}})}function o(h,y,x,S,E,b){if(!S){e.console.log("Tile %s failed to load: %s - error: %s",y,y.url,E),h.viewer.raiseEvent("tile-load-failed",{tile:y,tiledImage:h,time:x,message:E,tileRequest:b}),y.loading=!1,y.exists=!1;return}if(xh.visibility||y.visibility==h.visibility&&y.squaredDistance1&&I>h.smoothTileEdgesMinZoom&&!h.iOSDevice&&h.getRotation(!0)%360===0&&e.supportsCanvas&&(S=!0,E=x.getScaleForEdgeSmoothing(),b=x.getTranslationForEdgeSmoothing(E,h._drawer.getCanvasSize(!1),h._drawer.getCanvasSize(!0)));var k;S&&(E||(k=h.viewport.viewportToViewerElementRectangle(h.getClippedBounds(!0)).getIntegerBoundingBox(),h._drawer.viewer.viewport.getFlip()&&(h.viewport.degrees!==0||h.getRotation(!0)%360!==0)&&(k.x=h._drawer.viewer.container.clientWidth-(k.x+k.width)),k=k.times(e.pixelDensityRatio)),h._drawer._clear(!0,k)),E||(h.viewport.degrees!==0&&h._drawer._offsetForRotation({degrees:h.viewport.degrees,useSketch:S}),h.getRotation(!0)%360!==0&&h._drawer._offsetForRotation({degrees:h.getRotation(!0),point:h.viewport.pixelFromPointNoRotate(h._getRotationPoint(!0),!0),useSketch:S}),h.viewport.degrees===0&&h.getRotation(!0)%360===0&&h._drawer.viewer.viewport.getFlip()&&h._drawer._flip());var U=!1;if(h._clip){h._drawer.saveContext(S);var F=h.imageToViewportRectangle(h._clip,!0);F=F.rotate(-h.getRotation(!0),h._getRotationPoint(!0));var Z=h._drawer.viewportToDrawerRectangle(F);E&&(Z=Z.times(E)),b&&(Z=Z.translate(b)),h._drawer.setClip(Z,S),U=!0}if(h._croppingPolygons){h._drawer.saveContext(S);try{var V=h._croppingPolygons.map(function(ne){return ne.map(function(N){var ae=h.imageToViewportCoordinates(N.x,N.y,!0).rotate(-h.getRotation(!0),h._getRotationPoint(!0)),ue=h._drawer.viewportCoordToDrawerCoord(ae);return E&&(ue=ue.times(E)),ue})});h._drawer.clipWithPolygons(V,S)}catch(ne){e.console.error(ne)}U=!0}if(h.placeholderFillStyle&&h._hasOpaqueTile===!1){var te=h._drawer.viewportToDrawerRectangle(h.getBounds(!0));E&&(te=te.times(E)),b&&(te=te.translate(b));var ie=null;typeof h.placeholderFillStyle=="function"?ie=h.placeholderFillStyle(h,h._drawer.context):ie=h.placeholderFillStyle,h._drawer.drawRectangle(te,ie,S)}for(var oe=y.length-1;oe>=0;oe--)x=y[oe],h._drawer.drawTile(x,h._drawingHandler,S,E,b),x.beingDrawn=!0,h.viewer&&h.viewer.raiseEvent("tile-drawn",{tiledImage:h,tile:x});U&&h._drawer.restoreContext(S),E||(h.getRotation(!0)%360!==0&&h._drawer._restoreRotationChanges(S),h.viewport.degrees!==0&&h._drawer._restoreRotationChanges(S)),S&&(E&&(h.viewport.degrees!==0&&h._drawer._offsetForRotation({degrees:h.viewport.degrees,useSketch:!1}),h.getRotation(!0)%360!==0&&h._drawer._offsetForRotation({degrees:h.getRotation(!0),point:h.viewport.pixelFromPointNoRotate(h._getRotationPoint(!0),!0),useSketch:!1})),h._drawer.blendSketch({opacity:h.opacity,scale:E,translate:b,compositeOperation:h.compositeOperation,bounds:k}),E&&(h.getRotation(!0)%360!==0&&h._drawer._restoreRotationChanges(!1),h.viewport.degrees!==0&&h._drawer._restoreRotationChanges(!1))),E||h.viewport.degrees===0&&h.getRotation(!0)%360===0&&h._drawer.viewer.viewport.getFlip()&&h._drawer._flip(),A(h,y)}}function A(h,y){if(h.debugMode)for(var x=y.length-1;x>=0;x--){var S=y[x];try{h._drawer.drawDebugInfo(S,y.length,x,h)}catch(E){e.console.error(E)}}}}(OpenSeadragon),function(e){var t=function(n){e.console.assert(n,"[TileCache.cacheTile] options is required"),e.console.assert(n.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(n.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=n.tile,this.tiledImage=n.tiledImage},i=function(n){e.console.assert(n,"[ImageRecord] options is required"),e.console.assert(n.image,"[ImageRecord] options.image is required"),this._image=n.image,this._tiles=[]};i.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var n=document.createElement("canvas");n.width=this._image.width,n.height=this._image.height,this._renderedContext=n.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(n){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=n},addTile:function(n){e.console.assert(n,"[ImageRecord.addTile] tile is required"),this._tiles.push(n)},removeTile:function(n){for(var r=0;rthis._maxImageCacheCount){for(var s=null,f=-1,d=null,g,w,T,C,P,A,h=this._tilesLoaded.length-1;h>=0;h--)if(A=this._tilesLoaded[h],g=A.tile,!(g.level<=r||g.beingDrawn)){if(!s){s=g,f=h,d=A;continue}C=g.lastTouchTime,w=s.lastTouchTime,P=g.level,T=s.level,(CT)&&(s=g,f=h,d=A)}s&&f>=0&&(this._unloadTile(d),o=f)}this._tilesLoaded[o]=new t({tile:n.tile,tiledImage:n.tiledImage})},clearTilesFor:function(n){e.console.assert(n,"[TileCache.clearTilesFor] tiledImage is required");for(var r,o=0;o=this._items.length)throw new Error("Index bigger than number of layers.");i===n||n===-1||(this._items.splice(n,1),this._items.splice(i,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:n,newIndex:i}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var i=e.indexOf(this._items,t);i!==-1&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){this.viewer._cancelPendingImages();var t,i;for(i=0;iC.height?P=a:P=a*(C.width/C.height),A=P*(C.height/C.width),h=new e.Point(g+(a-P)/2,w+(a-A)/2),T.setPosition(h,i),T.setWidth(P,i),n==="horizontal"?g+=f:w+=f;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,n=this._contentFactor||0;if(!this._items.length)this._homeBounds=new e.Rect(0,0,1,1),this._contentSize=new e.Point(1,1),this._contentFactor=1;else{var r=this._items[0],o=r.getBounds();this._contentFactor=r.getContentSize().x/o.width;for(var a=r.getClippedBounds().getBoundingBox(),s=a.x,f=a.y,d=a.x+a.width,g=a.y+a.height,w=1;wt||o&&a&&f&&!s&&!d||n&&a&&f||!i&&f||!r)return 1;if(!n&&!o&&!d&&e=s)return f;var d=i[n];return f*(d=="desc"?-1:1)}}return e.index-t.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity=identity_1,isArray=isArray_1;function baseOrderBy$1(e,t,i){t.length?t=arrayMap(t,function(o){return isArray(o)?function(a){return baseGet(a,o.length===1?o[0]:o)}:o}):t=[identity];var n=-1;t=arrayMap(t,baseUnary(baseIteratee));var r=baseMap(e,function(o,a,s){var f=arrayMap(t,function(d){return d(o)});return{criteria:f,index:++n,value:o}});return baseSortBy(r,function(o,a){return compareMultiple(o,a,i)})}var _baseOrderBy=baseOrderBy$1,eq=eq_1,isArrayLike=isArrayLike_1,isIndex=_isIndex,isObject=isObject_1;function isIterateeCall$1(e,t,i){if(!isObject(i))return!1;var n=typeof t;return(n=="number"?isArrayLike(i)&&isIndex(t,i.length):n=="string"&&t in i)?eq(i[t],e):!1}var _isIterateeCall=isIterateeCall$1,baseFlatten$1=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest$1=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest$1(function(e,t){if(e==null)return[];var i=t.length;return i>1&&isIterateeCall(e,t[0],t[1])?t=[]:i>2&&isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),baseOrderBy(e,baseFlatten$1(t,1),[])}),sortBy_1=sortBy;const sortBy$1=getDefaultExportFromCjs(sortBy_1);var baseDifference=_baseDifference,baseFlatten=_baseFlatten,baseUniq=_baseUniq;function baseXor$1(e,t,i){var n=e.length;if(n<2)return n?baseUniq(e[0]):[];for(var r=-1,o=Array(n);++re.length)&&(t=e.length);for(var i=0,n=new Array(t);ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(e){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},_getPrototypeOf$1(e)}var AnnotationsOverlay$1=function(e){_inherits$1(i,e);var t=_createSuper$1(i);function i(n){var r;return _classCallCheck$1(this,i),r=t.call(this,n),r.ref=React.createRef(),r.osdCanvasOverlay=null,r.updateCanvas=function(){},r.onUpdateViewport=r.onUpdateViewport.bind(_assertThisInitialized$1(r)),r.onCanvasClick=r.onCanvasClick.bind(_assertThisInitialized$1(r)),r.onCanvasMouseMove=debounce(r.onCanvasMouseMove.bind(_assertThisInitialized$1(r)),10),r.onCanvasExit=r.onCanvasExit.bind(_assertThisInitialized$1(r)),r}return _createClass$1(i,[{key:"componentDidMount",value:function(){this.initializeViewer()}},{key:"componentDidUpdate",value:function(r){var o=this.props,a=o.drawAnnotations,s=o.drawSearchAnnotations,f=o.annotations,d=o.searchAnnotations,g=o.hoveredAnnotationIds,w=o.selectedAnnotationId,T=o.highlightAllAnnotations,C=o.viewer;this.initializeViewer();var P=!i.annotationsMatch(f,r.annotations),A=!i.annotationsMatch(d,r.searchAnnotations),h=xor$1(g,r.hoveredAnnotationIds).length>0;this.osdCanvasOverlay&&h&&(g.length>0?this.osdCanvasOverlay.canvasDiv.style.cursor="pointer":this.osdCanvasOverlay.canvasDiv.style.cursor="");var y=w!==r.selectedAnnotationId,x=a!==r.drawAnnotations||s!==r.drawSearchAnnotations||T!==r.highlightAllAnnotations;(A||P||y||h||x)&&(this.updateCanvas=this.canvasUpdateCallback(),C.forceRedraw())}},{key:"componentWillUnmount",value:function(){var r=this.props.viewer;r.removeHandler("canvas-click",this.onCanvasClick),r.removeHandler("canvas-exit",this.onCanvasExit),r.removeHandler("update-viewport",this.onUpdateViewport),r.removeHandler("mouse-move",this.onCanvasMouseMove)}},{key:"onCanvasClick",value:function(r){var o=this,a=this.props.canvasWorld,s=r.position,f=r.eventSource.viewport,d=f.pointFromPixel(s),g=a.canvasAtPoint(d);if(g){var w=a.canvasToWorldCoordinates(g.id),T=_slicedToArray(w,4);T[0],T[1];var C=T[2],P=T[3],A=this.annotationsAtPoint(g,d);if(A.length>0&&(r.preventDefaultAction=!0),A.length===1)this.toggleAnnotation(A[0].id);else if(A.length>0){var h=function(E){var b=Math.PI/180;return function(D){for(var I=0,k=0;k<360;k+=1){var U=Math.cos(k*b)*E+d.x,F=Math.sin(k*b)*E+d.y;o.isAnnotationAtPoint(D,g,{x:U,y:F})&&(I+=1)}return{anno:D,score:I}}},y=[],x=1;for(y=sortBy$1(A.map(h(x)),"score");x0&&f(T,h.map(function(y){return y.id}))}}},{key:"onCanvasExit",value:function(r){var o=this.props,a=o.hoverAnnotation,s=o.windowId;this.onCanvasMouseMove.cancel(),a(s,[])}},{key:"onUpdateViewport",value:function(r){this.updateCanvas()}},{key:"initializeViewer",value:function(){var r=this.props.viewer;r&&(this.osdCanvasOverlay||(this.osdCanvasOverlay=new OpenSeadragonCanvasOverlay(r,this.ref),r.addHandler("canvas-click",this.onCanvasClick),r.addHandler("canvas-exit",this.onCanvasExit),r.addHandler("update-viewport",this.onUpdateViewport),r.addHandler("mouse-move",this.onCanvasMouseMove),this.updateCanvas=this.canvasUpdateCallback()))}},{key:"canvasUpdateCallback",value:function(){var r=this;return function(){r.osdCanvasOverlay.clear(),r.osdCanvasOverlay.resize(),r.osdCanvasOverlay.canvasUpdate(r.renderAnnotations.bind(r))}}},{key:"isAnnotationAtPoint",value:function(r,o,a){var s=this.props.canvasWorld,f=s.canvasToWorldCoordinates(o.id),d=_slicedToArray(f,2),g=d[0],w=d[1],T=a.x-g,C=a.y-w;if(r.svgSelector){var P=this.osdCanvasOverlay.context2d,A=new CanvasAnnotationDisplay({resource:r}),h=A.svgPaths;return _toConsumableArray$1(h).some(function(D){return P.isPointInPath(new Path2D(D.attributes.d.nodeValue),T,C)})}if(r.fragmentSelector){var y=_slicedToArray(r.fragmentSelector,4),x=y[0],S=y[1],E=y[2],b=y[3];return x<=T&&T<=x+E&&S<=C&&C<=S+b}return!1}},{key:"annotationsAtPoint",value:function(r,o){var a=this,s=this.props,f=s.annotations,d=s.searchAnnotations,g=[].concat(_toConsumableArray$1(f),_toConsumableArray$1(d)),w=flatten(g.map(function(T){return T.resources})).filter(function(T){return r.id!==T.targetId?!1:a.isAnnotationAtPoint(T,r,o)});return w}},{key:"toggleAnnotation",value:function(r){var o=this.props,a=o.selectedAnnotationId,s=o.selectAnnotation,f=o.deselectAnnotation,d=o.windowId;a===r?f(d,r):s(d,r)}},{key:"annotationsToContext",value:function(r,o){var a=this.props,s=a.highlightAllAnnotations,f=a.hoveredAnnotationIds,d=a.selectedAnnotationId,g=a.canvasWorld,w=a.viewer,T=this.osdCanvasOverlay.context2d,C=w.viewport.getZoom(!0)/w.viewport.getMaxZoom();r.forEach(function(P){P.resources.forEach(function(A){if(g.canvasIds.includes(A.targetId)){var h=g.offsetByCanvas(A.targetId),y=new CanvasAnnotationDisplay({hovered:f.includes(A.id),offset:h,palette:_objectSpread$1(_objectSpread$1({},o),{},{default:_objectSpread$1(_objectSpread$1({},o.default),!s&&o.hidden)}),resource:A,selected:d===A.id,zoomRatio:C});y.toContext(T)}})})}},{key:"renderAnnotations",value:function(){var r=this.props,o=r.annotations,a=r.drawAnnotations,s=r.drawSearchAnnotations,f=r.searchAnnotations,d=r.palette;s&&this.annotationsToContext(f,d.search),a&&this.annotationsToContext(o,d.annotations)}},{key:"render",value:function(){var r=this.props.viewer;return r?ReactDOM.createPortal(React.createElement("div",{ref:this.ref,style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"}},React.createElement("canvas",null)),r.canvas):React.createElement(React.Fragment,null)}}],[{key:"annotationsMatch",value:function(r,o){return!r&&!o?!0:r&&!o||!r&&o?!1:r.length===0&&o.length===0?!0:r.length!==o.length?!1:r.every(function(a,s){var f=a.resources.map(function(g){return g.id}),d=o[s].resources.map(function(g){return g.id});return f.length===0&&d.length===0?!0:f.length!==d.length?!1:!!(a.id===o[s].id&&isEqual(f,d))})}}]),i}(reactExports.Component);AnnotationsOverlay$1.defaultProps={annotations:[],deselectAnnotation:function e(){},drawAnnotations:!0,drawSearchAnnotations:!0,highlightAllAnnotations:!1,hoverAnnotation:function e(){},hoveredAnnotationIds:[],palette:{},searchAnnotations:[],selectAnnotation:function e(){},selectedAnnotationId:void 0,viewer:null};var mapStateToProps$1=function e(t,i){var n=i.windowId;return{annotations:getPresentAnnotationsOnSelectedCanvases(t,{windowId:n}),canvasWorld:getCurrentCanvasWorld(t,{windowId:n}),drawAnnotations:getConfig(t).window.forceDrawAnnotations||getCompanionWindowsForContent(t,{content:"annotations",windowId:n}).length>0,drawSearchAnnotations:getConfig(t).window.forceDrawAnnotations||getCompanionWindowsForContent(t,{content:"search",windowId:n}).length>0,highlightAllAnnotations:getWindow(t,{windowId:n}).highlightAllAnnotations,hoveredAnnotationIds:getWindow(t,{windowId:n}).hoveredAnnotationIds,palette:getTheme(t).palette,searchAnnotations:getSearchAnnotationsForWindow(t,{windowId:n}),selectedAnnotationId:getSelectedAnnotationId(t,{windowId:n})}},mapDispatchToProps$1={deselectAnnotation,hoverAnnotation,selectAnnotation},enhance$1=compose(withTranslation(),connect(mapStateToProps$1,mapDispatchToProps$1),withPlugins("AnnotationsOverlay"));const AnnotationsOverlay=enhance$1(AnnotationsOverlay$1);function _construct(e,t,i){return _isNativeReflectConstruct()?_construct=Reflect.construct:_construct=function(r,o,a){var s=[null];s.push.apply(s,o);var f=Function.bind.apply(r,s),d=new f;return a&&_setPrototypeOf(d,a.prototype),d},_construct.apply(null,arguments)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(e,t)}}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},_getPrototypeOf(e)}var OpenSeadragonViewer$1=function(e){_inherits(i,e);var t=_createSuper(i);function i(n){var r;return _classCallCheck(this,i),r=t.call(this,n),r.state={viewer:void 0},r.ref=React.createRef(),r.apiRef=React.createRef(),OSDReferences.set(n.windowId,r.apiRef),r.onCanvasMouseMove=debounce(r.onCanvasMouseMove.bind(_assertThisInitialized(r)),10),r.onViewportChange=r.onViewportChange.bind(_assertThisInitialized(r)),r.zoomToWorld=r.zoomToWorld.bind(_assertThisInitialized(r)),r.osdUpdating=!1,r}return _createClass(i,[{key:"componentDidMount",value:function(){var r=this,o=this.props,a=o.osdConfig,s=o.t,f=o.windowId;if(this.ref.current){var d=new OpenSeadragon(_objectSpread({id:this.ref.current.id},a)),g=d.canvas&&d.canvas.firstElementChild;g&&(g.setAttribute("role","img"),g.setAttribute("aria-label",s("digitizedView")),g.setAttribute("aria-describedby","".concat(f,"-osd"))),this.apiRef.current=d,this.setState({viewer:d}),d.addHandler("animation-start",function(){r.osdUpdating=!0}),d.addHandler("animation-finish",this.onViewportChange),d.addHandler("animation-finish",function(){r.osdUpdating=!1}),d.innerTracker&&(d.innerTracker.moveHandler=this.onCanvasMouseMove)}}},{key:"componentDidUpdate",value:function(r,o){var a=this.props,s=a.viewerConfig,f=a.canvasWorld,d=this.state.viewer;if(this.apiRef.current=d,o.viewer===void 0){s&&(d.viewport.panTo(s,!0),d.viewport.zoomTo(s.zoom,s,!0),s.degrees!==void 0&&d.viewport.setRotation(s.degrees),s.flip!==void 0&&d.viewport.setFlip(s.flip)),this.addAllImageSources(!s);return}if(!this.infoResponsesMatch(r.infoResponses)||!this.nonTiledImagedMatch(r.nonTiledImages)){d.close();var g=!isEqual(f.canvasIds,r.canvasWorld.canvasIds);this.addAllImageSources(g||!s)}else if(!isEqual(f.layers,r.canvasWorld.layers))this.refreshTileProperties();else if(s&&!this.osdUpdating){var w=d.viewport;(s.x!==w.centerSpringX.target.value||s.y!==w.centerSpringY.target.value)&&w.panTo(s,!1),s.zoom!==w.zoomSpring.target.value&&w.zoomTo(s.zoom,s,!1),s.rotation!==w.getRotation()&&w.setRotation(s.rotation),s.flip!==w.getFlip()&&w.setFlip(s.flip)}}},{key:"componentWillUnmount",value:function(){var r=this.state.viewer;r.innerTracker&&r.innerTracker.moveHandler===this.onCanvasMouseMove&&(r.innerTracker.moveHandler=null),r.removeAllHandlers(),this.apiRef.current=void 0}},{key:"onCanvasMouseMove",value:function(r){var o=this.state.viewer;o.raiseEvent("mouse-move",r)}},{key:"onViewportChange",value:function(r){var o=this.props,a=o.updateViewport,s=o.windowId,f=r.eventSource.viewport;a(s,{flip:f.getFlip(),rotation:f.getRotation(),x:Math.round(f.centerSpringX.target.value),y:Math.round(f.centerSpringY.target.value),zoom:f.zoomSpring.target.value})}},{key:"addAllImageSources",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=this.props,s=a.nonTiledImages,f=a.infoResponses;Promise.all(f.map(function(d){return r.addTileSource(d)}),s.map(function(d){return r.addNonTiledImage(d)})).then(function(){(f[0]||s[0])&&(o&&r.zoomToWorld(),r.refreshTileProperties())})}},{key:"addNonTiledImage",value:function(r){var o=this.props.canvasWorld,a=this.state.viewer,s=r.getProperty("type"),f=r.getProperty("format")||"";return s==="Image"||s==="dctypes:Image"||f.startsWith("image/")?new Promise(function(d,g){a||g(),a.addSimpleImage({error:function(T){return g(T)},fitBounds:_construct(OpenSeadragon.Rect,_toConsumableArray(o.contentResourceToWorldCoordinates(r))),index:o.layerIndexOfImageResource(r),opacity:o.layerOpacityOfImageResource(r),success:function(T){return d(T)},url:r.id})}):Promise.resolve()}},{key:"addTileSource",value:function(r){var o=this.props.canvasWorld,a=this.state.viewer;return new Promise(function(s,f){a||f();var d=_objectSpread({},r.json),g=o.contentResource(r.id);g&&a.addTiledImage({error:function(T){return f(T)},fitBounds:_construct(OpenSeadragon.Rect,_toConsumableArray(o.contentResourceToWorldCoordinates(g))),index:o.layerIndexOfImageResource(g),opacity:o.layerOpacityOfImageResource(g),success:function(T){return s(T)},tileSource:d})})}},{key:"refreshTileProperties",value:function(){for(var r=this.props.canvasWorld,o=this.state.viewer.world,a=[],s=0;s4&&arguments[4]!==void 0?arguments[4]:!0,d=this.state.viewer;d.viewport.fitBounds(new OpenSeadragon.Rect(r,o,a,s),f)}},{key:"infoResponsesMatch",value:function(r){var o=this.props.infoResponses;return o.length===0&&r.length===0?!0:o.length!==r.length?!1:o.every(function(a,s){return!r[s]||!a.json||!r[s].json||a.tokenServiceId!==r[s].tokenServiceId?!1:!!(a.json["@id"]&&a.json["@id"]===r[s].json["@id"]||a.json.id&&a.json.id===r[s].json.id)})}},{key:"nonTiledImagedMatch",value:function(r){var o=this.props.nonTiledImages;return o.length===0&&r.length===0?!0:o.some(function(a,s){return r[s]?a.id===r[s].id:!1})}},{key:"zoomToWorld",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=this.props.canvasWorld;this.fitBounds.apply(this,_toConsumableArray(o.worldBounds()).concat([r]))}},{key:"render",value:function(){var r=this,o=this.props,a=o.children,s=o.classes,f=o.label,d=o.t,g=o.windowId,w=o.drawAnnotations,T=this.state.viewer,C=React.Children.map(a,function(P){return React.cloneElement(P,{zoomToWorld:r.zoomToWorld})});return React.createElement(React.Fragment,null,React.createElement("section",{className:classNames(ns("osd-container"),s.osdContainer),id:"".concat(g,"-osd"),ref:this.ref,"aria-label":d("item",{label:f}),"aria-live":"polite"},w&&React.createElement(AnnotationsOverlay,{viewer:T,windowId:g}),C,React.createElement(PluginHook,Object.assign({viewer:T},_objectSpread(_objectSpread({},this.props),{},{children:null})))))}}]),i}(reactExports.Component);OpenSeadragonViewer$1.defaultProps={children:null,drawAnnotations:!1,infoResponses:[],label:null,nonTiledImages:[],osdConfig:{},viewerConfig:null};var mapStateToProps=function e(t,i){var n=i.windowId,r=getCurrentCanvasWorld(t,{windowId:n}),o=selectInfoResponses(t),a=flatten(r.canvases.map(function(s){return s.imageServiceIds}));return{canvasWorld:r,drawAnnotations:getConfig(t).window.forceDrawAnnotations||getCompanionWindowsForContent(t,{content:"annotations",windowId:n}).length>0||getCompanionWindowsForContent(t,{content:"search",windowId:n}).length>0,infoResponses:a.map(function(s){return o[s]}).filter(function(s){return s!==void 0&&s.isFetching===!1&&s.error===void 0}),label:getCanvasLabel(t,{canvasId:(getCurrentCanvas(t,{windowId:n})||{}).id,windowId:n}),nonTiledImages:getVisibleCanvasNonTiledResources(t,{windowId:n}),osdConfig:getConfig(t).osdConfig,viewerConfig:getViewer(t,{windowId:n})}},mapDispatchToProps={updateViewport},styles={osdContainer:{flex:1,position:"relative"}},enhance=compose(withStyles(styles),withTranslation(),connect(mapStateToProps,mapDispatchToProps),withPlugins("OpenSeadragonViewer"));const OpenSeadragonViewer=enhance(OpenSeadragonViewer$1);export{OpenSeadragonViewer as default}; diff --git a/assets/SelectCollection-1cd7a2d7.js b/assets/SelectCollection-1cd7a2d7.js new file mode 100644 index 0000000..5088265 --- /dev/null +++ b/assets/SelectCollection-1cd7a2d7.js @@ -0,0 +1 @@ +import{r as h,aa as _,ab as g,ac as b,a2 as a,s as P,a3 as I,a4 as O,a5 as S,a6 as C,w as R,a7 as z,b9 as E,bz as D}from"./index-20109f1f.js";import{G as s}from"./WorkspaceArea-e4600548.js";var f={},H=g,j=b;Object.defineProperty(f,"__esModule",{value:!0});var v=f.default=void 0,T=j(h),x=H(_()),k=(0,x.default)(T.createElement("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"}),"ListSharp");v=f.default=k;function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(t)}var m=function(t){V(o,t);var e=B(o);function o(r){var n;return q(this,o),n=e.call(this,r),n.openCollectionDialog=n.openCollectionDialog.bind(d(n)),n}return M(o,[{key:"openCollectionDialog",value:function(){var n=this.props,i=n.collectionPath,l=n.manifestId,y=n.showCollectionDialog,w=n.windowId;y(l,i.slice(0,-1),w)}},{key:"render",value:function(){var n=this.props.t;return a.createElement(s,{container:!0,justify:"center",alignItems:"center"},a.createElement(s,{container:!0,direction:"column",alignItems:"center"},a.createElement(P,{variant:"h4",paragraph:!0},a.createElement("em",null,n("noItemSelected"))),a.createElement(I,{color:"primary",variant:"contained",onClick:this.openCollectionDialog,startIcon:a.createElement(v,null)},n("showCollection"))))}}]),o}(h.Component);m.defaultProps={collectionPath:[],manifestId:null,t:function(){},windowId:null};var G=function(e,o){var r=o.windowId,n=E(e,{windowId:r})||{},i=n.collectionPath,l=n.manifestId;return{collectionPath:i,manifestId:l}},L={showCollectionDialog:D},N=function(e){return{}},A=O(z(),R(N),C(G,L),S("SelectCollection"));const K=A(m);export{K as default}; diff --git a/assets/VideoViewer-6e91373b.js b/assets/VideoViewer-6e91373b.js new file mode 100644 index 0000000..60c973b --- /dev/null +++ b/assets/VideoViewer-6e91373b.js @@ -0,0 +1 @@ +import{a2 as a,r as s,a4 as h,a5 as m,a6 as w,w as g,a7 as _,cN as b,au as O,bF as R}from"./index-20109f1f.js";function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},c(t)}var d=function(t){V(n,t);var e=j(n);function n(){return P(this,n),e.apply(this,arguments)}return E(n,[{key:"render",value:function(){var o=this.props,u=o.captions,l=o.classes,y=o.videoOptions,v=o.videoResources;return a.createElement("div",{className:l.container},a.createElement("video",Object.assign({className:l.video},y),v.map(function(i){return a.createElement(s.Fragment,{key:i.id},a.createElement("source",{src:i.id,type:i.getFormat()}))}),u.map(function(i){return a.createElement(s.Fragment,{key:i.id},a.createElement("track",{src:i.id,label:i.getDefaultLabel(),srcLang:i.getProperty("language")}))})))}}]),n}(s.Component);d.defaultProps={captions:[],videoOptions:{},videoResources:[]};var k=function(e,n){var r=n.windowId;return{captions:b(e,{windowId:r})||[],videoOptions:O(e).videoOptions,videoResources:R(e,{windowId:r})||[]}},x=function(){return{container:{alignItems:"center",display:"flex",width:"100%"},video:{maxHeight:"100%",width:"100%"}}},N=h(_(),g(x),w(k,null),m("VideoViewer"));const C=N(d);export{C as default}; diff --git a/assets/WindowViewer-d9f1a515.js b/assets/WindowViewer-d9f1a515.js new file mode 100644 index 0000000..bb151b7 --- /dev/null +++ b/assets/WindowViewer-d9f1a515.js @@ -0,0 +1 @@ +import{r as s,aa as j,ab as T,ac as z,a2 as a,aq as re,ai as h,a4 as w,a5 as y,a6 as C,w as P,a7 as D,aB as oe,bk as ae,cZ as ie,aC as V,aw as f,s as $,b7 as ue,c_ as ce,cQ as se,c$ as le,d0 as fe,d1 as ve,cY as de,d2 as pe,d3 as he,P as we,ay as ye,d4 as me,af as _e,bI as be,bD as ge}from"./index-20109f1f.js";var Z={},Oe=T,Ce=z;Object.defineProperty(Z,"__esModule",{value:!0});var Y=Z.default=void 0,Pe=Ce(s),$e=Oe(j()),Ie=(0,$e.default)(Pe.createElement("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"AddCircleOutlineSharp");Y=Z.default=Ie;var W={},Ee=T,Re=z;Object.defineProperty(W,"__esModule",{value:!0});var J=W.default=void 0,Se=Re(s),ke=Ee(j()),Ne=(0,ke.default)(Se.createElement("path",{d:"M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"RemoveCircleOutlineSharp");J=W.default=Ne;function xe(t){return a.createElement(re,t,a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},a.createElement("path",{d:"M6,15H9v3h2V13H6Zm9-6V6H13v5h5V9Z"}),a.createElement("path",{d:"M12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8,8,8,0,0,1-8,8Z"})))}function je(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},m(t)}var K=function(t){ze(n,t);var e=De(n);function n(r){var o;return je(this,n),o=e.call(this,r),o.handleZoomInClick=o.handleZoomInClick.bind(E(o)),o.handleZoomOutClick=o.handleZoomOutClick.bind(E(o)),o}return Te(n,[{key:"handleZoomInClick",value:function(){var o=this.props,i=o.windowId,c=o.updateViewport,u=o.viewer;c(i,{zoom:u.zoom*2})}},{key:"handleZoomOutClick",value:function(){var o=this.props,i=o.windowId,c=o.updateViewport,u=o.viewer;c(i,{zoom:u.zoom/2})}},{key:"render",value:function(){var o=this.props,i=o.displayDivider,c=o.showZoomControls,u=o.classes,l=o.t,v=o.zoomToWorld;return c?a.createElement("div",{className:u.zoom_controls},a.createElement(h,{"aria-label":l("zoomIn"),onClick:this.handleZoomInClick},a.createElement(Y,null)),a.createElement(h,{"aria-label":l("zoomOut"),onClick:this.handleZoomOutClick},a.createElement(J,null)),a.createElement(h,{"aria-label":l("zoomReset"),onClick:function(){return v(!1)}},a.createElement(xe,null)),i&&a.createElement("span",{className:u.divider})):a.createElement(a.Fragment,null)}}]),n}(s.Component);K.defaultProps={displayDivider:!0,showZoomControls:!1,t:function(e){return e},updateViewport:function(){},viewer:{},windowId:""};var We=function(e,n){var r=n.windowId;return{showZoomControls:oe(e),viewer:ae(e,{windowId:r})}},Be={updateViewport:ie},qe=function(e){return{divider:{borderRight:"1px solid #808080",display:"inline-block",height:"24px",margin:"12px 6px"},ListItem:{paddingBottom:0,paddingTop:0},zoom_controls:{display:"flex",flexDirection:"row",justifyContent:"center"}}},Me=w(D(),P(qe),C(We,Be),y("ZoomControls"));const Ae=Me(K);function Le(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function L(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_(t)}var U=function(t){Fe(n,t);var e=Ge(n);function n(){return Le(this,n),e.apply(this,arguments)}return He(n,[{key:"render",value:function(){var o=this.props,i=o.canvasCount,c=o.canvasIndex,u=o.canvasLabel,l=o.classes,v=o.t;return a.createElement("div",{className:V(f("osd-info"),l.osdInfo)},a.createElement($,{display:"inline",variant:"caption",className:f("canvas-count")},v("pagination",{current:c+1,total:i})),a.createElement($,{display:"inline",variant:"caption",className:f("canvas-label")},u&&" • ".concat(u)))}}]),n}(s.Component);U.defaultProps={canvasLabel:void 0,t:function(){}};var Ke=function(e,n){var r=n.windowId,o=ue(e,{windowId:r}),i=ce(e,{windowId:r}),c=(se(e,{windowId:r})||{}).id;return{canvasCount:o.length,canvasIndex:i,canvasLabel:le(e,{canvasId:c,windowId:r})}},Ue={osdInfo:{order:2,overflow:"hidden",paddingBottom:3,textOverflow:"ellipsis",unicodeBidi:"plaintext",whiteSpace:"nowrap",width:"100%"}},Xe=w(P(Ue),D(),C(Ke,null),y("ViewerInfo"));const H=Xe(U);var B={},et=T,tt=z;Object.defineProperty(B,"__esModule",{value:!0});var S=B.default=void 0,nt=tt(s),rt=et(j()),ot=(0,rt.default)(nt.createElement("path",{d:"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"PlayCircleOutlineSharp");S=B.default=ot;function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},b(t)}var X=function(t){ut(n,t);var e=ct(n);function n(){return at(this,n),e.apply(this,arguments)}return it(n,[{key:"render",value:function(){var o=this.props,i=o.hasNextCanvas,c=o.hasPreviousCanvas,u=o.setNextCanvas,l=o.setPreviousCanvas,v=o.t,q=o.classes,te=o.viewingDirection,M="ltr",d={},p={};switch(te){case"top-to-bottom":d={transform:"rotate(270deg)"},p={transform:"rotate(90deg)"};break;case"bottom-to-top":d={transform:"rotate(90deg)"},p={transform:"rotate(270deg)"};break;case"right-to-left":M="rtl",d={},p={transform:"rotate(180deg)"};break;default:d={transform:"rotate(180deg)"},p={}}return a.createElement("div",{className:V(f("osd-navigation"),q.osdNavigation),dir:M},a.createElement(h,{"aria-label":v("previousCanvas"),className:f("previous-canvas-button"),disabled:!c,onClick:function(){c&&l()}},a.createElement(S,{style:d})),a.createElement(h,{"aria-label":v("nextCanvas"),className:f("next-canvas-button"),disabled:!i,onClick:function(){i&&u()}},a.createElement(S,{style:p})))}}]),n}(s.Component);X.defaultProps={hasNextCanvas:!1,hasPreviousCanvas:!1,setNextCanvas:function(){},setPreviousCanvas:function(){},viewingDirection:""};var vt=function(e,n){var r=n.windowId;return{hasNextCanvas:!!fe(e,{windowId:r}),hasPreviousCanvas:!!ve(e,{windowId:r}),viewingDirection:de(e,{windowId:r})}},dt=function(e,n){var r=n.windowId;return{setNextCanvas:function(){return e(pe(r))},setPreviousCanvas:function(){return e(he(r))}}},pt={osdNavigation:{order:1}},ht=w(P(pt),D(),C(vt,dt),y("ViewerNavigation"));const wt=ht(X);function yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},g(t)}var ee=function(t){_t(n,t);var e=bt(n);function n(){return yt(this,n),e.apply(this,arguments)}return mt(n,[{key:"canvasNavControlsAreStacked",value:function(){var o=this.props.size;return o&&o.width&&o.width<=253}},{key:"render",value:function(){var o=this.props,i=o.classes,c=o.visible,u=o.windowId,l=o.zoomToWorld;return c?a.createElement(we,{square:!0,className:V(i.controls,f("canvas-nav"),i.canvasNav,this.canvasNavControlsAreStacked()?f("canvas-nav-stacked"):null,this.canvasNavControlsAreStacked()?i.canvasNavStacked:null),elevation:0},a.createElement(Ae,{displayDivider:!this.canvasNavControlsAreStacked(),windowId:u,zoomToWorld:l}),a.createElement(wt,{windowId:u}),a.createElement(H,{windowId:u}),a.createElement(ye,this.props)):a.createElement($,{variant:"srOnly",component:"div"},a.createElement(H,{windowId:u}))}}]),n}(s.Component);ee.defaultProps={classes:{},visible:!0};var Pt=function(e,n){var r=n.windowId;return{visible:_e(e).focusedWindowId===r}},$t=function(e){return{canvasNav:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",textAlign:"center"},canvasNavStacked:{flexDirection:"column"},controls:{backgroundColor:be(e.palette.background.paper,.5),bottom:0,position:"absolute",width:"100%",zIndex:50}}},It=w(C(Pt),P($t),me.withSize(),y("WindowCanvasNavigationControls"));const Et=It(ee);function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},O(t)}var zt=s.lazy(function(){return ge(()=>import("./OpenSeadragonViewer-ae031a02.js"),["assets/OpenSeadragonViewer-ae031a02.js","assets/index-20109f1f.js","assets/index-de385847.css","assets/WorkspaceArea-e4600548.js"])}),Dt=function(t){kt(n,t);var e=Nt(n);function n(r){var o;return Rt(this,n),o=e.call(this,r),o.state={},o}return St(n,[{key:"render",value:function(){var o=this.props.windowId,i=this.state.hasError;return i?a.createElement(a.Fragment,null):a.createElement(s.Suspense,{fallback:a.createElement("div",null)},a.createElement(zt,{windowId:o},a.createElement(Et,{windowId:o})))}}],[{key:"getDerivedStateFromError",value:function(o){return{hasError:!0}}}]),n}(s.Component),Vt=w(y("WindowViewer"));const Wt=Vt(Dt);export{Wt as default}; diff --git a/assets/WorkspaceArea-e4600548.js b/assets/WorkspaceArea-e4600548.js new file mode 100644 index 0000000..017b0aa --- /dev/null +++ b/assets/WorkspaceArea-e4600548.js @@ -0,0 +1,19 @@ +import{_ as sf,a as ff,b as df,c as pf,r as d,w as D,d as Q,u as hf,e as fl,P as se,f as I,g as U,C as dl,B as ta,I as zn,h as pe,i as Ee,j as Hn,k as tt,T as pl,l as hl,m as jt,n as vl,o as $r,p as ir,q as de,M as ml,s as B,t as vf,v as mf,x as gf,y as gl,z as na,A as yf,D as ii,G as bf,E as wf,F as Ue,H as Z,J as ke,K as Vn,L as ra,N as _f,O as Of,Q as Ef,R as $f,S as Pf,U as Cf,V as kf,W as Sf,X as Tf,Y as Rf,Z as If,$ as xf,a0 as Df,a1 as Mf,a2 as i,a3 as le,a4 as j,a5 as W,a6 as A,a7 as L,a8 as jf,a9 as Wf,aa as G,ab as K,ac as J,ad as yl,ae as oa,af as me,ag as at,ah as aa,ai as ue,aj as Bf,ak as Nf,al as re,am as nt,an as Fn,ao as Af,ap as bl,aq as ge,ar as Wt,as as Lf,at as ia,au as je,av as wl,aw as V,ax as it,ay as he,az as zf,aA as Ge,aB as Hf,aC as ee,aD as _l,aE as Vf,aF as Ol,aG as Ff,aH as qf,aI as qn,aJ as ca,aK as Uf,aL as Un,aM as S,aN as Zf,aO as la,aP as El,aQ as Gf,aR as Kf,aS as $l,aT as Jf,aU as fe,aV as Pr,aW as rt,aX as Zn,aY as Pl,aZ as Xf,a_ as Yf,a$ as Cl,b0 as Qf,b1 as ed,b2 as cr,b3 as td,b4 as nd,b5 as rd,b6 as od,b7 as Cr,b8 as ad,b9 as Oe,ba as id,bb as ci,bc as cd,bd as kl,be as Gn,bf as kr,bg as Sr,bh as ld,bi as Sl,bj as Bt,bk as ud,bl as sd,bm as fd,bn as dd,bo as pd,bp as hd,bq as li,br as vd,bs as md,bt as gd,bu as yd,bv as bd,bw as ui,bx as ua,by as wd,bz as _d,bA as Od,bB as Nt,bC as Tl,bD as ct,bE as Ed,bF as $d,bG as Pd,bH as mt,bI as Cd,bJ as kd,bK as gt,bL as Sd,bM as Td,bN as Rd,bO as Id,bP as xd,bQ as Dd,bR as Md,bS as jd,bT as Wd,bU as Bd,bV as Nd,bW as Ad,bX as Ld,bY as zd,bZ as Hd,b_ as Vd,b$ as Fd,c0 as Rl,c1 as qd,c2 as Ud,c3 as Zd,c4 as Gd,c5 as Kd,c6 as Jd,c7 as ye,c8 as Xd,c9 as Yd,ca as Qd,cb as sa,cc as Il,cd as fa,ce as da,cf as pa,cg as ep,ch as tp,ci as np,cj as rp,ck as op,cl as xl,cm as ap,cn as ip,co as cp,cp as lp,cq as up,cr as Dl,cs as sp,ct as Ml,cu as jl,cv as fp,cw as dp,cx as pp,cy as hp,cz as vp,cA as lr,cB as mp,cC as Wl,cD as gp,cE as Bl,cF as si,cG as fi,cH as yp,cI as bp,cJ as wp,cK as _p,cL as Op,cM as Ep}from"./index-20109f1f.js";function $p(t){return sf(t)||ff(t)||df(t)||pf()}var Pp=d.createContext({});const Nl=Pp;var Cp=function(e){var n={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],n),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],n)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}},kp=d.forwardRef(function(e,n){var r=e.children,o=e.classes,a=e.className,c=e.defaultExpanded,l=c===void 0?!1:c,u=e.disabled,s=u===void 0?!1:u,f=e.expanded,p=e.onChange,h=e.square,v=h===void 0?!1:h,m=e.TransitionComponent,b=m===void 0?dl:m,_=e.TransitionProps,E=Q(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),g=hf({controlled:f,default:l,name:"Accordion",state:"expanded"}),$=fl(g,2),R=$[0],z=$[1],X=d.useCallback(function(k){z(!R),p&&p(k,!R)},[R,p,z]),w=d.Children.toArray(r),y=$p(w),P=y[0],C=y.slice(1),O=d.useMemo(function(){return{expanded:R,disabled:s,toggle:X}},[R,s,X]);return d.createElement(se,I({className:U(o.root,a,R&&o.expanded,s&&o.disabled,!v&&o.rounded),ref:n,square:v},E),d.createElement(Nl.Provider,{value:O},P),d.createElement(b,I({in:R,timeout:"auto"},_),d.createElement("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region"},C)))});const Al=D(Cp,{name:"MuiAccordion"})(kp);var Sp=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}},Tp=d.forwardRef(function(e,n){var r=e.classes,o=e.className,a=Q(e,["classes","className"]);return d.createElement("div",I({className:U(r.root,o),ref:n},a))});const Ll=D(Sp,{name:"MuiAccordionDetails"})(Tp);var Rp=function(e){var n={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:8*6,transition:e.transitions.create(["min-height","background-color"],n),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused, &$focusVisible":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},focusVisible:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],n),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",n),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}},Ip=d.forwardRef(function(e,n){var r=e.children,o=e.classes,a=e.className,c=e.expandIcon,l=e.focusVisibleClassName,u=e.IconButtonProps,s=u===void 0?{}:u,f=e.onClick,p=Q(e,["children","classes","className","expandIcon","focusVisibleClassName","IconButtonProps","onClick"]),h=d.useContext(Nl),v=h.disabled,m=v===void 0?!1:v,b=h.expanded,_=h.toggle,E=function($){_&&_($),f&&f($)};return d.createElement(ta,I({focusRipple:!1,disableRipple:!0,disabled:m,component:"div","aria-expanded":b,className:U(o.root,a,m&&o.disabled,b&&o.expanded),focusVisibleClassName:U(o.focusVisible,o.focused,l),onClick:E,ref:n},p),d.createElement("div",{className:U(o.content,b&&o.expanded)},r),c&&d.createElement(zn,I({className:U(o.expandIcon,b&&o.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},s),c))});const zl=D(Rp,{name:"MuiAccordionSummary"})(Ip);var xp=function(e){var n=e.palette.type==="light"?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:n,color:e.palette.getContrastText(n)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}},Dp=d.forwardRef(function(e,n){var r=e.classes,o=e.className,a=e.color,c=a===void 0?"primary":a,l=e.position,u=l===void 0?"fixed":l,s=Q(e,["classes","className","color","position"]);return d.createElement(se,I({square:!0,component:"header",elevation:4,className:U(r.root,r["position".concat(pe(u))],r["color".concat(pe(c))],o,u==="fixed"&&"mui-fixed"),ref:n},s))});const Kn=D(xp,{name:"MuiAppBar"})(Dp);var Mp={entering:{opacity:1},entered:{opacity:1}},jp={enter:Ee.enteringScreen,exit:Ee.leavingScreen},Wp=d.forwardRef(function(e,n){var r=e.children,o=e.disableStrictModeCompat,a=o===void 0?!1:o,c=e.in,l=e.onEnter,u=e.onEntered,s=e.onEntering,f=e.onExit,p=e.onExited,h=e.onExiting,v=e.style,m=e.TransitionComponent,b=m===void 0?pl:m,_=e.timeout,E=_===void 0?jp:_,g=Q(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),$=Hn(),R=$.unstable_strictMode&&!a,z=d.useRef(null),X=tt(r.ref,n),w=tt(R?z:void 0,X),y=function(x){return function(N,Y){if(x){var oe=R?[z.current,N]:[N,Y],ae=fl(oe,2),ve=ae[0],be=ae[1];be===void 0?x(ve):x(ve,be)}}},P=y(s),C=y(function(M,x){hl(M);var N=jt({style:v,timeout:E},{mode:"enter"});M.style.webkitTransition=$.transitions.create("opacity",N),M.style.transition=$.transitions.create("opacity",N),l&&l(M,x)}),O=y(u),k=y(h),T=y(function(M){var x=jt({style:v,timeout:E},{mode:"exit"});M.style.webkitTransition=$.transitions.create("opacity",x),M.style.transition=$.transitions.create("opacity",x),f&&f(M)}),H=y(p);return d.createElement(b,I({appear:!0,in:c,nodeRef:R?z:void 0,onEnter:C,onEntered:O,onEntering:P,onExit:T,onExited:H,onExiting:k,timeout:E},g),function(M,x){return d.cloneElement(r,I({style:I({opacity:0,visibility:M==="exited"&&!c?"hidden":void 0},Mp[M],v,r.props.style),ref:w},x))})});const Hl=Wp;var Bp={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Np=d.forwardRef(function(e,n){var r=e.children,o=e.classes,a=e.className,c=e.invisible,l=c===void 0?!1:c,u=e.open,s=e.transitionDuration,f=e.TransitionComponent,p=f===void 0?Hl:f,h=Q(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return d.createElement(p,I({in:u,timeout:s},h),d.createElement("div",{className:U(o.root,a,l&&o.invisible),"aria-hidden":!0,ref:n},r))});const ha=D(Bp,{name:"MuiBackdrop"})(Np);var Ap={root:{overflow:"hidden"}},Lp=d.forwardRef(function(e,n){var r=e.classes,o=e.className,a=e.raised,c=a===void 0?!1:a,l=Q(e,["classes","className","raised"]);return d.createElement(se,I({className:U(r.root,o),elevation:c?8:1,ref:n},l))});const di=D(Ap,{name:"MuiCard"})(Lp);var zp={root:{padding:16,"&:last-child":{paddingBottom:24}}},Hp=d.forwardRef(function(e,n){var r=e.classes,o=e.className,a=e.component,c=a===void 0?"div":a,l=Q(e,["classes","className","component"]);return d.createElement(c,I({className:U(r.root,o),ref:n},l))});const pi=D(zp,{name:"MuiCardContent"})(Hp);function hi(t){return t.substring(2).toLowerCase()}function Vp(t){return document.documentElement.clientWidth-1;else{var z=ir(f.current);R=!z.documentElement.contains(g.target)||f.current.contains(g.target)}!R&&(r||!$)&&c(g)}}),_=function($){return function(R){h.current=!0;var z=e.props[$];z&&z(R)}},E={ref:m};return u!==!1&&(E[u]=_(u)),d.useEffect(function(){if(u!==!1){var g=hi(u),$=ir(f.current),R=function(){s.current=!0};return $.addEventListener(g,b),$.addEventListener("touchmove",R),function(){$.removeEventListener(g,b),$.removeEventListener("touchmove",R)}}},[b,u]),a!==!1&&(E[a]=_(a)),d.useEffect(function(){if(a!==!1){var g=hi(a),$=ir(f.current);return $.addEventListener(g,b),function(){$.removeEventListener(g,b)}}},[b,a]),d.createElement(d.Fragment,null,d.cloneElement(e,E))}var qp=function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":de({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":de({},e.breakpoints.down(e.breakpoints.values.sm+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":de({},e.breakpoints.down(e.breakpoints.values.md+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":de({},e.breakpoints.down(e.breakpoints.values.lg+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":de({},e.breakpoints.down(e.breakpoints.values.xl+32*2),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}},Up={enter:Ee.enteringScreen,exit:Ee.leavingScreen},Zp=d.forwardRef(function(e,n){var r=e.BackdropProps,o=e.children,a=e.classes,c=e.className,l=e.disableBackdropClick,u=l===void 0?!1:l,s=e.disableEscapeKeyDown,f=s===void 0?!1:s,p=e.fullScreen,h=p===void 0?!1:p,v=e.fullWidth,m=v===void 0?!1:v,b=e.maxWidth,_=b===void 0?"sm":b,E=e.onBackdropClick,g=e.onClose,$=e.onEnter,R=e.onEntered,z=e.onEntering,X=e.onEscapeKeyDown,w=e.onExit,y=e.onExited,P=e.onExiting,C=e.open,O=e.PaperComponent,k=O===void 0?se:O,T=e.PaperProps,H=T===void 0?{}:T,M=e.scroll,x=M===void 0?"paper":M,N=e.TransitionComponent,Y=N===void 0?Hl:N,oe=e.transitionDuration,ae=oe===void 0?Up:oe,ve=e.TransitionProps,be=e["aria-describedby"],$e=e["aria-labelledby"],xe=Q(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),we=d.useRef(),He=function(Pe){we.current=Pe.target},Je=function(Pe){Pe.target===Pe.currentTarget&&Pe.target===we.current&&(we.current=null,E&&E(Pe),!u&&g&&g(Pe,"backdropClick"))};return d.createElement(ml,I({className:U(a.root,c),BackdropComponent:ha,BackdropProps:I({transitionDuration:ae},r),closeAfterTransition:!0},u?{disableBackdropClick:u}:{},{disableEscapeKeyDown:f,onEscapeKeyDown:X,onClose:g,open:C,ref:n},xe),d.createElement(Y,I({appear:!0,in:C,timeout:ae,onEnter:$,onEntering:z,onEntered:R,onExit:w,onExiting:P,onExited:y,role:"none presentation"},ve),d.createElement("div",{className:U(a.container,a["scroll".concat(pe(x))]),onMouseUp:Je,onMouseDown:He},d.createElement(k,I({elevation:24,role:"dialog","aria-describedby":be,"aria-labelledby":$e},H,{className:U(a.paper,a["paperScroll".concat(pe(x))],a["paperWidth".concat(pe(String(_)))],H.className,h&&a.paperFullScreen,m&&a.paperFullWidth)}),o))))});const We=D(qp,{name:"MuiDialog"})(Zp);var Gp={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},Kp=d.forwardRef(function(e,n){var r=e.disableSpacing,o=r===void 0?!1:r,a=e.classes,c=e.className,l=Q(e,["disableSpacing","classes","className"]);return d.createElement("div",I({className:U(a.root,c,!o&&a.spacing),ref:n},l))});const lt=D(Gp,{name:"MuiDialogActions"})(Kp);var Jp=function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}},Xp=d.forwardRef(function(e,n){var r=e.classes,o=e.className,a=e.dividers,c=a===void 0?!1:a,l=Q(e,["classes","className","dividers"]);return d.createElement("div",I({className:U(r.root,o,c&&r.dividers),ref:n},l))});const Jn=D(Jp,{name:"MuiDialogContent"})(Xp);var Yp={root:{marginBottom:12}},Qp=d.forwardRef(function(e,n){return d.createElement(B,I({component:"p",variant:"body1",color:"textSecondary",ref:n},e))});const eh=D(Yp,{name:"MuiDialogContentText"})(Qp);var th={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},nh=d.forwardRef(function(e,n){var r=e.children,o=e.classes,a=e.className,c=e.disableTypography,l=c===void 0?!1:c,u=Q(e,["children","classes","className","disableTypography"]);return d.createElement("div",I({className:U(o.root,a),ref:n},u),l?r:d.createElement(B,{component:"h2",variant:"h6"},r))});const Be=D(th,{name:"MuiDialogTitle"})(nh);function rh(t,e){var n=e.getBoundingClientRect(),r;if(e.fakeTransform)r=e.fakeTransform;else{var o=window.getComputedStyle(e);r=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,c=0;if(r&&r!=="none"&&typeof r=="string"){var l=r.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),c=parseInt(l[5],10)}return t==="left"?"translateX(".concat(window.innerWidth,"px) translateX(").concat(a-n.left,"px)"):t==="right"?"translateX(-".concat(n.left+n.width-a,"px)"):t==="up"?"translateY(".concat(window.innerHeight,"px) translateY(").concat(c-n.top,"px)"):"translateY(-".concat(n.top+n.height-c,"px)")}function yt(t,e){var n=rh(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}var oh={enter:Ee.enteringScreen,exit:Ee.leavingScreen},ah=d.forwardRef(function(e,n){var r=e.children,o=e.direction,a=o===void 0?"down":o,c=e.in,l=e.onEnter,u=e.onEntered,s=e.onEntering,f=e.onExit,p=e.onExited,h=e.onExiting,v=e.style,m=e.timeout,b=m===void 0?oh:m,_=e.TransitionComponent,E=_===void 0?pl:_,g=Q(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),$=Hn(),R=d.useRef(null),z=d.useCallback(function(x){R.current=vl.findDOMNode(x)},[]),X=tt(r.ref,z),w=tt(X,n),y=function(N){return function(Y){N&&(Y===void 0?N(R.current):N(R.current,Y))}},P=y(function(x,N){yt(a,x),hl(x),l&&l(x,N)}),C=y(function(x,N){var Y=jt({timeout:b,style:v},{mode:"enter"});x.style.webkitTransition=$.transitions.create("-webkit-transform",I({},Y,{easing:$.transitions.easing.easeOut})),x.style.transition=$.transitions.create("transform",I({},Y,{easing:$.transitions.easing.easeOut})),x.style.webkitTransform="none",x.style.transform="none",s&&s(x,N)}),O=y(u),k=y(h),T=y(function(x){var N=jt({timeout:b,style:v},{mode:"exit"});x.style.webkitTransition=$.transitions.create("-webkit-transform",I({},N,{easing:$.transitions.easing.sharp})),x.style.transition=$.transitions.create("transform",I({},N,{easing:$.transitions.easing.sharp})),yt(a,x),f&&f(x)}),H=y(function(x){x.style.webkitTransition="",x.style.transition="",p&&p(x)}),M=d.useCallback(function(){R.current&&yt(a,R.current)},[a]);return d.useEffect(function(){if(!(c||a==="down"||a==="right")){var x=vf(function(){R.current&&yt(a,R.current)});return window.addEventListener("resize",x),function(){x.clear(),window.removeEventListener("resize",x)}}},[a,c]),d.useEffect(function(){c||M()},[c,M]),d.createElement(E,I({nodeRef:R,onEnter:P,onEntered:O,onEntering:C,onExit:T,onExited:H,onExiting:k,appear:!0,in:c,timeout:b},g),function(x,N){return d.cloneElement(r,I({ref:w,style:I({visibility:x==="exited"&&!c?"hidden":void 0},v,r.props.style)},N))})});const Vl=ah;var ih=function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}},Fl={left:"right",right:"left",top:"down",bottom:"up"};function ch(t){return["left","right"].indexOf(t)!==-1}function lh(t,e){return t.direction==="rtl"&&ch(e)?Fl[e]:e}var uh={enter:Ee.enteringScreen,exit:Ee.leavingScreen},sh=d.forwardRef(function(e,n){var r=e.anchor,o=r===void 0?"left":r,a=e.BackdropProps,c=e.children,l=e.classes,u=e.className,s=e.elevation,f=s===void 0?16:s,p=e.ModalProps;p=p===void 0?{}:p;var h=p.BackdropProps,v=Q(p,["BackdropProps"]),m=e.onClose,b=e.open,_=b===void 0?!1:b,E=e.PaperProps,g=E===void 0?{}:E,$=e.SlideProps,R=e.TransitionComponent,z=R===void 0?Vl:R,X=e.transitionDuration,w=X===void 0?uh:X,y=e.variant,P=y===void 0?"temporary":y,C=Q(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),O=Hn(),k=d.useRef(!1);d.useEffect(function(){k.current=!0},[]);var T=lh(O,o),H=d.createElement(se,I({elevation:P==="temporary"?f:0,square:!0},g,{className:U(l.paper,l["paperAnchor".concat(pe(T))],g.className,P!=="temporary"&&l["paperAnchorDocked".concat(pe(T))])}),c);if(P==="permanent")return d.createElement("div",I({className:U(l.root,l.docked,u),ref:n},C),H);var M=d.createElement(z,I({in:_,direction:Fl[T],timeout:w,appear:k.current},$),H);return P==="persistent"?d.createElement("div",I({className:U(l.root,l.docked,u),ref:n},C),M):d.createElement(ml,I({BackdropProps:I({},a,h,{transitionDuration:w}),BackdropComponent:ha,className:U(l.root,l.modal,u),open:_,onClose:m,ref:n},C,v),M)});const ql=D(ih,{name:"MuiDrawer",flip:!1})(sh);var fh=function(e){return{root:I({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}},dh=d.forwardRef(function(e,n){var r=e.children,o=e.classes,a=e.className,c=e.color,l=c===void 0?"default":c,u=e.component,s=u===void 0?"button":u,f=e.disabled,p=f===void 0?!1:f,h=e.disableFocusRipple,v=h===void 0?!1:h,m=e.focusVisibleClassName,b=e.size,_=b===void 0?"large":b,E=e.variant,g=E===void 0?"circular":E,$=Q(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return d.createElement(ta,I({className:U(o.root,a,_!=="large"&&o["size".concat(pe(_))],p&&o.disabled,g==="extended"&&o.extended,{primary:o.primary,secondary:o.secondary,inherit:o.colorInherit}[l]),component:s,disabled:p,focusRipple:!v,focusVisibleClassName:U(o.focusVisible,m),ref:n},$),d.createElement("span",{className:o.label},r))});const Ul=D(fh,{name:"MuiFab"})(dh);var ph=function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}},hh=d.forwardRef(function(e,n){e.checked;var r=e.classes,o=e.className,a=e.control,c=e.disabled;e.inputRef;var l=e.label,u=e.labelPlacement,s=u===void 0?"end":u;e.name,e.onChange,e.value;var f=Q(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"]),p=mf(),h=c;typeof h>"u"&&typeof a.props.disabled<"u"&&(h=a.props.disabled),typeof h>"u"&&p&&(h=p.disabled);var v={disabled:h};return["checked","name","onChange","value","inputRef"].forEach(function(m){typeof a.props[m]>"u"&&typeof e[m]<"u"&&(v[m]=e[m])}),d.createElement("label",I({className:U(r.root,o,s!=="end"&&r["labelPlacement".concat(pe(s))],h&&r.disabled),ref:n},f),d.cloneElement(a,v),d.createElement(B,{component:"span",className:U(r.label,h&&r.disabled)},l))});const Pt=D(ph,{name:"MuiFormControlLabel"})(hh);var vh=[0,1,2,3,4,5,6,7,8,9,10],mh=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function gh(t,e,n){var r={};mh.forEach(function(o){var a="grid-".concat(n,"-").concat(o);if(o===!0){r[a]={flexBasis:0,flexGrow:1,maxWidth:"100%"};return}if(o==="auto"){r[a]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};return}var c="".concat(Math.round(o/12*1e8)/1e6,"%");r[a]={flexBasis:c,flexGrow:0,maxWidth:c}}),n==="xs"?I(t,r):t[e.breakpoints.up(n)]=r}function ur(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=parseFloat(t);return"".concat(n/e).concat(String(t).replace(String(n),"")||"px")}function yh(t,e){var n={};return vh.forEach(function(r){var o=t.spacing(r);o!==0&&(n["spacing-".concat(e,"-").concat(r)]={margin:"-".concat(ur(o,2)),width:"calc(100% + ".concat(ur(o),")"),"& > $item":{padding:ur(o,2)}})}),n}var bh=function(e){return I({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},yh(e,"xs"),e.breakpoints.keys.reduce(function(n,r){return gh(n,e,r),n},{}))},wh=d.forwardRef(function(e,n){var r=e.alignContent,o=r===void 0?"stretch":r,a=e.alignItems,c=a===void 0?"stretch":a,l=e.classes,u=e.className,s=e.component,f=s===void 0?"div":s,p=e.container,h=p===void 0?!1:p,v=e.direction,m=v===void 0?"row":v,b=e.item,_=b===void 0?!1:b,E=e.justify,g=e.justifyContent,$=g===void 0?"flex-start":g,R=e.lg,z=R===void 0?!1:R,X=e.md,w=X===void 0?!1:X,y=e.sm,P=y===void 0?!1:y,C=e.spacing,O=C===void 0?0:C,k=e.wrap,T=k===void 0?"wrap":k,H=e.xl,M=H===void 0?!1:H,x=e.xs,N=x===void 0?!1:x,Y=e.zeroMinWidth,oe=Y===void 0?!1:Y,ae=Q(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),ve=U(l.root,u,h&&[l.container,O!==0&&l["spacing-xs-".concat(String(O))]],_&&l.item,oe&&l.zeroMinWidth,m!=="row"&&l["direction-xs-".concat(String(m))],T!=="wrap"&&l["wrap-xs-".concat(String(T))],c!=="stretch"&&l["align-items-xs-".concat(String(c))],o!=="stretch"&&l["align-content-xs-".concat(String(o))],(E||$)!=="flex-start"&&l["justify-content-xs-".concat(String(E||$))],N!==!1&&l["grid-xs-".concat(String(N))],P!==!1&&l["grid-sm-".concat(String(P))],w!==!1&&l["grid-md-".concat(String(w))],z!==!1&&l["grid-lg-".concat(String(z))],M!==!1&&l["grid-xl-".concat(String(M))]);return d.createElement(f,I({className:ve,ref:n},ae))}),_h=D(bh,{name:"MuiGrid"})(wh);const q=_h;function Oh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=gf(),r=gl({theme:n,name:"MuiUseMediaQuery",props:{}}),o=typeof t=="function"?t(n):t;o=o.replace(/^@media( ?)/m,"");var a=typeof window<"u"&&typeof window.matchMedia<"u",c=I({},r,e),l=c.defaultMatches,u=l===void 0?!1:l,s=c.matchMedia,f=s===void 0?a?window.matchMedia:null:s,p=c.noSsr,h=p===void 0?!1:p,v=c.ssrMatchMedia,m=v===void 0?null:v,b=d.useState(function(){return h&&a?f(o).matches:m?m(o).matches:u}),_=b[0],E=b[1];return d.useEffect(function(){var g=!0;if(a){var $=f(o),R=function(){g&&E($.matches)};return R(),$.addListener(R),function(){g=!1,$.removeListener(R)}}},[o,f,a]),_}var Eh=typeof window>"u"?d.useEffect:d.useLayoutEffect,$h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(n){var r=e.withTheme,o=r===void 0?!1:r,a=e.noSSR,c=a===void 0?!1:a,l=e.initialWidth;function u(s){var f=Hn(),p=s.theme||f,h=gl({theme:p,name:"MuiWithWidth",props:I({},s)}),v=h.initialWidth,m=h.width,b=Q(h,["initialWidth","width"]),_=d.useState(!1),E=_[0],g=_[1];Eh(function(){g(!0)},[]);var $=p.breakpoints.keys.slice().reverse(),R=$.reduce(function(X,w){var y=Oh(p.breakpoints.up(w));return!X&&y?w:X},null),z=I({width:m||(E||c?R:void 0)||v||l},o?{theme:p}:{},b);return z.width===void 0?null:d.createElement(n,z)}return na(u,n),u}};const Ph=$h;var Ch=function(e){var n=e.palette.type==="light"?.8:.98,r=yf(e.palette.background.default,n);return{root:I({},e.typography.body2,de({color:e.palette.getContrastText(r),backgroundColor:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},kh=d.forwardRef(function(e,n){var r=e.action,o=e.classes,a=e.className,c=e.message,l=e.role,u=l===void 0?"alert":l,s=Q(e,["action","classes","className","message","role"]);return d.createElement(se,I({role:u,square:!0,elevation:6,className:U(o.root,a),ref:n},s),d.createElement("div",{className:o.message},c),r?d.createElement("div",{className:o.action},r):null)});const Sh=D(Ch,{name:"MuiSnackbarContent"})(kh);var Th=function(e){var n={top:8},r={bottom:8},o={justifyContent:"flex-end"},a={justifyContent:"flex-start"},c={top:24},l={bottom:24},u={right:24},s={left:24},f={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:I({},n,de({},e.breakpoints.up("sm"),I({},c,f))),anchorOriginBottomCenter:I({},r,de({},e.breakpoints.up("sm"),I({},l,f))),anchorOriginTopRight:I({},n,o,de({},e.breakpoints.up("sm"),I({left:"auto"},c,u))),anchorOriginBottomRight:I({},r,o,de({},e.breakpoints.up("sm"),I({left:"auto"},l,u))),anchorOriginTopLeft:I({},n,a,de({},e.breakpoints.up("sm"),I({right:"auto"},c,s))),anchorOriginBottomLeft:I({},r,a,de({},e.breakpoints.up("sm"),I({right:"auto"},l,s)))}},Rh=d.forwardRef(function(e,n){var r=e.action,o=e.anchorOrigin;o=o===void 0?{vertical:"bottom",horizontal:"center"}:o;var a=o.vertical,c=o.horizontal,l=e.autoHideDuration,u=l===void 0?null:l,s=e.children,f=e.classes,p=e.className,h=e.ClickAwayListenerProps,v=e.ContentProps,m=e.disableWindowBlurListener,b=m===void 0?!1:m,_=e.message,E=e.onClose,g=e.onEnter,$=e.onEntered,R=e.onEntering,z=e.onExit,X=e.onExited,w=e.onExiting,y=e.onMouseEnter,P=e.onMouseLeave,C=e.open,O=e.resumeHideDuration,k=e.TransitionComponent,T=k===void 0?bf:k,H=e.transitionDuration,M=H===void 0?{enter:Ee.enteringScreen,exit:Ee.leavingScreen}:H,x=e.TransitionProps,N=Q(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),Y=d.useRef(),oe=d.useState(!0),ae=oe[0],ve=oe[1],be=$r(function(){E&&E.apply(void 0,arguments)}),$e=$r(function(Se){!E||Se==null||(clearTimeout(Y.current),Y.current=setTimeout(function(){be(null,"timeout")},Se))});d.useEffect(function(){return C&&$e(u),function(){clearTimeout(Y.current)}},[C,u,$e]);var xe=function(){clearTimeout(Y.current)},we=d.useCallback(function(){u!=null&&$e(O??u*.5)},[u,O,$e]),He=function(Xe){y&&y(Xe),xe()},Je=function(Xe){P&&P(Xe),we()},ar=function(Xe){E&&E(Xe,"clickaway")},Pe=function(){ve(!0)},uf=function(){ve(!1)};return d.useEffect(function(){if(!b&&C)return window.addEventListener("focus",we),window.addEventListener("blur",xe),function(){window.removeEventListener("focus",we),window.removeEventListener("blur",xe)}},[b,we,C]),!C&&ae?null:d.createElement(Fp,I({onClickAway:ar},h),d.createElement("div",I({className:U(f.root,f["anchorOrigin".concat(pe(a)).concat(pe(c))],p),onMouseEnter:He,onMouseLeave:Je,ref:n},N),d.createElement(T,I({appear:!0,in:C,onEnter:ii(uf,g),onEntered:$,onEntering:R,onExit:z,onExited:ii(Pe,X),onExiting:w,timeout:M,direction:a==="top"?"down":"up"},x),s||d.createElement(Sh,I({message:_,action:r},v)))))});const Ih=D(Th,{flip:!1,name:"MuiSnackbar"})(Rh);var Zl=d.memo(function(t){var e=t.connect,n=t.src;if(typeof Image<"u"){var r=new Image;r.src=n,r.onload=function(){return e(r)}}return null});Zl.displayName="DragPreviewImage";function xh(t,e){return jh(t)||Mh(t,e)||Dh()}function Dh(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Mh(t,e){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]"){var n=[],r=!0,o=!1,a=void 0;try{for(var c=t[Symbol.iterator](),l;!(r=(l=c.next()).done)&&(n.push(l.value),!(e&&n.length===e));r=!0);}catch(u){o=!0,a=u}finally{try{!r&&c.return!=null&&c.return()}finally{if(o)throw a}}return n}}function jh(t){if(Array.isArray(t))return t}function Gl(t,e,n){var r=wf(t,e,n),o=xh(r,2),a=o[0],c=o[1];return Ue(function(){var u=t.getHandlerId();if(u!=null)return t.subscribeToStateChange(c,{handlerIds:[u]})},[t,c]),a}function Kl(t,e,n){var r=n.getRegistry(),o=r.addTarget(t,e);return[o,function(){return r.removeTarget(o)}]}function Jl(t,e,n){var r=n.getRegistry(),o=r.addSource(t,e);return[o,function(){return r.removeSource(o)}]}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vi(t,e){for(var n=0;n or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?d.cloneElement(t,{ref:function(o){mi(n,o),mi(e,o)}}):d.cloneElement(t,{ref:e})}function Ah(t){if(typeof t.type!="string"){var e=t.type.displayName||t.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(e," into a
, or turn it into a ")+"drag source or a drop target itself.")}}function Lh(t){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!d.isValidElement(e)){var r=e;return t(r,n),r}var o=e;Ah(o);var a=n?function(c){return t(c,n)}:t;return Nh(o,a)}}function Yl(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{var o=Lh(r);e[n]=function(){return o}}}),e}function Ct(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ct=function(n){return typeof n}:Ct=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ct(t)}function Tr(t){return t!==null&&Ct(t)==="object"&&t.hasOwnProperty("current")}function zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gi(t,e){for(var n=0;n-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',Pi.join(", "),e),Z(typeof t[e]=="function","Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",e,e,t[e])}),Tv.forEach(function(e){Z(typeof t[e]=="function","Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",e,e,t[e])}),function(n,r){return new Rv(t,n,r)}}function xv(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=t;typeof t!="function"&&(Z(ga(t),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t),o=function(){return t}),Z(ot(e),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e);var a=Iv(e);return Z(typeof n=="function",'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),Z(ot(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(l){return iu({containerDisplayName:"DragSource",createHandler:a,registerHandler:Jl,createConnector:function(s){return new Ql(s)},createMonitor:function(s){return new Xl(s)},DecoratedComponent:l,getType:o,collect:n,options:r})}}function Dv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ci(t,e){for(var n=0;n-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',ki.join(", "),e),Z(typeof t[e]=="function","Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",e,e,t[e])}),function(n,r){return new jv(t,n,r)}}function Bv(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=t;typeof t!="function"&&(Z(ga(t,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t),o=function(){return t}),Z(ot(e),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e);var a=Wv(e);return Z(typeof n=="function",'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Z(ot(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(l){return iu({containerDisplayName:"DropTarget",createHandler:a,registerHandler:Kl,createMonitor:function(s){return new tu(s)},createConnector:function(s){return new eu(s)},DecoratedComponent:l,getType:o,collect:n,options:r})}}function et(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(n){return typeof n}:et=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},et(t)}function Nv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Si(t,e){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{};return Z(typeof t=="function",'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",t),Z(ot(e),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',e),function(r){var o=r,a=e.arePropsEqual,c=a===void 0?ke:a,l=o.displayName||o.name||"Component",u=function(s){Hv(f,s);function f(){var p;return Nv(this,f),p=Lv(this,Dr(f).apply(this,arguments)),p.isCurrentlyMounted=!1,p.ref=d.createRef(),p.handleChange=function(){if(p.isCurrentlyMounted){var h=p.getCurrentState();ke(h,p.state)||p.setState(h)}},p}return Av(f,[{key:"getDecoratedComponentInstance",value:function(){return Z(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(h,v){return!c(h,this.props)||!ke(v,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var h=this;return d.createElement(ra.Consumer,null,function(v){var m=v.dragDropManager;return m===void 0||(h.receiveDragDropManager(m),!h.isCurrentlyMounted)?null:d.createElement(o,Object.assign({},h.props,h.state,{ref:au(o)?h.ref:null}))})}},{key:"receiveDragDropManager",value:function(h){if(this.manager===void 0){this.manager=h,Z(et(h)==="object","Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",l,l);var v=this.manager.getMonitor();this.unsubscribeFromOffsetChange=v.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=v.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var h=this.manager.getMonitor();return t(h,this.props)}}]),f}(d.Component);return u.displayName="DragLayer(".concat(l,")"),u.DecoratedComponent=r,na(u,r)}}const Fv=Object.freeze(Object.defineProperty({__proto__:null,DndContext:ra,DndProvider:_f,DragLayer:Vv,DragPreviewImage:Zl,DragSource:xv,DropTarget:Bv,createDndContext:Of,useDrag:Qh,useDragLayer:Ef,useDrop:nu},Symbol.toStringTag,{value:"Module"}));var qv=function(){var e=$f(),n=Pf();return e?n:{display:!1}};const Uv=Object.freeze(Object.defineProperty({__proto__:null,DndProvider:Cf,HTML5DragTransition:kf,MouseTransition:Sf,Preview:Tf,PreviewContext:Rf,TouchTransition:If,createTransition:xf,default:Df,usePreview:qv},Symbol.toStringTag,{value:"Module"}));function Zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ti(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},At(t)}var cu=function(t){Kv(n,t);var e=Jv(n);function n(){return Zv(this,n),e.apply(this,arguments)}return Gv(n,[{key:"render",value:function(){var o=this.props,a=o.error,c=o.removeError,l=o.t,u=!Mf(a);return a?i.createElement(We,{"aria-labelledby":"error-dialog-title",id:"error-dialog",onClose:function(){return c(a.id)},open:u},i.createElement(Be,{id:"error-dialog-title",disableTypography:!0},i.createElement(B,{variant:"h2"},l("errorDialogTitle"))),i.createElement(Jn,{disableTypography:!0},i.createElement(eh,{variant:"body2",noWrap:!0,color:"inherit"},"".concat(a.message)),i.createElement(lt,null,i.createElement(le,{onClick:function(){return c(a.id)},variant:"contained"},l("errorDialogConfirm"))))):null}}]),n}(d.Component);cu.defaultProps={error:null,removeError:function(){},t:function(e){return e}};var em=function(e){return{error:jf(e)}},tm={removeError:Wf},nm=j(L(),A(em,tm),W("ErrorDialog"));const rm=nm(cu);var ya={},om=K,am=J;Object.defineProperty(ya,"__esModule",{value:!0});var ba=ya.default=void 0,im=am(d),cm=om(G()),lm=(0,cm.default)(im.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddSharp");ba=ya.default=lm;function um(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ri(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lt(t)}var lu=function(t){fm(n,t);var e=dm(n);function n(){return um(this,n),e.apply(this,arguments)}return sm(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.t,l=o.setWorkspaceAddVisibility,u=o.isWorkspaceAddVisible,s=o.useExtendedFab;return i.createElement(yl,{title:c(u?"closeAddResourceMenu":"addResource")},i.createElement(Ul,{size:"medium",color:"primary",id:"addBtn",disableRipple:!0,"aria-label":u?c("closeAddResourceMenu"):s&&c("startHere")||c("addResource"),className:a.fab,classes:{primary:a.fabPrimary,secondary:a.fabSecondary},variant:s?"extended":"round",onClick:function(){l(!u)}},u?i.createElement(oa,null):i.createElement(ba,null),s&&c("startHere")))}}]),n}(d.Component);lu.defaultProps={isWorkspaceAddVisible:!1,t:function(e){return e}};var mm=function(e,n){var r=n.width,o=me(e),a=o.isWorkspaceAddVisible;return{isWorkspaceAddVisible:a,useExtendedFab:r!=="xs"&&!a&&at(e).length===0}},gm={setWorkspaceAddVisibility:aa},ym=function(e){return{fab:{margin:e.spacing(1)},fabPrimary:{"&:focus":{backgroundColor:e.palette.primary.dark}},fabSecondary:{"&:focus":{backgroundColor:e.palette.secondary.dark}}}},bm=j(L(),D(ym),Ph(),A(mm,gm),W("WorkspaceAddButton"));const wm=bm(lu);var wa={},_m=K,Om=J;Object.defineProperty(wa,"__esModule",{value:!0});var uu=wa.default=void 0,Em=Om(d),$m=_m(G()),Pm=(0,$m.default)(Em.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"FullscreenSharp");uu=wa.default=Pm;var _a={},Cm=K,km=J;Object.defineProperty(_a,"__esModule",{value:!0});var su=_a.default=void 0,Sm=km(d),Tm=Cm(G()),Rm=(0,Tm.default)(Sm.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExitSharp");su=_a.default=Rm;function Im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ii(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zt(t){return zt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zt(t)}var fu=function(t){Dm(n,t);var e=Mm(n);function n(){return Im(this,n),e.apply(this,arguments)}return xm(n,[{key:"render",value:function(){var o=this.props,a=o.className,c=o.isFullscreenEnabled,l=o.setWorkspaceFullscreen,u=o.t;return i.createElement(ue,{className:a,"aria-label":u(c?"exitFullScreen":"workspaceFullScreen"),onClick:function(){return l(!c)}},c?i.createElement(su,null):i.createElement(uu,null))}}]),n}(d.Component);fu.defaultProps={className:void 0,isFullscreenEnabled:!1,t:function(e){return e}};var Nm=function(e){return{isFullscreenEnabled:Bf(e)}},Am={setWorkspaceFullscreen:Nf},Lm=j(L(),A(Nm,Am),W("FullScreenButton"));const du=Lm(fu);var Oa={},zm=K,Hm=J;Object.defineProperty(Oa,"__esModule",{value:!0});var pu=Oa.default=void 0,Vm=Hm(d),Fm=zm(G()),qm=(0,Fm.default)(Vm.createElement("path",{d:"M19.44 12.99l-.01.02c.04-.33.08-.67.08-1.01 0-.34-.03-.66-.07-.99l.01.02 2.44-1.92-2.43-4.22-2.87 1.16.01.01c-.52-.4-1.09-.74-1.71-1h.01L14.44 2H9.57l-.44 3.07h.01c-.62.26-1.19.6-1.71 1l.01-.01-2.88-1.17-2.44 4.22 2.44 1.92.01-.02c-.04.33-.07.65-.07.99 0 .34.03.68.08 1.01l-.01-.02-2.1 1.65-.33.26 2.43 4.2 2.88-1.15-.02-.04c.53.41 1.1.75 1.73 1.01h-.03L9.58 22h4.85s.03-.18.06-.42l.38-2.65h-.01c.62-.26 1.2-.6 1.73-1.01l-.02.04 2.88 1.15 2.43-4.2s-.14-.12-.33-.26l-2.11-1.66zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"}),"SettingsSharp");pu=Oa.default=qm;var Ea={},Um=K,Zm=J;Object.defineProperty(Ea,"__esModule",{value:!0});var hu=Ea.default=void 0,Gm=Zm(d),Km=Um(G()),Jm=(0,Km.default)(Gm.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckSharp");hu=Ea.default=Jm;function Xm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ht(t)}var og=function(t){Qm(n,t);var e=eg(n);function n(){return Xm(this,n),e.apply(this,arguments)}return Ym(n,[{key:"render",value:function(){var o=this.props,a=o.handleClick,c=o.languages;return i.createElement(i.Fragment,null,c.map(function(l){return i.createElement(re,{button:!l.current,key:l.locale,onClick:function(){a(l.locale)}},i.createElement(nt,null,l.current&&i.createElement(hu,null)),i.createElement(Fn,{primaryTypographyProps:{variant:"body1"}},l.label))}))}}]),n}(d.Component),ag=function(e){return{languages:Af(e)}},ig=function(e,n){var r=n.afterSelect;return{handleClick:function(a){e(bl({language:a})),r&&r()}}};const cg=j(A(ag,ig),W("LanguageSettings"))(og);var $a={},lg=K,ug=J;Object.defineProperty($a,"__esModule",{value:!0});var vu=$a.default=void 0,sg=ug(d),fg=lg(G()),dg=(0,fg.default)(sg.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}),"ExpandLessSharp");vu=$a.default=dg;var Pa={},pg=K,hg=J;Object.defineProperty(Pa,"__esModule",{value:!0});var Ca=Pa.default=void 0,vg=hg(d),mg=pg(G()),gg=(0,mg.default)(vg.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}),"ExpandMoreSharp");Ca=Pa.default=gg;var yg=["children","icon","label"];function bg(t,e){if(t==null)return{};var n=wg(t,e),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function wg(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,a;for(a=0;a=0)&&(n[o]=t[o]);return n}function _g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Di(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vt(t){return Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vt(t)}var gu=function(t){Eg(n,t);var e=$g(n);function n(r){var o;return _g(this,n),o=e.call(this,r),o.state={nestedMenuIsOpen:!1},o.handleMenuClick=o.handleMenuClick.bind(mu(o)),o}return Og(n,[{key:"handleMenuClick",value:function(){var o=this.state.nestedMenuIsOpen;this.setState({nestedMenuIsOpen:!o})}},{key:"render",value:function(){var o=this.state.nestedMenuIsOpen,a=this.props,c=a.children,l=a.icon,u=a.label,s=bg(a,yg);return i.createElement(i.Fragment,null,i.createElement(re,Object.assign({onClick:this.handleMenuClick,divider:o},s),l&&i.createElement(nt,null,l),i.createElement(Fn,{primaryTypographyProps:{variant:"body1"}},u),o?i.createElement(vu,null):i.createElement(Ca,null)),o&&c)}}]),n}(d.Component);gu.defaultProps={icon:null};function kg(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},i.createElement("defs",null,i.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},i.createElement("stop",{offset:"0"}),i.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),i.createElement("stop",{offset:"1",stopOpacity:"0"})),i.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},i.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),i.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),i.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),i.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),i.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),i.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),i.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),i.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),i.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),i.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),i.createElement("stop",{offset:"1",stopColor:"#fff"})),i.createElement("clipPath",{id:"clip-elastic_icon"},i.createElement("rect",{width:"300",height:"225"}))),i.createElement("g",{id:"elastic_icon","data-name":"elastic icon",clipPath:"url(#clip-elastic_icon)"},i.createElement("rect",{width:"300",height:"225",fill:"#fff"}),i.createElement("g",{id:"Rectangle_278","data-name":"Rectangle 278",transform:"translate(232 159)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"54",height:"54",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"53",height:"53",fill:"none"})),i.createElement("g",{id:"Rectangle_8","data-name":"Rectangle 8",transform:"translate(7 148)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"70",height:"70",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"69",fill:"none"})),i.createElement("g",{id:"Rectangle_258","data-name":"Rectangle 258",transform:"translate(224 6)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"70",height:"100",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"99",fill:"none"})),i.createElement("g",{id:"Rectangle_259","data-name":"Rectangle 259",transform:"translate(71 64)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"115",height:"75",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),i.createElement("g",{id:"Rectangle_260","data-name":"Rectangle 260",transform:"translate(99 87)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"115",height:"75",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),i.createElement("g",{id:"Group_689","data-name":"Group 689"},i.createElement("g",{id:"Group_687","data-name":"Group 687",transform:"translate(0 3)"},i.createElement("path",{id:"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.164 -1.063)",fill:"#010101",fillRule:"evenodd",opacity:"0.246"}),i.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 36)",fill:"none"},i.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),i.createElement("path",{d:"M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",stroke:"none",fill:"#01579b"}))),i.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},i.createElement("rect",{width:"20",height:"147",stroke:"none"}),i.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),i.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},i.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),i.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},i.createElement("path",{id:"gradient_border_2","data-name":"gradient border 2",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient)"}),i.createElement("path",{id:"gradient_border_1","data-name":"gradient border 1",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient-2)"})))))))}function Sg(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},i.createElement("defs",null,i.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},i.createElement("stop",{offset:"0"}),i.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),i.createElement("stop",{offset:"1",stopOpacity:"0"})),i.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},i.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),i.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),i.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),i.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),i.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),i.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),i.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),i.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),i.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),i.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),i.createElement("stop",{offset:"1",stopColor:"#fff"})),i.createElement("clipPath",{id:"clip-mosaic_icon"},i.createElement("rect",{width:"300",height:"225"}))),i.createElement("g",{id:"mosaic_icon","data-name":"mosaic icon",clipPath:"url(#clip-mosaic_icon)"},i.createElement("rect",{width:"300",height:"225",fill:"#fff"}),i.createElement("path",{id:"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.163 1.938)",fill:"#010101",fillRule:"evenodd",opacity:"0.5"}),i.createElement("path",{id:"checkbox-2","data-name":"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.164 1.938)",fill:"#010101",fillRule:"evenodd",opacity:"0.246"}),i.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 39)",fill:"none"},i.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),i.createElement("path",{d:"M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",stroke:"none",fill:"#01579b"})),i.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},i.createElement("rect",{width:"20",height:"147",stroke:"none"}),i.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),i.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},i.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),i.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},i.createElement("path",{id:"gradient_border_2","data-name":"gradient border 2",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient)"}),i.createElement("path",{id:"gradient_border_1","data-name":"gradient border 1",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient-2)"}))),i.createElement("g",{id:"Rectangle_270","data-name":"Rectangle 270",transform:"translate(60 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"99",height:"72",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),i.createElement("g",{id:"Rectangle_271","data-name":"Rectangle 271",transform:"translate(159 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"99",height:"72",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),i.createElement("g",{id:"Rectangle_272","data-name":"Rectangle 272",transform:"translate(192 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),i.createElement("g",{id:"Rectangle_284","data-name":"Rectangle 284",transform:"translate(60 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),i.createElement("g",{id:"Rectangle_285","data-name":"Rectangle 285",transform:"translate(126 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},i.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),i.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})))))}var Tg=["classes","className"];function Rg(t,e){if(t==null)return{};var n=Ig(t,e),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Ig(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,a;for(a=0;a=0)&&(n[o]=t[o]);return n}function yu(t){var e=t.classes,n=t.className,r=Rg(t,Tg),o=[n,e.shadowScrollDialog].join(" ");return i.createElement(Jn,Object.assign({className:o},r))}yu.defaultProps={className:""};function Ye(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xg=function(e){var n;return{shadowScrollDialog:(n={background:"linear-gradient(".concat(e.palette.background.paper," 30%, rgba(255, 255, 255, 0)), ")+"linear-gradient(rgba(255, 255, 255, 0), ".concat(e.palette.background.paper," 70%) 0 100%, ")+"radial-gradient(50% 0, farthest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), radial-gradient(50% 100%, farthest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%,"},Ye(n,"background","linear-gradient(".concat(e.palette.background.paper," 30%, rgba(255, 255, 255, 0)), ")+"linear-gradient(rgba(255, 255, 255, 0), ".concat(e.palette.background.paper," 70%) 0 100%, ")+"radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%;"),Ye(n,"backgroundAttachment","local, local, scroll, scroll"),Ye(n,"backgroundRepeat","no-repeat"),Ye(n,"backgroundSize","100% 40px, 100% 40px, 100% 14px, 100% 14px"),Ye(n,"overflowY","auto"),n)}};const Ft=D(xg)(yu);function Dg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qt(t){return qt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qt(t)}var wu=function(t){jg(n,t);var e=Wg(n);function n(r){var o;return Dg(this,n),o=e.call(this,r),o.handleWorkspaceTypeChange=o.handleWorkspaceTypeChange.bind(bu(o)),o}return Mg(n,[{key:"handleWorkspaceTypeChange",value:function(o){var a=this.props,c=a.handleClose,l=a.updateWorkspace;l({type:o}),c()}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.container,u=a.handleClose,s=a.open,f=a.children,p=a.t,h=a.workspaceType;return i.createElement(We,{"aria-labelledby":"workspace-selection-dialog-title",container:l,id:"workspace-selection-dialog",onClose:u,onEntered:function(m){return n.setInitialFocus(m,h)},onEscapeKeyDown:u,open:s},i.createElement(Be,{id:"workspace-selection-dialog-title",disableTypography:!0},i.createElement(B,{variant:"h2"},p("workspaceSelectionTitle"))),i.createElement(Ft,null,f,i.createElement(Wt,{classes:{root:c.list},selected:h},i.createElement(re,{className:c.menuItem,onClick:function(){return o.handleWorkspaceTypeChange("elastic")},selected:h==="elastic",value:"elastic"},i.createElement(di,{className:c.card},i.createElement(kg,{className:c.svgIcon,viewBox:"0 0 120 90"}),i.createElement("div",{className:c.details},i.createElement(pi,{classes:{root:c.root},className:c.content},i.createElement(B,{className:c.headline,component:"p",variant:"h3"},p("elastic")),i.createElement(B,{variant:"body1"},p("elasticDescription")))))),i.createElement(re,{className:c.menuItem,onClick:function(){return o.handleWorkspaceTypeChange("mosaic")},selected:h==="mosaic",value:"mosaic"},i.createElement(di,{className:c.card},i.createElement(Sg,{className:c.svgIcon,viewBox:"0 0 120 90"}),i.createElement("div",{className:c.details},i.createElement(pi,{className:c.content,classes:{root:c.root}},i.createElement(B,{className:c.headline,component:"p",variant:"h3"},p("mosaic")),i.createElement(B,{variant:"body1"},p("mosaicDescription")))))))))}}],[{key:"setInitialFocus",value:function(o,a){var c=o.querySelectorAll('li[value="'.concat(a,'"]'));!c||c.length===0||c[0].focus()}}]),n}(d.Component);wu.defaultProps={children:null,container:null,open:!1,t:function(e){return e}};var Ag={updateWorkspace:Lf},Lg=function(e){return{workspaceType:ia(e)}},zg=function(e){return{card:{backgroundColor:"transparent",borderRadius:"0",boxShadow:"0 0 transparent",display:"flex"},content:{flex:"1 0 auto"},details:{display:"flex",flexDirection:"column"},headline:{paddingBottom:"6px"},list:{"&active":{outline:"none"},"&focus":{outline:"none"},outline:"none"},media:{flex:"0 0 120px",height:"90px"},menuItem:{height:"auto",overflow:"auto",whiteSpace:"inherit"},root:{"&:last-child":{paddingBottom:"12px"},paddingBottom:0,paddingTop:0,textAlign:"left"},svgIcon:{flexShrink:0,height:"90px",width:"120px"}}},Hg=j(L(),D(zg),A(Lg,Ag),W("WorkspaceSelectionDialog"));const Vg=Hg(wu);var ka={},Fg=K,qg=J;Object.defineProperty(ka,"__esModule",{value:!0});var _u=ka.default=void 0,Ug=qg(d),Zg=Fg(G()),Gg=(0,Zg.default)(Ug.createElement("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),"PaletteSharp");_u=ka.default=Gg;function Kg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ji(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ut(t)}var Eu=function(t){Xg(n,t);var e=Yg(n);function n(r){var o;return Kg(this,n),o=e.call(this,r),o.selectedItemRef=i.createRef(),o.handleThemeChange=o.handleThemeChange.bind(Ou(o)),o}return Jg(n,[{key:"handleThemeChange",value:function(o){var a=this.props,c=a.setSelectedTheme,l=a.handleClose;c(o),l()}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.handleClose,u=a.open,s=a.selectedTheme,f=a.t,p=a.themeIds;return i.createElement(We,{onClose:l,onEntered:function(v){return n.setInitialFocus(v,s)},open:u},i.createElement(Be,{id:"change-the-dialog-title",disableTypography:!0},i.createElement(B,{variant:"h2"},f("changeTheme"))),i.createElement(Jn,{className:c.dialogContent},i.createElement(Wt,null,p.map(function(h){return i.createElement(re,{key:h,className:c.listitem,onClick:function(){o.handleThemeChange(h)},selected:h===s,value:h},i.createElement(nt,null,i.createElement(_u,{className:c[h]})),i.createElement(Fn,null,f(h)))}))))}}],[{key:"setInitialFocus",value:function(o,a){var c=o.querySelectorAll('li[value="'.concat(a,'"]'));!c||c.length===0||c[0].focus()}}]),n}(d.Component);Eu.defaultProps={open:!1,themeIds:[]};var ty=function(e,n){return n.windowId,{setSelectedTheme:function(o){return e(bl({selectedTheme:o}))}}},ny=function(e){return{selectedTheme:je(e).selectedTheme,themeIds:wl(e)}},ry=function(e){return{dark:{color:"#000000"},dialogContent:{padding:0},light:{color:"#BDBDBD"},listitem:{"&:focus":{backgroundColor:e.palette.action.focus},"&:hover":{backgroundColor:e.palette.action.hover},cursor:"pointer"}}},oy=j(L(),D(ry),A(ny,ty),W("ChangeThemeDialog"));const ay=oy(Eu);function iy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zt(t){return Zt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zt(t)}var $u=function(t){ly(n,t);var e=uy(n);function n(r){var o;return iy(this,n),o=e.call(this,r),o.state={changeTheme:{},toggleZoom:{},workspaceSelection:{}},o.handleMenuItemClick=o.handleMenuItemClick.bind(Vr(o)),o.handleMenuItemClose=o.handleMenuItemClose.bind(Vr(o)),o}return cy(n,[{key:"handleMenuItemClick",value:function(o,a){var c={};c[o]={},c[o].open=!0,c[o].anchorEl=a.currentTarget,this.setState(c)}},{key:"handleMenuItemClose",value:function(o){var a=this;return function(c){var l={};l[o]={},l[o].open=!1,l[o].anchorEl=null,a.setState(l)}}},{key:"handleZoomToggleClick",value:function(){var o=this.props,a=o.toggleZoomControls,c=o.showZoomControls;a(!c)}},{key:"render",value:function(){var o=this,a=this.props,c=a.containerId,l=a.handleClose,u=a.anchorEl,s=a.showThemePicker,f=a.isWorkspaceAddVisible,p=a.t,h=a.showZoomControls,v=this.state,m=v.changeTheme,b=v.toggleZoom,_=v.workspaceSelection,E=document.querySelector("#".concat(c," .").concat(V("viewer")));return i.createElement(i.Fragment,null,i.createElement(it,{id:"workspace-menu",container:E,anchorEl:u,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:!!u,onClose:l},i.createElement(re,{"aria-haspopup":"true",disabled:f,onClick:function($){o.handleZoomToggleClick($),l($)},"aria-owns":b.anchorEl?"toggle-zoom-menu":void 0},i.createElement(B,{variant:"body1"},p(h?"hideZoomControls":"showZoomControls"))),i.createElement(re,{"aria-haspopup":"true",onClick:function($){o.handleMenuItemClick("workspaceSelection",$),l($)},"aria-owns":_.anchorEl?"workspace-selection":void 0},i.createElement(B,{variant:"body1"},p("selectWorkspaceMenu"))),i.createElement(gu,{label:p("language")},i.createElement(cg,{afterSelect:l})),s&&i.createElement(re,{"aria-haspopup":"true",onClick:function($){o.handleMenuItemClick("changeTheme",$),l($)},"aria-owns":m.anchorEl?"change-theme":void 0},i.createElement(B,{variant:"body1"},p("changeTheme"))),i.createElement(he,this.props)),!!m.open&&i.createElement(ay,{container:E,handleClose:this.handleMenuItemClose("changeTheme"),open:!!m.open}),!!_.open&&i.createElement(Vg,{open:!!_.open,container:E,handleClose:this.handleMenuItemClose("workspaceSelection")}))}}]),n}(d.Component);$u.defaultProps={anchorEl:null,isWorkspaceAddVisible:!1,showThemePicker:!1,showZoomControls:!1,t:function(e){return e},toggleZoomControls:function(){}};var dy={toggleZoomControls:zf},py=function(e){return{containerId:Ge(e),isWorkspaceAddVisible:me(e).isWorkspaceAddVisible,showThemePicker:wl(e).length>0,showZoomControls:Hf(e)}},hy=j(L(),A(py,dy),W("WorkspaceMenu"));const vy=hy($u);function my(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gt(t)}var Pu=function(t){yy(n,t);var e=by(n);function n(r){var o;return my(this,n),o=e.call(this,r),o.state={anchorEl:null},o.handleMenuClick=o.handleMenuClick.bind(qr(o)),o.handleMenuClose=o.handleMenuClose.bind(qr(o)),o}return gy(n,[{key:"handleMenuClick",value:function(o){this.setState({anchorEl:o.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.t,l=this.state.anchorEl;return i.createElement(i.Fragment,null,i.createElement(ue,{"aria-haspopup":"true","aria-label":c("workspaceMenu"),"aria-owns":l?"workspace-menu":void 0,className:ee(a.ctrlBtn,l?a.ctrlBtnSelected:null),id:"menuBtn",onClick:this.handleMenuClick},i.createElement(pu,null)),i.createElement(vy,{anchorEl:l,handleClose:this.handleMenuClose}))}}]),n}(d.Component);Pu.defaultProps={t:function(e){return e}};var Oy=function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}},Ey=j(L(),D(Oy),W("WorkspaceMenuButton"));const $y=Ey(Pu);var Sa={},Py=K,Cy=J;Object.defineProperty(Sa,"__esModule",{value:!0});var Cu=Sa.default=void 0,ky=Cy(d),Sy=Py(G()),Ty=(0,Sy.default)(ky.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHorizSharp");Cu=Sa.default=Ty;var Ta={},Ry=K,Iy=J;Object.defineProperty(Ta,"__esModule",{value:!0});var ku=Ta.default=void 0,xy=Iy(d),Dy=Ry(G()),My=(0,Dy.default)(xy.createElement("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"}),"Input");ku=Ta.default=My;var Ra={},jy=K,Wy=J;Object.defineProperty(Ra,"__esModule",{value:!0});var Su=Ra.default=void 0,By=Wy(d),Ny=jy(G()),Ay=(0,Ny.default)(By.createElement("path",{d:"M19 12v7H5v-7H3v9h18v-9h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z"}),"SaveAltSharp");Su=Ra.default=Ay;var Ia={},Ly=K,zy=J;Object.defineProperty(Ia,"__esModule",{value:!0});var Tu=Ia.default=void 0,Hy=zy(d),Vy=Ly(G()),Fy=(0,Vy.default)(Hy.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");Tu=Ia.default=Fy;var Xn={},qy=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=Ni[e.format]||Ni.default;window.clipboardData.setData(p,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),c.addRange(a);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");u=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),u=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=Gy("message"in e?e.message:Zy),window.prompt(r,t)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(a):c.removeAllRanges()),l&&document.body.removeChild(l),o()}return u}var Jy=Ky;function Ur(t){"@babel/helpers - typeof";return Ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ur(t)}Object.defineProperty(Xn,"__esModule",{value:!0});Xn.CopyToClipboard=void 0;var bt=Ru(d),Xy=Ru(Jy),Yy=["text","onCopy","options","children"];function Ru(t){return t&&t.__esModule?t:{default:t}}function Ai(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Li(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function eb(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,a;for(a=0;a=0)&&(n[o]=t[o]);return n}function tb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kt(t){return Kt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kt(t)}function xa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xu=function(t){rb(n,t);var e=ob(n);function n(){var r;tb(this,n);for(var o=arguments.length,a=new Array(o),c=0;c"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jt(t){return Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Jt(t)}var Du=function(t){fb(n,t);var e=db(n);function n(r){var o;return ub(this,n),o=e.call(this,r),o.state={copied:!1},o.onCopy=o.onCopy.bind(Jr(o)),o.handleClose=o.handleClose.bind(Jr(o)),o}return sb(n,[{key:"handleClose",value:function(){var o=this.props.handleClose;o()}},{key:"onCopy",value:function(){this.setState({copied:!0})}},{key:"exportedState",value:function(){var o=this.props.exportableState;return JSON.stringify(o,null,2)}},{key:"render",value:function(){var o=this.props,a=o.children,c=o.classes,l=o.container,u=o.open,s=o.t,f=this.state.copied;return f?i.createElement(Ih,{anchorOrigin:{horizontal:"center",vertical:"top"},open:!0,autoHideDuration:6e3,onClose:this.handleClose,message:s("exportCopied"),action:i.createElement(zn,{size:"small","aria-label":s("dismiss"),color:"inherit",onClick:this.handleClose},i.createElement(Tu,{fontSize:"small"}))}):i.createElement(We,{id:"workspace-settings",container:l,open:u,onClose:this.handleClose,scroll:"paper",fullWidth:!0,maxWidth:"sm"},i.createElement(Be,{id:"form-dialog-title",disableTypography:!0},i.createElement(B,{variant:"h2"},s("downloadExport"))),i.createElement(Jn,null,i.createElement(Al,{elevation:0},i.createElement(zl,{classes:{root:c.accordionTitle},expandIcon:i.createElement(_l,null)},i.createElement(B,{variant:"h4"},s("viewWorkspaceConfiguration"))),i.createElement(Ll,null,a,i.createElement("pre",null,this.exportedState())))),i.createElement(lt,null,i.createElement(le,{onClick:this.handleClose},s("cancel")),i.createElement(lb.CopyToClipboard,{onCopy:this.onCopy,text:this.exportedState()},i.createElement(le,{variant:"contained",color:"primary"},s("copy")))))}}]),n}(d.Component);Du.defaultProps={children:null,classes:{},container:null,open:!1,t:function(e){return e}};var vb=function(e){return{exportableState:Vf(e)}},mb=function(e){return{accordionTitle:{padding:0}}},gb=j(L(),D(mb),A(vb,{}),W("WorkspaceExport"));const yb=gb(Du);function bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xt(t){return Xt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xt(t)}var Mu=function(t){_b(n,t);var e=Ob(n);function n(r){var o;return bb(this,n),o=e.call(this,r),o.state={configImportValue:""},o.handleImportConfig=o.handleImportConfig.bind(Yr(o)),o.handleChange=o.handleChange.bind(Yr(o)),o}return wb(n,[{key:"handleChange",value:function(o){o.preventDefault(),this.setState({configImportValue:o.target.value})}},{key:"handleImportConfig",value:function(o){var a=this.props,c=a.handleClose,l=a.importConfig,u=this.state.configImportValue;try{var s=JSON.parse(u);l(s),c()}catch(p){var f=this.props.addError;f(p.toString())}}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.handleClose,l=o.open,u=o.t;return i.createElement(We,{"aria-labelledby":"workspace-import-title",id:"workspace-import",onEscapeKeyDown:c,onClose:c,open:l,fullWidth:!0,maxWidth:"sm"},i.createElement(Be,{id:"workspace-import-title",disableTypography:!0},i.createElement(B,{variant:"h2"},u("importWorkspace"))),i.createElement(Ft,null,i.createElement(Ol,{className:a.textField,id:"workspace-import-input",multiline:!0,onChange:this.handleChange,rows:"15",variant:"filled",inputProps:{autoFocus:"autofocus",className:a.textInput},helperText:u("importWorkspaceHint")})),i.createElement(lt,null,i.createElement(le,{className:a.cancelBtn,onClick:c},u("cancel")),i.createElement(le,{color:"primary",onClick:this.handleImportConfig,variant:"contained"},u("import"))))}}]),n}(d.Component);Mu.defaultProps={classes:{},open:!1,t:function(e){return e}};var Pb={addError:Ff,importConfig:qf},Cb=function(e){return{cancelBtn:{color:e.palette.text.primary},textField:{width:"100%"},textInput:{fontFamily:"monospace"}}},kb=j(L(),D(Cb),A(null,Pb),W("WorkspaceImport"));const Sb=kb(Mu);function Tb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yt(t){return Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yt(t)}var ju=function(t){Ib(n,t);var e=xb(n);function n(r){var o;return Tb(this,n),o=e.call(this,r),o.state={exportWorkspace:{},importWorkspace:{}},o.handleMenuItemClick=o.handleMenuItemClick.bind(eo(o)),o.handleMenuItemClose=o.handleMenuItemClose.bind(eo(o)),o}return Rb(n,[{key:"handleMenuItemClick",value:function(o){var a={};a[o]={},a[o].open=!0,this.setState(a)}},{key:"handleMenuItemClose",value:function(o){var a=this;return function(c){var l={};l[o]={},l[o].open=!1,a.setState(l)}}},{key:"render",value:function(){var o=this,a=this.props,c=a.anchorEl,l=a.containerId,u=a.handleClose,s=a.t,f=this.state,p=f.exportWorkspace,h=f.importWorkspace,v=document.querySelector("#".concat(l," .").concat(V("viewer")));return i.createElement(i.Fragment,null,i.createElement(it,{id:"workspace-options-menu",container:v,anchorEl:c,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:!!c,onClose:u},i.createElement(re,{"aria-haspopup":"true",onClick:function(){o.handleMenuItemClick("exportWorkspace"),u()},"aria-owns":p.open?"workspace-export":void 0},i.createElement(nt,null,i.createElement(Su,null)),i.createElement(B,{variant:"body1"},s("downloadExportWorkspace"))),i.createElement(re,{"aria-haspopup":"true",id:"workspace-menu-import",onClick:function(){o.handleMenuItemClick("importWorkspace"),u()},"aria-owns":p.open?"workspace-import":void 0},i.createElement(nt,null,i.createElement(ku,null)),i.createElement(B,{variant:"body1"},s("importWorkspace"))),i.createElement(he,this.props)),!!p.open&&i.createElement(yb,{open:!!p.open,container:v,handleClose:this.handleMenuItemClose("exportWorkspace")}),!!h.open&&i.createElement(Sb,{open:!!h.open,container:v,handleClose:this.handleMenuItemClose("importWorkspace")}))}}]),n}(d.Component);ju.defaultProps={anchorEl:null};var jb=function(e){return{containerId:Ge(e)}},Wb=j(L(),A(jb,null));const Bb=Wb(ju);function Nb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Qt(t)}var Fb=function(t){Lb(n,t);var e=zb(n);function n(r){var o;return Nb(this,n),o=e.call(this,r),o.state={anchorEl:null},o.handleMenuClick=o.handleMenuClick.bind(no(o)),o.handleMenuClose=o.handleMenuClose.bind(no(o)),o}return Ab(n,[{key:"handleMenuClick",value:function(o){this.setState({anchorEl:o.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.t,l=this.state.anchorEl;return i.createElement(i.Fragment,null,i.createElement(ue,{"aria-label":c("workspaceOptions"),className:ee(a.ctrlBtn,l?a.ctrlBtnSelected:null),onClick:this.handleMenuClick},i.createElement(Cu,null)),i.createElement(Bb,{anchorEl:l,handleClose:this.handleMenuClose}))}}]),n}(d.Component),qb=function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}},Ub=j(D(qb),L(),W("WorkspaceOptionsButton"));const Zb=Ub(Fb);var Da={},Gb=K,Kb=J;Object.defineProperty(Da,"__esModule",{value:!0});var Wu=Da.default=void 0,Jb=Kb(d),Xb=Gb(G()),Yb=(0,Xb.default)(Jb.createElement("path",{d:"M19 18l2 1V1H7v2h12v15zM17 5H3v18l7-3 7 3V5z"}),"BookmarksSharp");Wu=Da.default=Yb;function Qb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ui(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},en(t)}var Bu=function(t){tw(n,t);var e=nw(n);function n(){return Qb(this,n),e.apply(this,arguments)}return ew(n,[{key:"titleContent",value:function(o){var a=this.props,c=a.titles,l=a.t;return c[o]||l("untitled")}},{key:"render",value:function(){var o=this,a=this.props,c=a.containerId,l=a.handleClose,u=a.anchorEl,s=a.windowIds,f=a.focusWindow,p=a.t;return i.createElement(it,{anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},id:"window-list-menu",container:document.querySelector("#".concat(c," .").concat(V("viewer"))),disableAutoFocusItem:!0,anchorEl:u,open:!!u,onClose:l,onEntering:n.focus2ndListIitem},i.createElement(qn,{role:"presentation",selected:!1,disabled:!0,tabIndex:"-1"},p("openWindows")),s.map(function(h,v){return i.createElement(re,{key:h,onClick:function(b){f(h,!0),l(b)}},i.createElement(Fn,{primaryTypographyProps:{variant:"body1"}},o.titleContent(h)))}))}}],[{key:"focus2ndListIitem",value:function(o){!o.querySelectorAll("li")||o.querySelectorAll("li").length<2||o.querySelectorAll("li")[1].focus()}}]),n}(d.Component);Bu.defaultProps={anchorEl:null,t:function(e){return e},titles:{}};var iw={focusWindow:ca},cw=function(e){return{containerId:Ge(e),titles:Uf(e),windowIds:at(e)}},lw=j(L(),A(cw,iw),W("WindowList"));const uw=lw(Bu);function sw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tn(t){return tn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},tn(t)}var Nu=function(t){dw(n,t);var e=pw(n);function n(r){var o;return sw(this,n),o=e.call(this,r),o.state={windowListAnchor:null},o.handleClose=o.handleClose.bind(ao(o)),o.handleOpen=o.handleOpen.bind(ao(o)),o}return fw(n,[{key:"handleClose",value:function(){this.setState({windowListAnchor:null})}},{key:"handleOpen",value:function(o){this.setState({windowListAnchor:o.currentTarget})}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.disabled,u=a.t,s=a.windowCount,f=this.state.windowListAnchor;return i.createElement(i.Fragment,null,i.createElement(ue,{"aria-haspopup":"true","aria-label":u("listAllOpenWindows"),"aria-owns":f?"window-list":null,className:ee(c.ctrlBtn,f?c.ctrlBtnSelected:null),disabled:l,badge:!0,BadgeProps:{badgeContent:s,classes:{badge:c.badge}},onClick:function(h){return o.handleOpen(h)}},i.createElement(Wu,null)),!!f&&i.createElement(uw,{anchorEl:f,id:"window-list",open:!!f,handleClose:this.handleClose}))}}]),n}(d.Component);Nu.defaultProps={classes:{},disabled:!1};var mw=function(e){return{disabled:me(e).isWorkspaceAddVisible,windowCount:at(e).length}},gw=function(e){return{badge:{paddingLeft:12},ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}},yw=j(L(),D(gw),A(mw,null),W("WindowListButton"));const bw=yw(Nu);function ww(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},nn(t)}var Au=function(t){Ow(n,t);var e=Ew(n);function n(){return ww(this,n),e.apply(this,arguments)}return _w(n,[{key:"render",value:function(){var o=this.props.classes;return i.createElement(i.Fragment,null,i.createElement(bw,null),i.createElement($y,null),i.createElement(Zb,null),i.createElement(du,{className:o.ctrlBtn}),i.createElement(he,this.props))}}]),n}(d.Component);Au.defaultProps={classes:{}};var kw=function(e){return{ctrlBtn:{margin:e.spacing(1)}}},Sw=j(D(kw),W("WorkspaceControlPanelButtons"));const Tw=Sw(Au);function Rw(t){return i.createElement(ge,Object.assign({viewBox:"0 0 60 55"},t),i.createElement("rect",{width:"18",height:"55"}),i.createElement("rect",{width:"18",height:"55",transform:"translate(42)"}),i.createElement("rect",{width:"18",height:"34",transform:"translate(21)"}))}var Iw=["t","variant"];function xw(t,e){if(t==null)return{};var n=Dw(t,e),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Dw(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,a;for(a=0;a=0)&&(n[o]=t[o]);return n}function Mw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ki(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},rn(t)}var Lu=function(t){Ww(n,t);var e=Bw(n);function n(){return Mw(this,n),e.apply(this,arguments)}return jw(n,[{key:"render",value:function(){var o=this.props,a=o.t,c=o.variant,l=xw(o,Iw);return i.createElement("div",l,c==="wide"&&i.createElement("div",null,i.createElement(B,{align:"center",component:"p",variant:"h3"},a("mirador"))),i.createElement(B,{align:"center"},i.createElement(zn,{component:"a",href:"https://projectmirador.org",target:"_blank",rel:"noopener"},i.createElement(Rw,{"aria-label":a("aboutMirador"),titleAccess:a("aboutMirador"),fontSize:"large"}))))}}]),n}(d.Component);Lu.defaultProps={t:function(e){return e},variant:"default"};const zw=W("Branding")(Lu);function Hw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ji(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function on(t){return on=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},on(t)}var zu=function(t){Fw(n,t);var e=qw(n);function n(){return Hw(this,n),e.apply(this,arguments)}return Vw(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.t,l=o.variant;return i.createElement(Kn,{className:ee(a.root,V("workspace-control-panel"),l==="wide"?a.wide:null),color:"default",position:"absolute",component:"nav","aria-label":c("workspaceNavigation")},i.createElement(Un,{disableGutters:!0,className:a.toolbar},i.createElement(wm,null),i.createElement("div",{className:a.workspaceButtons},i.createElement(Tw,null))),i.createElement(zw,{className:a.branding,t:c,variant:l}))}}]),n}(d.Component);zu.defaultProps={variant:"default"};function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Kw=function(e){var n;return{branding:(n={display:"flex",position:"absolute"},Ve(n,e.breakpoints.up("xs"),{display:"none"}),Ve(n,e.breakpoints.up("sm"),{bottom:0,display:"block",float:"none",right:"auto",width:"100%"}),Ve(n,"right",0),n),ctrlBtn:{margin:e.spacing(1)},drawer:{overflowX:"hidden"},root:Ve({height:64},e.breakpoints.up("sm"),{height:"100%",left:0,right:"auto",width:64}),toolbar:Ve({display:"flex",justifyContent:"space-between"},e.breakpoints.up("sm"),{flexDirection:"column",justifyContent:"flex-start",minHeight:0}),wide:{width:"auto"},workspaceButtons:Ve({},e.breakpoints.up("sm"),{display:"flex",flexDirection:"column"})}},Jw=j(L(),D(Kw),W("WorkspaceControlPanel"));const Xw=Jw(zu);var ce={},Yw=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});var Hu=ce.MosaicWindowContext=ce.MosaicContext=void 0,Vu=Yw(d);ce.MosaicContext=Vu.default.createContext(void 0);Hu=ce.MosaicWindowContext=Vu.default.createContext(void 0);var Ma={},Qw=K,e_=J;Object.defineProperty(Ma,"__esModule",{value:!0});var ja=Ma.default=void 0,t_=e_(d),n_=Qw(G()),r_=(0,n_.default)(t_.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuSharp");ja=Ma.default=r_;var Wa={},o_=K,a_=J;Object.defineProperty(Wa,"__esModule",{value:!0});var Fu=Wa.default=void 0,i_=a_(d),c_=o_(G()),l_=(0,c_.default)(i_.createElement("path",{d:"M21 3H3v18h18V3zm-2 16H5V5h14v14z"}),"CropDinSharp");Fu=Wa.default=l_;function u_(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(0 16)"}),i.createElement("path",{d:"M21,5H3V19H21ZM19,17H5V7H19Z",transform:"translate(0 -2)"})))}function s_(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M0,0H24V24H0Z",transform:"translate(24) rotate(90)",fill:"none"}),i.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(24) rotate(90)"}),i.createElement("path",{d:"M19,3H5V21H19ZM17,19H7V5H17Z",transform:"translate(-2)"})))}function f_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function an(t){return an=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},an(t)}var Uu=function(t){p_(n,t);var e=h_(n);function n(r){var o;return f_(this,n),o=e.call(this,r),o.handleChange=o.handleChange.bind(qu(o)),o}return d_(n,[{key:"handleChange",value:function(o){var a=this.props,c=a.windowId,l=a.setWindowThumbnailPosition;l(c,o)}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.handleClose,u=a.t,s=a.thumbnailNavigationPosition,f=a.direction;return i.createElement(i.Fragment,null,i.createElement(qn,{role:"presentation",disableSticky:!0,tabIndex:"-1"},u("thumbnails")),i.createElement(re,{className:c.MenuItem,onClick:function(){o.handleChange("off"),l()}},i.createElement(Pt,{value:"off",classes:{label:s==="off"?c.selectedLabel:c.label},control:i.createElement(Fu,{color:s==="off"?"secondary":void 0}),label:u("off"),labelPlacement:"bottom"})),i.createElement(re,{className:c.MenuItem,onClick:function(){o.handleChange("far-bottom"),l()}},i.createElement(Pt,{value:"far-bottom",classes:{label:s==="far-bottom"?c.selectedLabel:c.label},control:i.createElement(u_,{color:s==="far-bottom"?"secondary":void 0}),label:u("bottom"),labelPlacement:"bottom"})),i.createElement(re,{className:c.MenuItem,onClick:function(){o.handleChange("far-right"),l()}},i.createElement(Pt,{value:"far-right",classes:{label:s==="far-right"?c.selectedLabel:c.label},control:i.createElement(s_,{color:s==="far-right"?"secondary":void 0,style:f==="rtl"?{transform:"rotate(180deg)"}:{}}),label:u("right"),labelPlacement:"bottom"})))}}]),n}(d.Component);Uu.defaultProps={handleClose:function(){},t:function(e){return e}};var g_={setWindowThumbnailPosition:Zf},y_=function(e,n){var r=n.windowId;return{direction:la(e),thumbnailNavigationPosition:El(e,{windowId:r})}},b_=function(e){return{label:{borderBottom:"2px solid transparent"},MenuItem:{display:"inline-block"},selectedLabel:{borderBottom:"2px solid ".concat(e.palette.secondary.main),color:e.palette.secondary.main}}},w_=j(D(b_),L(null,{withRef:!0}),A(y_,g_,null,{forwardRef:!0}),W("WindowThumbnailSettings"));const __=w_(Uu);var Ba={},O_=K,E_=J;Object.defineProperty(Ba,"__esModule",{value:!0});var Zu=Ba.default=void 0,$_=E_(d),P_=O_(G()),C_=(0,P_.default)($_.createElement("path",{d:"M21 3H3v18h18V3zm-2 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"}),"CropOriginalSharp");Zu=Ba.default=C_;var Na={},k_=K,S_=J;Object.defineProperty(Na,"__esModule",{value:!0});var Gu=Na.default=void 0,T_=S_(d),R_=k_(G()),I_=(0,R_.default)(T_.createElement("path",{d:"M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"}),"ViewColumn");Gu=Na.default=I_;function x_(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8ZM14,9.5h6V11H14ZM14,12h6v1.5H14Zm0,2.5h6V16H14Z"})))}function D_(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M19.974,2H2V19.974H19.974V2ZM7.392,18.177H3.8V14.582H7.392Zm0-5.392H3.8V9.19H7.392Zm0-5.392H3.8V3.8H7.392Zm5.392,10.785H9.19V14.582h3.595Zm0-5.392H9.19V9.19h3.595Zm0-5.392H9.19V3.8h3.595Zm5.392,10.785H14.582V14.582h3.595Zm0-5.392H14.582V9.19h3.595Zm0-5.392H14.582V3.8h3.595Z",transform:"translate(1 1)"})))}function M_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cn(t){return cn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},cn(t)}var Ju=function(t){W_(n,t);var e=B_(n);function n(r){var o;return M_(this,n),o=e.call(this,r),o.handleChange=o.handleChange.bind(Ku(o)),o}return j_(n,[{key:"handleChange",value:function(o){var a=this.props,c=a.windowId,l=a.setWindowViewType;l(c,o)}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.handleClose,u=a.t,s=a.windowViewType,f=a.viewTypes,p={book:x_,gallery:D_,scroll:Gu,single:Zu},h=function(m){var b=m.value,_=m.Icon;return i.createElement(re,{key:b,className:c.MenuItem,autoFocus:s===b,onClick:function(){o.handleChange(b),l()}},i.createElement(Pt,{value:b,classes:{label:s===b?c.selectedLabel:c.label},control:i.createElement(_,{color:s===b?"secondary":void 0}),label:u(b),labelPlacement:"bottom"}))};return f.length===0?null:i.createElement(i.Fragment,null,i.createElement(qn,{role:"presentation",disableSticky:!0,tabIndex:"-1"},u("view")),f.map(function(v){return h({Icon:p[v],value:v})}))}}]),n}(d.Component);Ju.defaultProps={handleClose:function(){},t:function(e){return e},viewTypes:[]};var L_={setWindowViewType:Gf},z_=function(e,n){var r=n.windowId;return{viewTypes:Kf(e,{windowId:r}),windowViewType:$l(e,{windowId:r})}},H_=function(e){return{label:{borderBottom:"2px solid transparent"},MenuItem:{display:"inline-block"},selectedLabel:{borderBottom:"2px solid ".concat(e.palette.secondary.main),color:e.palette.secondary.main}}},V_=j(D(H_),L(null,{withRef:!0}),A(z_,L_,null,{forwardRef:!0}),W("WindowViewSettings"));const F_=V_(Ju);function q_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qi(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ln(t){return ln=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ln(t)}function Y_(t){var e=t.PluginComponents,n=t.t;return e?i.createElement(i.Fragment,null,i.createElement(qn,{role:"presentation",disableSticky:!0,tabIndex:"-1"},n("windowPluginButtons")),i.createElement(he,t)):null}var Xu=function(t){Z_(n,t);var e=G_(n);function n(){return q_(this,n),e.apply(this,arguments)}return U_(n,[{key:"render",value:function(){var o=this.props,a=o.containerId,c=o.handleClose,l=o.anchorEl,u=o.showThumbnailNavigationSettings,s=o.toggleDraggingEnabled,f=o.windowId;return i.createElement(it,{id:"window-menu_".concat(f),container:document.querySelector("#".concat(a," .").concat(V("viewer"))),anchorEl:l,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:!!l,onClose:c,onEntering:s,onExit:s,orientation:"horizontal"},i.createElement(F_,{windowId:f,handleClose:c}),u&&i.createElement(__,{windowId:f,handleClose:c}),i.createElement(Y_,this.props))}}]),n}(d.Component);Xu.defaultProps={anchorEl:null,showThumbnailNavigationSettings:!0};var Q_=function(e){return{containerId:Ge(e),showThumbnailNavigationSettings:je(e).thumbnailNavigation.displaySettings}},e0=function(e){return{toggleDraggingEnabled:function(){return e(Jf())}}},t0=j(L(),A(Q_,e0),W("WindowTopMenu"));const n0=t0(Xu);function r0(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M0,0H24V24H0Z",fill:"none"}),i.createElement("path",{d:"M24.852,17.981,3,18V15.945l21.852-.019Z",transform:"translate(-2 5)"}),i.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8Z",transform:"translate(0 -2)"})))}function o0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ec(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function un(t){return un=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},un(t)}var Yu=function(t){i0(n,t);var e=c0(n);function n(r){var o;return o0(this,n),o=e.call(this,r),o.state={anchorEl:null},o.handleMenuClick=o.handleMenuClick.bind(ho(o)),o.handleMenuClose=o.handleMenuClose.bind(ho(o)),o}return a0(n,[{key:"handleMenuClick",value:function(o){this.setState({anchorEl:o.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.t,l=o.windowId,u=this.state.anchorEl;return i.createElement(i.Fragment,null,i.createElement(ue,{"aria-haspopup":"true","aria-label":c("windowMenu"),"aria-owns":u?"window-menu_".concat(l):void 0,className:u?a.ctrlBtnSelected:null,onClick:this.handleMenuClick},i.createElement(r0,null)),i.createElement(n0,{windowId:l,anchorEl:u,handleClose:this.handleMenuClose}))}}]),n}(d.Component);Yu.defaultProps={t:function(e){return e}};var s0=function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}},f0=j(L(),D(s0),W("WindowTopMenuButton"));const d0=f0(Yu);function p0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(t){return sn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},sn(t)}var w0=function(t){v0(n,t);var e=m0(n);function n(){return p0(this,n),e.apply(this,arguments)}return h0(n,[{key:"render",value:function(){return i.createElement(i.Fragment,null,i.createElement(he,this.props))}}]),n}(d.Component),_0={},O0=j(L(),D(_0),A(null,null),W("WindowTopBarPluginArea"));const E0=O0(w0);var Aa={},$0=K,P0=J;Object.defineProperty(Aa,"__esModule",{value:!0});var Qu=Aa.default=void 0,C0=P0(d),k0=$0(G()),S0=(0,k0.default)(C0.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertSharp");Qu=Aa.default=S0;function T0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(t)}var es=function(t){I0(n,t);var e=x0(n);function n(r){var o;return T0(this,n),o=e.call(this,r),o.state={anchorEl:null},o.handleMenuClick=o.handleMenuClick.bind(go(o)),o.handleMenuClose=o.handleMenuClose.bind(go(o)),o}return R0(n,[{key:"handleMenuClick",value:function(o){this.setState({anchorEl:o.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.containerId,u=a.PluginComponents,s=a.t,f=a.windowId,p=a.menuIcon,h=this.state.anchorEl;return!u||u.length===0?i.createElement(i.Fragment,null):i.createElement(i.Fragment,null,i.createElement(ue,{"aria-haspopup":"true","aria-label":s("windowPluginMenu"),"aria-owns":h?"window-plugin-menu_".concat(f):void 0,className:h?c.ctrlBtnSelected:null,onClick:this.handleMenuClick},p),i.createElement(it,{id:"window-plugin-menu_".concat(f),container:document.querySelector("#".concat(l," .").concat(V("viewer"))),anchorEl:h,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:!!h,onClose:function(){return o.handleMenuClose()}},i.createElement(he,Object.assign({handleClose:function(){return o.handleMenuClose()}},this.props))))}}]),n}(d.Component);es.defaultProps={classes:{},menuIcon:i.createElement(Qu,null),PluginComponents:[]};var j0=function(e){return{containerId:Ge(e)}},W0=function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}},B0=j(L(),D(W0),A(j0,null),W("WindowTopBarPluginMenu"));const N0=B0(es);var La={},A0=K,L0=J;Object.defineProperty(La,"__esModule",{value:!0});var za=La.default=void 0,z0=L0(d),H0=A0(G()),V0=(0,H0.default)(z0.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineSharp");za=La.default=V0;function F0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dn(t){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(t)}var ts=function(t){U0(n,t);var e=Z0(n);function n(){return F0(this,n),e.apply(this,arguments)}return q0(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.error,l=o.hideWindowTitle,u=o.isFetching,s=o.manifestTitle,f=function(v){return i.createElement(B,Object.assign({variant:"h2",noWrap:!0,color:"inherit",className:a.title},v),v.children)},p=null;return u?p=i.createElement(f,null,i.createElement(fe,{variant:"text"})):c?p=i.createElement(i.Fragment,null,i.createElement(za,{color:"error"}),i.createElement(f,{color:"textSecondary"},c)):l?p=i.createElement("div",{className:a.title}):p=i.createElement(f,null,s),p}}]),n}(d.Component);ts.defaultProps={error:null,hideWindowTitle:!1,isFetching:!1,manifestTitle:""};function oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ac(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pn(t){return pn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(t)}var ns=function(t){iO(n,t);var e=cO(n);function n(){return oO(this,n),e.apply(this,arguments)}return aO(n,[{key:"render",value:function(){var o=this.props,a=o.removeWindow,c=o.windowId,l=o.classes,u=o.toggleWindowSideBar,s=o.t,f=o.windowDraggable,p=o.maximizeWindow,h=o.maximized,v=o.minimizeWindow,m=o.focused,b=o.allowClose,_=o.allowMaximize,E=o.focusWindow,g=o.allowFullscreen,$=o.allowTopMenuButton,R=o.allowWindowSideBar;return i.createElement(Kn,{position:"relative",color:"default"},i.createElement("nav",{"aria-label":s("windowNavigation")},i.createElement(Un,{disableGutters:!0,onMouseDown:E,className:ee(l.windowTopBarStyle,f?l.windowTopBarStyleDraggable:null,m?l.focused:null,V("window-top-bar")),variant:"dense"},R&&i.createElement(ue,{"aria-label":s("toggleWindowSideBar"),onClick:u},i.createElement(ja,null)),i.createElement(tO,{windowId:c}),$&&i.createElement(d0,{className:V("window-menu-btn"),windowId:c}),i.createElement(E0,{windowId:c}),i.createElement(N0,{windowId:c}),_&&i.createElement(ue,{"aria-label":s(h?"minimizeWindow":"maximizeWindow"),className:V("window-maximize"),onClick:h?v:p},h?i.createElement(rO,null):i.createElement(nO,null)),g&&i.createElement(du,null),b&&i.createElement(ue,{"aria-label":s("closeWindow"),className:V("window-close"),onClick:a},i.createElement(oa,null)))))}}]),n}(d.Component);ns.defaultProps={allowClose:!0,allowFullscreen:!1,allowMaximize:!0,allowTopMenuButton:!0,allowWindowSideBar:!0,focused:!1,focusWindow:function(){},maximized:!1,maximizeWindow:function(){},minimizeWindow:function(){},t:function(e){return e},windowDraggable:!0};var fO=function(e,n){var r=n.windowId,o=rt(e,{windowId:r});return{allowClose:o.allowClose,allowFullscreen:o.allowFullscreen,allowMaximize:o.allowMaximize,allowTopMenuButton:o.allowTopMenuButton,allowWindowSideBar:o.allowWindowSideBar,focused:Pl(e,{windowId:r}),maximized:o.maximized}},dO=function(e,n){var r=n.windowId;return{focusWindow:function(){return e(ca(r))},maximizeWindow:function(){return e(Xf(r))},minimizeWindow:function(){return e(Yf(r))},removeWindow:function(){return e(Cl(r))},toggleWindowSideBar:function(){return e(Qf(r))}}},pO=function(e){return{focused:{},windowTopBarStyle:{"&$focused":{borderTop:"2px solid ".concat(e.palette.primary.main)},backgroundColor:e.palette.shades.main,borderTop:"2px solid transparent",minHeight:32,paddingLeft:e.spacing(.5),paddingRight:e.spacing(.5)},windowTopBarStyleDraggable:{cursor:"move"}}},hO=j(L(),D(pO),A(fO,dO),W("WindowTopBar"));const vO=hO(ns);var Ha={},mO=K,gO=J;Object.defineProperty(Ha,"__esModule",{value:!0});var rs=Ha.default=void 0,yO=gO(d),bO=mO(G()),wO=(0,bO.default)(yO.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"InfoSharp");rs=Ha.default=wO;var Va={},_O=K,OO=J;Object.defineProperty(Va,"__esModule",{value:!0});var os=Va.default=void 0,EO=OO(d),$O=_O(G()),PO=(0,$O.default)(EO.createElement("path",{d:"M21.99 2H2v16h16l4 4-.01-20zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"CommentSharp");os=Va.default=PO;var Fa={},CO=K,kO=J;Object.defineProperty(Fa,"__esModule",{value:!0});var as=Fa.default=void 0,SO=kO(d),TO=CO(G()),RO=(0,TO.default)(SO.createElement("path",{d:"M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91c.48.22 1.05.34 1.7.34.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"CopyrightSharp");as=Fa.default=RO;var qa={},IO=K,xO=J;Object.defineProperty(qa,"__esModule",{value:!0});var is=qa.default=void 0,DO=xO(d),MO=IO(G()),jO=(0,MO.default)(DO.createElement("path",{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"}),"LayersSharp");is=qa.default=jO;function WO(t){return i.createElement(ge,t,i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.createElement("path",{d:"M6.924,21H21V19H6.924ZM3,17H21V15H3Zm3.924-4H21V11H6.924Zm0-4H21V7H6.924ZM3,3V5H21V3Z"})))}function BO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hn(t){return hn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(t)}var ls=function(t){AO(n,t);var e=LO(n);function n(r){var o;return BO(this,n),o=e.call(this,r),o.handleChange=o.handleChange.bind(cs(o)),o}return NO(n,[{key:"handleChange",value:function(o,a){var c=this.props.addCompanionWindow;c(a)}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.hasAnnotations,u=a.hasAnyAnnotations,s=a.hasAnyLayers,f=a.hasCurrentLayers,p=a.hasSearchResults,h=a.hasSearchService,v=a.panels,m=a.PluginComponents,b=a.sideBarPanel,_=a.t,E=function($){return i.createElement(yl,{title:_("openCompanionWindow",{context:$.value})},i.createElement(nd,Object.assign({},$,{classes:{root:c.tab,selected:c.tabSelected},"aria-label":_("openCompanionWindow",{context:$.value}),disableRipple:!0,onKeyUp:o.handleKeyUp})))};return i.createElement(ed,{classes:{flexContainer:c.tabsFlexContainer,indicator:c.tabsIndicator},value:b==="closed"?!1:b,onChange:this.handleChange,variant:"fullWidth",indicatorColor:"primary",textColor:"primary",orientation:"vertical","aria-orientation":"vertical","aria-label":_("sidebarPanelsNavigation")},v.info&&i.createElement(E,{value:"info",icon:i.createElement(rs,null)}),v.attribution&&i.createElement(E,{value:"attribution",icon:i.createElement(as,null)}),v.canvas&&i.createElement(E,{value:"canvas",icon:i.createElement(WO,null)}),v.annotations&&(l||u)&&i.createElement(E,{value:"annotations",icon:i.createElement(cr,{classes:{badge:c.badge},invisible:!l,variant:"dot"},i.createElement(os,null))}),v.search&&h&&i.createElement(E,{value:"search",icon:i.createElement(cr,{classes:{badge:c.badge},invisible:!p,variant:"dot"},i.createElement(td,null))}),v.layers&&s&&i.createElement(E,{value:"layers",icon:i.createElement(cr,{classes:{badge:c.badge},invisible:!f,variant:"dot"},i.createElement(is,null))}),m&&m.map(function(g){return i.createElement(E,{key:g.value,value:g.value,icon:i.createElement(g,null)})}))}}]),n}(d.Component);ls.defaultProps={classes:{},hasAnnotations:!1,hasAnyAnnotations:!1,hasAnyLayers:!1,hasCurrentLayers:!1,hasSearchResults:!1,hasSearchService:!1,panels:[],PluginComponents:null,sideBarPanel:"closed",t:function(e){return e}};var VO=function(e,n){var r=n.windowId;return{addCompanionWindow:function(a){return e(rd(r,{content:a,position:"left"}))}}};function lc(t){return t&&t.some(function(e){return new kl(e).imageResources.length>1})}function FO(t){return t&&t.some(function(e){var n=new kl(e);return n.annotationListUris.length>0||n.canvasAnnotationPages.length>0})}var qO=function(e,n){var r=n.windowId;return{hasAnnotations:od(e,{windowId:r}).length>0,hasAnyAnnotations:FO(Cr(e,{windowId:r})),hasAnyLayers:lc(Cr(e,{windowId:r})),hasCurrentLayers:lc(ad(e,{windowId:r})),hasSearchResults:Oe(e,{windowId:r}).suggestedSearches||id(e,{companionWindowId:(ci(e,{position:"left",windowId:r})[0]||{}).id,windowId:r}),hasSearchService:cd(e,{windowId:r})!==null,panels:rt(e,{windowId:r}).panels,sideBarPanel:(ci(e,{position:"left",windowId:r})[0]||{}).content}},UO=function(e){return{badge:{backgroundColor:e.palette.notification.main},tab:{"&:active":{backgroundColor:e.palette.action.active},"&:focus":{"@media (hover: none)":{backgroundColor:"transparent"},backgroundColor:e.palette.action.hover,textDecoration:"none"},"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"},backgroundColor:e.palette.action.hover,textDecoration:"none"},borderRight:"2px solid transparent",minWidth:"auto"},tabSelected:{borderRight:"2px solid ".concat(e.palette.primary.main)},tabsFlexContainer:{flexDirection:"column"},tabsIndicator:{display:"none"}}},ZO=j(L(),D(UO),A(qO,VO),W("WindowSideBarButtons"));const GO=ZO(ls);function KO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vn(t){return vn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vn(t)}var us=function(t){XO(n,t);var e=YO(n);function n(){return KO(this,n),e.apply(this,arguments)}return JO(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.direction,l=o.t,u=o.windowId,s=o.sideBarOpen;return i.createElement(i.Fragment,null,i.createElement(ql,{variant:"persistent",className:ee(a.drawer),classes:{paper:ee(a.paper)},anchor:c==="rtl"?"right":"left",PaperProps:{"aria-label":l("sidebarPanelsNavigation"),component:"nav",style:{height:"100%",position:"relative"}},SlideProps:{direction:c==="rtl"?"left":"right",mountOnEnter:!0,unmountOnExit:!0},open:s},i.createElement(GO,{windowId:u})))}}]),n}(d.Component);us.defaultProps={sideBarOpen:!1};var nE=function(e,n){var r=n.windowId;return{direction:la(e),sideBarOpen:(Oe(e,{windowId:r})||{}).sideBarOpen,sideBarPanel:(Oe(e,{windowId:r})||{}).sideBarPanel}},rE=function(e){return{drawer:{flexShrink:0,height:"100%",order:-1e3,zIndex:e.zIndex.appBar-1},grow:{flexGrow:1},paper:{borderInlineEnd:"1px solid ".concat(e.palette.divider),overflowX:"hidden",width:48},toolbar:e.mixins.toolbar}},oE=j(D(rE),L(),A(nE,null),W("WindowSideBar"));const aE=oE(us);var Ua={},iE=K,cE=J;Object.defineProperty(Ua,"__esModule",{value:!0});var Oo=Ua.default=void 0,lE=cE(d),uE=iE(G()),sE=(0,uE.default)(lE.createElement("path",{d:"M14 7l-5 5 5 5V7z"}),"ArrowLeftSharp");Oo=Ua.default=sE;var Za={},fE=K,dE=J;Object.defineProperty(Za,"__esModule",{value:!0});var Eo=Za.default=void 0,pE=dE(d),hE=fE(G()),vE=(0,hE.default)(pE.createElement("path",{d:"M10 17l5-5-5-5v10z"}),"ArrowRightSharp");Eo=Za.default=vE;const mE=Gn(d.createElement("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),gE=Gn(d.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),yE=Gn(d.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),bE=Gn(d.createElement("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}));var wE=function(e){var n=e.palette.type==="light"?kr:Sr,r=e.palette.type==="light"?Sr:kr;return{root:I({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:n(e.palette.success.main,.6),backgroundColor:r(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:n(e.palette.info.main,.6),backgroundColor:r(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:n(e.palette.warning.main,.6),backgroundColor:r(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:n(e.palette.error.main,.6),backgroundColor:r(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:n(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:n(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:n(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:n(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},sc={success:d.createElement(mE,{fontSize:"inherit"}),warning:d.createElement(gE,{fontSize:"inherit"}),error:d.createElement(yE,{fontSize:"inherit"}),info:d.createElement(bE,{fontSize:"inherit"})},_E=d.createElement(ld,{fontSize:"small"}),OE=d.forwardRef(function(e,n){var r=e.action,o=e.children,a=e.classes,c=e.className,l=e.closeText,u=l===void 0?"Close":l,s=e.color,f=e.icon,p=e.iconMapping,h=p===void 0?sc:p,v=e.onClose,m=e.role,b=m===void 0?"alert":m,_=e.severity,E=_===void 0?"success":_,g=e.variant,$=g===void 0?"standard":g,R=Q(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return d.createElement(se,I({role:b,square:!0,elevation:0,className:U(a.root,a["".concat($).concat(pe(s||E))],c),ref:n},R),f!==!1?d.createElement("div",{className:a.icon},f||h[E]||sc[E]):null,d.createElement("div",{className:a.message},o),r!=null?d.createElement("div",{className:a.action},r):null,r==null&&v?d.createElement("div",{className:a.action},d.createElement(zn,{size:"small","aria-label":u,title:u,color:"inherit",onClick:v},_E)):null)});const EE=D(wE,{name:"MuiAlert"})(OE);function $E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(t)}var ss=function(t){CE(n,t);var e=kE(n);function n(){return $E(this,n),e.apply(this,arguments)}return PE(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.error,l=o.metadata,u=o.showJsError,s=o.t;return u?i.createElement(i.Fragment,null,i.createElement(EE,{elevation:6,variant:"filled",severity:"error"},s("errorDialogTitle")),u&&i.createElement(Al,{square:!0,className:a.alert},i.createElement(zl,{expandIcon:i.createElement(_l,null)},i.createElement(B,null,s("jsError",{message:c.message,name:c.name}))),i.createElement(Ll,{className:a.details},i.createElement("pre",null,s("jsStack",{stack:c.stack})),l&&i.createElement("pre",null,JSON.stringify(l,null,2)))),i.createElement(he,this.props)):null}}]),n}(d.Component);ss.defaultProps={metadata:null,showJsError:!0,t:function(e){return e}};var IE=function(e,n){var r=n.companionWindowId,o=n.windowId;return{metadata:{companionWindow:r&&Sl(e,{companionWindowId:r}),manifest:Bt(e,{windowId:o}),viewer:ud(e,{windowId:o}),window:Oe(e,{windowId:o})},showJsError:je(e).window.showJsError}},xE=function(e){return{alert:{"& $icon":{color:e.palette.error.main},backgroundColor:e.palette.error.main,color:"#fff",fontWeight:e.typography.fontWeightMedium},details:{"& pre":{height:"100px",overflowY:"scroll"},flexDirection:"column"}}},DE=j(L(),D(xE),A(IE),W("ErrorContent"));const Po=DE(ss);function ME(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gn(t){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},gn(t)}var fs=function(t){WE(n,t);var e=BE(n);function n(r){var o;return ME(this,n),o=e.call(this,r),o.state={},o}return jE(n,[{key:"componentDidUpdate",value:function(o){var a=this.props.content;a!==o.content&&this.setState({error:null,hasError:!1})}},{key:"render",value:function(){var o=this.props,a=o.content,c=o.windowId,l=o.id,u=o.t,s=this.state,f=s.error,p=s.hasError;if(p)return i.createElement(sd,{title:u("error"),windowId:c,id:l},i.createElement(Po,{error:f,windowId:c,companionWindowId:l}));var h=fd[a];return h?i.createElement(h,{id:l,windowId:c}):i.createElement(i.Fragment,null)}}],[{key:"getDerivedStateFromError",value:function(o){return{error:o,hasError:!0}}}]),n}(d.Component);fs.defaultProps={content:null,t:function(e){return e}};var zE=function(e,n){var r=n.id,o=Sl(e,{companionWindowId:r});return{content:o.content,id:r}},HE=j(L(),A(zE),W("CompanionWindowFactory"));const VE=HE(fs);function FE(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yn(t){return yn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(t)}var ds=function(t){UE(n,t);var e=ZE(n);function n(){return FE(this,n),e.apply(this,arguments)}return qE(n,[{key:"areaLayoutClass",value:function(){var o=this.props,a=o.classes,c=o.position;return c==="bottom"||c==="far-bottom"?a.horizontal:null}},{key:"collapseIcon",value:function(){var o=this.props,a=o.companionAreaOpen,c=o.direction;return c==="rtl"?a?i.createElement(Eo,null):i.createElement(Oo,null):a?i.createElement(Oo,null):i.createElement(Eo,null)}},{key:"slideDirection",value:function(){var o=this.props,a=o.direction,c=o.position,l=a==="rtl"?"left":"right",u=a==="rtl"?"right":"left";switch(c){case"right":case"far-right":return u;case"bottom":case"far-bottom":return"up";default:return l}}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.companionWindowIds,l=o.companionAreaOpen,u=o.setCompanionAreaOpen,s=o.position,f=o.sideBarOpen,p=o.t,h=o.windowId;return i.createElement("div",{className:[a.root,this.areaLayoutClass(),V("companion-area-".concat(s))].join(" ")},i.createElement(Vl,{in:l,direction:this.slideDirection()},i.createElement("div",{className:[V("companion-windows"),c.length>0&&a[s],this.areaLayoutClass()].join(" "),style:{display:l?"flex":"none"}},c.map(function(v){return i.createElement(VE,{id:v,key:v,windowId:h})}))),u&&s==="left"&&f&&c.length>0&&i.createElement("div",{className:a.toggle},i.createElement(ue,{"aria-expanded":l,"aria-label":p(l?"collapseSidePanel":"expandSidePanel"),className:a.toggleButton,key:l?"collapse":"expand",onClick:function(){u(h,!l)},TooltipProps:{placement:"right"}},this.collapseIcon())))}}]),n}(d.Component);ds.defaultProps={classes:{},setCompanionAreaOpen:function(){},sideBarOpen:!1};var XE=function(e,n){var r=n.windowId,o=n.position;return{companionAreaOpen:dd(e,{position:o,windowId:r}),companionWindowIds:pd(e,{position:o,windowId:r}),direction:la(e),sideBarOpen:(Oe(e,{windowId:r})||{}).sideBarOpen}},YE={setCompanionAreaOpen:hd},QE=function(e){return{horizontal:{flexDirection:"column",width:"100%"},left:{minWidth:235},root:{display:"flex",minHeight:0,position:"relative",zIndex:e.zIndex.appBar-2},toggle:{backgroundColor:e.palette.background.paper,border:"1px solid ".concat(e.palette.shades.dark),borderRadius:0,height:"48px",left:"100%",marginTop:"1rem",padding:2,position:"absolute",width:"23px",zIndex:e.zIndex.drawer},toggleButton:{marginBottom:12,marginTop:12,padding:0}}},e1=j(L(),D(QE),A(XE,YE),W("CompanionArea"));const Qe=e1(ds);function pr(t){return o1(t)||r1(t)||n1(t)||t1()}function t1(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n1(t,e){if(t){if(typeof t=="string")return So(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return So(t,e)}}function r1(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function o1(t){if(Array.isArray(t))return So(t)}function So(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bn(t){return bn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bn(t)}var hs=function(t){c1(n,t);var e=l1(n);function n(r){var o;return a1(this,n),o=e.call(this,r),o.state={filter:null},o.hideDialog=o.hideDialog.bind(ps(o)),o}return i1(n,[{key:"setFilter",value:function(o){this.setState({filter:o})}},{key:"hideDialog",value:function(){var o=this.props,a=o.hideCollectionDialog,c=o.windowId;a(c)}},{key:"selectCollection",value:function(o){var a=this.props,c=a.collectionPath,l=a.manifestId,u=a.showCollectionDialog,s=a.windowId;u(o.id,[].concat(pr(c),[l]),s)}},{key:"goToPreviousCollection",value:function(){var o=this.props,a=o.collectionPath,c=o.showCollectionDialog,l=o.windowId;c(a[a.length-1],a.slice(0,-1),l)}},{key:"selectManifest",value:function(o){var a=this.props,c=a.addWindow,l=a.collectionPath,u=a.manifestId,s=a.setWorkspaceAddVisibility,f=a.updateWindow,p=a.windowId;p?f(p,{canvasId:null,collectionPath:[].concat(pr(l),[u]),manifestId:o.id}):c({collectionPath:[].concat(pr(l),[u]),manifestId:o.id}),this.hideDialog(),s(!1)}},{key:"dialogContainer",value:function(){var o=this.props,a=o.containerId,c=o.windowId;return document.querySelector("#".concat(a," #").concat(c))}},{key:"placeholder",value:function(){var o=this.props.classes;return i.createElement(We,{className:o.dialog,onClose:this.hideDialog,open:!0,container:this.dialogContainer(),BackdropProps:this.backdropProps()},i.createElement(Be,{id:"select-collection",disableTypography:!0},i.createElement(fe,{className:o.placeholder,variant:"text"})),i.createElement(Ft,null,i.createElement(fe,{className:o.placeholder,variant:"text"}),i.createElement(fe,{className:o.placeholder,variant:"text"})))}},{key:"backdropProps",value:function(){var o=this.props.classes;return{classes:{root:o.dialog}}}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.collection,u=a.error,s=a.isMultipart,f=a.manifest,p=a.ready,h=a.t,v=this.state.filter;if(u)return null;if(!this.dialogContainer())return this.forceUpdate(),i.createElement(i.Fragment,null);if(!p)return this.placeholder();var m=f&&li(f.getProperty("rights")||f.getProperty("license")),b=f&&li(f.getRequiredStatement()).filter(function(g){return g.getValue()}).map(function(g){return{label:null,values:g.getValues()}}),_=f.getCollections(),E=v||(_.length>0?"collections":"manifests");return i.createElement(We,{className:c.dialog,onClose:this.hideDialog,container:this.dialogContainer(),BackdropProps:this.backdropProps(),open:!0},i.createElement(Be,{id:"select-collection",disableTypography:!0},i.createElement(B,{component:"div",variant:"overline"},h(s?"multipartCollection":"collection")),i.createElement(B,{variant:"h3"},n.getUseableLabel(f))),i.createElement(Ft,{className:c.dialogContent},l&&i.createElement(le,{startIcon:i.createElement(vd,null),onClick:function(){return o.goToPreviousCollection()}},n.getUseableLabel(l)),i.createElement("div",{className:c.collectionMetadata},i.createElement(md,{manifestId:f.id}),i.createElement(gd,{id:"select-collection-rights",label:h("attributionTitle")},b&&i.createElement(yd,{labelValuePairs:b,defaultLabel:h("attribution")}),m&&m.length>0&&i.createElement(i.Fragment,null,i.createElement(B,{variant:"subtitle2",component:"dt"},h("rights")),m.map(function(g){return i.createElement(B,{variant:"body1",component:"dd",key:g},i.createElement(bd,{target:"_blank",rel:"noopener noreferrer",href:g},g))})))),i.createElement("div",{className:c.collectionFilter},f.getTotalCollections()>0&&i.createElement(ui,{clickable:!0,color:E==="collections"?"primary":"default",onClick:function(){return o.setFilter("collections")},label:h("totalCollections",{count:f.getTotalCollections()})}),f.getTotalManifests()>0&&i.createElement(ui,{clickable:!0,color:E==="manifests"?"primary":"default",onClick:function(){return o.setFilter("manifests")},label:h("totalManifests",{count:f.getTotalManifests()})})),E==="collections"&&i.createElement(Wt,null,_.map(function(g){return i.createElement(re,{key:g.id,onClick:function(){o.selectCollection(g)},className:c.collectionItem},n.getUseableLabel(g))})),E==="manifests"&&i.createElement(Wt,null,f.getManifests().map(function(g){return i.createElement(re,{key:g.id,onClick:function(){o.selectManifest(g)},className:c.collectionItem},n.getUseableLabel(g))}))),i.createElement(lt,null,i.createElement(le,{onClick:this.hideDialog},h("close"))))}}],[{key:"getUseableLabel",value:function(o,a){return o&&o.getLabel&&o.getLabel().length>0?o.getLabel().getValue():String(a+1)}}]),n}(d.Component);hs.defaultProps={collection:null,collectionPath:[],containerId:null,error:null,isMultipart:!1,ready:!1,windowId:null};var f1={addWindow:ua,hideCollectionDialog:wd,setWorkspaceAddVisibility:aa,showCollectionDialog:_d,updateWindow:Od},d1=function(e,n){var r=n.windowId,o=Oe(e,{windowId:r}),a=o.collectionPath,c=o.collectionManifestId,l=Bt(e,{manifestId:c}),u=a&&a[a.length-1],s=u&&Bt(e,{manifestId:u});return{collection:s&&Nt(e,{manifestId:s.id}),collectionPath:a,containerId:Ge(e),error:l&&l.error,isMultipart:Tl(e,{manifestId:c}).includes("multi-part"),manifest:l&&Nt(e,{manifestId:c}),manifestId:c,open:e.workspace.collectionDialogOn,ready:l&&!!l.json,windowId:r}},p1=function(e){return{collectionFilter:{padding:"16px",paddingTop:0},collectionItem:{whiteSpace:"normal"},collectionMetadata:{padding:"16px"},dark:{color:"#000000"},dialog:{position:"absolute !important"},dialogContent:{padding:e.spacing(1)},light:{color:e.palette.grey[400]},listitem:{"&:focus":{backgroundColor:e.palette.action.focus},"&:hover":{backgroundColor:e.palette.action.hover},cursor:"pointer"}}},h1=j(L(),D(p1),A(d1,f1),W("CollectionDialog"));const v1=h1(hs);function m1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wn(t){return wn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},wn(t)}var E1=d.lazy(function(){return ct(()=>import("./AudioViewer-442cf80f.js"),["assets/AudioViewer-442cf80f.js","assets/index-20109f1f.js","assets/index-de385847.css"])}),vs=d.lazy(function(){return ct(()=>import("./GalleryView-fd154492.js"),["assets/GalleryView-fd154492.js","assets/index-20109f1f.js","assets/index-de385847.css"])}),ms=d.lazy(function(){return ct(()=>import("./SelectCollection-1cd7a2d7.js"),["assets/SelectCollection-1cd7a2d7.js","assets/index-20109f1f.js","assets/index-de385847.css"])}),gs=d.lazy(function(){return ct(()=>import("./WindowViewer-d9f1a515.js"),["assets/WindowViewer-d9f1a515.js","assets/index-20109f1f.js","assets/index-de385847.css"])}),$1=d.lazy(function(){return ct(()=>import("./VideoViewer-6e91373b.js"),["assets/VideoViewer-6e91373b.js","assets/index-20109f1f.js","assets/index-de385847.css"])});vs.displayName="GalleryView";ms.displayName="SelectCollection";gs.displayName="WindowViewer";var ys=function(t){y1(n,t);var e=b1(n);function n(){return m1(this,n),e.apply(this,arguments)}return g1(n,[{key:"renderViewer",value:function(){var o=this.props,a=o.audioResources,c=o.isCollection,l=o.isFetching,u=o.videoResources,s=o.view,f=o.windowId;return c?i.createElement(i.Fragment,null,i.createElement(ms,{windowId:f})):l===!1?s==="gallery"?i.createElement(vs,{windowId:f}):u.length>0?i.createElement($1,{windowId:f}):a.length>0?i.createElement(E1,{windowId:f}):i.createElement(gs,{windowId:f}):null}},{key:"render",value:function(){var o=this.props,a=o.isCollectionDialogVisible,c=o.windowId,l=o.classes,u=o.children;return i.createElement("div",{className:ee(V("primary-window"),l.primaryWindow)},i.createElement(aE,{windowId:c}),i.createElement(Qe,{windowId:c,position:"left"}),a&&i.createElement(v1,{windowId:c}),i.createElement(d.Suspense,{fallback:i.createElement("div",null)},u||this.renderViewer()))}}]),n}(d.Component);ys.defaultProps={audioResources:[],children:void 0,isCollection:!1,isCollectionDialogVisible:!1,isFetching:!1,videoResources:[],view:void 0};var P1=function(e,n){var r=n.windowId,o=Nt(e,{windowId:r});return{audioResources:Ed(e,{windowId:r})||[],isCollection:o&&o.isCollection(),isCollectionDialogVisible:Oe(e,{windowId:r}).collectionDialogOn,videoResources:$d(e,{windowId:r})||[]}},C1={primaryWindow:{display:"flex",flex:1,position:"relative"}},k1=j(D(C1),A(P1,null),W("PrimaryWindow"));const S1=k1(ys);function T1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _n(t){return _n=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_n(t)}var bs=function(t){I1(n,t);var e=x1(n);function n(){return T1(this,n),e.apply(this,arguments)}return R1(n,[{key:"render",value:function(){var o=this.props,a=o.allowClose,c=o.allowWindowSideBar,l=o.ariaLabel,u=o.children,s=o.classes,f=o.label,p=o.removeWindow,h=o.t,v=o.windowId;return i.createElement(se,{component:"section",elevation:1,id:v,className:ee(s.window,V("placeholder-window")),"aria-label":f&&l?h("window",{label:f}):null},i.createElement(Kn,{position:"relative",color:"default"},i.createElement(Un,{disableGutters:!0,className:ee(s.windowTopBarStyle,V("window-top-bar")),variant:"dense"},c&&i.createElement(ue,{"aria-label":h("toggleWindowSideBar"),disabled:!0},i.createElement(ja,null)),i.createElement(B,{variant:"h2",noWrap:!0,color:"inherit",className:s.title},f),a&&p&&i.createElement(ue,{"aria-label":h("closeWindow"),className:ee(s.button,V("window-close")),onClick:p,TooltipProps:{tabIndex:l?"0":"-1"}},i.createElement(oa,null)))),u)}}]),n}(d.Component);bs.defaultProps={allowClose:!0,allowWindowSideBar:!0,ariaLabel:!0,children:null,classes:{},label:"",removeWindow:function(){},t:function(e){return e}};function gc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function yc(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function On(t){return On=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},On(t)}var $s=function(t){X1(n,t);var e=Y1(n);function n(r){var o;return K1(this,n),o=e.call(this,r),o.onReceiveAccessTokenMessage=o.onReceiveAccessTokenMessage.bind(Es(o)),o}return J1(n,[{key:"onReceiveAccessTokenMessage",value:function(o){var a=this.props,c=a.handleAccessTokenMessage,l=a.url;o.data&&o.data.messageId&&o.data.messageId===l&&c(o.data)}},{key:"render",value:function(){var o=this.props.url;return o?i.createElement(G1,{attributes:{"aria-hidden":!0,height:1,src:"".concat(o,"?origin=").concat(window.origin,"&messageId=").concat(o),style:{visibility:"hidden"},width:1},handleReceiveMessage:this.onReceiveAccessTokenMessage}):i.createElement(i.Fragment,null)}}]),n}(d.Component);$s.defaultProps={url:void 0};function t$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _c(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function En(t){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},En(t)}var Ps=function(t){r$(n,t);var e=o$(n);function n(r){var o;return t$(this,n),o=e.call(this,r),o.released=void 0,o.window=null,o.checkIfWindowClosed=null,o}return n$(n,[{key:"componentDidMount",value:function(){this.openWindow()}},{key:"componentWillUnmount",value:function(){this.window&&this.window.close()}},{key:"onClose",value:function(){var o=this.props,a=o.onClose,c=o.url;this.released||(this.released=!0,clearInterval(this.checkIfWindowClosed),a(c))}},{key:"openWindow",value:function(){var o=this,a=this.props,c=a.depWindow,l=a.features,u=a.name,s=a.url;this.window=(c||window).open(s,u,l),this.released=!1,this.checkIfWindowClosed=setInterval(function(){(!o.window||o.window.closed)&&o.onClose()},250)}},{key:"render",value:function(){return null}}]),n}(d.Component);Ps.defaultProps={depWindow:void 0,features:void 0,name:void 0};var Ga={},l$=K,u$=J;Object.defineProperty(Ga,"__esModule",{value:!0});var Mo=Ga.default=void 0,s$=u$(d),f$=l$(G()),d$=(0,f$.default)(s$.createElement("path",{d:"M20 8h-3V6.21c0-2.61-1.91-4.94-4.51-5.19C9.51.74 7 3.08 7 6v2H4v14h16V8zm-8 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z"}),"LockSharp");Mo=Ga.default=d$;function Oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ec(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$n(t)}var Cs=function(t){m$(n,t);var e=g$(n);function n(r){var o;return h$(this,n),o=e.call(this,r),o.state={open:!1},o.setOpen=o.setOpen.bind(Wo(o)),o.onSubmit=o.onSubmit.bind(Wo(o)),o}return v$(n,[{key:"onSubmit",value:function(){var o=this.props.onConfirm;this.setOpen(!1),o()}},{key:"setOpen",value:function(o){this.setState(function(a){return Ec(Ec({},a),{},{open:o})})}},{key:"render",value:function(){var o=this,a=this.props,c=a.classes,l=a.confirmButton,u=a.continueLabel,s=a.header,f=a.description,p=a.icon,h=a.label,v=a.t,m=a.ruleSet,b=a.hasLogoutService,_=a.status,E=a.ConfirmProps;if(_==="ok"&&!b)return null;var g=this.state.open,$=i.createElement(le,Object.assign({onClick:this.onSubmit,className:c.buttonInvert,color:"secondary"},E),l||v("login"));return!f&&!s?i.createElement(se,{square:!0,elevation:4,color:"secondary",classes:{root:c.paper}},i.createElement("div",{className:c.topBar},p||i.createElement(Mo,{className:c.icon}),i.createElement(B,{className:c.label,component:"h3",variant:"body1",color:"inherit"},m?i.createElement(mt,{htmlString:h,ruleSet:m}):h),i.createElement(he,this.props),$)):i.createElement(se,{square:!0,elevation:4,color:"secondary",classes:{root:c.paper}},i.createElement(le,{fullWidth:!0,className:c.topBar,onClick:function(){return o.setOpen(!0)},component:"div",color:"inherit"},p||i.createElement(Mo,{className:c.icon}),i.createElement(B,{className:c.label,component:"h3",variant:"body1",color:"inherit"},m?i.createElement(mt,{htmlString:h,ruleSet:m}):h),i.createElement(he,this.props),i.createElement("span",{className:c.fauxButton},!g&&i.createElement(B,{variant:"button",color:"inherit"},u||v("continue")))),i.createElement(dl,{in:g,onClose:function(){return o.setOpen(!1)}},i.createElement(B,{variant:"body1",color:"inherit",className:c.expanded},m?i.createElement(mt,{htmlString:s,ruleSet:m}):s,s&&f?": ":"",m?i.createElement(mt,{htmlString:f,ruleSet:m}):f),i.createElement(lt,null,i.createElement(le,{onClick:function(){return o.setOpen(!1)},color:"inherit"},v("cancel")),$)))}}]),n}(d.Component);Cs.defaultProps={confirmButton:void 0,ConfirmProps:{},continueLabel:void 0,description:void 0,hasLogoutService:!0,header:void 0,icon:void 0,ruleSet:"iiif",status:void 0,t:function(e){return e}};var w$=function(e){return{buttonInvert:{"&:hover":{backgroundColor:Cd(e.palette.secondary.contrastText,1-e.palette.action.hoverOpacity)},backgroundColor:e.palette.secondary.contrastText,marginLeft:e.spacing(5),paddingBottom:0,paddingTop:0},expanded:{paddingLeft:e.spacing(),paddingRight:e.spacing()},failure:{backgroundColor:e.palette.error.dark},fauxButton:{marginLeft:e.spacing(2.5)},icon:{marginRight:e.spacing(1.5),verticalAlign:"text-bottom"},label:{lineHeight:2.25},paper:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText,cursor:"pointer"},topBar:{"&:hover":{backgroundColor:e.palette.secondary.main},alignItems:"center",display:"flex",justifyContent:"inherit",padding:e.spacing(1),textTransform:"none"}}},_$=j(L(),D(w$),W("WindowAuthenticationBar"));const hr=_$(Cs);function O$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pn(t){return Pn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(t)}var ks=function(t){$$(n,t);var e=P$(n);function n(r){var o;return O$(this,n),o=e.call(this,r),o.performLogout=o.performLogout.bind(No(o)),o.onReceiveAccessTokenMessage=o.onReceiveAccessTokenMessage.bind(No(o)),o}return E$(n,[{key:"onReceiveAccessTokenMessage",value:function(o){var a=this.props,c=a.authServiceId,l=a.accessTokenServiceId,u=a.resolveAccessTokenRequest;u(c,l,o)}},{key:"defaultAuthBarProps",value:function(){var o=this.props,a=o.authServiceId,c=o.windowId,l=o.status,u=o.logoutServiceId;return{authServiceId:a,hasLogoutService:!!u,status:l,windowId:c}}},{key:"performLogout",value:function(){var o=this.props,a=o.accessTokenServiceId,c=o.authServiceId,l=o.features,u=o.logoutServiceId,s=o.resetAuthenticationState,f=o.openWindow;f(u,void 0,l),s({authServiceId:c,tokenServiceId:a})}},{key:"renderLoggedIn",value:function(){var o=this.props,a=o.isInteractive,c=o.logoutConfirm,l=o.t;return a?i.createElement(hr,Object.assign({confirmButton:c||l("logout"),onConfirm:this.performLogout},this.defaultAuthBarProps())):null}},{key:"renderFailure",value:function(){var o=this.props,a=o.handleAuthInteraction,c=o.failureHeader,l=o.failureDescription,u=o.t,s=o.authServiceId,f=o.windowId;return i.createElement(hr,Object.assign({header:c,description:l,confirmButton:u("retry"),onConfirm:function(){return a(f,s)}},this.defaultAuthBarProps()))}},{key:"renderLoggingInCookie",value:function(){var o=this.props,a=o.accessTokenServiceId,c=o.authServiceId,l=o.resolveAuthenticationRequest,u=o.features;return i.createElement(i.Fragment,null,this.renderLogin(),i.createElement(Ps,{name:"IiifLoginSender",url:"".concat(c,"?origin=").concat(window.origin),features:u,onClose:function(){return l(c,a)}}))}},{key:"renderLoggingInToken",value:function(){var o=this.props.accessTokenServiceId;return i.createElement(i.Fragment,null,this.renderLogin(),i.createElement($s,{handleAccessTokenMessage:this.onReceiveAccessTokenMessage,url:o}))}},{key:"renderLogin",value:function(){var o=this.props,a=o.confirm,c=o.description,l=o.handleAuthInteraction,u=o.header,s=o.isInteractive,f=o.label,p=o.authServiceId,h=o.windowId;return s?i.createElement(hr,Object.assign({header:u,description:c,label:f,confirmButton:a,onConfirm:function(){return l(h,p)}},this.defaultAuthBarProps())):null}},{key:"render",value:function(){var o=this.props,a=o.authServiceId,c=o.status;return a?c===null?this.renderLogin():c==="cookie"?this.renderLoggingInCookie():c==="token"?this.renderLoggingInToken():c==="failed"?this.renderFailure():c==="ok"?this.renderLoggedIn():null:null}}]),n}(d.Component);ks.defaultProps={confirm:void 0,description:void 0,failureDescription:void 0,failureHeader:void 0,features:"centerscreen",header:void 0,isInteractive:!0,label:void 0,logoutConfirm:void 0,logoutServiceId:void 0,openWindow:window.open,status:null,t:function(e){return e}};var S$=function(e,n){var r=n.windowId,o=kd(e,{windowId:r}),a=o[0],c=a&&(gt.getService(a,"http://iiif.io/api/auth/1/token")||gt.getService(a,"http://iiif.io/api/auth/0/token")),l=a&&(gt.getService(a,"http://iiif.io/api/auth/1/logout")||gt.getService(a,"http://iiif.io/api/auth/0/logout")),u=Sd(e),s=a&&u[a.id],f=Td(e),p=c&&f[c.id],h=null;s?s.isFetching?s.windowId===r&&(h="cookie"):p&&p.isFetching?s.windowId===r&&(h="token"):s.ok?h="ok":s.ok===!1&&(h="failed"):h=null;var v=Rd(e),m=a&&a.getProfile(),b=v.some(function(_){return _.profile===m&&!(_.external||_.kiosk)});return{accessTokenServiceId:c&&c.id,authServiceId:a&&a.id,confirm:a&&a.getConfirmLabel(),description:a&&a.getDescription(),failureDescription:a&&a.getFailureDescription(),failureHeader:a&&a.getFailureHeader(),header:a&&a.getHeader(),isInteractive:b,label:a&&a.getLabel()[0].value,logoutConfirm:l&&l.getLabel()[0]&&l.getLabel()[0].value,logoutServiceId:l&&l.id,profile:m,status:h}},T$={handleAuthInteraction:Id,resetAuthenticationState:xd,resolveAccessTokenRequest:Dd,resolveAuthenticationRequest:Md},R$=j(L(),A(S$,T$),W("IIIFAuthentication"));const I$=R$(ks);function x$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cn(t)}var Ka=function(t){M$(n,t);var e=j$(n);function n(r){var o;return x$(this,n),o=e.call(this,r),o.state={},o}return D$(n,[{key:"wrappedTopBar",value:function(){var o=this.props,a=o.windowId,c=o.workspaceType,l=o.windowDraggable,u=i.createElement("div",null,i.createElement(vO,{windowId:a,windowDraggable:l}),i.createElement(I$,{windowId:a}));if(c==="mosaic"&&l){var s=this.context.mosaicWindowActions;return s.connectDragSource(u)}return u}},{key:"render",value:function(){var o=this.props,a=o.focusWindow,c=o.label,l=o.isFetching,u=o.maximized,s=o.sideBarOpen,f=o.view,p=o.windowId,h=o.classes,v=o.t,m=o.manifestError,b=this.state,_=b.error,E=b.hasError;return E?i.createElement(ws,{windowId:p},i.createElement(Po,{error:_,windowId:p})):i.createElement(se,{onFocus:a,component:"section",elevation:1,id:p,className:ee(h.window,V("window"),u?h.maximized:null),"aria-label":v("window",{label:c})},this.wrappedTopBar(),m&&i.createElement(Po,{error:{stack:m},windowId:p}),i.createElement("div",{className:h.middle},i.createElement("div",{className:h.middleLeft},i.createElement("div",{className:h.primaryWindow},i.createElement(S1,{view:f,windowId:p,isFetching:l,sideBarOpen:s})),i.createElement("div",{className:h.companionAreaBottom},i.createElement(Qe,{windowId:p,position:"bottom"}))),i.createElement("div",{className:h.companionAreaRight},i.createElement(Qe,{windowId:p,position:"right"}),i.createElement(Qe,{windowId:p,position:"far-right"}))),i.createElement(Qe,{windowId:p,position:"far-bottom"}),i.createElement(he,this.props))}}],[{key:"getDerivedStateFromError",value:function(o){return{error:o,hasError:!0}}}]),n}(d.Component);Ka.contextType=Hu;Ka.defaultProps={classes:{},focusWindow:function(){},isFetching:!1,label:null,manifestError:null,maximized:!1,sideBarOpen:!1,view:void 0,windowDraggable:null,workspaceType:null};var A$=function(e,n){var r=n.windowId;return{isFetching:Pr(e,{windowId:r}).isFetching,label:Zn(e,{windowId:r}),manifestError:jd(e,{windowId:r}),maximized:(Oe(e,{windowId:r})||{}).maximized,sideBarOpen:(Oe(e,{windowId:r})||{}).sideBarOpen,thumbnailNavigationPosition:El(e,{windowId:r}),view:$l(e,{windowId:r}),window:Oe(e,{windowId:r}),windowDraggable:Wd(e,{windowId:r}),workspaceType:ia(e)}},L$=function(e,n){var r=n.windowId;return{focusWindow:function(){return e(ca(r))}}},z$=function(e){return{companionAreaBottom:{display:"flex",flex:"0",flexBasis:"auto",minHeight:0},companionAreaRight:{display:"flex",flex:"0 1 auto",minHeight:0},maximized:{},middle:{display:"flex",flex:"1",flexDirection:"row",minHeight:0},middleLeft:{display:"flex",flex:"1",flexDirection:"column",minHeight:0},primaryWindow:{display:"flex",flex:"1",height:"300px",minHeight:0,position:"relative"},thumbnailArea:{backgroundColor:e.palette.shades.dark},thumbnailAreaBottom:{},thumbnailAreaRight:{minWidth:100},window:{"&$maximized":{left:0,position:"absolute",top:0,zIndex:e.zIndex.modal-1},backgroundColor:e.palette.shades.dark,borderRadius:0,display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden",width:"100%"}}},H$=j(L(),D(z$),A(A$,L$),W("Window"));const kn=H$(Ka);var qe={},Ze={},V$=Bd,F$=Nd,q$=Object.prototype,U$=q$.hasOwnProperty,Z$=F$(function(t,e,n){U$.call(t,n)?++t[n]:V$(t,n,1)}),G$=Z$,K$=Ld,J$=Ad(),X$=zd;function Y$(t,e,n){for(var r=-1,o=e.length,a={};++rmr)&&t.nsecs===void 0&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");mr=u,gr=s,vr=c,u+=122192928e5;var p=((u&268435455)*1e4+s)%4294967296;o[r++]=p>>>24&255,o[r++]=p>>>16&255,o[r++]=p>>>8&255,o[r++]=p&255;var h=u/4294967296*1e4&268435455;o[r++]=h>>>8&255,o[r++]=h&255,o[r++]=h>>>24&15|16,o[r++]=h>>>16&255,o[r++]=c>>>8|128,o[r++]=c&255;for(var v=0;v<6;++v)o[r+v]=a[v];return e||lP(o)}var sP=uP,fP=sP,Ss=Zd,Ja=Ss;Ja.v1=fP;Ja.v4=Ss;var dP=Ja,er={},tr={};function pP(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}var hP=pP,vP=hP,yr=Gd;function mP(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=yr(n),n=n===n?n:0),e!==void 0&&(e=yr(e),e=e===e?e:0),vP(yr(t),e,n)}var gP=mP,yP=Kd,bP=Jd,wP="Expected a function";function _P(t,e,n){var r=!0,o=!0;if(typeof t!="function")throw new TypeError(wP);return bP(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),yP(t,e,{leading:r,maxWait:e,trailing:o})}var OP=_P,Xa={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.assertNever=void 0;function EP(t){throw new Error("Unhandled case: "+JSON.stringify(t))}nr.assertNever=EP;(function(t){var e=S&&S.__assign||function(){return e=Object.assign||function(r){for(var o,a=1,c=arguments.length;a1;){for(;_.length>0;)_.length>1?E.push({direction:"row",first:_.shift(),second:_.shift()}):E.unshift(_.shift());_=E,E=[]}return o(_[0],b)}t.createBalancedTreeFromLeaves=l;function u(m){if(m==="first")return"second";if(m==="second")return"first";throw new Error("Branch '"+m+"' not a valid branch")}t.getOtherBranch=u;function s(m){return m==="row"?"column":"row"}t.getOtherDirection=s;function f(m,b){for(var _=m,E=[];c(_);)_.direction==="row"&&(b===a.TOP_LEFT||b===a.BOTTOM_LEFT)||_.direction==="column"&&(b===a.TOP_LEFT||b===a.TOP_RIGHT)?(E.push("first"),_=_.first):(E.push("second"),_=_.second);return E}t.getPathToCorner=f;function p(m){return m==null?[]:c(m)?p(m.first).concat(p(m.second)):[m]}t.getLeaves=p;function h(m,b){return b.length>0?r.default(m,b,null):m}t.getNodeAtPath=h;function v(m,b){if(m==null)throw new Error("Root is empty, cannot fetch path");var _=h(m,b);if(_==null)throw new Error("Path ["+b.join(", ")+"] did not resolve to a node");return _}t.getAndAssertNodeAtPathExists=v})(_e);var RP=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tn=S&&S.__assign||function(){return Tn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n"u"&&!a.call(y,T))&&(k===y&&(k=p(y)),u(k)==="Map"?k.set(T,M):k[T]=M)}}),k},w}();e.Context=h;var v={$push:function(w,y,P){return b(y,P,"$push"),w.length?y.concat(w):y},$unshift:function(w,y,P){return b(y,P,"$unshift"),w.length?w.concat(y):y},$splice:function(w,y,P,C){return E(y,P),w.forEach(function(O){g(O),y===C&&O.length&&(y=p(C)),c.apply(y,O)}),y},$set:function(w,y,P){return R(P),w},$toggle:function(w,y){_(w,"$toggle");var P=w.length?p(y):y;return w.forEach(function(C){P[C]=!y[C]}),P},$unset:function(w,y,P,C){return _(w,"$unset"),w.forEach(function(O){Object.hasOwnProperty.call(y,O)&&(y===C&&(y=p(C)),delete y[O])}),y},$add:function(w,y,P,C){return X(y,"$add"),_(w,"$add"),u(y)==="Map"?w.forEach(function(O){var k=O[0],T=O[1];y===C&&y.get(k)!==T&&(y=p(C)),y.set(k,T)}):w.forEach(function(O){y===C&&!y.has(O)&&(y=p(C)),y.add(O)}),y},$remove:function(w,y,P,C){return X(y,"$remove"),_(w,"$remove"),w.forEach(function(O){y===C&&y.has(O)&&(y=p(C)),y.delete(O)}),y},$merge:function(w,y,P,C){return z(y,w),f(w).forEach(function(O){w[O]!==y[O]&&(y===C&&(y=p(C)),y[O]=w[O])}),y},$apply:function(w,y){return $(w),w(y)}},m=new h;e.isEquals=m.update.isEquals,e.extend=m.extend,e.default=m.update,e.default.default=t.exports=s(e.default,e);function b(w,y,P){o(Array.isArray(w),function(){return"update(): expected target of "+n(P)+" to be an array; got "+n(w)+"."}),_(y[P],P)}function _(w,y){o(Array.isArray(w),function(){return"update(): expected spec of "+n(y)+" to be an array; got "+n(w)+". Did you forget to wrap your parameter in an array?"})}function E(w,y){o(Array.isArray(w),function(){return"Expected $splice target to be an array; got "+n(w)}),g(y.$splice)}function g(w){o(Array.isArray(w),function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(w)+". Did you forget to wrap your parameters in an array?"})}function $(w){o(typeof w=="function",function(){return"update(): expected spec of $apply to be a function; got "+n(w)+"."})}function R(w){o(Object.keys(w).length===1,function(){return"Cannot have more than one key in an object with $set"})}function z(w,y){o(y&&typeof y=="object",function(){return"update(): $merge expects a spec of type 'object'; got "+n(y)}),o(w&&typeof w=="object",function(){return"update(): $merge expects a target of type 'object'; got "+n(w)})}function X(w,y){var P=u(w);o(P==="Map"||P==="Set",function(){return"update(): "+n(y)+" expects a target of type Set or Map; got "+n(P)})}})(Lo,Lo.exports);var nC=Lo.exports,rC=fa,oC=da;function aC(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:oC(e),rC(t,e<0?0:e,r)):[]}var iC=aC,cC=fa,lC=da;function uC(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:lC(e),e=r-e,cC(t,0,e<0?0:e)):[]}var ei=uC;const sC=pa(ei);var fC=ep;function dC(t,e){return fC(t,e)}var ti=dC;const pC=pa(ti);var hC=fa,vC=da;function mC(t,e,n){return t&&t.length?(e=n||e===void 0?1:vC(e),hC(t,0,e<0?0:e)):[]}var gC=mC,Le=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ie,"__esModule",{value:!0});ie.createExpandUpdate=ie.createHideUpdate=ie.createDragToUpdates=js=ie.createRemoveUpdate=zo=ie.updateTree=ie.buildSpecFromUpdate=void 0;var yC=Le(nC),bC=Le(iC),Is=Le(ei),wC=Le(ti),xs=Le(tp),_C=Le(np()),xc=Le(gC),Et=Ke,Rn=_e;function Ds(t){return t.path.length>0?_C.default({},t.path,t.spec):t.spec}ie.buildSpecFromUpdate=Ds;function Ms(t,e){var n=t;return e.forEach(function(r){n=yC.default(n,Ds(r))}),n}var zo=ie.updateTree=Ms;function Ho(t,e){var n=Is.default(e),r=xs.default(e),o=n.concat(Rn.getOtherBranch(r)),a=Rn.getAndAssertNodeAtPathExists(t,o);return{path:n,spec:{$set:a}}}var js=ie.createRemoveUpdate=Ho;function Dc(t,e,n){return wC.default(xc.default(t,n),xc.default(e,n))}function OC(t,e,n,r){var o=Rn.getAndAssertNodeAtPathExists(t,n),a=[],c=Dc(e,n,n.length);if(c)o=Ms(o,[Ho(o,bC.default(e,n.length))]);else{a.push(Ho(t,e));var l=Dc(e,n,e.length-1);l&&n.splice(e.length-1,1)}var u=Rn.getAndAssertNodeAtPathExists(t,e),s,f;r===Et.MosaicDropTargetPosition.LEFT||r===Et.MosaicDropTargetPosition.TOP?(s=u,f=o):(s=o,f=u);var p="column";return(r===Et.MosaicDropTargetPosition.LEFT||r===Et.MosaicDropTargetPosition.RIGHT)&&(p="row"),a.push({path:n,spec:{$set:{first:s,second:f,direction:p}}}),a}ie.createDragToUpdates=OC;function EC(t){var e=Is.default(t),n=xs.default(t),r;return n==="first"?r=0:r=100,{path:e,spec:{splitPercentage:{$set:r}}}}ie.createHideUpdate=EC;function $C(t,e){for(var n,r={},o=t.length-1;o>=0;o--){var a=t[o],c=a==="first"?e:100-e;r=(n={splitPercentage:{$set:c}},n[a]=r,n)}return{spec:r,path:[]}}ie.createExpandUpdate=$C;var Ws=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vo=S&&S.__assign||function(){return Vo=Object.assign||function(t){for(var e,n=1,r=arguments.length;nO.rootElement.offsetHeight?"row":"column";return Promise.resolve(M.apply(void 0,k)).then(function(ae){return N.replaceWith(x,{direction:oe,second:ae,first:$.getAndAssertNodeAtPathExists(Y,x)})})},O.swap=function(){for(var k=[],T=0;T0,$e=be?this.props.connectDragSource:function(Je){return Je};if(oe){var xe=$e(oe(this.props,M));return f.default.createElement("div",{className:o.default("mosaic-window-toolbar",{draggable:be})},xe)}var we=$e(f.default.createElement("div",{title:H,className:"mosaic-window-title"},H)),He=!l.default(x);return f.default.createElement("div",{className:o.default("mosaic-window-toolbar",{draggable:be})},we,f.default.createElement("div",{className:o.default("mosaic-window-controls",R.OptionalBlueprint.getClasses("BUTTON_GROUP"))},He&&f.default.createElement("button",{onClick:function(){return k.setAdditionalControlsOpen(!ae)},className:o.default(R.OptionalBlueprint.getClasses("BUTTON","MINIMAL"),R.OptionalBlueprint.getIconClass("MORE"),(O={},O[R.OptionalBlueprint.getClasses("ACTIVE")]=ae,O))},f.default.createElement("span",{className:"control-text"},N)),He&&f.default.createElement(v.Separator,null),ve))},C.prototype.checkCreateNode=function(){if(this.props.createNode==null)throw new Error("Operation invalid unless `createNode` is defined")},C.defaultProps={additionalControlButtonText:"More",draggable:!0,renderPreview:function(O){var k=O.title;return f.default.createElement("div",{className:"mosaic-preview"},f.default.createElement("div",{className:"mosaic-window-toolbar"},f.default.createElement("div",{className:"mosaic-window-title"},k)),f.default.createElement("div",{className:"mosaic-window-body"},f.default.createElement("h4",null,k),f.default.createElement(R.OptionalBlueprint.Icon,{iconSize:72,icon:"application"})))},renderToolbar:null},C.contextType=m.MosaicContext,C}(f.default.Component);t.InternalMosaicWindow=z;var X={beginDrag:function(P,C,O){P.onDragStart&&P.onDragStart();var k=a.default(function(){return O.context.mosaicActions.hide(O.props.path)});return{mosaicId:O.context.mosaicId,hideTimer:k}},endDrag:function(P,C,O){var k=C.getItem().hideTimer;window.clearTimeout(k);var T=O.props.path,H=C.getDropResult()||{},M=O.context.mosaicActions,x=H.position,N=H.path;x!=null&&N!=null&&!u.default(N,T)?(M.updateTree(g.createDragToUpdates(M.getRoot(),T,N,x)),P.onDragEnd&&P.onDragEnd("drop")):(M.updateTree([{path:c.default(T),spec:{splitPercentage:{$set:null}}}]),P.onDragEnd&&P.onDragEnd("reset"))}},w={};t.SourceConnectedInternalMosaicWindow=p.DragSource(E.MosaicDragType.WINDOW,X,function(P,C){return{connectDragSource:P.dragSource(),connectDragPreview:P.dragPreview()}})(z),t.SourceDropConnectedInternalMosaicWindow=p.DropTarget(E.MosaicDragType.WINDOW,w,function(P,C){return{connectDropTarget:P.dropTarget(),isOver:C.isOver(),draggedMosaicId:(C.getItem()||{}).mosaicId}})(t.SourceConnectedInternalMosaicWindow);var y=function(P){e(C,P);function C(){return P!==null&&P.apply(this,arguments)||this}return C.prototype.render=function(){return f.default.createElement(t.SourceDropConnectedInternalMosaicWindow,n({},this.props))},C}(f.default.PureComponent);t.MosaicWindow=y})(Ns);(function(t){Object.defineProperty(t,"__esModule",{value:!0});/** + * @license + * Copyright 2019 Kevin Verdieck, originally developed at Palantir Technologies, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */var e=Ze;Object.defineProperty(t,"Mosaic",{enumerable:!0,get:function(){return e.Mosaic}}),Object.defineProperty(t,"MosaicWithoutDragDropContext",{enumerable:!0,get:function(){return e.MosaicWithoutDragDropContext}});var n=Ae;Object.defineProperty(t,"MosaicDragType",{enumerable:!0,get:function(){return n.MosaicDragType}});var r=ce;Object.defineProperty(t,"MosaicContext",{enumerable:!0,get:function(){return r.MosaicContext}}),Object.defineProperty(t,"MosaicWindowContext",{enumerable:!0,get:function(){return r.MosaicWindowContext}});var o=ie;Object.defineProperty(t,"buildSpecFromUpdate",{enumerable:!0,get:function(){return o.buildSpecFromUpdate}}),Object.defineProperty(t,"createDragToUpdates",{enumerable:!0,get:function(){return o.createDragToUpdates}}),Object.defineProperty(t,"createExpandUpdate",{enumerable:!0,get:function(){return o.createExpandUpdate}}),Object.defineProperty(t,"createHideUpdate",{enumerable:!0,get:function(){return o.createHideUpdate}}),Object.defineProperty(t,"createRemoveUpdate",{enumerable:!0,get:function(){return o.createRemoveUpdate}}),Object.defineProperty(t,"updateTree",{enumerable:!0,get:function(){return o.updateTree}});var a=_e;Object.defineProperty(t,"createBalancedTreeFromLeaves",{enumerable:!0,get:function(){return a.createBalancedTreeFromLeaves}}),Object.defineProperty(t,"Corner",{enumerable:!0,get:function(){return a.Corner}}),Object.defineProperty(t,"getAndAssertNodeAtPathExists",{enumerable:!0,get:function(){return a.getAndAssertNodeAtPathExists}}),Object.defineProperty(t,"getLeaves",{enumerable:!0,get:function(){return a.getLeaves}}),Object.defineProperty(t,"getNodeAtPath",{enumerable:!0,get:function(){return a.getNodeAtPath}}),Object.defineProperty(t,"getOtherBranch",{enumerable:!0,get:function(){return a.getOtherBranch}}),Object.defineProperty(t,"getOtherDirection",{enumerable:!0,get:function(){return a.getOtherDirection}}),Object.defineProperty(t,"getPathToCorner",{enumerable:!0,get:function(){return a.getPathToCorner}}),Object.defineProperty(t,"isParent",{enumerable:!0,get:function(){return a.isParent}});var c=Ns;Object.defineProperty(t,"MosaicWindow",{enumerable:!0,get:function(){return c.MosaicWindow}});var l=Ie;Object.defineProperty(t,"createDefaultToolbarButton",{enumerable:!0,get:function(){return l.createDefaultToolbarButton}});var u=ut;Object.defineProperty(t,"MosaicZeroState",{enumerable:!0,get:function(){return u.MosaicZeroState}});var s=vt;Object.defineProperty(t,"Separator",{enumerable:!0,get:function(){return s.Separator}});var f=ft;Object.defineProperty(t,"ExpandButton",{enumerable:!0,get:function(){return f.ExpandButton}});var p=pt;Object.defineProperty(t,"ReplaceButton",{enumerable:!0,get:function(){return p.ReplaceButton}});var h=ht;Object.defineProperty(t,"SplitButton",{enumerable:!0,get:function(){return h.SplitButton}});var v=dt;Object.defineProperty(t,"RemoveButton",{enumerable:!0,get:function(){return v.RemoveButton}});var m=Ne;Object.defineProperty(t,"DEFAULT_CONTROLS_WITH_CREATION",{enumerable:!0,get:function(){return m.DEFAULT_CONTROLS_WITH_CREATION}}),Object.defineProperty(t,"DEFAULT_CONTROLS_WITHOUT_CREATION",{enumerable:!0,get:function(){return m.DEFAULT_CONTROLS_WITHOUT_CREATION}})})(qe);var $k=ip,Pk=cp,Ck=xl,Lc=lp,kk=Ck(function(t,e){return Lc(t)?$k(t,Pk(e,1,Lc,!0)):[]}),Sk=kk;const zc=pa(Sk);function Fs(t){var e=t.t,n=t.title,r=t.windowId;return i.createElement(ws,{windowId:"".concat(r,"-preview"),label:e("previewWindowTitle",{title:n}),ariaLabel:!1})}Fs.defaultProps={t:function(e){return e},title:""};function Hc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Tk(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:_e.Corner.TOP_RIGHT;return _e.getPathToCorner(this.layout,n)}},{key:"pathToParent",value:function(n){return _e.getNodeAtPath(this.layout,sC(n))}},{key:"nodeAtPath",value:function(n){return _e.getNodeAtPath(this.layout,n)}},{key:"addWindows",value:function(n){var r=this;n.forEach(function(o,a){var c=r.pathToCorner(),l=r.pathToParent(c),u=r.nodeAtPath(c),s=l?_e.getOtherDirection(l.direction):"row",f,p;s==="row"?(f=u,p=n[a]):(f=n[a],p=u);var h={path:c,spec:{$set:{direction:s,first:f,second:p}}};r.layout=zo(r.layout,[h])})}},{key:"removeWindows",value:function(n,r){var o=this,a=n.map(function(c){return js(o.layout,r[c])});this.layout=zo(this.layout,a)}}]),t}();function Bk(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function In(t){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},In(t)}var qs=function(t){Ak(n,t);var e=Lk(n);function n(r){var o;return Bk(this,n),o=e.call(this,r),o.tileRenderer=o.tileRenderer.bind(It(o)),o.mosaicChange=o.mosaicChange.bind(It(o)),o.determineWorkspaceLayout=o.determineWorkspaceLayout.bind(It(o)),o.zeroStateView=i.createElement("div",null),o.windowPaths={},o.toolbarControls=[],o.additionalControls=[],o}return Nk(n,[{key:"componentDidMount",value:function(){var o=this.props.updateWorkspaceMosaicLayout,a=this.determineWorkspaceLayout();a&&o(a)}},{key:"componentDidUpdate",value:function(o){var a=this.props,c=a.windowIds,l=a.layout,u=a.updateWorkspaceMosaicLayout,s=o.windowIds;if(!c.every(function(v){return s.includes(v)})){var f=this.determineWorkspaceLayout();pC(f,l)||u(f);return}if(!s.every(function(v){return c.includes(v)})){if(c.length===0){u(null);return}var p=zc(s,c),h=new Fc(l);h.removeWindows(p,this.windowPaths),u(h.layout)}}},{key:"bookkeepPath",value:function(o,a){this.windowPaths[o]=a}},{key:"determineWorkspaceLayout",value:function(){var o=this.props,a=o.windowIds,c=o.layout,l=qe.getLeaves(c);if(!a.every(function(f){return l.includes(f)})){if(l.length<2)return qe.createBalancedTreeFromLeaves(a);var u=zc(a,l),s=new Fc(c);return s.addWindows(u),s.layout}return l.every(function(f){return a.includes(f)})?c:qe.createBalancedTreeFromLeaves(a)}},{key:"tileRenderer",value:function(o,a){var c=this.props,l=c.windowIds,u=c.workspaceId;return l.includes(o)?(this.bookkeepPath(o,a),i.createElement(qe.MosaicWindow,{toolbarControls:this.toolbarControls,additionalControls:this.additionalControls,path:a,windowId:o,renderPreview:n.renderPreview},i.createElement(kn,{key:"".concat(o,"-").concat(u),windowId:o}))):null}},{key:"mosaicChange",value:function(o){var a=this.props.updateWorkspaceMosaicLayout;a(o)}},{key:"render",value:function(){var o=this.props,a=o.layout,c=o.classes;return i.createElement(qe.MosaicWithoutDragDropContext,{renderTile:this.tileRenderer,initialValue:a||this.determineWorkspaceLayout(),onChange:this.mosaicChange,className:ee("mirador-mosaic",c.root),zeroStateView:this.zeroStateView})}}],[{key:"renderPreview",value:function(o){return i.createElement("div",{className:"mosaic-preview","aria-hidden":!0},i.createElement(Mk,{windowId:o.windowId}))}}]),n}(i.Component);qs.defaultProps={layout:void 0,windowIds:[]};var Vk={"@global":{".mosaic":{height:"100%",width:"100%"},".mosaic, .mosaic > *":{boxSizing:"border-box"},".mosaic .mosaic-zero-state":{position:"absolute",top:6,right:6,bottom:6,left:6,width:"auto",height:"auto",zIndex:"1"},".mosaic-root":{position:"absolute",top:3,right:3,bottom:3,left:3},".mosaic-split":{position:"absolute",zIndex:"1",touchAction:"none"},".mosaic-split:hover":{background:"black"},".mosaic-split .mosaic-split-line":{position:"absolute"},".mosaic-split.-row":{marginLeft:-3,width:6,cursor:"ew-resize"},".mosaic-split.-row .mosaic-split-line":{top:"0",bottom:"0",left:3,right:3},".mosaic-split.-column":{marginTop:-3,height:6,cursor:"ns-resize"},".mosaic-split.-column .mosaic-split-line":{top:3,bottom:3,left:"0",right:"0"},".mosaic-tile":{position:"absolute",margin:3},".mosaic-tile > *":{height:"100%",width:"100%"},".mosaic-drop-target":{position:"relative"},".mosaic-drop-target.drop-target-hover .drop-target-container":{display:"block"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.left":{right:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.right":{left:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.bottom":{top:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.top":{bottom:"calc(100% - 10px )"},".mosaic-drop-target .drop-target-container":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"none"},".mosaic-drop-target .drop-target-container.-dragging":{display:"block"},".mosaic-drop-target .drop-target-container .drop-target":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",background:"rgba(0, 0, 0, 0.2)",border:"2px solid black",opacity:"0",zIndex:"5"},".mosaic-drop-target .drop-target-container .drop-target.left":{right:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.right":{left:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.bottom":{top:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.top":{bottom:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover":{opacity:"1"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.left":{right:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.right":{left:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.bottom":{top:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.top":{bottom:"calc(100% - 50% )"},".mosaic-window, .mosaic-preview":{position:"relative",display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxOrient:"vertical",webkitBoxDirection:"normal",flexDirection:"column",overflow:"hidden",boxShadow:"0 0 1px rgba(0, 0, 0, 0.2)"},".mosaic-window .mosaic-window-toolbar, .mosaic-preview .mosaic-window-toolbar":{zIndex:"4",display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxPack:"justify",justifyContent:"space-between",webkitBoxAlign:"center",alignItems:"center",flexShrink:"0",height:30,background:"white",boxShadow:"0 1px 1px rgba(0, 0, 0, 0.2)"},".mosaic-window .mosaic-window-toolbar.draggable, .mosaic-preview .mosaic-window-toolbar.draggable":{cursor:"move"},".mosaic-window .mosaic-window-title, .mosaic-preview .mosaic-window-title":{paddingLeft:15,webkitBoxFlex:"1",flex:"1",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minHeight:18},".mosaic-window .mosaic-window-controls, .mosaic-preview .mosaic-window-controls":{display:"flex",fallbacks:[{display:"-webkit-box"}],height:"100%"},".mosaic-window .mosaic-window-controls .separator, .mosaic-preview .mosaic-window-controls .separator":{height:20,borderLeft:"1px solid black",margin:"5px 4px"},".mosaic-window .mosaic-window-body, .mosaic-preview .mosaic-window-body":{position:"relative",webkitBoxFlex:"1",flex:"1",height:"0",background:"white",zIndex:"1",overflow:"hidden"},".mosaic-window .mosaic-window-additional-actions-bar, .mosaic-preview .mosaic-window-additional-actions-bar":{position:"absolute",top:30,right:"0",bottom:"initial",left:"0",height:"0",overflow:"hidden",background:"white",webkitBoxPack:"end",justifyContent:"flex-end",display:"flex",fallbacks:[{display:"-webkit-box"}],zIndex:"3"},".mosaic-window .mosaic-window-additional-actions-bar .bp3-button, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button":{margin:"0"},".mosaic-window .mosaic-window-additional-actions-bar .bp3-button:after, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button:after":{display:"none"},".mosaic-window .mosaic-window-body-overlay, .mosaic-preview .mosaic-window-body-overlay":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",opacity:"0",background:"white",display:"none",zIndex:"2"},".mosaic-window.additional-controls-open .mosaic-window-additional-actions-bar, .mosaic-preview.additional-controls-open .mosaic-window-additional-actions-bar":{height:30},".mosaic-window.additional-controls-open .mosaic-window-body-overlay, .mosaic-preview.additional-controls-open .mosaic-window-body-overlay":{display:"block"},".mosaic-window .mosaic-preview, .mosaic-preview .mosaic-preview":{height:"100%",width:"100%",position:"absolute",zIndex:"0",border:"1px solid black",maxHeight:400},".mosaic-window .mosaic-preview .mosaic-window-body, .mosaic-preview .mosaic-preview .mosaic-window-body":{display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxOrient:"vertical",webkitBoxDirection:"normal",flexDirection:"column",webkitBoxAlign:"center",alignItems:"center",webkitBoxPack:"center",justifyContent:"center"},".mosaic-window .mosaic-preview h4, .mosaic-preview .mosaic-preview h4":{marginBottom:10},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.close-button:before":{content:"'Close'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.split-button:before":{content:"'Split'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.replace-button:before":{content:"'Replace'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.expand-button:before":{content:"'Expand'"}}};const Fk=Vk;function Uc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function qk(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dn(t){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(t)}var Gs=function(t){iS(n,t);var e=cS(n);function n(){return oS(this,n),e.apply(this,arguments)}return aS(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.companionWindowDimensions,l=o.focused,u=o.layout,s=o.workspace,f=o.updateElasticWindowLayout,p=s.width/2,h=s.height/2;return i.createElement(Dl,{key:"".concat(u.windowId,"-").concat(s.id),size:{height:u.height+c.height,width:u.width+c.width},position:{x:u.x+p,y:u.y+h},bounds:"parent",onDragStop:function(m,b){f(u.windowId,{x:b.x-p,y:b.y-h})},onResize:function(m,b,_,E,g){f(u.windowId,{height:Number.parseInt(_.style.height,10)-c.height,width:Number.parseInt(_.style.width,10)-c.width,x:g.x-p,y:g.y-h})},dragHandleClassName:V("window-top-bar"),className:l?a.focused:null},i.createElement(kn,{windowId:u.windowId}))}}]),n}(i.Component);Gs.defaultProps={classes:{},companionWindowDimensions:{height:0,width:0},focused:!1};const fS=Gs;var dS=function(e,n){var r=n.windowId;return{companionWindowDimensions:sp(e,{windowId:r}),focused:Pl(e,{windowId:r}),layout:Ml(e)[r],workspace:me(e)}},pS=function(e,n){return{updateElasticWindowLayout:function(o,a){e(jl(o,a))}}},hS=function(e){return{focused:{zIndex:e.zIndex.modal-1}}},vS=j(D(hS),A(dS,pS));const mS=vS(fS);function gS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yc(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mn(t){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mn(t)}var $S=function(t){bS(n,t);var e=wS(n);function n(){return gS(this,n),e.apply(this,arguments)}return yS(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.workspace,l=o.elasticLayout,u=o.setWorkspaceViewportDimensions,s=o.setWorkspaceViewportPosition,f=c.viewportPosition,p=c.width/2,h=c.height/2;return i.createElement("div",{style:{height:"100%",position:"relative",width:"100%"}},i.createElement(Us,{onResize:function(m){u(m)}}),i.createElement(Dl,{size:{height:c.height,width:c.width},position:{x:-1*f.x-p,y:-1*f.y-h},enableResizing:{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1},onDragStop:function(m,b){s({x:-1*b.x-p,y:-1*b.y-h})},cancel:".".concat(V("window")),className:ee(a.workspace,V("workspace")),disableDragging:!c.draggingEnabled},Object.keys(l).map(function(v){return i.createElement(mS,{key:v,windowId:v})})))}}]),n}(i.Component);const PS=$S;var CS=function(e){return{elasticLayout:Ml(e),workspace:me(e)}},kS=function(e,n){return{setWorkspaceViewportDimensions:function(o){e(fp(o))},setWorkspaceViewportPosition:function(o){e(dp(o))},updateElasticWindowLayout:function(o,a){e(jl(o,a))}}},SS={workspace:{boxSizing:"border-box",margin:0,position:"absolute",transitionDuration:".7s","& .react-draggable-dragging":{transitionDuration:"unset"}}},TS=j(D(SS),A(CS,kS),W("WorkspaceElastic"));const RS=TS(PS);var ai={},IS=K,xS=J;Object.defineProperty(ai,"__esModule",{value:!0});var Ks=ai.default=void 0,DS=xS(d),MS=IS(G()),jS=(0,MS.default)(DS.createElement("path",{d:"M4.01 2L4 22h16V8l-6-6H4.01zM13 9V3.5L18.5 9H13z"}),"InsertDriveFileSharp");Ks=ai.default=jS;function WS(t){return new Promise(function(e,n){var r=new FileReader;r.addEventListener("load",function(){var o=new Image;o.addEventListener("load",function(){e({height:o.height,name:t.name,type:t.type,url:r.result,width:o.width})}),o.src=r.result}),r.readAsDataURL(t)})}function BS(t,e){return LS(t)||AS(t,e)||Js(t,e)||NS()}function NS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AS(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,a=!1,c,l;try{for(n=n.call(t);!(o=(c=n.next()).done)&&(r.push(c.value),!(e&&r.length===e));o=!0);}catch(u){a=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function LS(t){if(Array.isArray(t))return t}function zS(t){return FS(t)||VS(t)||Js(t)||HS()}function HS(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Js(t,e){if(t){if(typeof t=="string")return Go(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Go(t,e)}}function VS(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function FS(t){if(Array.isArray(t))return Go(t)}function Go(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var s=lr(),f=l.map(function(p){return WS(p)});u=Promise.all(f).then(function(p){var h={"@context":"http://iiif.io/api/presentation/3/context.json",id:s,items:p.map(function(m,b){var _=m.name,E=m.type,g=m.width,$=m.height,R=m.url;return{height:$,id:"".concat(s,"/canvas/").concat(b),items:[{id:"".concat(s,"/canvas/").concat(b,"/1"),items:[{body:{format:E,id:R,type:"Image"},height:$,id:"".concat(s,"/canvas/").concat(b,"/1/image"),motivation:"painting",target:"".concat(s,"/canvas/").concat(b,"/1"),type:"Annotation",width:g}],type:"AnnotationPage"}],label:_,type:"Canvas",width:g}}),label:p[0].name,type:"Manifest"},v=lr();h&&o({manifestId:v,manifestJson:h},r,n)})}return Promise.all([].concat(zS(c),[u]))}},Xs=function(e){var n=e.children,r=e.onDrop,o=nu({accept:[hp,vp],collect:function(v){return{canDrop:v.canDrop(),isOver:v.isOver()}},drop:function(v,m){r&&Qc(v,m,e)}}),a=BS(o,2),c=a[0],l=c.canDrop,u=c.isOver,s=a[1],f=function(v){if(!(!window.safari||!r||!v.dataTransfer)&&v.dataTransfer.types.includes("Files")&&v.dataTransfer.types.includes("text/uri-list")){var m=v.dataTransfer.getData("text/uri-list");if(!m)return;Qc({urls:[m]},null,e)}},p=l&&u;return i.createElement("div",{ref:s,onDrop:f,style:{height:"100%",width:"100%"}},n,i.createElement(ha,{open:p,style:{zIndex:9999}},i.createElement(Ks,{style:{color:pp[400],fontSize:256}})))};function qS(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function el(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jn(t){return jn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jn(t)}var Qs=function(t){ZS(n,t);var e=GS(n);function n(r){var o;return qS(this,n),o=e.call(this,r),o.handleDrop=o.handleDrop.bind(Ys(o)),o}return US(n,[{key:"handleDrop",value:function(o,a,c){var l=o.canvasId,u=o.manifestId,s=o.manifestJson,f=this.props,p=f.addWindow,h=f.allowNewWindows;h&&p({canvasId:l,manifest:s,manifestId:u})}},{key:"workspaceByType",value:function(){var o=this.props,a=o.workspaceId,c=o.workspaceType,l=o.windowIds;if(this.maximizedWindows())return this.maximizedWindows();if(l.length===0)return this.zeroWindows();switch(c){case"elastic":return i.createElement(RS,null);case"mosaic":return i.createElement(Xk,null);default:return l.map(function(u){return i.createElement(kn,{key:"".concat(u,"-").concat(a),windowId:u})})}}},{key:"zeroWindows",value:function(){var o=this.props.t;return i.createElement(q,{alignItems:"center",container:!0,style:{height:"100%"}},i.createElement(q,{xs:12,item:!0},i.createElement(B,{variant:"h1",component:"div",align:"center"},o("welcome"))))}},{key:"maximizedWindows",value:function(){var o=this.props,a=o.maximizedWindowIds,c=o.workspaceId;return a.length>0?a.map(function(l){return i.createElement(kn,{key:"".concat(l,"-").concat(c),windowId:l,className:ee(V("workspace-maximized-window"))})}):!1}},{key:"render",value:function(){var o=this.props,a=o.classes,c=o.isWorkspaceControlPanelVisible,l=o.t;return i.createElement(Xs,{onDrop:this.handleDrop},i.createElement("div",{className:ee(V("workspace-viewport"),c&&V("workspace-with-control-panel"),c&&a.workspaceWithControlPanel,a.workspaceViewport)},i.createElement(B,{variant:"srOnly",component:"h1"},l("miradorViewer")),this.workspaceByType()))}}]),n}(i.Component);Qs.defaultProps={addWindow:function(){},allowNewWindows:!0,maximizedWindowIds:[],windowIds:[]};var XS=function(e){return{allowNewWindows:je(e).workspace.allowNewWindows,isWorkspaceControlPanelVisible:je(e).workspaceControlPanel.enabled,maximizedWindowIds:mp(e),windowIds:at(e),workspaceId:me(e).id,workspaceType:ia(e)}},YS={addWindow:ua},QS=function(e){return{workspaceViewport:{bottom:0,left:0,margin:0,overflow:"hidden",position:"absolute",right:0,top:0},workspaceWithControlPanel:{paddingTop:74},"@media (min-width: 600px)":{workspaceWithControlPanel:{paddingLeft:68,paddingTop:0}}}},eT=j(L(),D(QS),A(XS,YS),W("Workspace"));const tT=eT(Qs);function nT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tl(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wn(t){return Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wn(t)}var ef=function(t){oT(n,t);var e=aT(n);function n(r){var o;return nT(this,n),o=e.call(this,r),o.state={formValue:""},o.formSubmit=o.formSubmit.bind(Dt(o)),o.handleCancel=o.handleCancel.bind(Dt(o)),o.handleInputChange=o.handleInputChange.bind(Dt(o)),o}return rT(n,[{key:"handleCancel",value:function(){var o=this.props.onCancel;o(),this.setState({formValue:""})}},{key:"handleInputChange",value:function(o){var a=this;o.preventDefault(),a.setState({formValue:o.target.value})}},{key:"formSubmit",value:function(o){var a=this.props,c=a.addResource,l=a.onSubmit,u=this.state.formValue;o.preventDefault(),l(),c(u),this.setState({formValue:""})}},{key:"render",value:function(){var o=this.state.formValue,a=this.props,c=a.addResourcesOpen,l=a.classes,u=a.onCancel,s=a.t;return c?i.createElement("form",{onSubmit:this.formSubmit},i.createElement(q,{container:!0,spacing:2},i.createElement(q,{item:!0,xs:12,sm:8,md:9},i.createElement(Ol,{autoFocus:!0,fullWidth:!0,value:o,id:"manifestURL",type:"text",onChange:this.handleInputChange,variant:"filled",label:s("addManifestUrl"),helperText:s("addManifestUrlHelp"),InputLabelProps:{shrink:!0},InputProps:{className:l.input}})),i.createElement(q,{item:!0,xs:12,sm:4,md:3,className:l.buttons},u&&i.createElement(le,{onClick:this.handleCancel},s("cancel")),i.createElement(le,{id:"fetchBtn",type:"submit",variant:"contained",color:"primary"},s("fetchManifest"))))):null}}]),n}(d.Component);ef.defaultProps={classes:{},onCancel:null,onSubmit:function(){},t:function(e){return e}};function nl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function lT(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bn(t){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bn(t)}var wT=function(t){vT(n,t);var e=mT(n);function n(){return pT(this,n),e.apply(this,arguments)}return hT(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.manifestId,l=o.onDismissClick,u=o.onTryAgainClick,s=o.t;return i.createElement(q,{container:!0},i.createElement(q,{container:!0},i.createElement(q,{container:!0,item:!0,xs:12,sm:6},i.createElement(q,{item:!0,xs:4,sm:3},i.createElement(q,{container:!0,justify:"center"},i.createElement(za,{className:a.errorIcon}))),i.createElement(q,{item:!0,xs:8,sm:9},i.createElement(B,null,s("manifestError")),i.createElement(B,{className:a.manifestIdText},c)))),i.createElement(q,{container:!0},i.createElement(q,{container:!0,item:!0,xs:12,sm:6,justify:"flex-end"},i.createElement(q,{item:!0},i.createElement(le,{onClick:function(){l(c)}},s("dismiss")),i.createElement(le,{onClick:function(){u(c)}},s("tryAgain"))))))}}]),n}(d.Component),_T={onDismissClick:gp,onTryAgainClick:Bl},OT=function(e){return{errorIcon:{color:e.palette.error.main,height:"2rem",width:"2rem"},manifestIdText:{wordBreak:"break-all"}}},ET=j(L(),D(OT),A(null,_T),W("ManifestListItemError"));const $T=ET(wT);function PT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ol(t,e){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nn(t){return Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nn(t)}var rf=function(t){kT(n,t);var e=ST(n);function n(r){var o;return PT(this,n),o=e.call(this,r),o.handleOpenButtonClick=o.handleOpenButtonClick.bind(nf(o)),o}return CT(n,[{key:"componentDidMount",value:function(){var o=this.props,a=o.fetchManifest,c=o.manifestId,l=o.ready,u=o.isFetching,s=o.error,f=o.provider;!l&&!s&&!u&&f!=="file"&&a(c)}},{key:"handleOpenButtonClick",value:function(){var o=this.props,a=o.addWindow,c=o.handleClose,l=o.manifestId;a({manifestId:l}),c()}},{key:"render",value:function(){var o=this.props,a=o.active,c=o.buttonRef,l=o.manifestId,u=o.ready,s=o.title,f=o.thumbnail,p=o.manifestLogo,h=o.size,v=o.classes,m=o.provider,b=o.t,_=o.error,E=o.isCollection,g=o.isMultipart,$=i.createElement(q,{container:!0,className:V("manifest-list-item"),spacing:2},i.createElement(q,{item:!0,xs:3,sm:2},i.createElement(fe,{className:v.placeholder,variant:"rect",height:80,width:120})),i.createElement(q,{item:!0,xs:9,sm:6},i.createElement(fe,{className:v.placeholder,variant:"text"})),i.createElement(q,{item:!0,xs:8,sm:2},i.createElement(fe,{className:v.placeholder,variant:"text"}),i.createElement(fe,{className:v.placeholder,variant:"text"})),i.createElement(q,{item:!0,xs:4,sm:2},i.createElement(fe,{className:v.placeholder,variant:"rect",height:60,width:60})));return _?i.createElement(si,{divider:!0,className:v.root,"data-manifestid":l},i.createElement($T,{manifestId:l})):i.createElement(si,{divider:!0,className:[v.root,a?v.active:""].join(" "),"data-manifestid":l},u?i.createElement(q,{container:!0,className:V("manifest-list-item"),spacing:2},i.createElement(q,{item:!0,xs:12,sm:6,className:v.buttonGrid},i.createElement(ta,{ref:c,className:V("manifest-list-item-title"),style:{width:"100%"},onClick:this.handleOpenButtonClick},i.createElement(q,{container:!0,spacing:2,className:v.label,component:"span"},i.createElement(q,{item:!0,xs:4,sm:3,component:"span"},f?i.createElement(fi,{className:[v.thumbnail,V("manifest-list-item-thumb")].join(" "),src:[f],alt:"",height:"80",unloader:i.createElement(fe,{variant:"rect",animation:!1,className:v.placeholder,height:80,width:120})}):i.createElement(fe,{className:v.placeholder,variant:"rect",height:80,width:120})),i.createElement(q,{item:!0,xs:8,sm:9,component:"span"},E&&i.createElement(B,{component:"div",variant:"overline"},b(g?"multipartCollection":"collection")),i.createElement(B,{component:"span",variant:"h6"},s||l))))),i.createElement(q,{item:!0,xs:8,sm:4},i.createElement(B,{className:V("manifest-list-item-provider")},m),i.createElement(B,null,b("numItems",{count:h,number:h}))),i.createElement(q,{item:!0,xs:4,sm:2},p&&i.createElement(fi,{src:[p],alt:"",role:"presentation",className:v.logo,unloader:i.createElement(fe,{variant:"rect",animation:!1,className:v.placeholder,height:60,width:60})}))):$)}}]),n}(i.Component);rf.defaultProps={active:!1,buttonRef:void 0,classes:{},error:null,handleClose:function(){},isCollection:!1,isFetching:!1,isMultipart:!1,manifestLogo:null,provider:null,ready:!1,size:0,t:function(e){return e},thumbnail:null,title:null};function al(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function il(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function An(t){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},An(t)}var of=function(t){LT(n,t);var e=zT(n);function n(r){var o;return NT(this,n),o=e.call(this,r),o.state={addResourcesOpen:!1},o.ref=i.createRef(),o.onSubmit=o.onSubmit.bind(Mt(o)),o.setAddResourcesVisibility=o.setAddResourcesVisibility.bind(Mt(o)),o.handleDrop=o.handleDrop.bind(Mt(o)),o}return AT(n,[{key:"handleDrop",value:function(o,a,c){var l=o.manifestId,u=o.manifestJson,s=this.props.addResource;u?s(l,u,{provider:"file"}):s(l),this.scrollToTop()}},{key:"onSubmit",value:function(){this.setAddResourcesVisibility(!1),this.scrollToTop()}},{key:"setAddResourcesVisibility",value:function(o){this.setState({addResourcesOpen:o})}},{key:"scrollToTop",value:function(){if(this.ref.current){var o=this.ref.current;o.scrollTo({behavior:"smooth",left:0,top:0})}}},{key:"render",value:function(){var o=this,a=this.props,c=a.catalog,l=a.setWorkspaceAddVisibility,u=a.t,s=a.classes,f=this.state.addResourcesOpen,p=c.map(function(h,v){return i.createElement(WT,Object.assign({},v===0&&{buttonRef:function(b){return b&&b.focus()}},{key:h.manifestId,manifestId:h.manifestId,provider:h.provider,handleClose:function(){return l(!1)}}))});return i.createElement(Xs,{onDrop:this.handleDrop},i.createElement("div",{ref:this.ref,className:ee(V("workspace-add"),s.workspaceAdd)},c.length<1?i.createElement(q,{alignItems:"center",container:!0,style:{height:"100%"}},i.createElement(q,{xs:12,item:!0},i.createElement(B,{variant:"h1",component:"div",align:"center"},u("emptyResourceList")))):i.createElement(se,{className:s.list},i.createElement(B,{variant:"srOnly",component:"h1"},u("miradorResources")),i.createElement(he,this.props),i.createElement(Op,{disablePadding:!0},p)),i.createElement(Ul,{variant:"extended",disabled:f,className:ee(s.fab,V("add-resource-button")),color:"primary",onClick:function(){return o.setAddResourcesVisibility(!0)}},i.createElement(ba,null),u("addResource")),i.createElement(ql,{className:ee(BT({},s.displayNone,!f)),classes:{paper:s.paper},variant:"persistent",anchor:"bottom",open:f,ModalProps:{disablePortal:!0,hideBackdrop:!0,style:{position:"absolute"}}},i.createElement(se,{className:s.form},i.createElement(Kn,{position:"absolute",color:"primary",onClick:function(){return o.setAddResourcesVisibility(!1)}},i.createElement(Un,{variant:"dense"},i.createElement(ue,{"aria-label":u("closeAddResourceForm"),className:s.menuButton,color:"inherit"},i.createElement(Ca,null)),i.createElement(B,{variant:"h2",noWrap:!0,color:"inherit",className:s.typographyBody},u("addResource")))),i.createElement(dT,{addResourcesOpen:f,onSubmit:this.onSubmit,onCancel:function(){return o.setAddResourcesVisibility(!1)}})))))}}]),n}(i.Component);of.defaultProps={addResource:function(){},catalog:[],classes:{},t:function(e){return e}};function ll(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ul(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ln(t)}var lf=function(t){YT(n,t);var e=QT(n);function n(){return JT(this,n),e.apply(this,arguments)}return XT(n,[{key:"render",value:function(){var o=this.props,a=o.classes,c=o.controlPanelVariant,l=o.isWorkspaceAddVisible,u=o.isWorkspaceControlPanelVisible,s=o.lang,f=o.t;return i.createElement(i.Fragment,null,u&&i.createElement(Xw,{variant:c}),i.createElement("main",{className:ee(a.viewer,V("viewer")),lang:s,"aria-label":f("workspace")},l?i.createElement(GT,null):i.createElement(tT,null),i.createElement(rm,null),i.createElement(KT,null)))}}]),n}(d.Component);lf.defaultProps={controlPanelVariant:void 0,isWorkspaceAddVisible:!1,lang:void 0};var rR=function(e){return{controlPanelVariant:me(e).isWorkspaceAddVisible||at(e).length>0?void 0:"wide",isWorkspaceAddVisible:me(e).isWorkspaceAddVisible,isWorkspaceControlPanelVisible:je(e).workspaceControlPanel.enabled,lang:je(e).language}},oR=function(e){var n=e.palette.type==="light"?kr:Sr;return{viewer:{background:n(e.palette.shades.light,.1),bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0}}},aR=j(L(),D(oR),A(rR),W("WorkspaceArea"));const iR=aR(lf),lR=Object.freeze(Object.defineProperty({__proto__:null,default:iR},Symbol.toStringTag,{value:"Module"}));export{q as G,lR as W,os as d,pC as i}; diff --git a/assets/index-20109f1f.js b/assets/index-20109f1f.js new file mode 100644 index 0000000..b3f0b47 --- /dev/null +++ b/assets/index-20109f1f.js @@ -0,0 +1,249 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function rE(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const en={},Yl=[],Hi=()=>{},gH=()=>!1,mH=/^on[^a-z]/,Ug=e=>mH.test(e),iE=e=>e.startsWith("onUpdate:"),Kn=Object.assign,aE=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},yH=Object.prototype.hasOwnProperty,xt=(e,t)=>yH.call(e,t),ct=Array.isArray,Xl=e=>Vg(e)==="[object Map]",tL=e=>Vg(e)==="[object Set]",ht=e=>typeof e=="function",Rn=e=>typeof e=="string",Hg=e=>typeof e=="symbol",nn=e=>e!==null&&typeof e=="object",nL=e=>(nn(e)||ht(e))&&ht(e.then)&&ht(e.catch),rL=Object.prototype.toString,Vg=e=>rL.call(e),bH=e=>Vg(e).slice(8,-1),iL=e=>Vg(e)==="[object Object]",oE=e=>Rn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ph=rE(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gg=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},wH=/-(\w)/g,lu=Gg(e=>e.replace(wH,(t,n)=>n?n.toUpperCase():"")),SH=/\B([A-Z])/g,Du=Gg(e=>e.replace(SH,"-$1").toLowerCase()),aL=Gg(e=>e.charAt(0).toUpperCase()+e.slice(1)),ab=Gg(e=>e?`on${aL(e)}`:""),Ls=(e,t)=>!Object.is(e,t),ob=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},_H=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let QT;const D0=()=>QT||(QT=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sE(e){if(ct(e)){const t={};for(let n=0;n{if(n){const r=n.split(OH);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lE(e){let t="";if(Rn(e))t=e;else if(ct(e))for(let n=0;nRn(e)?e:e==null?"":ct(e)||nn(e)&&(e.toString===rL||!ht(e.toString))?JSON.stringify(e,sL,2):String(e),sL=(e,t)=>t&&t.__v_isRef?sL(e,t.value):Xl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:tL(t)?{[`Set(${t.size})`]:[...t.values()]}:nn(t)&&!ct(t)&&!iL(t)?String(t):t;let Br;class lL{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Br,!t&&Br&&(this.index=(Br.scopes||(Br.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Br;try{return Br=this,t()}finally{Br=n}}}on(){Br=this}off(){Br=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},fL=e=>(e.w&zo)>0,dL=e=>(e.n&zo)>0,AH=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(c==="length"||!Hg(c)&&c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(o.get(n)),t){case"add":ct(e)?oE(n)&&s.push(o.get("length")):(s.push(o.get(xs)),Xl(e)&&s.push(o.get(L0)));break;case"delete":ct(e)||(s.push(o.get(xs)),Xl(e)&&s.push(o.get(L0)));break;case"set":Xl(e)&&s.push(o.get(xs));break}if(s.length===1)s[0]&&M0(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);M0(uE(l))}}function M0(e,t){const n=ct(e)?e:[...e];for(const r of n)r.computed&&JT(r);for(const r of n)r.computed||JT(r)}function JT(e,t){(e!==Fi||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function kH(e,t){var n;return(n=Kh.get(e))==null?void 0:n.get(t)}const DH=rE("__proto__,__v_isRef,__isVue"),vL=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Hg)),eP=NH();function NH(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Tt(this);for(let a=0,o=this.length;a{e[t]=function(...n){Nu();const r=Tt(this)[t].apply(this,n);return Lu(),r}}),e}function LH(e){const t=Tt(this);return Lr(t,"has",e),t.hasOwnProperty(e)}class gL{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,r){const i=this._isReadonly,a=this._shallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return a;if(n==="__v_raw"&&r===(i?a?YH:wL:a?bL:yL).get(t))return t;const o=ct(t);if(!i){if(o&&xt(eP,n))return Reflect.get(eP,n,r);if(n==="hasOwnProperty")return LH}const s=Reflect.get(t,n,r);return(Hg(n)?vL.has(n):DH(n))||(i||Lr(t,"get",n),a)?s:ln(s)?o&&oE(n)?s:s.value:nn(s)?i?SL(s):Kg(s):s}}class mL extends gL{constructor(t=!1){super(!1,t)}set(t,n,r,i){let a=t[n];if(uu(a)&&ln(a)&&!ln(r))return!1;if(!this._shallow&&(!Yh(r)&&!uu(r)&&(a=Tt(a),r=Tt(r)),!ct(t)&&ln(a)&&!ln(r)))return a.value=r,!0;const o=ct(t)&&oE(n)?Number(n)e,qg=e=>Reflect.getPrototypeOf(e);function cp(e,t,n=!1,r=!1){e=e.__v_raw;const i=Tt(e),a=Tt(t);n||(Ls(t,a)&&Lr(i,"get",t),Lr(i,"get",a));const{has:o}=qg(i),s=r?fE:n?hE:Rf;if(o.call(i,t))return s(e.get(t));if(o.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function fp(e,t=!1){const n=this.__v_raw,r=Tt(n),i=Tt(e);return t||(Ls(e,i)&&Lr(r,"has",e),Lr(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function dp(e,t=!1){return e=e.__v_raw,!t&&Lr(Tt(e),"iterate",xs),Reflect.get(e,"size",e)}function tP(e){e=Tt(e);const t=Tt(this);return qg(t).has.call(t,e)||(t.add(e),$a(t,"add",e,e)),this}function nP(e,t){t=Tt(t);const n=Tt(this),{has:r,get:i}=qg(n);let a=r.call(n,e);a||(e=Tt(e),a=r.call(n,e));const o=i.call(n,e);return n.set(e,t),a?Ls(t,o)&&$a(n,"set",e,t):$a(n,"add",e,t),this}function rP(e){const t=Tt(this),{has:n,get:r}=qg(t);let i=n.call(t,e);i||(e=Tt(e),i=n.call(t,e)),r&&r.call(t,e);const a=t.delete(e);return i&&$a(t,"delete",e,void 0),a}function iP(){const e=Tt(this),t=e.size!==0,n=e.clear();return t&&$a(e,"clear",void 0,void 0),n}function pp(e,t){return function(r,i){const a=this,o=a.__v_raw,s=Tt(o),l=t?fE:e?hE:Rf;return!e&&Lr(s,"iterate",xs),o.forEach((u,c)=>r.call(i,l(u),l(c),a))}}function hp(e,t,n){return function(...r){const i=this.__v_raw,a=Tt(i),o=Xl(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=i[e](...r),c=n?fE:t?hE:Rf;return!t&&Lr(a,"iterate",l?L0:xs),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:s?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function to(e){return function(...t){return e==="delete"?!1:this}}function zH(){const e={get(a){return cp(this,a)},get size(){return dp(this)},has:fp,add:tP,set:nP,delete:rP,clear:iP,forEach:pp(!1,!1)},t={get(a){return cp(this,a,!1,!0)},get size(){return dp(this)},has:fp,add:tP,set:nP,delete:rP,clear:iP,forEach:pp(!1,!0)},n={get(a){return cp(this,a,!0)},get size(){return dp(this,!0)},has(a){return fp.call(this,a,!0)},add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear"),forEach:pp(!0,!1)},r={get(a){return cp(this,a,!0,!0)},get size(){return dp(this,!0)},has(a){return fp.call(this,a,!0)},add:to("add"),set:to("set"),delete:to("delete"),clear:to("clear"),forEach:pp(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=hp(a,!1,!1),n[a]=hp(a,!0,!1),t[a]=hp(a,!1,!0),r[a]=hp(a,!0,!0)}),[e,n,t,r]}const[BH,UH,HH,VH]=zH();function dE(e,t){const n=t?e?VH:HH:e?UH:BH;return(r,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(xt(n,i)&&i in r?n:r,i,a)}const GH={get:dE(!1,!1)},qH={get:dE(!1,!0)},KH={get:dE(!0,!1)},yL=new WeakMap,bL=new WeakMap,wL=new WeakMap,YH=new WeakMap;function XH(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function QH(e){return e.__v_skip||!Object.isExtensible(e)?0:XH(bH(e))}function Kg(e){return uu(e)?e:pE(e,!1,jH,GH,yL)}function ZH(e){return pE(e,!1,WH,qH,bL)}function SL(e){return pE(e,!0,FH,KH,wL)}function pE(e,t,n,r,i){if(!nn(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const o=QH(e);if(o===0)return e;const s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function ka(e){return uu(e)?ka(e.__v_raw):!!(e&&e.__v_isReactive)}function uu(e){return!!(e&&e.__v_isReadonly)}function Yh(e){return!!(e&&e.__v_isShallow)}function _L(e){return ka(e)||uu(e)}function Tt(e){const t=e&&e.__v_raw;return t?Tt(t):e}function Yg(e){return qh(e,"__v_skip",!0),e}const Rf=e=>nn(e)?Kg(e):e,hE=e=>nn(e)?SL(e):e;function EL(e){Co&&Fi&&(e=Tt(e),hL(e.dep||(e.dep=uE())))}function OL(e,t){e=Tt(e);const n=e.dep;n&&M0(n)}function ln(e){return!!(e&&e.__v_isRef===!0)}function So(e){return JH(e,!1)}function JH(e,t){return ln(e)?e:new eV(e,t)}class eV{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Tt(t),this._value=n?t:Rf(t)}get value(){return EL(this),this._value}set value(t){const n=this.__v_isShallow||Yh(t)||uu(t);t=n?t:Tt(t),Ls(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Rf(t),OL(this))}}function zi(e){return ln(e)?e.value:e}const tV={get:(e,t,n)=>zi(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return ln(i)&&!ln(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function IL(e){return ka(e)?e:new Proxy(e,tV)}function nV(e){const t=ct(e)?new Array(e.length):{};for(const n in e)t[n]=CL(e,n);return t}class rV{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return kH(Tt(this._object),this._key)}}class iV{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function aV(e,t,n){return ln(e)?e:ht(e)?new iV(e):nn(e)&&arguments.length>1?CL(e,t,n):So(e)}function CL(e,t,n){const r=e[t];return ln(r)?r:new rV(e,t,n)}class oV{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new cE(t,()=>{this._dirty||(this._dirty=!0,OL(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=Tt(this);return EL(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function sV(e,t,n=!1){let r,i;const a=ht(e);return a?(r=e,i=Hi):(r=e.get,i=e.set),new oV(r,i,a||!i,n)}function To(e,t,n,r){let i;try{i=r?e(...r):e()}catch(a){Xg(a,t,n)}return i}function Vi(e,t,n,r){if(ht(e)){const a=To(e,t,n,r);return a&&nL(a)&&a.catch(o=>{Xg(o,t,n)}),a}const i=[];for(let a=0;a>>1,i=or[r],a=$f(i);aua&&or.splice(t,1)}function fV(e){ct(e)?Ql.push(...e):(!Ia||!Ia.includes(e,e.allowRecurse?ys+1:ys))&&Ql.push(e),xL()}function aP(e,t=Af?ua+1:0){for(;t$f(n)-$f(r)),ys=0;yse.id==null?1/0:e.id,dV=(e,t)=>{const n=$f(e)-$f(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function AL(e){j0=!1,Af=!0,or.sort(dV);const t=Hi;try{for(ua=0;uaRn(p)?p.trim():p)),f&&(i=n.map(_H))}let s,l=r[s=ab(t)]||r[s=ab(lu(t))];!l&&a&&(l=r[s=ab(Du(t))]),l&&Vi(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Vi(u,e,6,i)}}function $L(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const a=e.emits;let o={},s=!1;if(!ht(e)){const l=u=>{const c=$L(u,t,!0);c&&(s=!0,Kn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!s?(nn(e)&&r.set(e,null),null):(ct(a)?a.forEach(l=>o[l]=null):Kn(o,a),nn(e)&&r.set(e,o),o)}function Qg(e,t){return!e||!Ug(t)?!1:(t=t.slice(2).replace(/Once$/,""),xt(e,t[0].toLowerCase()+t.slice(1))||xt(e,Du(t))||xt(e,t))}let vr=null,Zg=null;function Xh(e){const t=vr;return vr=e,Zg=e&&e.type.__scopeId||null,t}function mE(e){Zg=e}function yE(){Zg=null}function hd(e,t=vr,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&gP(-1);const a=Xh(t);let o;try{o=e(...i)}finally{Xh(a),r._d&&gP(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function sb(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:l,emit:u,render:c,renderCache:f,data:d,setupState:p,ctx:h,inheritAttrs:v}=e;let w,m;const g=Xh(e);try{if(n.shapeFlag&4){const S=i||r;w=la(c.call(S,S,f,a,p,d,h)),m=l}else{const S=t;w=la(S.length>1?S(a,{attrs:l,slots:s,emit:u}):S(a,null)),m=t.props?l:hV(l)}}catch(S){lf.length=0,Xg(S,e,1),w=Vr(cu)}let y=w;if(m&&v!==!1){const S=Object.keys(m),{shapeFlag:_}=y;S.length&&_&7&&(o&&S.some(iE)&&(m=vV(m,o)),y=fu(y,m))}return n.dirs&&(y=fu(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),w=y,Xh(g),w}const hV=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ug(n))&&((t||(t={}))[n]=e[n]);return t},vV=(e,t)=>{const n={};for(const r in e)(!iE(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function gV(e,t,n){const{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?oP(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;fe.__isSuspense;function bV(e,t){t&&t.pendingBranch?ct(e)?t.effects.push(...e):t.effects.push(e):fV(e)}const vp={};function Zl(e,t,n){return kL(e,t,n)}function kL(e,t,{immediate:n,deep:r,flush:i,onTrack:a,onTrigger:o}=en){var s;const l=cL()===((s=Vn)==null?void 0:s.scope)?Vn:null;let u,c=!1,f=!1;if(ln(e)?(u=()=>e.value,c=Yh(e)):ka(e)?(u=()=>e,r=!0):ct(e)?(f=!0,c=e.some(S=>ka(S)||Yh(S)),u=()=>e.map(S=>{if(ln(S))return S.value;if(ka(S))return Rl(S);if(ht(S))return To(S,l,2)})):ht(e)?t?u=()=>To(e,l,2):u=()=>{if(!(l&&l.isUnmounted))return d&&d(),Vi(e,l,3,[p])}:u=Hi,t&&r){const S=u;u=()=>Rl(S())}let d,p=S=>{d=g.onStop=()=>{To(S,l,4)}},h;if(Nf)if(p=Hi,t?n&&Vi(t,l,3,[u(),f?[]:void 0,p]):u(),i==="sync"){const S=p9();h=S.__watcherHandles||(S.__watcherHandles=[])}else return Hi;let v=f?new Array(e.length).fill(vp):vp;const w=()=>{if(g.active)if(t){const S=g.run();(r||c||(f?S.some((_,E)=>Ls(_,v[E])):Ls(S,v)))&&(d&&d(),Vi(t,l,3,[S,v===vp?void 0:f&&v[0]===vp?[]:v,p]),v=S)}else g.run()};w.allowRecurse=!!t;let m;i==="sync"?m=w:i==="post"?m=()=>Tr(w,l&&l.suspense):(w.pre=!0,l&&(w.id=l.uid),m=()=>gE(w));const g=new cE(u,m);t?n?w():v=g.run():i==="post"?Tr(g.run.bind(g),l&&l.suspense):g.run();const y=()=>{g.stop(),l&&l.scope&&aE(l.scope.effects,g)};return h&&h.push(y),y}function wV(e,t,n){const r=this.proxy,i=Rn(e)?e.includes(".")?DL(r,e):()=>r[e]:e.bind(r,r);let a;ht(t)?a=t:(a=t.handler,n=t);const o=Vn;du(this);const s=kL(i,a.bind(r),n);return o?du(o):Rs(),s}function DL(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Rl(n,t)});else if(iL(e))for(const n in e)Rl(e[n],t);return e}function as(e,t,n,r){const i=e.dirs,a=t&&t.dirs;for(let o=0;oKn({name:e.name},t,{setup:e}))():e}const af=e=>!!e.type.__asyncLoader,NL=e=>e.type.__isKeepAlive;function SV(e,t){LL(e,"a",t)}function _V(e,t){LL(e,"da",t)}function LL(e,t,n=Vn){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Jg(t,r,n),n){let i=n.parent;for(;i&&i.parent;)NL(i.parent.vnode)&&EV(r,t,n,i),i=i.parent}}function EV(e,t,n,r){const i=Jg(t,e,r,!0);ML(()=>{aE(r[t],i)},n)}function Jg(e,t,n=Vn,r=!1){if(n){const i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Nu(),du(n);const s=Vi(t,n,e,o);return Rs(),Lu(),s});return r?i.unshift(a):i.push(a),a}}const Ka=e=>(t,n=Vn)=>(!Nf||e==="sp")&&Jg(e,(...r)=>t(...r),n),OV=Ka("bm"),bE=Ka("m"),IV=Ka("bu"),CV=Ka("u"),TV=Ka("bum"),ML=Ka("um"),PV=Ka("sp"),xV=Ka("rtg"),RV=Ka("rtc");function AV(e,t=Vn){Jg("ec",e,t)}const $V=Symbol.for("v-ndc");function sP(e,t,n,r){let i;const a=n&&n[r];if(ct(e)||Rn(e)){i=new Array(e.length);for(let o=0,s=e.length;ot(o,s,void 0,a&&a[s]));else{const o=Object.keys(e);i=new Array(o.length);for(let s=0,l=o.length;sKL(t)?!(t.type===cu||t.type===Hr&&!jL(t.children)):!0)?e:null}const F0=e=>e?XL(e)?OE(e)||e.proxy:F0(e.parent):null,of=Kn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>F0(e.parent),$root:e=>F0(e.root),$emit:e=>e.emit,$options:e=>wE(e),$forceUpdate:e=>e.f||(e.f=()=>gE(e.update)),$nextTick:e=>e.n||(e.n=PL.bind(e.proxy)),$watch:e=>wV.bind(e)}),lb=(e,t)=>e!==en&&!e.__isScriptSetup&&xt(e,t),DV={get({_:e},t){const{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else{if(lb(r,t))return o[t]=1,r[t];if(i!==en&&xt(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&xt(u,t))return o[t]=3,a[t];if(n!==en&&xt(n,t))return o[t]=4,n[t];W0&&(o[t]=0)}}const c=of[t];let f,d;if(c)return t==="$attrs"&&Lr(e,"get",t),c(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(n!==en&&xt(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,xt(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:a}=e;return lb(i,t)?(i[t]=n,!0):r!==en&&xt(r,t)?(r[t]=n,!0):xt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},o){let s;return!!n[o]||e!==en&&xt(e,o)||lb(t,o)||(s=a[0])&&xt(s,o)||xt(r,o)||xt(of,o)||xt(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:xt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function lP(e){return ct(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let W0=!0;function NV(e){const t=wE(e),n=e.proxy,r=e.ctx;W0=!1,t.beforeCreate&&uP(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:o,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:p,updated:h,activated:v,deactivated:w,beforeDestroy:m,beforeUnmount:g,destroyed:y,unmounted:S,render:_,renderTracked:E,renderTriggered:O,errorCaptured:T,serverPrefetch:R,expose:$,inheritAttrs:F,components:H,directives:Y,filters:Q}=t;if(u&&LV(u,r,null),o)for(const ae in o){const N=o[ae];ht(N)&&(r[ae]=N.bind(n))}if(i){const ae=i.call(n,n);nn(ae)&&(e.data=Kg(ae))}if(W0=!0,a)for(const ae in a){const N=a[ae],D=ht(N)?N.bind(n,n):ht(N.get)?N.get.bind(n,n):Hi,k=!ht(N)&&ht(N.set)?N.set.bind(n):Hi,W=ZL({get:D,set:k});Object.defineProperty(r,ae,{enumerable:!0,configurable:!0,get:()=>W.value,set:C=>W.value=C})}if(s)for(const ae in s)FL(s[ae],r,n,ae);if(l){const ae=ht(l)?l.call(n):l;Reflect.ownKeys(ae).forEach(N=>{BV(N,ae[N])})}c&&uP(c,e,"c");function J(ae,N){ct(N)?N.forEach(D=>ae(D.bind(n))):N&&ae(N.bind(n))}if(J(OV,f),J(bE,d),J(IV,p),J(CV,h),J(SV,v),J(_V,w),J(AV,T),J(RV,E),J(xV,O),J(TV,g),J(ML,S),J(PV,R),ct($))if($.length){const ae=e.exposed||(e.exposed={});$.forEach(N=>{Object.defineProperty(ae,N,{get:()=>n[N],set:D=>n[N]=D})})}else e.exposed||(e.exposed={});_&&e.render===Hi&&(e.render=_),F!=null&&(e.inheritAttrs=F),H&&(e.components=H),Y&&(e.directives=Y)}function LV(e,t,n=Hi){ct(e)&&(e=z0(e));for(const r in e){const i=e[r];let a;nn(i)?"default"in i?a=sf(i.from||r,i.default,!0):a=sf(i.from||r):a=sf(i),ln(a)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>a.value,set:o=>a.value=o}):t[r]=a}}function uP(e,t,n){Vi(ct(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function FL(e,t,n,r){const i=r.includes(".")?DL(n,r):()=>n[r];if(Rn(e)){const a=t[e];ht(a)&&Zl(i,a)}else if(ht(e))Zl(i,e.bind(n));else if(nn(e))if(ct(e))e.forEach(a=>FL(a,t,n,r));else{const a=ht(e.handler)?e.handler.bind(n):t[e.handler];ht(a)&&Zl(i,a,e)}}function wE(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>Qh(l,u,o,!0)),Qh(l,t,o)),nn(t)&&a.set(t,l),l}function Qh(e,t,n,r=!1){const{mixins:i,extends:a}=t;a&&Qh(e,a,n,!0),i&&i.forEach(o=>Qh(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const s=MV[o]||n&&n[o];e[o]=s?s(e[o],t[o]):t[o]}return e}const MV={data:cP,props:fP,emits:fP,methods:Bc,computed:Bc,beforeCreate:fr,created:fr,beforeMount:fr,mounted:fr,beforeUpdate:fr,updated:fr,beforeDestroy:fr,beforeUnmount:fr,destroyed:fr,unmounted:fr,activated:fr,deactivated:fr,errorCaptured:fr,serverPrefetch:fr,components:Bc,directives:Bc,watch:FV,provide:cP,inject:jV};function cP(e,t){return t?e?function(){return Kn(ht(e)?e.call(this,this):e,ht(t)?t.call(this,this):t)}:t:e}function jV(e,t){return Bc(z0(e),z0(t))}function z0(e){if(ct(e)){const t={};for(let n=0;n1)return n&&ht(t)?t.call(r&&r.proxy):t}}function UV(){return!!(Vn||vr||kf)}function HV(e,t,n,r=!1){const i={},a={};qh(a,tm,1),e.propsDefaults=Object.create(null),zL(e,t,i,a);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);n?e.props=r?i:ZH(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function VV(e,t,n,r){const{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Tt(i),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f{l=!0;const[d,p]=BL(f,t,!0);Kn(o,d),p&&s.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!l)return nn(e)&&r.set(e,Yl),Yl;if(ct(a))for(let c=0;c-1,p[1]=v<0||h-1||xt(p,"default"))&&s.push(f)}}}const u=[o,s];return nn(e)&&r.set(e,u),u}function dP(e){return e[0]!=="$"}function pP(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function hP(e,t){return pP(e)===pP(t)}function vP(e,t){return ct(t)?t.findIndex(n=>hP(n,e)):ht(t)&&hP(t,e)?0:-1}const UL=e=>e[0]==="_"||e==="$stable",SE=e=>ct(e)?e.map(la):[la(e)],GV=(e,t,n)=>{if(t._n)return t;const r=hd((...i)=>SE(t(...i)),n);return r._c=!1,r},HL=(e,t,n)=>{const r=e._ctx;for(const i in e){if(UL(i))continue;const a=e[i];if(ht(a))t[i]=GV(i,a,r);else if(a!=null){const o=SE(a);t[i]=()=>o}}},VL=(e,t)=>{const n=SE(t);e.slots.default=()=>n},qV=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Tt(t),qh(t,"_",n)):HL(t,e.slots={})}else e.slots={},t&&VL(e,t);qh(e.slots,tm,1)},KV=(e,t,n)=>{const{vnode:r,slots:i}=e;let a=!0,o=en;if(r.shapeFlag&32){const s=t._;s?n&&s===1?a=!1:(Kn(i,t),!n&&s===1&&delete i._):(a=!t.$stable,HL(t,i)),o=t}else t&&(VL(e,t),o={default:1});if(a)for(const s in i)!UL(s)&&o[s]==null&&delete i[s]};function U0(e,t,n,r,i=!1){if(ct(e)){e.forEach((d,p)=>U0(d,t&&(ct(t)?t[p]:t),n,r,i));return}if(af(r)&&!i)return;const a=r.shapeFlag&4?OE(r.component)||r.component.proxy:r.el,o=i?null:a,{i:s,r:l}=e,u=t&&t.r,c=s.refs===en?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(Rn(u)?(c[u]=null,xt(f,u)&&(f[u]=null)):ln(u)&&(u.value=null)),ht(l))To(l,s,12,[o,c]);else{const d=Rn(l),p=ln(l);if(d||p){const h=()=>{if(e.f){const v=d?xt(f,l)?f[l]:c[l]:l.value;i?ct(v)&&aE(v,a):ct(v)?v.includes(a)||v.push(a):d?(c[l]=[a],xt(f,l)&&(f[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else d?(c[l]=o,xt(f,l)&&(f[l]=o)):p&&(l.value=o,e.k&&(c[e.k]=o))};o?(h.id=-1,Tr(h,n)):h()}}}const Tr=bV;function YV(e){return XV(e)}function XV(e,t){const n=D0();n.__VUE__=!0;const{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:p=Hi,insertStaticContent:h}=e,v=(P,A,U,ee=null,K=null,X=null,oe=!1,ie=null,se=!!A.dynamicChildren)=>{if(P===A)return;P&&!hc(P,A)&&(ee=B(P),C(P,K,X,!0),P=null),A.patchFlag===-2&&(se=!1,A.dynamicChildren=null);const{type:re,ref:le,shapeFlag:ue}=A;switch(re){case em:w(P,A,U,ee);break;case cu:m(P,A,U,ee);break;case ub:P==null&&g(A,U,ee,oe);break;case Hr:H(P,A,U,ee,K,X,oe,ie,se);break;default:ue&1?_(P,A,U,ee,K,X,oe,ie,se):ue&6?Y(P,A,U,ee,K,X,oe,ie,se):(ue&64||ue&128)&&re.process(P,A,U,ee,K,X,oe,ie,se,V)}le!=null&&K&&U0(le,P&&P.ref,X,A||P,!A)},w=(P,A,U,ee)=>{if(P==null)r(A.el=s(A.children),U,ee);else{const K=A.el=P.el;A.children!==P.children&&u(K,A.children)}},m=(P,A,U,ee)=>{P==null?r(A.el=l(A.children||""),U,ee):A.el=P.el},g=(P,A,U,ee)=>{[P.el,P.anchor]=h(P.children,A,U,ee,P.el,P.anchor)},y=({el:P,anchor:A},U,ee)=>{let K;for(;P&&P!==A;)K=d(P),r(P,U,ee),P=K;r(A,U,ee)},S=({el:P,anchor:A})=>{let U;for(;P&&P!==A;)U=d(P),i(P),P=U;i(A)},_=(P,A,U,ee,K,X,oe,ie,se)=>{oe=oe||A.type==="svg",P==null?E(A,U,ee,K,X,oe,ie,se):R(P,A,K,X,oe,ie,se)},E=(P,A,U,ee,K,X,oe,ie)=>{let se,re;const{type:le,props:ue,shapeFlag:de,transition:xe,dirs:Ee}=P;if(se=P.el=o(P.type,X,ue&&ue.is,ue),de&8?c(se,P.children):de&16&&T(P.children,se,null,ee,K,X&&le!=="foreignObject",oe,ie),Ee&&as(P,null,ee,"created"),O(se,P,P.scopeId,oe,ee),ue){for(const Ce in ue)Ce!=="value"&&!ph(Ce)&&a(se,Ce,null,ue[Ce],X,P.children,ee,K,x);"value"in ue&&a(se,"value",null,ue.value),(re=ue.onVnodeBeforeMount)&&na(re,ee,P)}Ee&&as(P,null,ee,"beforeMount");const Fe=QV(K,xe);Fe&&xe.beforeEnter(se),r(se,A,U),((re=ue&&ue.onVnodeMounted)||Fe||Ee)&&Tr(()=>{re&&na(re,ee,P),Fe&&xe.enter(se),Ee&&as(P,null,ee,"mounted")},K)},O=(P,A,U,ee,K)=>{if(U&&p(P,U),ee)for(let X=0;X{for(let re=se;re{const ie=A.el=P.el;let{patchFlag:se,dynamicChildren:re,dirs:le}=A;se|=P.patchFlag&16;const ue=P.props||en,de=A.props||en;let xe;U&&os(U,!1),(xe=de.onVnodeBeforeUpdate)&&na(xe,U,A,P),le&&as(A,P,U,"beforeUpdate"),U&&os(U,!0);const Ee=K&&A.type!=="foreignObject";if(re?$(P.dynamicChildren,re,ie,U,ee,Ee,X):oe||N(P,A,ie,null,U,ee,Ee,X,!1),se>0){if(se&16)F(ie,A,ue,de,U,ee,K);else if(se&2&&ue.class!==de.class&&a(ie,"class",null,de.class,K),se&4&&a(ie,"style",ue.style,de.style,K),se&8){const Fe=A.dynamicProps;for(let Ce=0;Ce{xe&&na(xe,U,A,P),le&&as(A,P,U,"updated")},ee)},$=(P,A,U,ee,K,X,oe)=>{for(let ie=0;ie{if(U!==ee){if(U!==en)for(const ie in U)!ph(ie)&&!(ie in ee)&&a(P,ie,U[ie],null,oe,A.children,K,X,x);for(const ie in ee){if(ph(ie))continue;const se=ee[ie],re=U[ie];se!==re&&ie!=="value"&&a(P,ie,re,se,oe,A.children,K,X,x)}"value"in ee&&a(P,"value",U.value,ee.value)}},H=(P,A,U,ee,K,X,oe,ie,se)=>{const re=A.el=P?P.el:s(""),le=A.anchor=P?P.anchor:s("");let{patchFlag:ue,dynamicChildren:de,slotScopeIds:xe}=A;xe&&(ie=ie?ie.concat(xe):xe),P==null?(r(re,U,ee),r(le,U,ee),T(A.children,U,le,K,X,oe,ie,se)):ue>0&&ue&64&&de&&P.dynamicChildren?($(P.dynamicChildren,de,U,K,X,oe,ie),(A.key!=null||K&&A===K.subTree)&&GL(P,A,!0)):N(P,A,U,le,K,X,oe,ie,se)},Y=(P,A,U,ee,K,X,oe,ie,se)=>{A.slotScopeIds=ie,P==null?A.shapeFlag&512?K.ctx.activate(A,U,ee,oe,se):Q(A,U,ee,K,X,oe,se):ne(P,A,se)},Q=(P,A,U,ee,K,X,oe)=>{const ie=P.component=o9(P,ee,K);if(NL(P)&&(ie.ctx.renderer=V),s9(ie),ie.asyncDep){if(K&&K.registerDep(ie,J),!P.el){const se=ie.subTree=Vr(cu);m(null,se,A,U)}return}J(ie,P,A,U,K,X,oe)},ne=(P,A,U)=>{const ee=A.component=P.component;if(gV(P,A,U))if(ee.asyncDep&&!ee.asyncResolved){ae(ee,A,U);return}else ee.next=A,cV(ee.update),ee.update();else A.el=P.el,ee.vnode=A},J=(P,A,U,ee,K,X,oe)=>{const ie=()=>{if(P.isMounted){let{next:le,bu:ue,u:de,parent:xe,vnode:Ee}=P,Fe=le,Ce;os(P,!1),le?(le.el=Ee.el,ae(P,le,oe)):le=Ee,ue&&ob(ue),(Ce=le.props&&le.props.onVnodeBeforeUpdate)&&na(Ce,xe,le,Ee),os(P,!0);const Re=sb(P),Ye=P.subTree;P.subTree=Re,v(Ye,Re,f(Ye.el),B(Ye),P,K,X),le.el=Re.el,Fe===null&&mV(P,Re.el),de&&Tr(de,K),(Ce=le.props&&le.props.onVnodeUpdated)&&Tr(()=>na(Ce,xe,le,Ee),K)}else{let le;const{el:ue,props:de}=A,{bm:xe,m:Ee,parent:Fe}=P,Ce=af(A);if(os(P,!1),xe&&ob(xe),!Ce&&(le=de&&de.onVnodeBeforeMount)&&na(le,Fe,A),os(P,!0),ue&&ce){const Re=()=>{P.subTree=sb(P),ce(ue,P.subTree,P,K,null)};Ce?A.type.__asyncLoader().then(()=>!P.isUnmounted&&Re()):Re()}else{const Re=P.subTree=sb(P);v(null,Re,U,ee,P,K,X),A.el=Re.el}if(Ee&&Tr(Ee,K),!Ce&&(le=de&&de.onVnodeMounted)){const Re=A;Tr(()=>na(le,Fe,Re),K)}(A.shapeFlag&256||Fe&&af(Fe.vnode)&&Fe.vnode.shapeFlag&256)&&P.a&&Tr(P.a,K),P.isMounted=!0,A=U=ee=null}},se=P.effect=new cE(ie,()=>gE(re),P.scope),re=P.update=()=>se.run();re.id=P.uid,os(P,!0),re()},ae=(P,A,U)=>{A.component=P;const ee=P.vnode.props;P.vnode=A,P.next=null,VV(P,A.props,ee,U),KV(P,A.children,U),Nu(),aP(),Lu()},N=(P,A,U,ee,K,X,oe,ie,se=!1)=>{const re=P&&P.children,le=P?P.shapeFlag:0,ue=A.children,{patchFlag:de,shapeFlag:xe}=A;if(de>0){if(de&128){k(re,ue,U,ee,K,X,oe,ie,se);return}else if(de&256){D(re,ue,U,ee,K,X,oe,ie,se);return}}xe&8?(le&16&&x(re,K,X),ue!==re&&c(U,ue)):le&16?xe&16?k(re,ue,U,ee,K,X,oe,ie,se):x(re,K,X,!0):(le&8&&c(U,""),xe&16&&T(ue,U,ee,K,X,oe,ie,se))},D=(P,A,U,ee,K,X,oe,ie,se)=>{P=P||Yl,A=A||Yl;const re=P.length,le=A.length,ue=Math.min(re,le);let de;for(de=0;dele?x(P,K,X,!0,!1,ue):T(A,U,ee,K,X,oe,ie,se,ue)},k=(P,A,U,ee,K,X,oe,ie,se)=>{let re=0;const le=A.length;let ue=P.length-1,de=le-1;for(;re<=ue&&re<=de;){const xe=P[re],Ee=A[re]=se?vo(A[re]):la(A[re]);if(hc(xe,Ee))v(xe,Ee,U,null,K,X,oe,ie,se);else break;re++}for(;re<=ue&&re<=de;){const xe=P[ue],Ee=A[de]=se?vo(A[de]):la(A[de]);if(hc(xe,Ee))v(xe,Ee,U,null,K,X,oe,ie,se);else break;ue--,de--}if(re>ue){if(re<=de){const xe=de+1,Ee=xede)for(;re<=ue;)C(P[re],K,X,!0),re++;else{const xe=re,Ee=re,Fe=new Map;for(re=Ee;re<=de;re++){const Ze=A[re]=se?vo(A[re]):la(A[re]);Ze.key!=null&&Fe.set(Ze.key,re)}let Ce,Re=0;const Ye=de-Ee+1;let ve=!1,Me=0;const Te=new Array(Ye);for(re=0;re=Ye){C(Ze,K,X,!0);continue}let je;if(Ze.key!=null)je=Fe.get(Ze.key);else for(Ce=Ee;Ce<=de;Ce++)if(Te[Ce-Ee]===0&&hc(Ze,A[Ce])){je=Ce;break}je===void 0?C(Ze,K,X,!0):(Te[je-Ee]=re+1,je>=Me?Me=je:ve=!0,v(Ze,A[je],U,null,K,X,oe,ie,se),Re++)}const it=ve?ZV(Te):Yl;for(Ce=it.length-1,re=Ye-1;re>=0;re--){const Ze=Ee+re,je=A[Ze],be=Ze+1{const{el:X,type:oe,transition:ie,children:se,shapeFlag:re}=P;if(re&6){W(P.component.subTree,A,U,ee);return}if(re&128){P.suspense.move(A,U,ee);return}if(re&64){oe.move(P,A,U,V);return}if(oe===Hr){r(X,A,U);for(let ue=0;ueie.enter(X),K);else{const{leave:ue,delayLeave:de,afterLeave:xe}=ie,Ee=()=>r(X,A,U),Fe=()=>{ue(X,()=>{Ee(),xe&&xe()})};de?de(X,Ee,Fe):Fe()}else r(X,A,U)},C=(P,A,U,ee=!1,K=!1)=>{const{type:X,props:oe,ref:ie,children:se,dynamicChildren:re,shapeFlag:le,patchFlag:ue,dirs:de}=P;if(ie!=null&&U0(ie,null,U,P,!0),le&256){A.ctx.deactivate(P);return}const xe=le&1&&de,Ee=!af(P);let Fe;if(Ee&&(Fe=oe&&oe.onVnodeBeforeUnmount)&&na(Fe,A,P),le&6)j(P.component,U,ee);else{if(le&128){P.suspense.unmount(U,ee);return}xe&&as(P,null,A,"beforeUnmount"),le&64?P.type.remove(P,A,U,K,V,ee):re&&(X!==Hr||ue>0&&ue&64)?x(re,A,U,!1,!0):(X===Hr&&ue&384||!K&&le&16)&&x(se,A,U),ee&&z(P)}(Ee&&(Fe=oe&&oe.onVnodeUnmounted)||xe)&&Tr(()=>{Fe&&na(Fe,A,P),xe&&as(P,null,A,"unmounted")},U)},z=P=>{const{type:A,el:U,anchor:ee,transition:K}=P;if(A===Hr){L(U,ee);return}if(A===ub){S(P);return}const X=()=>{i(U),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(P.shapeFlag&1&&K&&!K.persisted){const{leave:oe,delayLeave:ie}=K,se=()=>oe(U,X);ie?ie(P.el,X,se):se()}else X()},L=(P,A)=>{let U;for(;P!==A;)U=d(P),i(P),P=U;i(A)},j=(P,A,U)=>{const{bum:ee,scope:K,update:X,subTree:oe,um:ie}=P;ee&&ob(ee),K.stop(),X&&(X.active=!1,C(oe,P,A,U)),ie&&Tr(ie,A),Tr(()=>{P.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&P.asyncDep&&!P.asyncResolved&&P.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},x=(P,A,U,ee=!1,K=!1,X=0)=>{for(let oe=X;oeP.shapeFlag&6?B(P.component.subTree):P.shapeFlag&128?P.suspense.next():d(P.anchor||P.el),te=(P,A,U)=>{P==null?A._vnode&&C(A._vnode,null,null,!0):v(A._vnode||null,P,A,null,null,null,U),aP(),RL(),A._vnode=P},V={p:v,um:C,m:W,r:z,mt:Q,mc:T,pc:N,pbc:$,n:B,o:e};let Z,ce;return t&&([Z,ce]=t(V)),{render:te,hydrate:Z,createApp:zV(te,Z)}}function os({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function QV(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function GL(e,t,n=!1){const r=e.children,i=t.children;if(ct(r)&&ct(i))for(let a=0;a>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}const JV=e=>e.__isTeleport,Hr=Symbol.for("v-fgt"),em=Symbol.for("v-txt"),cu=Symbol.for("v-cmt"),ub=Symbol.for("v-stc"),lf=[];let Bi=null;function Wi(e=!1){lf.push(Bi=e?null:[])}function e9(){lf.pop(),Bi=lf[lf.length-1]||null}let Df=1;function gP(e){Df+=e}function qL(e){return e.dynamicChildren=Df>0?Bi||Yl:null,e9(),Df>0&&Bi&&Bi.push(e),e}function Al(e,t,n,r,i,a){return qL(ft(e,t,n,r,i,a,!0))}function gd(e,t,n,r,i){return qL(Vr(e,t,n,r,i,!0))}function KL(e){return e?e.__v_isVNode===!0:!1}function hc(e,t){return e.type===t.type&&e.key===t.key}const tm="__vInternal",YL=({key:e})=>e??null,hh=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Rn(e)||ln(e)||ht(e)?{i:vr,r:e,k:t,f:!!n}:e:null);function ft(e,t=null,n=null,r=0,i=null,a=e===Hr?0:1,o=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&YL(t),ref:t&&hh(t),scopeId:Zg,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:vr};return s?(_E(l,n),a&128&&e.normalize(l)):n&&(l.shapeFlag|=Rn(n)?8:16),Df>0&&!o&&Bi&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&Bi.push(l),l}const Vr=t9;function t9(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===$V)&&(e=cu),KL(e)){const s=fu(e,t,!0);return n&&_E(s,n),Df>0&&!a&&Bi&&(s.shapeFlag&6?Bi[Bi.indexOf(e)]=s:Bi.push(s)),s.patchFlag|=-2,s}if(f9(e)&&(e=e.__vccOpts),t){t=n9(t);let{class:s,style:l}=t;s&&!Rn(s)&&(t.class=lE(s)),nn(l)&&(_L(l)&&!ct(l)&&(l=Kn({},l)),t.style=sE(l))}const o=Rn(e)?1:yV(e)?128:JV(e)?64:nn(e)?4:ht(e)?2:0;return ft(e,t,n,r,i,o,a,!0)}function n9(e){return e?_L(e)||tm in e?Kn({},e):e:null}function fu(e,t,n=!1){const{props:r,ref:i,patchFlag:a,children:o}=e,s=t?r9(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&YL(s),ref:t&&t.ref?n&&i?ct(i)?i.concat(hh(t)):[i,hh(t)]:hh(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Hr?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fu(e.ssContent),ssFallback:e.ssFallback&&fu(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Es(e=" ",t=0){return Vr(em,null,e,t)}function la(e){return e==null||typeof e=="boolean"?Vr(cu):ct(e)?Vr(Hr,null,e.slice()):typeof e=="object"?vo(e):Vr(em,null,String(e))}function vo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fu(e)}function _E(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ct(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),_E(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(tm in t)?t._ctx=vr:i===3&&vr&&(vr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ht(t)?(t={default:t,_ctx:vr},n=32):(t=String(t),r&64?(n=16,t=[Es(t)]):n=8);e.children=t,e.shapeFlag|=n}function r9(...e){const t={};for(let n=0;nVn=e),EE=e=>{ul.length>1?ul.forEach(t=>t(e)):ul[0](e)};const du=e=>{EE(e),e.scope.on()},Rs=()=>{Vn&&Vn.scope.off(),EE(null)};function XL(e){return e.vnode.shapeFlag&4}let Nf=!1;function s9(e,t=!1){Nf=t;const{props:n,children:r}=e.vnode,i=XL(e);HV(e,n,i,t),qV(e,r);const a=i?l9(e,t):void 0;return Nf=!1,a}function l9(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Yg(new Proxy(e.ctx,DV));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?c9(e):null;du(e),Nu();const a=To(r,e,0,[e.props,i]);if(Lu(),Rs(),nL(a)){if(a.then(Rs,Rs),t)return a.then(o=>{yP(e,o,t)}).catch(o=>{Xg(o,e,0)});e.asyncDep=a}else yP(e,a,t)}else QL(e,t)}function yP(e,t,n){ht(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:nn(t)&&(e.setupState=IL(t)),QL(e,n)}let bP;function QL(e,t,n){const r=e.type;if(!e.render){if(!t&&bP&&!r.render){const i=r.template||wE(e).template;if(i){const{isCustomElement:a,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:l}=r,u=Kn(Kn({isCustomElement:a,delimiters:s},o),l);r.render=bP(i,u)}}e.render=r.render||Hi}{du(e),Nu();try{NV(e)}finally{Lu(),Rs()}}}function u9(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return Lr(e,"get","$attrs"),t[n]}}))}function c9(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return u9(e)},slots:e.slots,emit:e.emit,expose:t}}function OE(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(IL(Yg(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in of)return of[n](e)},has(t,n){return n in t||n in of}}))}function f9(e){return ht(e)&&"__vccOpts"in e}const ZL=(e,t)=>sV(e,t,Nf),d9=Symbol.for("v-scx"),p9=()=>sf(d9),h9="3.3.7",v9="http://www.w3.org/2000/svg",bs=typeof document<"u"?document:null,wP=bs&&bs.createElement("template"),g9={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?bs.createElementNS(v9,e):bs.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>bs.createTextNode(e),createComment:e=>bs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,a){const o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{wP.innerHTML=r?`${e}`:e;const s=wP.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},m9=Symbol("_vtc");function y9(e,t,n){const r=e[m9];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const b9=Symbol("_vod");function w9(e,t,n){const r=e.style,i=Rn(n);if(n&&!i){if(t&&!Rn(t))for(const a in t)n[a]==null&&H0(r,a,"");for(const a in n)H0(r,a,n[a])}else{const a=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),b9 in e&&(r.display=a)}}const SP=/\s*!important$/;function H0(e,t,n){if(ct(n))n.forEach(r=>H0(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=S9(e,t);SP.test(n)?e.setProperty(Du(r),n.replace(SP,""),"important"):e[r]=n}}const _P=["Webkit","Moz","ms"],cb={};function S9(e,t){const n=cb[t];if(n)return n;let r=lu(t);if(r!=="filter"&&r in e)return cb[t]=r;r=aL(r);for(let i=0;i<_P.length;i++){const a=_P[i]+r;if(a in e)return cb[t]=a}return t}const EP="http://www.w3.org/1999/xlink";function _9(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(EP,t.slice(6,t.length)):e.setAttributeNS(EP,t,n);else{const a=PH(t);n==null||a&&!oL(n)?e.removeAttribute(t):e.setAttribute(t,a?"":n)}}function E9(e,t,n,r,i,a,o){if(t==="innerHTML"||t==="textContent"){r&&o(r,i,a),e[t]=n??"";return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){e._value=n;const u=s==="OPTION"?e.getAttribute("value"):e.value,c=n??"";u!==c&&(e.value=c),n==null&&e.removeAttribute(t);return}let l=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=oL(n):n==null&&u==="string"?(n="",l=!0):u==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function O9(e,t,n,r){e.addEventListener(t,n,r)}function I9(e,t,n,r){e.removeEventListener(t,n,r)}const OP=Symbol("_vei");function C9(e,t,n,r,i=null){const a=e[OP]||(e[OP]={}),o=a[t];if(r&&o)o.value=r;else{const[s,l]=T9(t);if(r){const u=a[t]=R9(r,i);O9(e,s,u,l)}else o&&(I9(e,s,o,l),a[t]=void 0)}}const IP=/(?:Once|Passive|Capture)$/;function T9(e){let t;if(IP.test(e)){t={};let r;for(;r=e.match(IP);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Du(e.slice(2)),t]}let fb=0;const P9=Promise.resolve(),x9=()=>fb||(P9.then(()=>fb=0),fb=Date.now());function R9(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Vi(A9(r,n.value),t,5,[r])};return n.value=e,n.attached=x9(),n}function A9(e,t){if(ct(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const CP=/^on[a-z]/,$9=(e,t,n,r,i=!1,a,o,s,l)=>{t==="class"?y9(e,r,i):t==="style"?w9(e,n,r):Ug(t)?iE(t)||C9(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):k9(e,t,r,i))?E9(e,t,r,a,o,s,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),_9(e,t,r,i))};function k9(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&CP.test(t)&&ht(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||CP.test(t)&&Rn(n)?!1:t in e}const D9=Kn({patchProp:$9},g9);let TP;function N9(){return TP||(TP=YV(D9))}const L9=(...e)=>{const t=N9().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=M9(r);if(!i)return;const a=t._component;!ht(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function M9(e){return Rn(e)?document.querySelector(e):e}var j9=!1;/*! + * pinia v2.1.7 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */let JL;const nm=e=>JL=e,eM=Symbol();function V0(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var uf;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(uf||(uf={}));function F9(){const e=uL(!0),t=e.run(()=>So({}));let n=[],r=[];const i=Yg({install(a){nm(i),i._a=a,a.provide(eM,i),a.config.globalProperties.$pinia=i,r.forEach(o=>n.push(o)),r=[]},use(a){return!this._a&&!j9?r.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const tM=()=>{};function PP(e,t,n,r=tM){e.push(t);const i=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),r())};return!n&&cL()&&RH(i),i}function cl(e,...t){e.slice().forEach(n=>{n(...t)})}const W9=e=>e();function G0(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],i=e[n];V0(i)&&V0(r)&&e.hasOwnProperty(n)&&!ln(r)&&!ka(r)?e[n]=G0(i,r):e[n]=r}return e}const z9=Symbol();function B9(e){return!V0(e)||!e.hasOwnProperty(z9)}const{assign:po}=Object;function U9(e){return!!(ln(e)&&e.effect)}function H9(e,t,n,r){const{state:i,actions:a,getters:o}=t,s=n.state.value[e];let l;function u(){s||(n.state.value[e]=i?i():{});const c=nV(n.state.value[e]);return po(c,a,Object.keys(o||{}).reduce((f,d)=>(f[d]=Yg(ZL(()=>{nm(n);const p=n._s.get(e);return o[d].call(p,p)})),f),{}))}return l=nM(e,u,t,n,r,!0),l}function nM(e,t,n={},r,i,a){let o;const s=po({actions:{}},n),l={deep:!0};let u,c,f=[],d=[],p;const h=r.state.value[e];!a&&!h&&(r.state.value[e]={}),So({});let v;function w(T){let R;u=c=!1,typeof T=="function"?(T(r.state.value[e]),R={type:uf.patchFunction,storeId:e,events:p}):(G0(r.state.value[e],T),R={type:uf.patchObject,payload:T,storeId:e,events:p});const $=v=Symbol();PL().then(()=>{v===$&&(u=!0)}),c=!0,cl(f,R,r.state.value[e])}const m=a?function(){const{state:R}=n,$=R?R():{};this.$patch(F=>{po(F,$)})}:tM;function g(){o.stop(),f=[],d=[],r._s.delete(e)}function y(T,R){return function(){nm(r);const $=Array.from(arguments),F=[],H=[];function Y(J){F.push(J)}function Q(J){H.push(J)}cl(d,{args:$,name:T,store:_,after:Y,onError:Q});let ne;try{ne=R.apply(this&&this.$id===e?this:_,$)}catch(J){throw cl(H,J),J}return ne instanceof Promise?ne.then(J=>(cl(F,J),J)).catch(J=>(cl(H,J),Promise.reject(J))):(cl(F,ne),ne)}}const S={_p:r,$id:e,$onAction:PP.bind(null,d),$patch:w,$reset:m,$subscribe(T,R={}){const $=PP(f,T,R.detached,()=>F()),F=o.run(()=>Zl(()=>r.state.value[e],H=>{(R.flush==="sync"?c:u)&&T({storeId:e,type:uf.direct,events:p},H)},po({},l,R)));return $},$dispose:g},_=Kg(S);r._s.set(e,_);const O=(r._a&&r._a.runWithContext||W9)(()=>r._e.run(()=>(o=uL()).run(t)));for(const T in O){const R=O[T];if(ln(R)&&!U9(R)||ka(R))a||(h&&B9(R)&&(ln(R)?R.value=h[T]:G0(R,h[T])),r.state.value[e][T]=R);else if(typeof R=="function"){const $=y(T,R);O[T]=$,s.actions[T]=R}}return po(_,O),po(Tt(_),O),Object.defineProperty(_,"$state",{get:()=>r.state.value[e],set:T=>{w(R=>{po(R,T)})}}),r._p.forEach(T=>{po(_,o.run(()=>T({store:_,app:r._a,pinia:r,options:s})))}),h&&a&&n.hydrate&&n.hydrate(_.$state,h),u=!0,c=!0,_}function V9(e,t,n){let r,i;const a=typeof t=="function";typeof e=="string"?(r=e,i=a?n:t):(i=e,r=e.id);function o(s,l){const u=UV();return s=s||(u?sf(eM,null):null),s&&nm(s),s=JL,s._s.has(r)||(a?nM(r,t,i,s):H9(r,i,s)),s._s.get(r)}return o.$id=r,o}function G9(e){{e=Tt(e);const t={};for(const n in e){const r=e[n];(ln(r)||ka(r))&&(t[n]=aV(e,n))}return t}}const Mu=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},q9={},K9={class:"container"};function Y9(e,t){return Wi(),Al("section",K9,[kV(e.$slots,"default",{},void 0,!0)])}const rm=Mu(q9,[["render",Y9],["__scopeId","data-v-4df8db85"]]),rM=e=>(mE("data-v-3528b89c"),e=e(),yE(),e),X9=rM(()=>ft("h1",{hidden:""},"Maniiifision",-1)),Q9=rM(()=>ft("div",null,[ft("svg",{id:"svg5",width:"146.72519",height:"45.434669",viewBox:"0 0 146.72519 45.434669",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg"},[ft("defs",{id:"defs2"}),ft("g",{id:"layer1",transform:"translate(-157.92697,-51.768333)"},[ft("g",{id:"text116","aria-label":"Maniiifision"},[ft("path",{id:"path373",d:"m 157.92697,81.148841 q 0.112,-3.696 0.952,-7.28 0.896,-3.64 1.4,-5.6 0.504,-1.96 0.616,-2.352 0.112,-0.448 0.112,-0.896 -0.448,-0.336 -0.392,-0.952 0.112,-0.672 0.896,-0.952 0.112,-0.056 0.168,-0.056 0.056,0 0.392,0 0.336,-0.056 0.448,0.056 0.112,0.056 0.112,0.056 0,-0.056 0.056,-0.056 1.792,-0.28 2.8,2.184 0.448,1.008 0.672,2.072 0.28,1.064 0.728,1.904 0.448,0.84 1.008,1.848 0.616,1.008 1.512,1.792 1.232,-0.112 2.464,-2.408 0.336,-0.56 0.672,-1.064 0.336,-0.56 0.672,-1.232 0.392,-0.672 0.672,-1.12 0.336,-0.504 1.064,-1.736 0.84,-1.288 1.848,-2.52 2.632,-3.192 4.256,-2.632 1.344,0.392 1.232,2.52 0,0.56 -0.112,1.064 -0.056,1.624 -0.224,2.632 -0.112,0.952 -0.224,1.848 -0.112,0.84 -0.336,2.016 -0.672,3.136 -1.736,6.44 -1.064,3.248 -1.344,4.144 -0.28,0.896 -0.392,1.344 -0.056,0.448 -0.168,0.896 0.28,0.504 0.056,1.176 l -0.336,0.504 q -0.392,0.56 -0.896,0.56 -0.504,0 -0.952,-0.448 -0.672,-1.344 1.064,-6.496 0.952,-2.8 1.344,-4.368 0.448,-1.624 0.84,-3.08 0.056,-0.112 0.056,0.112 1.12,-4.424 1.064,-8.232 -2.352,2.352 -5.656,7.84 -1.736,2.856 -2.408,3.528 -0.616,0.672 -1.4,0.784 -1.904,0.336 -3.024,-0.504 -1.12,-0.896 -1.848,-2.352 -0.728,-1.456 -1.288,-3.136 -0.504,-1.68 -1.232,-3.024 -0.112,0.784 -0.336,1.512 -0.224,0.728 -0.672,2.576 -0.392,1.792 -1.12,4.872 -0.728,3.024 -0.84,6.16 -0.112,1.12 -1.064,1.232 -0.392,0 -0.784,-0.28 -0.336,-0.28 -0.392,-0.896 z m 2.8,-14.84 0.056,-0.224 q 0,0.112 -0.056,0.224 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path375",d:"m 181.20797,75.670607 c 0.29867,-0.597333 0.65333,-1.157333 1.064,-1.68 0.448,-0.522667 1.21333,-1.306667 2.296,-2.352 1.12,-1.045333 2.128,-1.848 3.024,-2.408 0.93333,-0.56 1.624,-0.858667 2.072,-0.896 0.448,-0.03733 0.82133,0.03733 1.12,0.224 0.63467,0.410667 0.82133,1.026667 0.56,1.848 0.26133,-0.186667 0.504,-0.354667 0.728,-0.504 0.224,-0.186667 0.504,-0.298667 0.84,-0.336 0.37333,-0.07467 0.69067,0.01867 0.952,0.28 0.26133,0.224 0.35467,0.56 0.28,1.008 -0.37333,1.381333 -0.76533,2.632 -1.176,3.752 -0.37333,1.12 -0.48533,2.034667 -0.336,2.744 0.14933,0.709333 0.69067,1.157333 1.624,1.344 0.93333,0.149333 0.4554,0.164522 2.77007,-0.358144 0.37333,-0.03733 0.672,0.03733 0.896,0.224 0.224,0.186666 0.35466,0.410666 0.392,0.672 0.0373,0.261333 -0.0373,0.522666 -0.224,0.784 -0.14934,0.261333 -0.48534,0.466666 -1.008,0.616 -1.344,0.336 -0.58607,0.302144 -1.93007,0.302144 -1.30667,0.03733 -2.31467,-0.149333 -3.024,-0.56 -0.672,-0.373333 -1.15733,-0.877333 -1.456,-1.512 -0.448,-1.008 -0.392,-2.557333 0.168,-4.648 -0.56,0.56 -1.232,1.269333 -2.016,2.128 -0.784,0.858667 -1.344,1.456 -1.68,1.792 -0.336,0.298667 -0.65333,0.578667 -0.952,0.84 -0.26133,0.224 -0.728,0.429333 -1.4,0.616 -0.63467,0.186667 -1.26933,0.261333 -1.904,0.224 -0.59733,-0.03733 -1.12,-0.242667 -1.568,-0.616 -0.448,-0.373333 -0.65333,-0.896 -0.616,-1.568 0.0373,-0.709333 0.20533,-1.362667 0.504,-1.96 z m 7.672,-3.416 c -0.41067,-0.03733 -0.728,-0.205333 -0.952,-0.504 -0.93333,0.746667 -1.904,1.605333 -2.912,2.576 -1.008,0.933333 -1.68,1.978667 -2.016,3.136 1.49333,0.410667 3.21067,-0.728 5.152,-3.416 0.52267,-0.746667 1.064,-1.418667 1.624,-2.016 -0.224,0.07467 -0.52267,0.149333 -0.896,0.224 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}}),ft("path",{id:"path377",d:"m 199.92266,78.474004 q -0.728,-1.736 -0.616,-4.2 0.168,-2.52 0.28,-3.752 0.112,-1.232 -0.056,-2.016 -0.504,-0.28 -0.56,-0.896 -0.112,-0.616 0.28,-0.896 0.448,-0.28 0.504,-0.28 0.896,-0.448 1.568,0.448 0.84,1.848 0.28,6.384 -0.112,1.12 -0.112,2.016 2.52,-3.864 5.264,-6.832 1.96,-2.072 3.864,-2.184 0.952,-0.056 1.904,-0.224 1.008,-0.224 1.792,0.224 3.36,2.016 2.408,6.664 -0.392,2.016 -1.456,3.808 -1.792,3.08 -3.192,3.36 -0.504,0.112 -1.008,0.224 -0.504,0.168 -0.896,-0.056 -0.336,-0.224 -0.448,-0.616 -0.28,-0.952 0.728,-1.344 1.008,-0.392 1.848,-1.344 0.896,-1.008 1.456,-2.24 0.616,-1.288 0.84,-2.576 0.224,-1.344 -0.056,-2.352 -0.672,-2.24 -3.696,-1.288 -1.736,0.504 -2.968,1.736 -1.232,1.232 -2.24,2.744 -1.008,1.456 -1.96,3.024 -0.952,1.512 -2.128,2.688 -0.896,0.504 -1.624,-0.224 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path379",d:"m 221.15164,69.395 q 0.504,-0.952 1.344,-0.672 0.896,0.28 0.784,1.288 -0.84,3.024 -1.456,6.048 -0.56,2.968 -1.4,5.992 -0.448,1.064 -1.4,0.784 -0.952,-0.28 -0.672,-1.456 0.28,-1.12 0.56,-2.24 0.336,-1.176 0.616,-2.296 v -0.056 q 0.448,-1.848 0.728,-3.696 0.336,-1.904 0.896,-3.696 z m 2.912,-8.008 q 0.952,0.336 0.952,1.176 0,0.84 -1.008,1.064 h -0.224 q -0.616,-0.056 -0.896,-0.392 -0.224,-0.336 -0.224,-0.784 0.056,-0.952 1.176,-1.064 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}}),ft("path",{id:"path381",d:"m 226.76762,65.395 q 0.504,-0.952 1.344,-0.672 0.896,0.28 0.784,1.288 -0.84,3.024 -1.456,6.048 -0.56,2.968 -1.4,5.992 -0.448,1.064 -1.4,0.784 -0.952,-0.28 -0.672,-1.456 0.28,-1.12 0.56,-2.24 0.336,-1.176 0.616,-2.296 v -0.056 q 0.448,-1.848 0.728,-3.696 0.336,-1.904 0.896,-3.696 z m 2.912,-8.008 q 0.952,0.336 0.952,1.176 0,0.84 -1.008,1.064 h -0.224 q -0.616,-0.056 -0.896,-0.392 -0.224,-0.336 -0.224,-0.784 0.056,-0.952 1.176,-1.064 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path383",d:"m 232.3836,61.395 q 0.504,-0.952 1.344,-0.672 0.896,0.28 0.784,1.288 -0.84,3.024 -1.456,6.048 -0.56,2.968 -1.4,5.992 -0.448,1.064 -1.4,0.784 -0.952,-0.28 -0.672,-1.456 0.28,-1.12 0.56,-2.24 0.336,-1.176 0.616,-2.296 v -0.056 q 0.448,-1.848 0.728,-3.696 0.336,-1.904 0.896,-3.696 z m 2.912,-8.008 q 0.952,0.336 0.952,1.176 0,0.84 -1.008,1.064 h -0.224 q -0.616,-0.056 -0.896,-0.392 -0.224,-0.336 -0.224,-0.784 0.056,-0.952 1.176,-1.064 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}}),ft("path",{id:"path385",d:"m 232.93559,71.667 q -1.008,-0.168 -1.12,-0.952 -0.112,-0.84 0.84,-1.232 0.728,-0.112 1.848,-1.232 l 1.288,-1.288 q 1.848,-1.848 3.136,-3.696 2.52,-6.608 5.32,-11.2 0.616,-0.448 1.232,-0.224 0.672,0.168 0.728,0.952 h 0.168 l -0.168,0.336 q -0.784,5.376 -5.376,11.536 -0.504,1.288 -0.952,2.576 -0.392,1.232 -0.84,2.52 1.736,-0.448 3.528,-0.672 1.792,-0.224 3.64,-0.56 0.56,-0.056 0.896,0.224 0.336,0.28 0.392,0.672 0.056,0.392 -0.224,0.784 -0.224,0.392 -1.568,0.672 -1.288,0.28 -3.416,0.504 -2.128,0.224 -4.088,0.952 -0.896,2.968 -1.736,5.88 -0.84,2.912 -1.512,4.984 -0.616,2.128 -1.064,3.752 -0.392,1.68 -0.952,3.416 -1.288,4.144 -2.688,6.272 -0.392,0.56 -0.896,0.56 -0.56,0 -1.008,-0.448 0,-0.112 -0.056,-0.112 -0.336,-1.008 0.28,-1.512 1.568,-2.688 2.352,-5.824 0.784,-3.08 1.624,-5.768 0.84,-2.632 1.512,-5.096 0.672,-2.408 1.4,-4.928 -0.784,0.112 -1.176,-0.616 -0.336,-0.784 0.504,-1.4 0.784,-0.448 1.568,-0.784 0.112,-0.448 0.28,-0.84 0.168,-0.392 0.28,-0.84 -0.84,0.784 -1.848,1.68 -1.008,0.84 -2.128,0.952 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path387",d:"m 249.61425,67.816253 q 0.73323,-0.789117 1.47214,-0.30125 0.793,0.502361 0.42392,1.447027 -1.59404,2.703552 -2.97172,5.465079 -1.3091,2.721929 -2.90314,5.425481 -0.70812,0.911794 -1.55521,0.394939 -0.8471,-0.516855 -0.27227,-1.580315 0.56034,-1.009367 1.12068,-2.018735 0.62892,-1.048965 1.18926,-2.058333 l 0.0145,-0.05409 q 0.91103,-1.66908 1.65979,-3.381641 0.81734,-1.75216 1.82206,-3.33816 z m 4.8854,-6.981453 q 0.8326,0.570947 0.61519,1.382324 -0.2174,0.811378 -1.24903,0.766856 L 253.64944,62.926 q -0.58052,-0.213524 -0.76401,-0.610545 -0.12941,-0.382526 -0.0135,-0.815261 0.30049,-0.905067 1.41132,-0.723374 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}}),ft("path",{id:"path389",d:"m 261.57136,69.674898 q 0.784,0.672 0.56,1.232 -0.448,1.064 -1.4,0.84 -1.12,-0.448 -2.464,0 -2.24,0.728 -3.752,1.624 1.064,0.672 2.24,1.064 1.232,0.392 2.24,1.008 2.352,1.232 2.912,3.36 -0.112,0.672 -0.392,1.008 -2.408,1.68 -6.16,2.464 -3.64,0.784 -6.664,0.168 -0.952,-0.448 -0.728,-1.288 0.224,-0.784 1.176,-0.896 3.584,0.616 8.176,-0.784 1.344,-0.392 2.128,-0.952 -0.952,-0.672 -2.128,-1.12 -1.176,-0.448 -2.296,-0.952 -1.064,-0.56 -1.904,-1.288 -0.784,-0.728 -1.008,-2.016 -0.056,-0.784 0.504,-1.232 5.6,-3.472 8.96,-2.24 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path391",d:"m 266.05988,70.788798 q 0.504,-0.952 1.344,-0.672 0.896,0.28 0.784,1.288 -0.84,3.024 -1.456,6.048 -0.56,2.968 -1.4,5.992 -0.448,1.064 -1.4,0.784 -0.952,-0.28 -0.672,-1.456 0.28,-1.12 0.56,-2.24 0.336,-1.176 0.616,-2.296 v -0.056 q 0.448,-1.848 0.728,-3.696 0.336,-1.904 0.896,-3.696 z m 2.912,-8.008 q 0.952,0.336 0.952,1.176 0,0.84 -1.008,1.064 h -0.224 q -0.616,-0.056 -0.896,-0.392 -0.224,-0.336 -0.224,-0.784 0.056,-0.952 1.176,-1.064 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}}),ft("path",{id:"path393",d:"m 271.32123,78.511022 q 0.336,-0.896 0.784,-2.016 0.336,-1.176 0.896,-2.128 1.288,-2.52 2.688,-3.584 l 0.168,-0.336 q 2.968,-2.576 5.88,-1.904 1.344,0.336 2.352,1.288 1.008,0.896 1.456,2.184 1.12,3.024 -0.784,6.44 -1.232,2.296 -4.144,3.696 -2.128,1.064 -5.432,1.456 -1.848,0.28 -3.192,-1.512 -1.344,-1.792 -0.672,-3.584 z m 9.408,0.952 q 1.288,-0.896 2.128,-2.072 0.84,-1.232 0.84,-3.136 0,-1.904 -1.008,-2.856 -1.008,-0.952 -2.464,-0.728 -0.224,0.672 -0.952,0.84 -2.128,0.28 -3.864,2.968 -1.512,2.352 -1.904,4.536 -0.112,0.448 0.056,0.896 0.224,0.392 0.336,0.84 0.336,0.112 0.672,0.336 0.336,0.168 1.12,0.224 0.84,0.056 2.296,-0.448 1.512,-0.504 2.744,-1.4 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#ed1d33","fill-opacity":"1"}}),ft("path",{id:"path395",d:"m 287.64197,76.591865 q -0.728,-1.736 -0.616,-4.2 0.168,-2.52 0.28,-3.752 0.112,-1.232 -0.056,-2.016 -0.504,-0.28 -0.56,-0.896 -0.112,-0.616 0.28,-0.896 0.448,-0.28 0.504,-0.28 0.896,-0.448 1.568,0.448 0.84,1.848 0.28,6.384 -0.112,1.12 -0.112,2.016 2.52,-3.864 5.264,-6.832 1.96,-2.072 3.864,-2.184 0.952,-0.056 1.904,-0.224 1.008,-0.224 1.792,0.224 3.36,2.016 2.408,6.664 -0.392,2.016 -1.456,3.808 -1.792,3.08 -3.192,3.36 -0.504,0.112 -1.008,0.224 -0.504,0.168 -0.896,-0.056 -0.336,-0.224 -0.448,-0.616 -0.28,-0.952 0.728,-1.344 1.008,-0.392 1.848,-1.344 0.896,-1.008 1.456,-2.24 0.616,-1.288 0.84,-2.576 0.224,-1.344 -0.056,-2.352 -0.672,-2.24 -3.696,-1.288 -1.736,0.504 -2.968,1.736 -1.232,1.232 -2.24,2.744 -1.008,1.456 -1.96,3.024 -0.952,1.512 -2.128,2.688 -0.896,0.504 -1.624,-0.224 z",style:{"font-size":"56px","font-family":"Karumbi","-inkscape-font-specification":"'Karumbi, Normal'",fill:"#2873ac","fill-opacity":"1"}})])])])],-1)),Z9=vd({__name:"Logo",setup(e){return(t,n)=>(Wi(),gd(zi(rm),null,{default:hd(()=>[X9,Q9]),_:1}))}});const J9=Mu(Z9,[["__scopeId","data-v-3528b89c"]]);var e7={get:function(t){return this.refs[t]},refs:{},set:function(t,n){this.refs[t]=n}};const IE=V9("manifest",{state:()=>({iiifUrl:"https://nijdam.nu/maniiifision-api/manifests/manifest.php",manifestJson:{},manifest:{},newManifest:{},items:{},terms:[]}),actions:{setIiifUrl(e){console.log("update store w/",e),this.iiifUrl=e,console.log("updated store w/",this.iiifUrl)},setManifestJson(e){console.log("setManifestJson"),this.manifestJson=e},setManifest(e){console.log("setManifest"),this.manifest=e},updateManifest(e){this.newManifest=e},getCurrentImage(){return e7.get("test1").current.world.getItemAt(0).source["@id"]},updateItems(e){this.items=e},resetTerms(){this.terms=[]},addTerm(e){this.terms.push(e)}},getters:{getIiifUrl(){return this.iiifUrl},getManifestJson(){return this.manifestJson},getManifest(){return this.newManifest},getItems(){return this.items},getTerms(){return this.terms},resetManifest(){return this.newManifest=this.manifest,this.newManifest}}}),im=e=>(mE("data-v-a09aeb7a"),e=e(),yE(),e),t7={class:"go"},n7=im(()=>ft("h2",null,"Image Recognition",-1)),r7={class:"clean-ul-lvl1"},i7=["src"],a7=im(()=>ft("input",{type:"text"},null,-1)),o7={class:"clean-ul-lvl2"},s7={class:"checkbox-line"},l7=im(()=>ft("input",{type:"checkbox"},null,-1)),u7=im(()=>ft("span",{class:"checkmark"},null,-1)),c7={class:"go"},f7=vd({__name:"DataEditor",setup(e){const t=IE();So(t.getItems);const n=So([]);So([]);const r=So("");function i(l){let u=n.value[0],c=n.value[1],f=Math.round(l.boundingPoly.normalizedVertices[0].x*u),d=Math.round(l.boundingPoly.normalizedVertices[0].y*c),p=Math.round(l.boundingPoly.normalizedVertices[2].x*u)-f,h=Math.round(l.boundingPoly.normalizedVertices[2].y*c)-d,v=f+","+d+","+p+","+h;return l.coords=v,t.getCurrentImage()+"/"+v+"/max/0/default.jpg"}function a(){t.resetTerms();let l="https://nijdam.nu/maniiifision-api/?imageUrl="+t.getCurrentImage()+"/full/max/0/default.jpg";fetch(l).then(u=>{u.json().then(c=>{t.updateItems(c.responses[0].localizedObjectAnnotations),this.imageData=c.imageData,c.responses[0].localizedObjectAnnotations.forEach(f=>{s(f.name_nl)})})}).catch(u=>{console.error("Error:",u)})}function o(){let l=t.manifest.items[0].id+"#xywh=";t.manifest.items[0].annotations||(t.manifest.items[0].annotations=[{id:"annot1",type:"AnnotationPage",items:[]}]),t.getItems.forEach((u,c)=>{console.log(u),t.manifest&&t.manifest.items&&t.manifest.items[0]&&t.manifest.items[0].annotations&&t.manifest.items[0].annotations[0]&&t.manifest.items[0].annotations[0].items?t.manifest.items[0].annotations[0].items.push({id:"annotation"+c,type:"Annotation",motivation:"commenting",body:{type:"TextualBody",language:"nl",format:"text/plain",value:u.name_nl},target:l+u.coords}):console.warn("Something went wrong with the manifest")}),fetch("https://nijdam.nu/maniiifision-api/manifests/save.php",{method:"POST",body:JSON.stringify(t.manifest),headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(u){return u.json()}).then(function(u){console.log(u),r.value=u.url}),console.log(JSON.stringify(t.manifest))}async function s(l){return await fetch("https://termennetwerk-api.netwerkdigitaalerfgoed.nl/graphql",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:` + query Terms { + terms( + sources: [ + "https://data.beeldengeluid.nl/id/datadownload/0031", + "http://vocab.getty.edu/aat/sparql", + ] + query: "${l}" + queryMode: OPTIMIZED + ) { + source { + name + } + result { + __typename + ... on Terms { + terms { + uri + prefLabel + altLabel + } + } + ... on Error { + message + } + } + } + } + `,variables:{name:l}})}).then(u=>u.json()).then(u=>{t.addTerm(u.data.terms.flatMap(c=>c.result.terms).slice(0,5))})}return(l,u)=>(Wi(),gd(zi(rm),null,{default:hd(()=>[ft("div",t7,[ft("input",{type:"button",value:"GO",onClick:u[0]||(u[0]=c=>a())}),n7]),ft("ul",r7,[(Wi(!0),Al(Hr,null,sP(zi(t).getItems,(c,f)=>(Wi(),Al("li",{key:`${c}-${f}`},[ft("img",{class:"img_small",src:i(c)},null,8,i7),ft("div",null,[ft("span",null,[Es(pc(c.name_nl)+" ",1),a7]),ft("ul",o7,[(Wi(!0),Al(Hr,null,sP(zi(t).getTerms[f],d=>(Wi(),Al("li",{key:d},[ft("label",s7,[l7,u7,ft("div",null,pc(d.uri)+" - "+pc(d.prefLabel[0])+" - "+pc(d.altLabel),1)])]))),128))])])]))),128))]),ft("div",c7,[ft("input",{type:"button",value:"Save Annotations to new IIIF manifest",onClick:u[1]||(u[1]=c=>o())}),Es(" "+pc(r.value),1)])]),_:1}))}});const d7=Mu(f7,[["__scopeId","data-v-a09aeb7a"]]);function iM(e,t){return function(){return e.apply(t,arguments)}}const{toString:p7}=Object.prototype,{getPrototypeOf:CE}=Object,am=(e=>t=>{const n=p7.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ba=e=>(e=e.toLowerCase(),t=>am(t)===e),om=e=>t=>typeof t===e,{isArray:ju}=Array,Lf=om("undefined");function h7(e){return e!==null&&!Lf(e)&&e.constructor!==null&&!Lf(e.constructor)&&Ei(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const aM=ba("ArrayBuffer");function v7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&aM(e.buffer),t}const g7=om("string"),Ei=om("function"),oM=om("number"),sm=e=>e!==null&&typeof e=="object",m7=e=>e===!0||e===!1,vh=e=>{if(am(e)!=="object")return!1;const t=CE(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},y7=ba("Date"),b7=ba("File"),w7=ba("Blob"),S7=ba("FileList"),_7=e=>sm(e)&&Ei(e.pipe),E7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ei(e.append)&&((t=am(e))==="formdata"||t==="object"&&Ei(e.toString)&&e.toString()==="[object FormData]"))},O7=ba("URLSearchParams"),I7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function md(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ju(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const lM=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),uM=e=>!Lf(e)&&e!==lM;function q0(){const{caseless:e}=uM(this)&&this||{},t={},n=(r,i)=>{const a=e&&sM(t,i)||i;vh(t[a])&&vh(r)?t[a]=q0(t[a],r):vh(r)?t[a]=q0({},r):ju(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r(md(t,(i,a)=>{n&&Ei(i)?e[a]=iM(i,n):e[a]=i},{allOwnKeys:r}),e),T7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),P7=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},x7=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&CE(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},R7=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},A7=e=>{if(!e)return null;if(ju(e))return e;let t=e.length;if(!oM(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&CE(Uint8Array)),k7=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},D7=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},N7=ba("HTMLFormElement"),L7=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),xP=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M7=ba("RegExp"),cM=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};md(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},j7=e=>{cM(e,(t,n)=>{if(Ei(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ei(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},F7=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return ju(e)?r(e):r(String(e).split(t)),n},W7=()=>{},z7=(e,t)=>(e=+e,Number.isFinite(e)?e:t),db="abcdefghijklmnopqrstuvwxyz",RP="0123456789",fM={DIGIT:RP,ALPHA:db,ALPHA_DIGIT:db+db.toUpperCase()+RP},B7=(e=16,t=fM.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function U7(e){return!!(e&&Ei(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const H7=e=>{const t=new Array(10),n=(r,i)=>{if(sm(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=ju(r)?[]:{};return md(r,(o,s)=>{const l=n(o,i+1);!Lf(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)},V7=ba("AsyncFunction"),G7=e=>e&&(sm(e)||Ei(e))&&Ei(e.then)&&Ei(e.catch),pe={isArray:ju,isArrayBuffer:aM,isBuffer:h7,isFormData:E7,isArrayBufferView:v7,isString:g7,isNumber:oM,isBoolean:m7,isObject:sm,isPlainObject:vh,isUndefined:Lf,isDate:y7,isFile:b7,isBlob:w7,isRegExp:M7,isFunction:Ei,isStream:_7,isURLSearchParams:O7,isTypedArray:$7,isFileList:S7,forEach:md,merge:q0,extend:C7,trim:I7,stripBOM:T7,inherits:P7,toFlatObject:x7,kindOf:am,kindOfTest:ba,endsWith:R7,toArray:A7,forEachEntry:k7,matchAll:D7,isHTMLForm:N7,hasOwnProperty:xP,hasOwnProp:xP,reduceDescriptors:cM,freezeMethods:j7,toObjectSet:F7,toCamelCase:L7,noop:W7,toFiniteNumber:z7,findKey:sM,global:lM,isContextDefined:uM,ALPHABET:fM,generateString:B7,isSpecCompliantForm:U7,toJSONObject:H7,isAsyncFn:V7,isThenable:G7};function It(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}pe.inherits(It,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:pe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const dM=It.prototype,pM={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{pM[e]={value:e}});Object.defineProperties(It,pM);Object.defineProperty(dM,"isAxiosError",{value:!0});It.from=(e,t,n,r,i,a)=>{const o=Object.create(dM);return pe.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),It.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const q7=null;function K0(e){return pe.isPlainObject(e)||pe.isArray(e)}function hM(e){return pe.endsWith(e,"[]")?e.slice(0,-2):e}function AP(e,t,n){return e?e.concat(t).map(function(i,a){return i=hM(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function K7(e){return pe.isArray(e)&&!e.some(K0)}const Y7=pe.toFlatObject(pe,{},null,function(t){return/^is[A-Z]/.test(t)});function lm(e,t,n){if(!pe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=pe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!pe.isUndefined(w[v])});const r=n.metaTokens,i=n.visitor||c,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&pe.isSpecCompliantForm(t);if(!pe.isFunction(i))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(pe.isDate(h))return h.toISOString();if(!l&&pe.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return pe.isArrayBuffer(h)||pe.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,w){let m=h;if(h&&!w&&typeof h=="object"){if(pe.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(pe.isArray(h)&&K7(h)||(pe.isFileList(h)||pe.endsWith(v,"[]"))&&(m=pe.toArray(h)))return v=hM(v),m.forEach(function(y,S){!(pe.isUndefined(y)||y===null)&&t.append(o===!0?AP([v],S,a):o===null?v:v+"[]",u(y))}),!1}return K0(h)?!0:(t.append(AP(w,v,a),u(h)),!1)}const f=[],d=Object.assign(Y7,{defaultVisitor:c,convertValue:u,isVisitable:K0});function p(h,v){if(!pe.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),pe.forEach(h,function(m,g){(!(pe.isUndefined(m)||m===null)&&i.call(t,m,pe.isString(g)?g.trim():g,v,d))===!0&&p(m,v?v.concat(g):[g])}),f.pop()}}if(!pe.isObject(e))throw new TypeError("data must be an object");return p(e),t}function $P(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function TE(e,t){this._pairs=[],e&&lm(e,this,t)}const vM=TE.prototype;vM.append=function(t,n){this._pairs.push([t,n])};vM.toString=function(t){const n=t?function(r){return t.call(this,r,$P)}:$P;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function X7(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gM(e,t,n){if(!t)return e;const r=n&&n.encode||X7,i=n&&n.serialize;let a;if(i?a=i(t,n):a=pe.isURLSearchParams(t)?t.toString():new TE(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Q7{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pe.forEach(this.handlers,function(r){r!==null&&t(r)})}}const kP=Q7,mM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z7=typeof URLSearchParams<"u"?URLSearchParams:TE,J7=typeof FormData<"u"?FormData:null,eG=typeof Blob<"u"?Blob:null,tG=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),nG=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),fa={isBrowser:!0,classes:{URLSearchParams:Z7,FormData:J7,Blob:eG},isStandardBrowserEnv:tG,isStandardBrowserWebWorkerEnv:nG,protocols:["http","https","file","blob","url","data"]};function rG(e,t){return lm(e,new fa.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return fa.isNode&&pe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function iG(e){return pe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function aG(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r=n.length;return o=!o&&pe.isArray(i)?i.length:o,l?(pe.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!pe.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&pe.isArray(i[o])&&(i[o]=aG(i[o])),!s)}if(pe.isFormData(e)&&pe.isFunction(e.entries)){const n={};return pe.forEachEntry(e,(r,i)=>{t(iG(r),i,n,0)}),n}return null}function oG(e,t,n){if(pe.isString(e))try{return(t||JSON.parse)(e),pe.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const PE={transitional:mM,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=pe.isObject(t);if(a&&pe.isHTMLForm(t)&&(t=new FormData(t)),pe.isFormData(t))return i&&i?JSON.stringify(yM(t)):t;if(pe.isArrayBuffer(t)||pe.isBuffer(t)||pe.isStream(t)||pe.isFile(t)||pe.isBlob(t))return t;if(pe.isArrayBufferView(t))return t.buffer;if(pe.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return rG(t,this.formSerializer).toString();if((s=pe.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return lm(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),oG(t)):t}],transformResponse:[function(t){const n=this.transitional||PE.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&pe.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?It.from(s,It.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fa.classes.FormData,Blob:fa.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pe.forEach(["delete","get","head","post","put","patch"],e=>{PE.headers[e]={}});const xE=PE,sG=pe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lG=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&sG[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},DP=Symbol("internals");function vc(e){return e&&String(e).trim().toLowerCase()}function gh(e){return e===!1||e==null?e:pe.isArray(e)?e.map(gh):String(e)}function uG(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const cG=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pb(e,t,n,r,i){if(pe.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!pe.isString(t)){if(pe.isString(r))return t.indexOf(r)!==-1;if(pe.isRegExp(r))return r.test(t)}}function fG(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function dG(e,t){const n=pe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class um{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,l,u){const c=vc(l);if(!c)throw new Error("header name must be a non-empty string");const f=pe.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=gh(s))}const o=(s,l)=>pe.forEach(s,(u,c)=>a(u,c,l));return pe.isPlainObject(t)||t instanceof this.constructor?o(t,n):pe.isString(t)&&(t=t.trim())&&!cG(t)?o(lG(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=vc(t),t){const r=pe.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return uG(i);if(pe.isFunction(n))return n.call(this,i,r);if(pe.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=vc(t),t){const r=pe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pb(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=vc(o),o){const s=pe.findKey(r,o);s&&(!n||pb(r,r[s],s,n))&&(delete r[s],i=!0)}}return pe.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||pb(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return pe.forEach(this,(i,a)=>{const o=pe.findKey(r,a);if(o){n[o]=gh(i),delete n[a];return}const s=t?fG(a):String(a).trim();s!==a&&delete n[a],n[s]=gh(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return pe.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&pe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[DP]=this[DP]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=vc(o);r[s]||(dG(i,o),r[s]=!0)}return pe.isArray(t)?t.forEach(a):a(t),this}}um.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);pe.reduceDescriptors(um.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});pe.freezeMethods(um);const Da=um;function hb(e,t){const n=this||xE,r=t||n,i=Da.from(r.headers);let a=r.data;return pe.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function bM(e){return!!(e&&e.__CANCEL__)}function yd(e,t,n){It.call(this,e??"canceled",It.ERR_CANCELED,t,n),this.name="CanceledError"}pe.inherits(yd,It,{__CANCEL__:!0});function pG(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new It("Request failed with status code "+n.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const hG=fa.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const l=[];l.push(n+"="+encodeURIComponent(r)),pe.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),pe.isString(a)&&l.push("path="+a),pe.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function vG(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gG(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function wM(e,t){return e&&!vG(t)?gG(e,t):t}const mG=fa.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=pe.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function yG(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bG(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[a];o||(o=u),n[i]=l,r[i]=u;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,l=r(s),u=a<=o;n=a;const c={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-a)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const wG=typeof XMLHttpRequest<"u",SG=wG&&function(e){return new Promise(function(n,r){let i=e.data;const a=Da.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}let u;pe.isFormData(i)&&(fa.isStandardBrowserEnv||fa.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.getContentType(/^\s*multipart\/form-data/)?pe.isString(u=a.getContentType())&&a.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):a.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(h+":"+v))}const f=wM(e.baseURL,e.url);c.open(e.method.toUpperCase(),gM(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const h=Da.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),w={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};pG(function(g){n(g),l()},function(g){r(g),l()},w),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new It("Request aborted",It.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new It("Network Error",It.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||mM;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),r(new It(v,w.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,c)),c=null},fa.isStandardBrowserEnv){const h=mG(f)&&e.xsrfCookieName&&hG.read(e.xsrfCookieName);h&&a.set(e.xsrfHeaderName,h)}i===void 0&&a.setContentType(null),"setRequestHeader"in c&&pe.forEach(a.toJSON(),function(v,w){c.setRequestHeader(w,v)}),pe.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",NP(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",NP(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=h=>{c&&(r(!h||h.type?new yd(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=yG(f);if(p&&fa.protocols.indexOf(p)===-1){r(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}c.send(i||null)})},Y0={http:q7,xhr:SG};pe.forEach(Y0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const LP=e=>`- ${e}`,_G=e=>pe.isFunction(e)||e===null||e===!1,SM={getAdapter:e=>{e=pe.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since : +`+a.map(LP).join(` +`):" "+LP(a[0]):"as no adapter specified";throw new It("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Y0};function vb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yd(null,e)}function MP(e){return vb(e),e.headers=Da.from(e.headers),e.data=hb.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),SM.getAdapter(e.adapter||xE.adapter)(e).then(function(r){return vb(e),r.data=hb.call(e,e.transformResponse,r),r.headers=Da.from(r.headers),r},function(r){return bM(r)||(vb(e),r&&r.response&&(r.response.data=hb.call(e,e.transformResponse,r.response),r.response.headers=Da.from(r.response.headers))),Promise.reject(r)})}const jP=e=>e instanceof Da?e.toJSON():e;function pu(e,t){t=t||{};const n={};function r(u,c,f){return pe.isPlainObject(u)&&pe.isPlainObject(c)?pe.merge.call({caseless:f},u,c):pe.isPlainObject(c)?pe.merge({},c):pe.isArray(c)?c.slice():c}function i(u,c,f){if(pe.isUndefined(c)){if(!pe.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function a(u,c){if(!pe.isUndefined(c))return r(void 0,c)}function o(u,c){if(pe.isUndefined(c)){if(!pe.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>i(jP(u),jP(c),!0)};return pe.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||i,d=f(e[c],t[c],c);pe.isUndefined(d)&&f!==s||(n[c]=d)}),n}const _M="1.6.0",RE={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{RE[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const FP={};RE.transitional=function(t,n,r){function i(a,o){return"[Axios v"+_M+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new It(i(o," has been removed"+(n?" in "+n:"")),It.ERR_DEPRECATED);return n&&!FP[o]&&(FP[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function EG(e,t,n){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new It("option "+a+" must be "+l,It.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new It("Unknown option "+a,It.ERR_BAD_OPTION)}}const X0={assertOptions:EG,validators:RE},no=X0.validators;class Zh{constructor(t){this.defaults=t,this.interceptors={request:new kP,response:new kP}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&X0.assertOptions(r,{silentJSONParsing:no.transitional(no.boolean),forcedJSONParsing:no.transitional(no.boolean),clarifyTimeoutError:no.transitional(no.boolean)},!1),i!=null&&(pe.isFunction(i)?n.paramsSerializer={serialize:i}:X0.assertOptions(i,{encode:no.function,serialize:no.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&pe.merge(a.common,a[n.method]);a&&pe.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=Da.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!l){const h=[MP.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(n);f{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new yd(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new AE(function(i){t=i}),cancel:t}}}const OG=AE;function IG(e){return function(n){return e.apply(null,n)}}function CG(e){return pe.isObject(e)&&e.isAxiosError===!0}const Q0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Q0).forEach(([e,t])=>{Q0[t]=e});const TG=Q0;function EM(e){const t=new mh(e),n=iM(mh.prototype.request,t);return pe.extend(n,mh.prototype,t,{allOwnKeys:!0}),pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return EM(pu(e,i))},n}const En=EM(xE);En.Axios=mh;En.CanceledError=yd;En.CancelToken=OG;En.isCancel=bM;En.VERSION=_M;En.toFormData=lm;En.AxiosError=It;En.Cancel=En.CanceledError;En.all=function(t){return Promise.all(t)};En.spread=IG;En.isAxiosError=CG;En.mergeConfig=pu;En.AxiosHeaders=Da;En.formToJSON=e=>yM(pe.isHTMLForm(e)?new FormData(e):e);En.getAdapter=SM.getAdapter;En.HttpStatusCode=TG;En.default=En;const PG=En,xG=["value"],RG=vd({__name:"GetManifest",setup(e){const t=IE(),n=async o=>{t.setIiifUrl(o);const s=await i(o);console.log(s),t.setManifestJson(s),t.setManifest(s)},r=async o=>{const s=o.target.value;o&&(console.log("comp updated: ",s),s&&await n(s)),t.updateItems([])},i=async o=>PG.get(o).then(function(s){return s.data}).catch(function(s){console.log(s)}),a=So("https://athenaeumcollecties.nl/collecties/gedigitaliseerde-collecties/manifest/0b266318-3487-11e6-b89c-23313efd728e");return bE(()=>{n(a.value)}),Zl([a],([o])=>{n(o)}),(o,s)=>(Wi(),gd(zi(rm),null,{default:hd(()=>[ft("article",null,[Es(" Example manifests: "),ft("div",null,[ft("input",{type:"button",value:"Load: ",onClick:s[0]||(s[0]=()=>a.value="https://nijdam.nu/maniiifision-api/manifests/manifest.php")}),Es(" https://nijdam.nu/maniiifision-api/manifests/manifest.php ")]),ft("div",null,[ft("input",{type:"button",value:"Load: ",onClick:s[1]||(s[1]=()=>a.value="https://athenaeumcollecties.nl/collecties/gedigitaliseerde-collecties/manifest/0b266318-3487-11e6-b89c-23313efd728e")}),Es(" https://athenaeumcollecties.nl/collecties/gedigitaliseerde-collecties/manifest/0b266318-3487-11e6-b89c-23313efd728e ")]),ft("div",null,[ft("input",{type:"button",value:"Load: ",onClick:s[2]||(s[2]=()=>a.value="https://iiif.io/api/cookbook/recipe/0021-tagging/manifest.json")}),Es(" https://iiif.io/api/cookbook/recipe/0021-tagging/manifest.json ")])]),ft("input",{placeholder:"url to iiif manifest",type:"url",value:a.value,onInput:r},null,40,xG)]),_:1}))}});const AG=Mu(RG,[["__scopeId","data-v-e9215c18"]]);var Uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var OM={exports:{}},St={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var bd=Symbol.for("react.element"),$G=Symbol.for("react.portal"),kG=Symbol.for("react.fragment"),DG=Symbol.for("react.strict_mode"),NG=Symbol.for("react.profiler"),LG=Symbol.for("react.provider"),MG=Symbol.for("react.context"),jG=Symbol.for("react.forward_ref"),FG=Symbol.for("react.suspense"),WG=Symbol.for("react.memo"),zG=Symbol.for("react.lazy"),WP=Symbol.iterator;function BG(e){return e===null||typeof e!="object"?null:(e=WP&&e[WP]||e["@@iterator"],typeof e=="function"?e:null)}var IM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CM=Object.assign,TM={};function Fu(e,t,n){this.props=e,this.context=t,this.refs=TM,this.updater=n||IM}Fu.prototype.isReactComponent={};Fu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};Fu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function PM(){}PM.prototype=Fu.prototype;function $E(e,t,n){this.props=e,this.context=t,this.refs=TM,this.updater=n||IM}var kE=$E.prototype=new PM;kE.constructor=$E;CM(kE,Fu.prototype);kE.isPureReactComponent=!0;var zP=Array.isArray,xM=Object.prototype.hasOwnProperty,DE={current:null},RM={key:!0,ref:!0,__self:!0,__source:!0};function AM(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)xM.call(t,r)&&!RM.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,C=N[W];if(0>>1;Wi(j,k))xi(B,j)?(N[W]=B,N[x]=k,W=x):(N[W]=j,N[L]=k,W=L);else if(xi(B,k))N[W]=B,N[x]=k,W=x;else break e}}return D}function i(N,D){var k=N.sortIndex-D.sortIndex;return k!==0?k:N.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=N)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function S(N){if(v=!1,y(N),!h)if(n(l)!==null)h=!0,J(_);else{var D=n(u);D!==null&&ae(S,D.startTime-N)}}function _(N,D){h=!1,v&&(v=!1,m(T),T=-1),p=!0;var k=d;try{for(y(D),f=n(l);f!==null&&(!(f.expirationTime>D)||N&&!F());){var W=f.callback;if(typeof W=="function"){f.callback=null,d=f.priorityLevel;var C=W(f.expirationTime<=D);D=e.unstable_now(),typeof C=="function"?f.callback=C:f===n(l)&&r(l),y(D)}else r(l);f=n(l)}if(f!==null)var z=!0;else{var L=n(u);L!==null&&ae(S,L.startTime-D),z=!1}return z}finally{f=null,d=k,p=!1}}var E=!1,O=null,T=-1,R=5,$=-1;function F(){return!(e.unstable_now()-$N||125W?(N.sortIndex=k,t(u,N),n(l)===null&&N===n(u)&&(v?(m(T),T=-1):v=!0,ae(S,k-W))):(N.sortIndex=C,t(l,N),h||p||(h=!0,J(_))),N},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(N){var D=d;return function(){var k=d;d=D;try{return N.apply(this,arguments)}finally{d=k}}}})(DM);kM.exports=DM;var qG=kM.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var NM=b,Jr=qG;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Z0=Object.prototype.hasOwnProperty,KG=/^[: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]*$/,UP={},HP={};function YG(e){return Z0.call(HP,e)?!0:Z0.call(UP,e)?!1:KG.test(e)?HP[e]=!0:(UP[e]=!0,!1)}function XG(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function QG(e,t,n,r){if(t===null||typeof t>"u"||XG(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Sr(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Yn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Yn[e]=new Sr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Yn[t]=new Sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Yn[e]=new Sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Yn[e]=new Sr(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){Yn[e]=new Sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Yn[e]=new Sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Yn[e]=new Sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Yn[e]=new Sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Yn[e]=new Sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var LE=/[\-:]([a-z])/g;function ME(e){return e[1].toUpperCase()}"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(LE,ME);Yn[t]=new Sr(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(LE,ME);Yn[t]=new Sr(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(LE,ME);Yn[t]=new Sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Yn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Yn.xlinkHref=new Sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Yn[e]=new Sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function jE(e,t,n,r){var i=Yn.hasOwnProperty(t)?Yn[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{yb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hc(e):""}function ZG(e){switch(e.tag){case 5:return Hc(e.type);case 16:return Hc("Lazy");case 13:return Hc("Suspense");case 19:return Hc("SuspenseList");case 0:case 2:case 15:return e=bb(e.type,!1),e;case 11:return e=bb(e.type.render,!1),e;case 1:return e=bb(e.type,!0),e;default:return""}}function nS(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case kl:return"Fragment";case $l:return"Portal";case J0:return"Profiler";case FE:return"StrictMode";case eS:return"Suspense";case tS:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jM:return(e.displayName||"Context")+".Consumer";case MM:return(e._context.displayName||"Context")+".Provider";case WE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zE:return t=e.displayName||null,t!==null?t:nS(e.type)||"Memo";case go:t=e._payload,e=e._init;try{return nS(e(t))}catch{}}return null}function JG(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=t.render,e=e.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 nS(t);case 8:return t===FE?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eq(e){var t=WM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yp(e){e._valueTracker||(e._valueTracker=eq(e))}function zM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=WM(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Jh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rS(e,t){var n=t.checked;return cn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function GP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Bo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function BM(e,t){t=t.checked,t!=null&&jE(e,"checked",t,!1)}function iS(e,t){BM(e,t);var n=Bo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?aS(e,t.type,n):t.hasOwnProperty("defaultValue")&&aS(e,t.type,Bo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function aS(e,t,n){(t!=="number"||Jh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Vc=Array.isArray;function Jl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=bp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cf={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},tq=["Webkit","ms","Moz","O"];Object.keys(cf).forEach(function(e){tq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cf[t]=cf[e]})});function GM(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cf.hasOwnProperty(e)&&cf[e]?(""+t).trim():t+"px"}function qM(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=GM(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var nq=cn({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 lS(e,t){if(t){if(nq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function uS(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 cS=null;function BE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fS=null,eu=null,tu=null;function XP(e){if(e=_d(e)){if(typeof fS!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=hm(t),fS(e.stateNode,e.type,t))}}function KM(e){eu?tu?tu.push(e):tu=[e]:eu=e}function YM(){if(eu){var e=eu,t=tu;if(tu=eu=null,XP(e),t)for(e=0;e>>=0,e===0?32:31-(pq(e)/hq|0)|0}var wp=64,Sp=4194304;function Gc(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function rv(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Gc(s):(a&=o,a!==0&&(r=Gc(a)))}else o=n&~i,o!==0?r=Gc(o):a!==0&&(r=Gc(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gi(t),e[t]=n}function yq(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=df),ax=String.fromCharCode(32),ox=!1;function vj(e,t){switch(e){case"keyup":return Gq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dl=!1;function Kq(e,t){switch(e){case"compositionend":return gj(t);case"keypress":return t.which!==32?null:(ox=!0,ax);case"textInput":return e=t.data,e===ax&&ox?null:e;default:return null}}function Yq(e,t){if(Dl)return e==="compositionend"||!XE&&vj(e,t)?(e=pj(),Sh=qE=_o=null,Dl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cx(n)}}function wj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sj(){for(var e=window,t=Jh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jh(e.document)}return t}function QE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function iK(e){var t=Sj(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wj(n.ownerDocument.documentElement,n)){if(r!==null&&QE(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=fx(n,a);var o=fx(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.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;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Nl=null,mS=null,hf=null,yS=!1;function dx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yS||Nl==null||Nl!==Jh(r)||(r=Nl,"selectionStart"in r&&QE(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hf&&Hf(hf,r)||(hf=r,r=ov(mS,"onSelect"),0jl||(e.current=OS[jl],OS[jl]=null,jl--)}function Gt(e,t){jl++,OS[jl]=e.current,e.current=t}var Uo={},sr=Xo(Uo),$r=Xo(!1),Ms=Uo;function vu(e,t){var n=e.type.contextTypes;if(!n)return Uo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function kr(e){return e=e.childContextTypes,e!=null}function lv(){Zt($r),Zt(sr)}function bx(e,t,n){if(sr.current!==Uo)throw Error(Ie(168));Gt(sr,t),Gt($r,n)}function Rj(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,JG(e)||"Unknown",i));return cn({},n,r)}function uv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Uo,Ms=sr.current,Gt(sr,e),Gt($r,$r.current),!0}function wx(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=Rj(e,t,Ms),r.__reactInternalMemoizedMergedChildContext=e,Zt($r),Zt(sr),Gt(sr,e)):Zt($r),Gt($r,n)}var Ta=null,vm=!1,kb=!1;function Aj(e){Ta===null?Ta=[e]:Ta.push(e)}function gK(e){vm=!0,Aj(e)}function Qo(){if(!kb&&Ta!==null){kb=!0;var e=0,t=Mt;try{var n=Ta;for(Mt=1;e>=o,i-=o,xa=1<<32-Gi(t)+i|n<T?(R=O,O=null):R=O.sibling;var $=d(m,O,y[T],S);if($===null){O===null&&(O=R);break}e&&O&&$.alternate===null&&t(m,O),g=a($,g,T),E===null?_=$:E.sibling=$,E=$,O=R}if(T===y.length)return n(m,O),tn&&us(m,T),_;if(O===null){for(;TT?(R=O,O=null):R=O.sibling;var F=d(m,O,$.value,S);if(F===null){O===null&&(O=R);break}e&&O&&F.alternate===null&&t(m,O),g=a(F,g,T),E===null?_=F:E.sibling=F,E=F,O=R}if($.done)return n(m,O),tn&&us(m,T),_;if(O===null){for(;!$.done;T++,$=y.next())$=f(m,$.value,S),$!==null&&(g=a($,g,T),E===null?_=$:E.sibling=$,E=$);return tn&&us(m,T),_}for(O=r(m,O);!$.done;T++,$=y.next())$=p(O,m,T,$.value,S),$!==null&&(e&&$.alternate!==null&&O.delete($.key===null?T:$.key),g=a($,g,T),E===null?_=$:E.sibling=$,E=$);return e&&O.forEach(function(H){return t(m,H)}),tn&&us(m,T),_}function w(m,g,y,S){if(typeof y=="object"&&y!==null&&y.type===kl&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case mp:e:{for(var _=y.key,E=g;E!==null;){if(E.key===_){if(_=y.type,_===kl){if(E.tag===7){n(m,E.sibling),g=i(E,y.props.children),g.return=m,m=g;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===go&&Tx(_)===E.type){n(m,E.sibling),g=i(E,y.props),g.ref=Sc(m,E,y),g.return=m,m=g;break e}n(m,E);break}else t(m,E);E=E.sibling}y.type===kl?(g=$s(y.props.children,m.mode,S,y.key),g.return=m,m=g):(S=xh(y.type,y.key,y.props,null,m.mode,S),S.ref=Sc(m,g,y),S.return=m,m=S)}return o(m);case $l:e:{for(E=y.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(m,g.sibling),g=i(g,y.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=zb(y,m.mode,S),g.return=m,m=g}return o(m);case go:return E=y._init,w(m,g,E(y._payload),S)}if(Vc(y))return h(m,g,y,S);if(gc(y))return v(m,g,y,S);Pp(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,y),g.return=m,m=g):(n(m,g),g=Wb(y,m.mode,S),g.return=m,m=g),o(m)):n(m,g)}return w}var mu=Fj(!0),Wj=Fj(!1),Ed={},pa=Xo(Ed),Kf=Xo(Ed),Yf=Xo(Ed);function Cs(e){if(e===Ed)throw Error(Ie(174));return e}function oO(e,t){switch(Gt(Yf,t),Gt(Kf,e),Gt(pa,Ed),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sS(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sS(t,e)}Zt(pa),Gt(pa,t)}function yu(){Zt(pa),Zt(Kf),Zt(Yf)}function zj(e){Cs(Yf.current);var t=Cs(pa.current),n=sS(t,e.type);t!==n&&(Gt(Kf,e),Gt(pa,n))}function sO(e){Kf.current===e&&(Zt(pa),Zt(Kf))}var sn=Xo(0);function vv(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Db=[];function lO(){for(var e=0;en?n:4,e(!0);var r=Nb.transition;Nb.transition={};try{e(!1),t()}finally{Mt=n,Nb.transition=r}}function rF(){return xi().memoizedState}function wK(e,t,n){var r=Do(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iF(e))aF(t,n);else if(n=Nj(e,t,n,r),n!==null){var i=yr();qi(n,e,r,i),oF(n,t,r)}}function SK(e,t,n){var r=Do(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iF(e))aF(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ki(s,o)){var l=t.interleaved;l===null?(i.next=i,iO(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Nj(e,t,i,r),n!==null&&(i=yr(),qi(n,e,r,i),oF(n,t,r))}}function iF(e){var t=e.alternate;return e===un||t!==null&&t===un}function aF(e,t){vf=gv=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,HE(e,n)}}var mv={readContext:Pi,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},_K={readContext:Pi,useCallback:function(e,t){return oa().memoizedState=[e,t===void 0?null:t],e},useContext:Pi,useEffect:xx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ih(4194308,4,Zj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ih(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ih(4,2,e,t)},useMemo:function(e,t){var n=oa();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=oa();return t=n!==void 0?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=wK.bind(null,un,e),[r.memoizedState,e]},useRef:function(e){var t=oa();return e={current:e},t.memoizedState=e},useState:Px,useDebugValue:pO,useDeferredValue:function(e){return oa().memoizedState=e},useTransition:function(){var e=Px(!1),t=e[0];return e=bK.bind(null,e[1]),oa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=un,i=oa();if(tn){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),Mn===null)throw Error(Ie(349));Fs&30||Hj(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,xx(Gj.bind(null,r,a,e),[e]),r.flags|=2048,Zf(9,Vj.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=oa(),t=Mn.identifierPrefix;if(tn){var n=Ra,r=xa;n=(r&~(1<<32-Gi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ca]=t,e[qf]=r,vF(e,t,!1,!1),t.stateNode=e;e:{switch(o=uS(n,r),n){case"dialog":Kt("cancel",e),Kt("close",e),i=r;break;case"iframe":case"object":case"embed":Kt("load",e),i=r;break;case"video":case"audio":for(i=0;iwu&&(t.flags|=128,r=!0,_c(a,!1),t.lanes=4194304)}else{if(!r)if(e=vv(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),_c(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!tn)return er(t),null}else 2*gn()-a.renderingStartTime>wu&&n!==1073741824&&(t.flags|=128,r=!0,_c(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=gn(),t.sibling=null,n=sn.current,Gt(sn,r?n&1|2:n&1),t):(er(t),null);case 22:case 23:return bO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ur&1073741824&&(er(t),t.subtreeFlags&6&&(t.flags|=8192)):er(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function RK(e,t){switch(JE(t),t.tag){case 1:return kr(t.type)&&lv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yu(),Zt($r),Zt(sr),lO(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sO(t),null;case 13:if(Zt(sn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));gu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zt(sn),null;case 4:return yu(),null;case 10:return rO(t.type._context),null;case 22:case 23:return bO(),null;case 24:return null;default:return null}}var Rp=!1,ir=!1,AK=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function Bl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fn(e,t,r)}else n.current=null}function LS(e,t,n){try{n()}catch(r){fn(e,t,r)}}var jx=!1;function $K(e,t){if(bS=iv,e=Sj(),QE(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(s=o),d===a&&++c===r&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wS={focusedElem:e,selectionRange:n},iv=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){t=Ve;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,w=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:Li(t.type,v),w);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(S){fn(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}return h=jx,jx=!1,h}function gf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&LS(t,n,a)}i=i.next}while(i!==r)}}function ym(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 MS(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function yF(e){var t=e.alternate;t!==null&&(e.alternate=null,yF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ca],delete t[qf],delete t[ES],delete t[hK],delete t[vK])),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 bF(e){return e.tag===5||e.tag===3||e.tag===4}function Fx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sv));else if(r!==4&&(e=e.child,e!==null))for(jS(e,t,n),e=e.sibling;e!==null;)jS(e,t,n),e=e.sibling}function FS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(FS(e,t,n),e=e.sibling;e!==null;)FS(e,t,n),e=e.sibling}var Un=null,Mi=!1;function ro(e,t,n){for(n=n.child;n!==null;)wF(e,t,n),n=n.sibling}function wF(e,t,n){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(cm,n)}catch{}switch(n.tag){case 5:ir||Bl(n,t);case 6:var r=Un,i=Mi;Un=null,ro(e,t,n),Un=r,Mi=i,Un!==null&&(Mi?(e=Un,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Un.removeChild(n.stateNode));break;case 18:Un!==null&&(Mi?(e=Un,n=n.stateNode,e.nodeType===8?$b(e.parentNode,n):e.nodeType===1&&$b(e,n),Bf(e)):$b(Un,n.stateNode));break;case 4:r=Un,i=Mi,Un=n.stateNode.containerInfo,Mi=!0,ro(e,t,n),Un=r,Mi=i;break;case 0:case 11:case 14:case 15:if(!ir&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&LS(n,t,o),i=i.next}while(i!==r)}ro(e,t,n);break;case 1:if(!ir&&(Bl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){fn(n,t,s)}ro(e,t,n);break;case 21:ro(e,t,n);break;case 22:n.mode&1?(ir=(r=ir)||n.memoizedState!==null,ro(e,t,n),ir=r):ro(e,t,n);break;default:ro(e,t,n)}}function Wx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new AK),t.forEach(function(r){var i=zK.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function $i(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=gn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*DK(r/1960))-r,10e?16:e,Eo===null)var r=!1;else{if(e=Eo,Eo=null,wv=0,At&6)throw Error(Ie(331));var i=At;for(At|=4,Ve=e.current;Ve!==null;){var a=Ve,o=a.child;if(Ve.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lgn()-mO?As(e,0):gO|=n),Dr(e,t)}function PF(e,t){t===0&&(e.mode&1?(t=Sp,Sp<<=1,!(Sp&130023424)&&(Sp=4194304)):t=1);var n=yr();e=Ba(e,t),e!==null&&(wd(e,t,n),Dr(e,n))}function WK(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),PF(e,n)}function zK(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),PF(e,n)}var xF;xF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$r.current)Rr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Rr=!1,PK(e,t,n);Rr=!!(e.flags&131072)}else Rr=!1,tn&&t.flags&1048576&&$j(t,fv,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ch(e,t),e=t.pendingProps;var i=vu(t,sr.current);ru(t,n),i=cO(null,t,r,e,i,n);var a=fO();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kr(r)?(a=!0,uv(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,aO(t),i.updater=gm,t.stateNode=i,i._reactInternals=t,xS(t,r,e,n),t=$S(null,t,r,!0,a,n)):(t.tag=0,tn&&a&&ZE(t),pr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ch(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=UK(r),e=Li(r,e),i){case 0:t=AS(null,t,r,e,n);break e;case 1:t=Nx(null,t,r,e,n);break e;case 11:t=kx(null,t,r,e,n);break e;case 14:t=Dx(null,t,r,Li(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Li(r,i),AS(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Li(r,i),Nx(e,t,r,i,n);case 3:e:{if(dF(t),e===null)throw Error(Ie(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Lj(e,t),hv(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=bu(Error(Ie(423)),t),t=Lx(e,t,r,n,i);break e}else if(r!==i){i=bu(Error(Ie(424)),t),t=Lx(e,t,r,n,i);break e}else for(Gr=Ao(t.stateNode.containerInfo.firstChild),Yr=t,tn=!0,ji=null,n=Wj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gu(),r===i){t=Ua(e,t,n);break e}pr(e,t,r,n)}t=t.child}return t;case 5:return zj(t),e===null&&CS(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,SS(r,i)?o=null:a!==null&&SS(r,a)&&(t.flags|=32),fF(e,t),pr(e,t,o,n),t.child;case 6:return e===null&&CS(t),null;case 13:return pF(e,t,n);case 4:return oO(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mu(t,null,r,n):pr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Li(r,i),kx(e,t,r,i,n);case 7:return pr(e,t,t.pendingProps,n),t.child;case 8:return pr(e,t,t.pendingProps.children,n),t.child;case 12:return pr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Gt(dv,r._currentValue),r._currentValue=o,a!==null)if(Ki(a.value,o)){if(a.children===i.children&&!$r.current){t=Ua(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=Na(-1,n&-n),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),TS(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ie(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),TS(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}pr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ru(t,n),i=Pi(i),r=r(i),t.flags|=1,pr(e,t,r,n),t.child;case 14:return r=t.type,i=Li(r,t.pendingProps),i=Li(r.type,i),Dx(e,t,r,i,n);case 15:return uF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Li(r,i),Ch(e,t),t.tag=1,kr(r)?(e=!0,uv(t)):e=!1,ru(t,n),jj(t,r,i),xS(t,r,i,n),$S(null,t,r,!0,e,n);case 19:return hF(e,t,n);case 22:return cF(e,t,n)}throw Error(Ie(156,t.tag))};function RF(e,t){return nj(e,t)}function BK(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 bi(e,t,n,r){return new BK(e,t,n,r)}function SO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function UK(e){if(typeof e=="function")return SO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===WE)return 11;if(e===zE)return 14}return 2}function No(e,t){var n=e.alternate;return n===null?(n=bi(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xh(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")SO(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case kl:return $s(n.children,i,a,t);case FE:o=8,i|=8;break;case J0:return e=bi(12,n,t,i|2),e.elementType=J0,e.lanes=a,e;case eS:return e=bi(13,n,t,i),e.elementType=eS,e.lanes=a,e;case tS:return e=bi(19,n,t,i),e.elementType=tS,e.lanes=a,e;case FM:return wm(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case MM:o=10;break e;case jM:o=9;break e;case WE:o=11;break e;case zE:o=14;break e;case go:o=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=bi(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function $s(e,t,n,r){return e=bi(7,e,r,t),e.lanes=n,e}function wm(e,t,n,r){return e=bi(22,e,r,t),e.elementType=FM,e.lanes=n,e.stateNode={isHidden:!1},e}function Wb(e,t,n){return e=bi(6,e,null,t),e.lanes=n,e}function zb(e,t,n){return t=bi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function HK(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=Sb(0),this.expirationTimes=Sb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _O(e,t,n,r,i,a,o,s,l){return e=new HK(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=bi(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},aO(a),e}function VK(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DF)}catch(e){console.error(e)}}DF(),$M.exports=ei;var Xn=$M.exports;const Oo=$t(Xn);var NF={exports:{}},XK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QK=XK,ZK=QK;function LF(){}function MF(){}MF.resetWarningCache=LF;var JK=function(){function e(r,i,a,o,s,l){if(l!==ZK){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:MF,resetWarningCache:LF};return n.PropTypes=n,n};NF.exports=JK();var Im=NF.exports;const qr=$t(Im);var jF=I.createContext(null);function eY(e){e()}var FF=eY,tY=function(t){return FF=t},nY=function(){return FF};function rY(){var e=nY(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=t;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=n={callback:i,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!a||t===null||(a=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var Kx={notify:function(){},get:function(){return[]}};function WF(e,t){var n,r=Kx;function i(f){return l(),r.subscribe(f)}function a(){r.notify()}function o(){c.onStateChange&&c.onStateChange()}function s(){return!!n}function l(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=rY())}function u(){n&&(n(),n=void 0,r.clear(),r=Kx)}var c={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:o,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:function(){return r}};return c}var zF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect;function BF(e){var t=e.store,n=e.context,r=e.children,i=b.useMemo(function(){var s=WF(t);return{store:t,subscription:s}},[t]),a=b.useMemo(function(){return t.getState()},[t]);zF(function(){var s=i.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),a!==t.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[i,a]);var o=n||jF;return I.createElement(o.Provider,{value:i},r)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var UF={exports:{}},jt={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Fn=typeof Symbol=="function"&&Symbol.for,CO=Fn?Symbol.for("react.element"):60103,TO=Fn?Symbol.for("react.portal"):60106,Cm=Fn?Symbol.for("react.fragment"):60107,Tm=Fn?Symbol.for("react.strict_mode"):60108,Pm=Fn?Symbol.for("react.profiler"):60114,xm=Fn?Symbol.for("react.provider"):60109,Rm=Fn?Symbol.for("react.context"):60110,PO=Fn?Symbol.for("react.async_mode"):60111,Am=Fn?Symbol.for("react.concurrent_mode"):60111,$m=Fn?Symbol.for("react.forward_ref"):60112,km=Fn?Symbol.for("react.suspense"):60113,iY=Fn?Symbol.for("react.suspense_list"):60120,Dm=Fn?Symbol.for("react.memo"):60115,Nm=Fn?Symbol.for("react.lazy"):60116,aY=Fn?Symbol.for("react.block"):60121,oY=Fn?Symbol.for("react.fundamental"):60117,sY=Fn?Symbol.for("react.responder"):60118,lY=Fn?Symbol.for("react.scope"):60119;function ni(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case CO:switch(e=e.type,e){case PO:case Am:case Cm:case Pm:case Tm:case km:return e;default:switch(e=e&&e.$$typeof,e){case Rm:case $m:case Nm:case Dm:case xm:return e;default:return t}}case TO:return t}}}function HF(e){return ni(e)===Am}jt.AsyncMode=PO;jt.ConcurrentMode=Am;jt.ContextConsumer=Rm;jt.ContextProvider=xm;jt.Element=CO;jt.ForwardRef=$m;jt.Fragment=Cm;jt.Lazy=Nm;jt.Memo=Dm;jt.Portal=TO;jt.Profiler=Pm;jt.StrictMode=Tm;jt.Suspense=km;jt.isAsyncMode=function(e){return HF(e)||ni(e)===PO};jt.isConcurrentMode=HF;jt.isContextConsumer=function(e){return ni(e)===Rm};jt.isContextProvider=function(e){return ni(e)===xm};jt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===CO};jt.isForwardRef=function(e){return ni(e)===$m};jt.isFragment=function(e){return ni(e)===Cm};jt.isLazy=function(e){return ni(e)===Nm};jt.isMemo=function(e){return ni(e)===Dm};jt.isPortal=function(e){return ni(e)===TO};jt.isProfiler=function(e){return ni(e)===Pm};jt.isStrictMode=function(e){return ni(e)===Tm};jt.isSuspense=function(e){return ni(e)===km};jt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cm||e===Am||e===Pm||e===Tm||e===km||e===iY||typeof e=="object"&&e!==null&&(e.$$typeof===Nm||e.$$typeof===Dm||e.$$typeof===xm||e.$$typeof===Rm||e.$$typeof===$m||e.$$typeof===oY||e.$$typeof===sY||e.$$typeof===lY||e.$$typeof===aY)};jt.typeOf=ni;UF.exports=jt;var uY=UF.exports,xO=uY,cY={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},fY={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dY={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},VF={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},RO={};RO[xO.ForwardRef]=dY;RO[xO.Memo]=VF;function Yx(e){return xO.isMemo(e)?VF:RO[e.$$typeof]||cY}var pY=Object.defineProperty,hY=Object.getOwnPropertyNames,Xx=Object.getOwnPropertySymbols,vY=Object.getOwnPropertyDescriptor,gY=Object.getPrototypeOf,Qx=Object.prototype;function GF(e,t,n){if(typeof t!="string"){if(Qx){var r=gY(t);r&&r!==Qx&&GF(e,r,n)}var i=hY(t);Xx&&(i=i.concat(Xx(t)));for(var a=Yx(e),o=Yx(t),s=0;s=0;r--){var i=t[r](e);if(i)return i}return function(a,o){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+o.wrappedComponentName+".")}}function tX(e,t){return e===t}function nX(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?LY:n,i=t.mapStateToPropsFactories,a=i===void 0?HY:i,o=t.mapDispatchToPropsFactories,s=o===void 0?zY:o,l=t.mergePropsFactories,u=l===void 0?YY:l,c=t.selectorFactory,f=c===void 0?JY:c;return function(p,h,v,w){w===void 0&&(w={});var m=w,g=m.pure,y=g===void 0?!0:g,S=m.areStatesEqual,_=S===void 0?tX:S,E=m.areOwnPropsEqual,O=E===void 0?Bb:E,T=m.areStatePropsEqual,R=T===void 0?Bb:T,$=m.areMergedPropsEqual,F=$===void 0?Bb:$,H=ga(m,eX),Y=Ub(p,a,"mapStateToProps"),Q=Ub(h,s,"mapDispatchToProps"),ne=Ub(v,u,"mergeProps");return r(f,M({methodName:"connect",getDisplayName:function(ae){return"Connect("+ae+")"},shouldHandleStateChanges:!!p,initMapStateToProps:Y,initMapDispatchToProps:Q,initMergeProps:ne,pure:y,areStatesEqual:_,areOwnPropsEqual:O,areStatePropsEqual:R,areMergedPropsEqual:F},H))}}const kt=nX();tY(Xn.unstable_batchedUpdates);const rX="modulepreload",iX=function(e){return"/maniiifision/"+e},tR={},aX=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=iX(a),a in tR)return;tR[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===a&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":rX,o||(u.as="script",u.crossOrigin=""),u.href=a,document.head.appendChild(u),o)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t()).catch(a=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a})};var oX=I.createContext();const eW=oX;var sX=Array.isArray,Qn=sX,lX=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc,tW=lX,uX=tW,cX=typeof self=="object"&&self&&self.Object===Object&&self,fX=uX||cX||Function("return this")(),_r=fX,dX=_r,pX=dX.Symbol,Bu=pX,nR=Bu,nW=Object.prototype,hX=nW.hasOwnProperty,vX=nW.toString,Oc=nR?nR.toStringTag:void 0;function gX(e){var t=hX.call(e,Oc),n=e[Oc];try{e[Oc]=void 0;var r=!0}catch{}var i=vX.call(e);return r&&(t?e[Oc]=n:delete e[Oc]),i}var mX=gX,yX=Object.prototype,bX=yX.toString;function wX(e){return bX.call(e)}var SX=wX,rR=Bu,_X=mX,EX=SX,OX="[object Null]",IX="[object Undefined]",iR=rR?rR.toStringTag:void 0;function CX(e){return e==null?e===void 0?IX:OX:iR&&iR in Object(e)?_X(e):EX(e)}var Zo=CX;function TX(e){return e!=null&&typeof e=="object"}var ri=TX,PX=Zo,xX=ri,RX="[object Symbol]";function AX(e){return typeof e=="symbol"||xX(e)&&PX(e)==RX}var kd=AX,$X=Qn,kX=kd,DX=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NX=/^\w*$/;function LX(e,t){if($X(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||kX(e)?!0:NX.test(e)||!DX.test(e)||t!=null&&e in Object(t)}var kO=LX;function MX(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Qi=MX;const jm=$t(Qi);var jX=Zo,FX=Qi,WX="[object AsyncFunction]",zX="[object Function]",BX="[object GeneratorFunction]",UX="[object Proxy]";function HX(e){if(!FX(e))return!1;var t=jX(e);return t==zX||t==BX||t==WX||t==UX}var Fm=HX;const DO=$t(Fm);var VX=_r,GX=VX["__core-js_shared__"],qX=GX,Hb=qX,aR=function(){var e=/[^.]+$/.exec(Hb&&Hb.keys&&Hb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function KX(e){return!!aR&&aR in e}var YX=KX,XX=Function.prototype,QX=XX.toString;function ZX(e){if(e!=null){try{return QX.call(e)}catch{}try{return e+""}catch{}}return""}var rW=ZX,JX=Fm,eQ=YX,tQ=Qi,nQ=rW,rQ=/[\\^$.*+?()[\]{}|]/g,iQ=/^\[object .+?Constructor\]$/,aQ=Function.prototype,oQ=Object.prototype,sQ=aQ.toString,lQ=oQ.hasOwnProperty,uQ=RegExp("^"+sQ.call(lQ).replace(rQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cQ(e){if(!tQ(e)||eQ(e))return!1;var t=JX(e)?uQ:iQ;return t.test(nQ(e))}var fQ=cQ;function dQ(e,t){return e==null?void 0:e[t]}var pQ=dQ,hQ=fQ,vQ=pQ;function gQ(e,t){var n=vQ(e,t);return hQ(n)?n:void 0}var Qs=gQ,mQ=Qs,yQ=mQ(Object,"create"),Wm=yQ,oR=Wm;function bQ(){this.__data__=oR?oR(null):{},this.size=0}var wQ=bQ;function SQ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _Q=SQ,EQ=Wm,OQ="__lodash_hash_undefined__",IQ=Object.prototype,CQ=IQ.hasOwnProperty;function TQ(e){var t=this.__data__;if(EQ){var n=t[e];return n===OQ?void 0:n}return CQ.call(t,e)?t[e]:void 0}var PQ=TQ,xQ=Wm,RQ=Object.prototype,AQ=RQ.hasOwnProperty;function $Q(e){var t=this.__data__;return xQ?t[e]!==void 0:AQ.call(t,e)}var kQ=$Q,DQ=Wm,NQ="__lodash_hash_undefined__";function LQ(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DQ&&t===void 0?NQ:t,this}var MQ=LQ,jQ=wQ,FQ=_Q,WQ=PQ,zQ=kQ,BQ=MQ;function Uu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var aZ=iZ,oZ=zm;function sZ(e,t){var n=this.__data__,r=oZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lZ=sZ,uZ=VQ,cZ=JQ,fZ=nZ,dZ=aZ,pZ=lZ;function Hu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Hn(1));return n(Gu)(e,t)}if(typeof e!="function")throw new Error(Hn(2));var i=e,a=t,o=[],s=o,l=!1;function u(){s===o&&(s=o.slice())}function c(){if(l)throw new Error(Hn(3));return a}function f(v){if(typeof v!="function")throw new Error(Hn(4));if(l)throw new Error(Hn(5));var w=!0;return u(),s.push(v),function(){if(w){if(l)throw new Error(Hn(6));w=!1,u();var g=s.indexOf(v);s.splice(g,1),o=null}}}function d(v){if(!DJ(v))throw new Error(Hn(7));if(typeof v.type>"u")throw new Error(Hn(8));if(l)throw new Error(Hn(9));try{l=!0,a=i(a,v)}finally{l=!1}for(var w=o=s,m=0;m"u")throw new Error(Hn(12));if(typeof n(void 0,{type:ed.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Hn(13))})}function BO(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error(Hn(14));f[p]=w,c=c||w!==v}return c=c||a.length!==Object.keys(l).length,c?f:l}}function bR(e,t){return function(){return t(e.apply(this,arguments))}}function GS(e,t){if(typeof e=="function")return bR(e,t);if(typeof e!="object"||e===null)throw new Error(Hn(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=bR(i,t))}return n}function _t(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},WJ=function(t){return FJ[t]},zJ=function(t){return t.replace(jJ,WJ)};function SR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _R(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};qS=_R(_R({},qS),e)}function UJ(){return qS}var HJ=function(){function e(){Zi(this,e),this.usedNamespaces={}}return ii(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function VJ(e){fW=e}function GJ(){return fW}var qJ={type:"3rdParty",init:function(t){BJ(t.options.react),VJ(t)}};function KJ(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var o=function(l,u){var c=t.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(r,e)&&(!i||o(a,e)))}function XJ(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return KS("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,o){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}):YJ(e,t,n)}function QJ(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}function ZJ(e){if(Array.isArray(e))return e}function JJ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function YS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=b.useContext(dW)||{},i=r.i18n,a=r.defaultNS,o=n||i||GJ();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new HJ),!o){KS("You will need to pass in an i18next instance by using initReactI18next");var s=function(R){return Array.isArray(R)?R[R.length-1]:R},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}o.options.react&&o.options.react.wait!==void 0&&KS("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Xb(Xb(Xb({},UJ()),o.options.react),t),c=u.useSuspense,f=u.keyPrefix,d=e||a||o.options&&o.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(d);var p=(o.isInitialized||o.initializedStoreOnce)&&d.every(function(T){return XJ(T,o,u)});function h(){return o.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var v=b.useState(h),w=Ii(v,2),m=w[0],g=w[1],y=d.join(),S=tee(y),_=b.useRef(!0);b.useEffect(function(){var T=u.bindI18n,R=u.bindI18nStore;_.current=!0,!p&&!c&&OR(o,d,function(){_.current&&g(h)}),p&&S&&S!==y&&_.current&&g(h);function $(){_.current&&g(h)}return T&&o&&o.on(T,$),R&&o&&o.store.on(R,$),function(){_.current=!1,T&&o&&T.split(" ").forEach(function(F){return o.off(F,$)}),R&&o&&R.split(" ").forEach(function(F){return o.store.off(F,$)})}},[o,y]);var E=b.useRef(!0);b.useEffect(function(){_.current&&!E.current&&g(h),E.current=!1},[o,f]);var O=[m,o,p];if(O.t=m,O.i18n=o,O.ready=p,p||!p&&!c)return O;throw new Promise(function(T){OR(o,d,function(){T()})})}var ree=["forwardedRef"];function CR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function i(o){var s=o.forwardedRef,l=Ge(o,ree),u=nee(e,kp(kp({},l),{},{keyPrefix:t.keyPrefix})),c=Ii(u,3),f=c[0],d=c[1],p=c[2],h=kp(kp({},l),{},{t:f,i18n:d,tReady:p});return t.withRef&&s?h.ref=s:!t.withRef&&s&&(h.forwardedRef=s),b.createElement(r,h)}i.displayName="withI18nextTranslation(".concat(QJ(r),")"),i.WrappedComponent=r;var a=function(s,l){return b.createElement(i,Object.assign({},s,{forwardedRef:l}))};return t.withRef?b.forwardRef(a):i}}function iee(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=b.useMemo(function(){return{i18n:t,defaultNS:n}},[t,n]);return b.createElement(dW.Provider,{value:i},r)}function Gm(e,t){return function(){return null}}function Qb(e){return e&&Nr(e)==="object"&&e.constructor===Object}function Ho(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},r=n.clone?M({},e):e;return Qb(e)&&Qb(t)&&Object.keys(t).forEach(function(i){i!=="__proto__"&&(Qb(t[i])&&i in e?r[i]=Ho(e[i],t[i],n):r[i]=t[i])}),r}var hW=Gm(qr.element);hW.isRequired=Gm(qr.element.isRequired);const aee=hW,oee=Gm();function see(e){return e}function Bs(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n1&&arguments[1]!==void 0?arguments[1]:"";return e.displayName||e.name||uee(e)||t}function TR(e,t,n){var r=vW(t);return e.displayName||(r!==""?"".concat(n,"(").concat(r,")"):n)}function cee(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return vW(e,"Component");if(Nr(e)==="object")switch(e.$$typeof){case VS.ForwardRef:return TR(e,e.render,"ForwardRef");case VS.Memo:return TR(e,e.type,"memo");default:return}}}function fee(e,t,n,r,i){return null}const dee=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();var pee=qr.oneOfType([qr.func,qr.object]);const hee=pee;/** @license Material-UI v4.11.3 + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */const vee=Object.freeze(Object.defineProperty({__proto__:null,HTMLElementType:fee,chainPropTypes:Gm,deepmerge:Ho,elementAcceptingRef:aee,elementTypeAcceptingRef:oee,exactProp:see,formatMuiErrorMessage:Bs,getDisplayName:cee,ponyfillGlobal:dee,refType:hee},Symbol.toStringTag,{value:"Module"}));function HO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,e),n)}function gee(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&n[0].length===1&&(n=n.map(function(r){return r+r})),n?"rgb".concat(n.length===4?"a":"","(").concat(n.map(function(r,i){return i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3}).join(", "),")"):""}function mee(e){e=Us(e);var t=e,n=t.values,r=n[0],i=n[1]/100,a=n[2]/100,o=i*Math.min(a,1-a),s=function(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(f+r/30)%12;return a-o*Math.max(Math.min(d-3,9-d,1),-1)},l="rgb",u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(l+="a",u.push(n[3])),qm({type:l,values:u})}function Us(e){if(e.type)return e;if(e.charAt(0)==="#")return Us(gee(e));var t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla"].indexOf(n)===-1)throw new Error(Bs(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map(function(i){return parseFloat(i)}),{type:n,values:r}}function qm(e){var t=e.type,n=e.values;return t.indexOf("rgb")!==-1?n=n.map(function(r,i){return i<3?parseInt(r,10):r}):t.indexOf("hsl")!==-1&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function yee(e,t){var n=XS(e),r=XS(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function XS(e){e=Us(e);var t=e.type==="hsl"?Us(mee(e)).values:e.values;return t=t.map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function dl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return XS(e)>.5?VO(e,t):GO(e,t)}function Wt(e,t){return e=Us(e),t=HO(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.values[3]=t,qm(e)}function VO(e,t){if(e=Us(e),t=HO(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1)for(var n=0;n<3;n+=1)e.values[n]*=1-t;return qm(e)}function GO(e,t){if(e=Us(e),t=HO(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return qm(e)}var io=["xs","sm","md","lg","xl"];function bee(e){var t=e.values,n=t===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=r===void 0?"px":r,a=e.step,o=a===void 0?5:a,s=Ge(e,["values","unit","step"]);function l(p){var h=typeof n[p]=="number"?n[p]:p;return"@media (min-width:".concat(h).concat(i,")")}function u(p){var h=io.indexOf(p)+1,v=n[io[h]];if(h===io.length)return l("xs");var w=typeof v=="number"&&h>0?v:p;return"@media (max-width:".concat(w-o/100).concat(i,")")}function c(p,h){var v=io.indexOf(h);return v===io.length-1?l(p):"@media (min-width:".concat(typeof n[p]=="number"?n[p]:p).concat(i,") and ")+"(max-width:".concat((v!==-1&&typeof n[io[v+1]]=="number"?n[io[v+1]]:h)-o/100).concat(i,")")}function f(p){return c(p,p)}function d(p){return n[p]}return M({keys:io,values:n,up:l,down:u,between:c,only:f,width:d},s)}function wee(e,t,n){var r;return M({gutters:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",` + paddingLeft: theme.spacing(2), + paddingRight: theme.spacing(2), + [theme.breakpoints.up('sm')]: { + paddingLeft: theme.spacing(3), + paddingRight: theme.spacing(3), + }, + `].join(` +`)),M({paddingLeft:t(2),paddingRight:t(2)},a,Dt({},e.up("sm"),M({paddingLeft:t(3),paddingRight:t(3)},a[e.up("sm")])))},toolbar:(r={minHeight:56},Dt(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Dt(r,e.up("sm"),{minHeight:64}),r)},n)}var See={black:"#000",white:"#fff"};const Ev=See;var _ee={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};const qO=_ee;var Eee={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"};const Zb=Eee;var Oee={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"};const Jb=Oee;var Iee={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};const ew=Iee;var Cee={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};const tw=Cee;var Tee={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};const nw=Tee;var Pee={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const rw=Pee;var PR={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ev.white,default:qO[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},iw={text:{primary:Ev.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:qO[800],default:"#303030"},action:{active:Ev.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xR(e,t,n,r){var i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=GO(e.main,i):t==="dark"&&(e.dark=VO(e.main,a)))}function xee(e){var t=e.primary,n=t===void 0?{light:Zb[300],main:Zb[500],dark:Zb[700]}:t,r=e.secondary,i=r===void 0?{light:Jb.A200,main:Jb.A400,dark:Jb.A700}:r,a=e.error,o=a===void 0?{light:ew[300],main:ew[500],dark:ew[700]}:a,s=e.warning,l=s===void 0?{light:tw[300],main:tw[500],dark:tw[700]}:s,u=e.info,c=u===void 0?{light:nw[300],main:nw[500],dark:nw[700]}:u,f=e.success,d=f===void 0?{light:rw[300],main:rw[500],dark:rw[700]}:f,p=e.type,h=p===void 0?"light":p,v=e.contrastThreshold,w=v===void 0?3:v,m=e.tonalOffset,g=m===void 0?.2:m,y=Ge(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function S(T){var R=yee(T,iw.text.primary)>=w?iw.text.primary:PR.text.primary;return R}var _=function(R){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(R=M({},R),!R.main&&R[$]&&(R.main=R[$]),!R.main)throw new Error(Bs(4,$));if(typeof R.main!="string")throw new Error(Bs(5,JSON.stringify(R.main)));return xR(R,"light",F,g),xR(R,"dark",H,g),R.contrastText||(R.contrastText=S(R.main)),R},E={dark:iw,light:PR},O=Ho(M({common:Ev,type:h,primary:_(n),secondary:_(i,"A400","A200","A700"),error:_(o),warning:_(l),info:_(c),success:_(d),grey:qO,contrastThreshold:w,getContrastText:S,augmentColor:_,tonalOffset:g},E[h]),y);return O}function gW(e){return Math.round(e*1e5)/1e5}function Ree(e){return gW(e)}var RR={textTransform:"uppercase"},AR='"Roboto", "Helvetica", "Arial", sans-serif';function Aee(e,t){var n=typeof t=="function"?t(e):t,r=n.fontFamily,i=r===void 0?AR:r,a=n.fontSize,o=a===void 0?14:a,s=n.fontWeightLight,l=s===void 0?300:s,u=n.fontWeightRegular,c=u===void 0?400:u,f=n.fontWeightMedium,d=f===void 0?500:f,p=n.fontWeightBold,h=p===void 0?700:p,v=n.htmlFontSize,w=v===void 0?16:v,m=n.allVariants,g=n.pxToRem,y=Ge(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),S=o/14,_=g||function(T){return"".concat(T/w*S,"rem")},E=function(R,$,F,H,Y){return M({fontFamily:i,fontWeight:R,fontSize:_($),lineHeight:F},i===AR?{letterSpacing:"".concat(gW(H/$),"em")}:{},Y,m)},O={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(c,48,1.167,0),h4:E(c,34,1.235,.25),h5:E(c,24,1.334,0),h6:E(d,20,1.6,.15),subtitle1:E(c,16,1.75,.15),subtitle2:E(d,14,1.57,.1),body1:E(c,16,1.5,.15),body2:E(c,14,1.43,.15),button:E(d,14,1.75,.4,RR),caption:E(c,12,1.66,.4),overline:E(c,12,2.66,1,RR)};return Ho(M({htmlFontSize:w,pxToRem:_,round:Ree,fontFamily:i,fontSize:o,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:h},O),y,{clone:!1})}var $ee=.2,kee=.14,Dee=.12;function Jt(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat($ee,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(kee,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(Dee,")")].join(",")}var Nee=["none",Jt(0,2,1,-1,0,1,1,0,0,1,3,0),Jt(0,3,1,-2,0,2,2,0,0,1,5,0),Jt(0,3,3,-2,0,3,4,0,0,1,8,0),Jt(0,2,4,-1,0,4,5,0,0,1,10,0),Jt(0,3,5,-1,0,5,8,0,0,1,14,0),Jt(0,3,5,-1,0,6,10,0,0,1,18,0),Jt(0,4,5,-2,0,7,10,1,0,2,16,1),Jt(0,5,5,-3,0,8,10,1,0,3,14,2),Jt(0,5,6,-3,0,9,12,1,0,3,16,2),Jt(0,6,6,-3,0,10,14,1,0,4,18,3),Jt(0,6,7,-4,0,11,15,1,0,4,20,3),Jt(0,7,8,-4,0,12,17,2,0,5,22,4),Jt(0,7,8,-4,0,13,19,2,0,5,24,4),Jt(0,7,9,-4,0,14,21,2,0,5,26,4),Jt(0,8,9,-5,0,15,22,2,0,6,28,5),Jt(0,8,10,-5,0,16,24,2,0,6,30,5),Jt(0,8,11,-5,0,17,26,2,0,6,32,5),Jt(0,9,11,-5,0,18,28,2,0,7,34,6),Jt(0,9,12,-6,0,19,29,2,0,7,36,6),Jt(0,10,13,-6,0,20,31,3,0,8,38,7),Jt(0,10,13,-6,0,21,33,3,0,8,40,7),Jt(0,10,14,-6,0,22,35,3,0,8,42,7),Jt(0,11,14,-7,0,23,36,3,0,9,44,8),Jt(0,11,15,-7,0,24,38,3,0,9,46,8)];const Lee=Nee;var Mee={borderRadius:4};const jee=Mee;function Fee(e){if(Array.isArray(e))return YS(e)}function Wee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zee(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Km(e){return Fee(e)||Wee(e)||pW(e)||zee()}function Bee(e){var t=e.spacing||8;return typeof t=="number"?function(n){return t*n}:Array.isArray(t)?function(n){return t[n]}:typeof t=="function"?t:function(){}}function Uee(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(e.mui)return e;var t=Bee({spacing:e}),n=function(){for(var i=arguments.length,a=new Array(i),o=0;o0&&arguments[0]!==void 0?arguments[0]:["all"],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.duration,i=r===void 0?QS.standard:r,a=n.easing,o=a===void 0?$R.easeInOut:a,s=n.delay,l=s===void 0?0:s;return Ge(n,["duration","easing","delay"]),(Array.isArray(t)?t:[t]).map(function(u){return"".concat(u," ").concat(typeof i=="string"?i:kR(i)," ").concat(o," ").concat(typeof l=="string"?l:kR(l))}).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var n=t/36;return Math.round((4+15*Math.pow(n,.25)+n/5)*10)}};var Vee={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const mW=Vee;function yW(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.breakpoints,n=t===void 0?{}:t,r=e.mixins,i=r===void 0?{}:r,a=e.palette,o=a===void 0?{}:a,s=e.spacing,l=e.typography,u=l===void 0?{}:l,c=Ge(e,["breakpoints","mixins","palette","spacing","typography"]),f=xee(o),d=bee(n),p=Uee(s),h=Ho({breakpoints:d,direction:"ltr",mixins:wee(d,p,i),overrides:{},palette:f,props:{},shadows:Lee,typography:Aee(f,u),spacing:p,shape:jee,transitions:Hee,zIndex:mW},c),v=arguments.length,w=new Array(v>1?v-1:0),m=1;m0&&arguments[0]!==void 0?arguments[0]:{},t=e.disableGlobal,n=t===void 0?!1:t,r=e.productionPrefix,i=r===void 0?"jss":r,a=e.seed,o=a===void 0?"":a,s=o===""?"":"".concat(o,"-"),l=0,u=function(){return l+=1,l};return function(c,f){var d=f.options.name;if(d&&d.indexOf("Mui")===0&&!f.options.link&&!n){if(Kee.indexOf(c.key)!==-1)return"Mui-".concat(c.key);var p="".concat(s).concat(d,"-").concat(c.key);return!f.options.theme[bW]||o!==""?p:"".concat(p,"-").concat(u())}return"".concat(s).concat(i).concat(u())}}function SW(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i=t.props[n],a;for(a in i)r[a]===void 0&&(r[a]=i[a]);return r}var DR=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Md=(typeof window>"u"?"undefined":DR(window))==="object"&&(typeof document>"u"?"undefined":DR(document))==="object"&&document.nodeType===9;function Ov(e,t){return Ov=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ov(e,t)}function Js(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ov(e,t)}function Ri(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Yee={}.constructor;function ZS(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(ZS);if(e.constructor!==Yee)return e;var t={};for(var n in e)t[n]=ZS(e[n]);return t}function KO(e,t,n){e===void 0&&(e="unnamed");var r=n.jss,i=ZS(t),a=r.plugins.onCreateRule(e,i,n);return a||(e[0],null)}var NR=function(t,n){for(var r="",i=0;i<+~=|^:(),"'`\s])/g,LR=typeof CSS<"u"&&CSS.escape,YO=function(e){return LR?LR(e):e.replace(Xee,"\\$1")},_W=function(){function e(n,r,i){this.type="style",this.isProcessed=!1;var a=i.sheet,o=i.Renderer;this.key=n,this.options=i,this.style=r,a?this.renderer=a.renderer:o&&(this.renderer=new o)}var t=e.prototype;return t.prop=function(r,i,a){if(i===void 0)return this.style[r];var o=a?a.force:!1;if(!o&&this.style[r]===i)return this;var s=i;(!a||a.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,r,this));var l=s==null||s===!1,u=r in this.style;if(l&&!u&&!o)return this;var c=l&&u;if(c?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return c?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var f=this.options.sheet;return f&&f.attached,this},e}(),JS=function(e){Js(t,e);function t(r,i,a){var o;o=e.call(this,r,i,a)||this;var s=a.selector,l=a.scoped,u=a.sheet,c=a.generateId;return s?o.selectorText=s:l!==!1&&(o.id=c(Ri(Ri(o)),u),o.selectorText="."+YO(o.id)),o}var n=t.prototype;return n.applyTo=function(i){var a=this.renderer;if(a){var o=this.toJSON();for(var s in o)a.setProperty(i,s,o[s])}return this},n.toJSON=function(){var i={};for(var a in this.style){var o=this.style[a];typeof o!="object"?i[a]=o:Array.isArray(o)&&(i[a]=ks(o))}return i},n.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,s=o?M({},i,{allowEmpty:!0}):i;return td(this.selectorText,this.style,s)},ii(t,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var a=this.renderer,o=this.renderable;if(!(!o||!a)){var s=a.setSelector(o,i);s||a.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),t}(_W),Qee={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new JS(t,n,r)}},aw={indent:1,children:!0},Zee=/@([\w-]+)/,Jee=function(){function e(n,r,i){this.type="conditional",this.isProcessed=!1,this.key=n;var a=n.match(Zee);this.at=a?a[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new Ym(M({},i,{parent:this}));for(var o in r)this.rules.add(o,r[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,i,a){var o=this.rules.add(r,i,a);return o?(this.options.jss.plugins.onProcessRule(o),o):null},t.replaceRule=function(r,i,a){var o=this.rules.replace(r,i,a);return o&&this.options.jss.plugins.onProcessRule(o),o},t.toString=function(r){r===void 0&&(r=aw);var i=qu(r),a=i.linebreak;if(r.indent==null&&(r.indent=aw.indent),r.children==null&&(r.children=aw.children),r.children===!1)return this.query+" {}";var o=this.rules.toString(r);return o?this.query+" {"+a+o+a+"}":""},e}(),ete=/@container|@media|@supports\s+/,tte={onCreateRule:function(t,n,r){return ete.test(t)?new Jee(t,n,r):null}},ow={indent:1,children:!0},nte=/@keyframes\s+([\w-]+)/,e1=function(){function e(n,r,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var a=n.match(nte);a&&a[1]?this.name=a[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var o=i.scoped,s=i.sheet,l=i.generateId;this.id=o===!1?this.name:YO(l(this,s)),this.rules=new Ym(M({},i,{parent:this}));for(var u in r)this.rules.add(u,r[u],M({},i,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=ow);var i=qu(r),a=i.linebreak;if(r.indent==null&&(r.indent=ow.indent),r.children==null&&(r.children=ow.children),r.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(r);return o&&(o=""+a+o+a),this.at+" "+this.id+" {"+o+"}"},e}(),rte=/@keyframes\s+/,ite=/\$([\w-]+)/g,t1=function(t,n){return typeof t=="string"?t.replace(ite,function(r,i){return i in n?n[i]:r}):t},MR=function(t,n,r){var i=t[n],a=t1(i,r);a!==i&&(t[n]=a)},ate={onCreateRule:function(t,n,r){return typeof t=="string"&&rte.test(t)?new e1(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&MR(t,"animation-name",r.keyframes),"animation"in t&&MR(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var i=r.options.sheet;if(!i)return t;switch(n){case"animation":return t1(t,i.keyframes);case"animation-name":return t1(t,i.keyframes);default:return t}}},ote=function(e){Js(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,s=o?M({},i,{allowEmpty:!0}):i;return td(this.key,this.style,s)},t}(_W),ste={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new ote(t,n,r):null}},lte=function(){function e(n,r,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var t=e.prototype;return t.toString=function(r){var i=qu(r),a=i.linebreak;if(Array.isArray(this.style)){for(var o="",s=0;s=this.index){i.push(r);return}for(var o=0;oa){i.splice(o,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var i=this.registry.indexOf(r);this.registry.splice(i,1)},t.toString=function(r){for(var i=r===void 0?{}:r,a=i.attached,o=ga(i,["attached"]),s=qu(o),l=s.linebreak,u="",c=0;c-1?i.substr(0,a-1):i;t.style.setProperty(n,o,a>-1?"important":"")}}catch{return!1}return!0},Ste=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},_te=function(t,n){return t.selectorText=n,t.selectorText===n},IW=OW(function(){return document.querySelector("head")});function Ete(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Ote(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Ite(e){for(var t=IW(),n=0;n0){var n=Ete(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Ote(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var i=Ite(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Tte(e,t){var n=t.insertionPoint,r=Cte(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var i=n,a=i.parentNode;a&&a.insertBefore(e,i.nextSibling);return}IW().appendChild(e)}var Pte=OW(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),BR=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},UR=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},xte=function(){var t=document.createElement("style");return t.textContent=` +`,t},Rte=function(){function e(n){this.getPropertyValue=bte,this.setProperty=wte,this.removeProperty=Ste,this.setSelector=_te,this.hasInsertedRules=!1,this.cssRules=[],n&&bf.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},i=r.media,a=r.meta,o=r.element;this.element=o||xte(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),a&&this.element.setAttribute("data-meta",a);var s=Pte();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){Tte(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` +`)}},t.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=` +`+r.toString()+` +`}},t.insertRules=function(r,i){for(var a=0;a-1){var a=kW[t];if(!Array.isArray(a))return dt.js+Vo(a)in n?dt.css+a:!1;if(!i)return!1;for(var o=0;or?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var i={},a=Object.keys(n).sort(e),o=0;o"u"?null:Cne(),Tne()]}}function JO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=M({},t);return Object.keys(n).forEach(function(i){n[i]&&(r[i]="".concat(t[i]," ").concat(n[i]))}),r}var Pne={set:function(t,n,r,i){var a=t.get(n);a||(a=new Map,t.set(n,a)),a.set(r,i)},get:function(t,n,r){var i=t.get(n);return i?i.get(r):void 0},delete:function(t,n,r){var i=t.get(n);i.delete(r)}};const Hl=Pne;var xne=I.createContext(null);const NW=xne;function Ku(){var e=I.useContext(NW);return e}var Rne=Xm(ZO()),Ane=wW(),$ne=new Map,kne={disableGeneration:!1,generateClassName:Ane,jss:Rne,sheetsCache:null,sheetsManager:$ne,sheetsRegistry:null},s1=I.createContext(kne),Np;function Dne(e){var t=e.children,n=e.injectFirst,r=n===void 0?!1:n,i=e.disableGeneration,a=i===void 0?!1:i,o=Ge(e,["children","injectFirst","disableGeneration"]),s=I.useContext(s1),l=M({},s,{disableGeneration:a},o);if(!l.jss.options.insertionPoint&&r&&typeof window<"u"){if(!Np){var u=document.head;Np=document.createComment("mui-inject-first"),u.insertBefore(Np,u.firstChild)}l.jss=Xm({plugins:ZO().plugins,insertionPoint:Np})}return I.createElement(s1.Provider,{value:l},t)}var qR=-1e9;function Nne(){return qR+=1,qR}var Lne={};const Mne=Lne;function jne(e){var t=typeof e=="function";return{create:function(r,i){var a;try{a=t?e(r):e}catch(l){throw l}if(!i||!r.overrides||!r.overrides[i])return a;var o=r.overrides[i],s=M({},a);return Object.keys(o).forEach(function(l){s[l]=Ho(s[l],o[l])}),s},options:{}}}function Fne(e,t,n){var r=e.state,i=e.stylesOptions;if(i.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var a=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,a=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,a=!0),a&&(r.cacheClasses.value=JO({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Wne(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,o=e.name;if(!i.disableGeneration){var s=Hl.get(i.sheetsManager,a,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Hl.set(i.sheetsManager,a,r,s));var l=M({},a.options,i,{theme:r,flip:typeof i.flip=="boolean"?i.flip:r.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(s.refs===0){var c;i.sheetsCache&&(c=Hl.get(i.sheetsCache,a,r));var f=a.create(r,o);c||(c=i.jss.createStyleSheet(f,M({link:!1},l)),c.attach(),i.sheetsCache&&Hl.set(i.sheetsCache,a,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=CW(f)}if(s.dynamicStyles){var d=i.jss.createStyleSheet(s.dynamicStyles,M({link:!0},l));d.update(t),d.attach(),n.dynamicSheet=d,n.classes=JO({baseClasses:s.staticSheet.classes,newClasses:d.classes}),u&&u.add(d)}else n.classes=s.staticSheet.classes;s.refs+=1}}function zne(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function Bne(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var a=Hl.get(r.sheetsManager,i,n);a.refs-=1;var o=r.sheetsRegistry;a.refs===0&&(Hl.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function Une(e,t){var n=I.useRef([]),r,i=I.useMemo(function(){return{}},t);n.current!==i&&(n.current=i,r=e()),I.useEffect(function(){return function(){r&&r()}},[i])}function Hne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,a=t.defaultTheme,o=a===void 0?Mne:a,s=Ge(t,["name","classNamePrefix","Component","defaultTheme"]),l=jne(e),u=n||r||"makeStyles";l.options={index:Nne(),name:n,meta:u,classNamePrefix:u};var c=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=Ku()||o,h=M({},I.useContext(s1),s),v=I.useRef(),w=I.useRef();Une(function(){var g={name:n,state:{},stylesCreator:l,stylesOptions:h,theme:p};return Wne(g,d),w.current=!1,v.current=g,function(){Bne(g)}},[p,l]),I.useEffect(function(){w.current&&zne(v.current,d),w.current=!0});var m=Fne(v.current,d.classes,i);return m};return c}function LW(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t1&&arguments[1]!==void 0?arguments[1]:{};return function(r){var i=n.defaultTheme,a=n.withTheme,o=a===void 0?!1:a,s=n.name,l=Ge(n,["defaultTheme","withTheme","name"]),u=s,c=Hne(t,M({defaultTheme:i,Component:r,name:s||r.displayName,classNamePrefix:u},l)),f=I.forwardRef(function(p,h){p.classes;var v=p.innerRef,w=Ge(p,["classes","innerRef"]),m=c(M({},r.defaultProps,p)),g,y=w;return(typeof s=="string"||o)&&(g=Ku()||i,s&&(y=SW({theme:g,name:s,props:w})),o&&!y.theme&&(y.theme=g)),I.createElement(r,M({ref:v||h,classes:m},y))});return HS(f,r),f}};const Yne=Kne;var Xne=yW();const MW=Xne;function Jo(){var e=Ku()||MW;return e}function ze(e,t){return Yne(e,M({defaultTheme:MW},t))}var Qne=Qs,Zne=_r,Jne=Qne(Zne,"WeakMap"),jW=Jne,KR=jW,ere=KR&&new KR,FW=ere,tre=Ld,YR=FW,nre=YR?function(e,t){return YR.set(e,t),e}:tre,WW=nre,rre=Qi,XR=Object.create,ire=function(){function e(){}return function(t){if(!rre(t))return{};if(XR)return XR(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Qm=ire,are=Qm,ore=Qi;function sre(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=are(e.prototype),r=e.apply(n,t);return ore(r)?r:n}}var Zm=sre,lre=Zm,ure=_r,cre=1;function fre(e,t,n){var r=t&cre,i=lre(e);function a(){var o=this&&this!==ure&&this instanceof a?i:e;return o.apply(r?n:this,arguments)}return a}var dre=fre;function pre(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var eI=pre,hre=Math.max;function vre(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,l=t.length,u=hre(a-o,0),c=Array(l+u),f=!r;++s0){if(++t>=tie)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var GW=iie,aie=WW,oie=GW,sie=oie(aie),qW=sie,lie=/\{\n\/\* \[wrapped with (.+)\] \*/,uie=/,? & /;function cie(e){var t=e.match(lie);return t?t[1].split(uie):[]}var fie=cie,die=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function pie(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(die,`{ +/* [wrapped with `+t+`] */ +`)}var hie=pie;function vie(e){return function(){return e}}var gie=vie,mie=gie,eA=sW,yie=Ld,bie=eA?function(e,t){return eA(e,"toString",{configurable:!0,enumerable:!1,value:mie(t),writable:!0})}:yie,wie=bie,Sie=wie,_ie=GW,Eie=_ie(Sie),rI=Eie;function Oie(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var aI=Mie,jie=iI,Fie=aI,Wie=1,zie=2,Bie=8,Uie=16,Hie=32,Vie=64,Gie=128,qie=256,Kie=512,Yie=[["ary",Gie],["bind",Wie],["bindKey",zie],["curry",Bie],["curryRight",Uie],["flip",Kie],["partial",Hie],["partialRight",Vie],["rearg",qie]];function Xie(e,t){return jie(Yie,function(n){var r="_."+n[0];t&n[1]&&!Fie(e,r)&&e.push(r)}),e.sort()}var Qie=Xie,Zie=fie,Jie=hie,eae=rI,tae=Qie;function nae(e,t,n){var r=t+"";return eae(e,Jie(r,tae(Zie(r),n)))}var KW=nae,rae=eie,iae=qW,aae=KW,oae=1,sae=2,lae=4,uae=8,tA=32,nA=64;function cae(e,t,n,r,i,a,o,s,l,u){var c=t&uae,f=c?o:void 0,d=c?void 0:o,p=c?a:void 0,h=c?void 0:a;t|=c?tA:nA,t&=~(c?nA:tA),t&lae||(t&=~(oae|sae));var v=[e,t,i,p,f,h,d,s,l,u],w=n.apply(void 0,v);return rae(e)&&iae(w,v),w.placeholder=r,aae(w,e,t)}var YW=cae;function fae(e){var t=e;return t.placeholder}var XW=fae,dae=Jm,pae=Vm,hae=Math.min;function vae(e,t){for(var n=e.length,r=hae(t.length,n),i=dae(e);r--;){var a=t[r];e[r]=pae(a,n)?i[a]:void 0}return e}var gae=vae,rA="__lodash_placeholder__";function mae(e,t){for(var n=-1,r=e.length,i=0,a=[];++n1&&g.reverse(),c&&l-1&&e%1==0&&e<=yse}var cI=bse,wse=Fm,Sse=cI;function _se(e){return e!=null&&Sse(e.length)&&!wse(e)}var jd=_se,xv={exports:{}};function Ese(){return!1}var Ose=Ese;xv.exports;(function(e,t){var n=_r,r=Ose,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(xv,xv.exports);var ny=xv.exports,Ise=Zo,Cse=cI,Tse=ri,Pse="[object Arguments]",xse="[object Array]",Rse="[object Boolean]",Ase="[object Date]",$se="[object Error]",kse="[object Function]",Dse="[object Map]",Nse="[object Number]",Lse="[object Object]",Mse="[object RegExp]",jse="[object Set]",Fse="[object String]",Wse="[object WeakMap]",zse="[object ArrayBuffer]",Bse="[object DataView]",Use="[object Float32Array]",Hse="[object Float64Array]",Vse="[object Int8Array]",Gse="[object Int16Array]",qse="[object Int32Array]",Kse="[object Uint8Array]",Yse="[object Uint8ClampedArray]",Xse="[object Uint16Array]",Qse="[object Uint32Array]",Yt={};Yt[Use]=Yt[Hse]=Yt[Vse]=Yt[Gse]=Yt[qse]=Yt[Kse]=Yt[Yse]=Yt[Xse]=Yt[Qse]=!0;Yt[Pse]=Yt[xse]=Yt[zse]=Yt[Rse]=Yt[Bse]=Yt[Ase]=Yt[$se]=Yt[kse]=Yt[Dse]=Yt[Nse]=Yt[Lse]=Yt[Mse]=Yt[jse]=Yt[Fse]=Yt[Wse]=!1;function Zse(e){return Tse(e)&&Cse(e.length)&&!!Yt[Ise(e)]}var Jse=Zse;function ele(e){return function(t){return e(t)}}var ry=ele,Rv={exports:{}};Rv.exports;(function(e,t){var n=tW,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Rv,Rv.exports);var fI=Rv.exports,tle=Jse,nle=ry,_A=fI,EA=_A&&_A.isTypedArray,rle=EA?nle(EA):tle,dI=rle,ile=uI,ale=Xu,ole=ty,sle=Qn,lle=jd,ule=ny,cle=ey,fle=dI,dle="[object Map]",ple="[object Set]",hle=Object.prototype,vle=hle.hasOwnProperty;function gle(e){if(e==null)return!0;if(lle(e)&&(sle(e)||typeof e=="string"||typeof e.splice=="function"||ule(e)||fle(e)||ole(e)))return!e.length;var t=ale(e);if(t==dle||t==ple)return!e.size;if(cle(e))return!ile(e).length;for(var n in e)if(vle.call(e,n))return!1;return!0}var mle=gle;const Lp=$t(mle);function OA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IA(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(Bn[e[t+0]]+Bn[e[t+1]]+Bn[e[t+2]]+Bn[e[t+3]]+"-"+Bn[e[t+4]]+Bn[e[t+5]]+"-"+Bn[e[t+6]]+Bn[e[t+7]]+"-"+Bn[e[t+8]]+Bn[e[t+9]]+"-"+Bn[e[t+10]]+Bn[e[t+11]]+Bn[e[t+12]]+Bn[e[t+13]]+Bn[e[t+14]]+Bn[e[t+15]]).toLowerCase();if(!Ele(n))throw TypeError("Stringified UUID is invalid");return n}function wi(e,t,n){e=e||{};var r=e.random||(e.rng||Sle)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Ole(r)}var Ile={ADD_COMPANION_WINDOW:"mirador/ADD_COMPANION_WINDOW",UPDATE_COMPANION_WINDOW:"mirador/UPDATE_COMPANION_WINDOW",REMOVE_COMPANION_WINDOW:"mirador/REMOVE_COMPANION_WINDOW",TOGGLE_TOC_NODE:"mirador/TOGGLE_TOC_NODE",UPDATE_WINDOW:"mirador/UPDATE_WINDOW",REQUEST_CANVAS_ANNOTATIONS:"mirador/REQUEST_CANVAS_ANNOTATIONS",HOVER_ANNOTATION:"mirador/HOVER_ANNOTATION",REQUEST_ANNOTATION:"mirador/REQUEST_ANNOTATION",RECEIVE_ANNOTATION:"mirador/RECEIVE_ANNOTATION",RECEIVE_ANNOTATION_FAILURE:"mirador/RECEIVE_ANNOTATION_FAILURE",DESELECT_ANNOTATION:"mirador/DESELECT_ANNOTATION",SELECT_ANNOTATION:"mirador/SELECT_ANNOTATION",TOGGLE_ANNOTATION_DISPLAY:"mirador/TOGGLE_ANNOTATION_DISPLAY",FOCUS_WINDOW:"mirador/FOCUS_WINDOW",SET_WORKSPACE_FULLSCREEN:"mirador/SET_WORKSPACE_FULLSCREEN",SET_WORKSPACE_VIEWPORT_POSITION:"mirador/SET_WORKSPACE_VIEWPORT_POSITION",ADD_MANIFEST:"mirador/ADD_MANIFEST",ADD_WINDOW:"mirador/ADD_WINDOW",ADD_ERROR:"mirador/ADD_ERROR",IMPORT_CONFIG:"mirador/IMPORT_CONFIG",IMPORT_MIRADOR_STATE:"mirador/IMPORT_MIRADOR_STATE",SET_CANVAS:"mirador/SET_CANVAS",MAXIMIZE_WINDOW:"mirador/MAXIMIZE_WINDOW",MINIMIZE_WINDOW:"mirador/MINIMIZE_WINDOW",UPDATE_WINDOW_POSITION:"mirador/UPDATE_WINDOW_POSITION",SET_WINDOW_SIZE:"mirador/SET_WINDOW_SIZE",REMOVE_WINDOW:"mirador/REMOVE_WINDOW",PICK_WINDOWING_SYSTEM:"mirador/PICK_WINDOWING_SYSTEM",REQUEST_MANIFEST:"mirador/REQUEST_MANIFEST",RECEIVE_MANIFEST:"mirador/RECEIVE_MANIFEST",RECEIVE_MANIFEST_FAILURE:"mirador/RECEIVE_MANIFEST_FAILURE",REMOVE_ERROR:"mirador/REMOVE_ERROR",SET_CONFIG:"mirador/SET_CONFIG",UPDATE_WORKSPACE:"mirador/UPDATE_WORKSPACE",SET_WINDOW_THUMBNAIL_POSITION:"mirador/SET_WINDOW_THUMBNAIL_POSITION",SET_WINDOW_VIEW_TYPE:"mirador/SET_WINDOW_VIEW_TYPE",SET_WORKSPACE_ADD_VISIBILITY:"mirador/SET_WORKSPACE_ADD_VISIBILITY",TOGGLE_WINDOW_SIDE_BAR:"mirador/TOGGLE_WINDOW_SIDE_BAR",TOGGLE_DRAGGING:"mirador/TOGGLE_DRAGGING",TOGGLE_ZOOM_CONTROLS:"mirador/TOGGLE_ZOOM_CONTROLS",UPDATE_CONFIG:"mirador/UPDATE_CONFIG",REMOVE_MANIFEST:"mirador/REMOVE_MANIFEST",REQUEST_INFO_RESPONSE:"mirador/REQUEST_INFO_RESPONSE",RECEIVE_INFO_RESPONSE:"mirador/RECEIVE_INFO_RESPONSE",RECEIVE_DEGRADED_INFO_RESPONSE:"mirador/RECEIVE_DEGRADED_INFO_RESPONSE",RECEIVE_INFO_RESPONSE_FAILURE:"mirador/RECEIVE_INFO_RESPONSE_FAILURE",REMOVE_INFO_RESPONSE:"mirador/REMOVE_INFO_RESPONSE",UPDATE_WORKSPACE_MOSAIC_LAYOUT:"mirador/UPDATE_WORKSPACE_MOSAIC_LAYOUT",UPDATE_VIEWPORT:"mirador/UPDATE_VIEWPORT",UPDATE_ELASTIC_WINDOW_LAYOUT:"mirador/UPDATE_ELASTIC_WINDOW_LAYOUT",ADD_AUTHENTICATION_REQUEST:"mirador/ADD_AUTHENTICATION_REQUEST",RESOLVE_AUTHENTICATION_REQUEST:"mirador/RESOLVE_AUTHENTICATION_REQUEST",REQUEST_ACCESS_TOKEN:"mirador/REQUEST_ACCESS_TOKEN",RECEIVE_ACCESS_TOKEN:"mirador/RECEIVE_ACCESS_TOKEN",RECEIVE_ACCESS_TOKEN_FAILURE:"mirador/RECEIVE_ACCESS_TOKEN_FAILURE",RESET_AUTHENTICATION_STATE:"mirador/RESET_AUTHENTICATION_STATE",CLEAR_ACCESS_TOKEN_QUEUE:"mirador/CLEAR_ACCESS_TOKEN_QUEUE",REQUEST_SEARCH:"mirador/REQUEST_SEARCH",RECEIVE_SEARCH:"mirador/RECEIVE_SEARCH",RECEIVE_SEARCH_FAILURE:"mirador/RECEIVE_SEARCH_FAILURE",REMOVE_SEARCH:"mirador/REMOVE_SEARCH",SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS:"mirador/SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS",UPDATE_LAYERS:"mirador/UPDATE_LAYERS",ADD_RESOURCE:"mirador/ADD_RESOURCE",REMOVE_RESOURCE:"mirador/REMOVE_RESOURCE",SHOW_COLLECTION_DIALOG:"mirador/SHOW_COLLECTION_DIALOG",HIDE_COLLECTION_DIALOG:"mirador/HIDE_COLLECTION_DIALOG"};const q=Ile;var Av="NOT_FOUND";function Cle(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Av},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function Tle(e,t){var n=[];function r(s){var l=n.findIndex(function(c){return t(s,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Av}function i(s,l){r(s)===Av&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function a(){return n}function o(){n=[]}return{get:r,put:i,getEntries:a,clear:o}}var Ple=function(t,n){return t===n};function xle(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,a=0;a1?t-1:0),r=1;rs))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=n&Yue?new Vue:void 0;for(a.set(e,t),a.set(t,e);++f0&&n(s)?t>1?yz(s,t-1,n,r,i):hde(i,s):r||(i[i.length]=s)}return i}var wI=yz,gde=wI;function mde(e){var t=e==null?0:e.length;return t?gde(e,1):[]}var bz=mde;const wt=$t(bz);function yde(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t0&&arguments[0]!==void 0?arguments[0]:{};wde(this,e),this.resource=t}return Sde(e,[{key:"isOnlyTag",value:function(){return this.motivations.length===1&&this.motivations[0]==="oa:tagging"}},{key:"id",get:function(){return this._id=this._id||this.resource["@id"]||this.resources[0]&&this.resources[0]["@id"]||wi(),this._id}},{key:"targetId",get:function(){var n=this.on[0];switch(typeof n){case"string":return n.replace(/#?xywh=(.*)$/,"");case"object":return n.full.replace(/#?xywh=(.*)$/,"");default:return null}}},{key:"motivations",get:function(){return wt(Ts(new Array(this.resource.motivation)))}},{key:"resources",get:function(){return wt(Ts(new Array(this.resource.resource)))}},{key:"on",get:function(){return wt(Ts(new Array(this.resource.on)))}},{key:"tags",get:function(){return this.isOnlyTag()?this.resources.map(function(n){return n.chars}):this.resources.filter(function(n){return n["@type"]==="oa:Tag"}).map(function(n){return n.chars})}},{key:"chars",get:function(){return this.resources.filter(function(n){return n["@type"]!=="oa:Tag"}).map(function(n){return n.chars}).join(" ")}},{key:"selector",get:function(){var n=this.on[0];switch(typeof n){case"string":return n;case"object":return n.selector["@type"]==="oa:Choice"?n.selector.default:n.selector;default:return null}}},{key:"svgSelector",get:function(){var n=this.on[0];switch(typeof n){case"string":return null;case"object":return n.selector&&n.selector.item&&n.selector.item["@type"]==="oa:SvgSelector"?n.selector.item:null;default:return null}}},{key:"fragmentSelector",get:function(){var n=this.selector,r;switch(typeof n){case"string":r=n.match(/xywh=(.*)$/);break;case"object":r=n.value.match(/xywh=(.*)$/);break;default:return null}return r&&r[1].split(",").map(function(i){return parseInt(i,10)})}}]),e}();function Ede(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zA(e,t){for(var n=0;n0}},{key:"resources",get:function(){var n=this;return this._resources=this._resources||function(){return!n.json||!n.json.resources?[]:wt([n.json.resources]).map(function(r){return new _de(r)})}(),this._resources}}]),e}();function Ide(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BA(e,t){for(var n=0;n0&&arguments[0]!==void 0?arguments[0]:{};Ide(this,e),this.resource=t}return Cde(e,[{key:"isOnlyTag",value:function(){return this.motivations.length===1&&this.motivations[0]==="tagging"}},{key:"id",get:function(){return this._id=this._id||this.resource.id||wi(),this._id}},{key:"targetId",get:function(){var n=this.target[0];switch(typeof n){case"string":return n.replace(/#?xywh=(.*)$/,"");case"object":return n.source&&n.source.id||n.source||n.id;default:return null}}},{key:"motivations",get:function(){return wt(Ts(new Array(this.resource.motivation)))}},{key:"body",get:function(){return wt(Ts(new Array(this.resource.body)))}},{key:"resources",get:function(){return this.body}},{key:"tags",get:function(){return this.isOnlyTag()?this.body.map(function(n){return n.value}):this.body.filter(function(n){return n.purpose==="tagging"}).map(function(n){return n.value})}},{key:"target",get:function(){return wt(Ts(new Array(this.resource.target)))}},{key:"chars",get:function(){return this.isOnlyTag()?null:this.body.filter(function(n){return n.purpose!=="tagging"}).map(function(n){return n.value}).join(" ")}},{key:"selector",get:function(){var n=this.target[0];switch(typeof n){case"string":return n;case"object":return wt(Ts(new Array(n.selector)));default:return null}}},{key:"svgSelector",get:function(){var n=this.selector;switch(typeof n){case"string":return null;case"object":return n.find(function(r){return r.type&&r.type==="SvgSelector"});default:return null}}},{key:"fragmentSelector",get:function(){var n=this.selector,r,i;switch(typeof n){case"string":r=n.match(/xywh=(.*)$/);break;case"object":i=n.find(function(a){return a.type&&a.type==="FragmentSelector"}),r=i&&i.value.match(/xywh=(.*)$/);break;default:return null}return r&&r[1].split(",").map(function(a){return parseInt(a,10)})}}]),e}();function Pde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UA(e,t){for(var n=0;n0}},{key:"items",get:function(){var n=this;return this._items=this._items||function(){return!n.json||!n.json.items?[]:wt([n.json.items]).map(function(r){return new Tde(r)})}(),this._items}},{key:"resources",get:function(){return this.items}}]),e}();function Ade(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HA(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:"single";jde(this,e),this.canvases=t,this.viewType=n,this._groupings=null}return Fde(e,[{key:"getCanvases",value:function(n){switch(this.viewType){case"book":return this.groupings()[Math.ceil(n/2)];default:return this.groupings()[n]}}},{key:"groupings",value:function(){if(this._groupings)return this._groupings;if(this.viewType==="scroll")return[this.canvases];if(this.viewType!=="book")return this.canvases.map(function(r){return[r]});var n=[];return this.canvases.forEach(function(r,i){if(i===0){n.push([r]);return}i%2!==0?n.push([r]):n[Math.ceil(i/2)].push(r)}),this._groupings=n,n}}]),e}(),zde=wI,Bde=1/0;function Ude(e){var t=e==null?0:e.length;return t?zde(e,Bde):[]}var Hde=Ude;const Ss=$t(Hde);var _z=function(){function e(t){this.__jsonld=t,this.context=this.getProperty("context"),this.id=this.getProperty("id")}return e.prototype.getProperty=function(t){var n=null;return this.__jsonld&&(n=this.__jsonld[t],n||(n=this.__jsonld["@"+t])),n},e}(),ke={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.BOOKMARKING="oa:bookmarking",t.CLASSIFYING="oa:classifying",t.COMMENTING="oa:commenting",t.DESCRIBING="oa:describing",t.EDITING="oa:editing",t.HIGHLIGHTING="oa:highlighting",t.IDENTIFYING="oa:identifying",t.LINKING="oa:linking",t.MODERATING="oa:moderating",t.PAINTING="sc:painting",t.QUESTIONING="oa:questioning",t.REPLYING="oa:replying",t.TAGGING="oa:tagging",t.TRANSCRIBING="oad:transcribing"}(e.AnnotationMotivation||(e.AnnotationMotivation={})),function(t){t.AUTO_ADVANCE="auto-advance",t.CONTINUOUS="continuous",t.FACING_PAGES="facing-pages",t.HIDDEN="hidden",t.INDIVIDUALS="individuals",t.MULTI_PART="multi-part",t.NO_NAV="no-nav",t.NON_PAGED="non-paged",t.PAGED="paged",t.REPEAT="repeat",t.SEQUENCE="sequence",t.THUMBNAIL_NAV="thumbnail-nav",t.TOGETHER="together",t.UNORDERED="unordered"}(e.Behavior||(e.Behavior={})),function(t){t.CANVAS="canvas",t.CHOICE="choice",t.OA_CHOICE="oa:choice",t.CONTENT_AS_TEXT="contentastext",t.DATASET="dataset",t.DOCUMENT="document",t.IMAGE="image",t.MODEL="model",t.MOVING_IMAGE="movingimage",t.PDF="pdf",t.PHYSICAL_OBJECT="physicalobject",t.SOUND="sound",t.TEXT="text",t.TEXTUALBODY="textualbody",t.VIDEO="video"}(e.ExternalResourceType||(e.ExternalResourceType={})),function(t){t.ANNOTATION="annotation",t.CANVAS="canvas",t.COLLECTION="collection",t.MANIFEST="manifest",t.RANGE="range",t.SEQUENCE="sequence"}(e.IIIFResourceType||(e.IIIFResourceType={})),function(t){t.AUDIO_MP4="audio/mp4",t.CORTO="application/corto",t.DICOM="application/dicom",t.DRACO="application/draco",t.EPUB="application/epub+zip",t.GIRDER="image/vnd.kitware.girder",t.GLB="model/gltf-binary",t.GLTF="model/gltf+json",t.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',t.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',t.JPG="image/jpeg",t.M3U8="application/vnd.apple.mpegurl",t.MP3="audio/mp3",t.MPEG_DASH="application/dash+xml",t.OBJ="text/plain",t.OPF="application/oebps-package+xml",t.PDF="application/pdf",t.PLY="application/ply",t.THREEJS="application/vnd.threejs+json",t.USDZ="model/vnd.usd+zip",t.VIDEO_MP4="video/mp4",t.WAV="audio/wav",t.WEBM="video/webm"}(e.MediaType||(e.MediaType={})),function(t){t.DOC="application/msword",t.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",t.PDF="application/pdf"}(e.RenderingFormat||(e.RenderingFormat={})),function(t){t.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",t.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",t.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",t.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",t.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",t.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",t.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",t.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",t.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",t.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",t.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",t.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",t.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",t.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",t.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",t.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",t.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",t.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",t.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",t.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",t.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",t.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",t.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",t.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",t.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",t.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",t.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",t.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",t.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",t.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",t.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",t.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",t.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",t.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",t.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",t.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",t.SEARCH_0="http://iiif.io/api/search/0/search",t.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",t.SEARCH_1="http://iiif.io/api/search/1/search",t.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",t.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",t.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",t.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",t.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",t.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",t.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",t.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(e.ServiceProfile||(e.ServiceProfile={})),function(t){t.IMAGE_SERVICE_2="ImageService2",t.IMAGE_SERVICE_3="ImageService3"}(e.ServiceType||(e.ServiceType={})),function(t){t.BOTTOM_TO_TOP="bottom-to-top",t.LEFT_TO_RIGHT="left-to-right",t.RIGHT_TO_LEFT="right-to-left",t.TOP_TO_BOTTOM="top-to-bottom"}(e.ViewingDirection||(e.ViewingDirection={})),function(t){t.CONTINUOUS="continuous",t.INDIVIDUALS="individuals",t.NON_PAGED="non-paged",t.PAGED="paged",t.TOP="top"}(e.ViewingHint||(e.ViewingHint={}))})(ke);var Vde=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xa=function(e){Vde(t,e);function t(n,r){var i=e.call(this,n)||this;return i.options=r,i}return t.prototype.getIIIFResourceType=function(){return Je.normaliseType(this.getProperty("type"))},t.prototype.getLabel=function(){var n=this.getProperty("label");return n?gr.parse(n,this.options.locale):new gr([],this.options.locale)},t.prototype.getDefaultLabel=function(){return this.getLabel().getValue(this.options.locale)},t.prototype.getMetadata=function(){var n=this.getProperty("metadata"),r=[];if(!n)return r;for(var i=0;i-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(o="native");else{var u=void 0;if(u=this.getImages(),u&&u.length){var c=u[0],f=c.getResource(),d=f.getServices();s||(s=f.getWidth());var p=d?d.find(function(g){return Je.isImageProfile(g.getProfile())||Je.isImageServiceType(g.getIIIFResourceType())}):null;if(p)r=p.id,o=Je.getImageQuality(p.getProfile());else if(s===f.getWidth())return f.id}if(u=this.getContent(),u&&u.length){var c=u[0],h=c.getBody(),v=h[0],d=v.getServices();s||(s=v.getWidth());var p=d?d.find(function(_){return Je.isImageServiceType(_.getIIIFResourceType())}):null;if(p)r=p.id,o=Je.getImageQuality(p.getProfile());else if(s===v.getWidth())return v.id}if(!r){var w=this.getProperty("thumbnail");if(w){if(typeof w=="string")return w;if(w["@id"])return w["@id"];if(w.length)return w[0].id}}}l=s+",",r&&r.endsWith("/")&&(r=r.substr(0,r.length-1));var m=[r,i,l,a,o+".jpg"].join("/");return m},t.prototype.getMaxDimensions=function(){var n=null,r;return this.externalResource&&this.externalResource.data&&this.externalResource.data.profile&&(r=this.externalResource.data.profile,Array.isArray(r)&&(r=r.filter(function(i){return i.maxWidth})[0],r&&(n=new bpe(r.maxWidth,r.maxHeight?r.maxHeight:r.maxWidth)))),n},t.prototype.getContent=function(){var n=[],r=this.__jsonld.items||this.__jsonld.content;if(!r)return n;var i=null;if(r.length&&(i=new Jde(r[0],this.options)),!i)return n;for(var a=i.getItems(),o=0;o")},t.getValues=function(n,r){return n.getValues(r)},t})(Array);var et={};Object.defineProperty(et,"__esModule",{value:!0});et.CONTINUE=100;et.SWITCHING_PROTOCOLS=101;et.PROCESSING=102;var vl=et.OK=200;et.CREATED=201;et.ACCEPTED=202;et.NON_AUTHORITATIVE_INFORMATION=203;et.NO_CONTENT=204;et.RESET_CONTENT=205;et.PARTIAL_CONTENT=206;et.MULTI_STATUS=207;et.MULTIPLE_CHOICES=300;et.MOVED_PERMANENTLY=301;var Tc=et.MOVED_TEMPORARILY=302;et.SEE_OTHER=303;et.NOT_MODIFIED=304;et.USE_PROXY=305;et.TEMPORARY_REDIRECT=307;et.BAD_REQUEST=400;var ipe=et.UNAUTHORIZED=401;et.PAYMENT_REQUIRED=402;et.FORBIDDEN=403;et.NOT_FOUND=404;et.METHOD_NOT_ALLOWED=405;et.NOT_ACCEPTABLE=406;et.PROXY_AUTHENTICATION_REQUIRED=407;et.REQUEST_TIME_OUT=408;et.CONFLICT=409;et.GONE=410;et.LENGTH_REQUIRED=411;et.PRECONDITION_FAILED=412;et.REQUEST_ENTITY_TOO_LARGE=413;et.REQUEST_URI_TOO_LARGE=414;et.UNSUPPORTED_MEDIA_TYPE=415;et.REQUESTED_RANGE_NOT_SATISFIABLE=416;et.EXPECTATION_FAILED=417;et.IM_A_TEAPOT=418;et.UNPROCESSABLE_ENTITY=422;et.LOCKED=423;et.FAILED_DEPENDENCY=424;et.UNORDERED_COLLECTION=425;et.UPGRADE_REQUIRED=426;et.PRECONDITION_REQUIRED=428;et.TOO_MANY_REQUESTS=429;et.REQUEST_HEADER_FIELDS_TOO_LARGE=431;et.INTERNAL_SERVER_ERROR=500;et.NOT_IMPLEMENTED=501;et.BAD_GATEWAY=502;et.SERVICE_UNAVAILABLE=503;et.GATEWAY_TIME_OUT=504;et.HTTP_VERSION_NOT_SUPPORTED=505;et.VARIANT_ALSO_NEGOTIATES=506;et.INSUFFICIENT_STORAGE=507;et.BANDWIDTH_LIMIT_EXCEEDED=509;et.NOT_EXTENDED=510;et.NETWORK_AUTHENTICATION_REQUIRED=511;function ape(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,a=[],o=[],s={},l=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return a},entries:function(){return o},get:function(c){return s[c.toLowerCase()]},has:function(c){return c.toLowerCase()in s}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(c,f,d){a.push(f=f.toLowerCase()),o.push([f,d]),s[f]=s[f]?s[f]+","+d:d}),n(l())},i.onerror=r,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)})}const ope=Object.freeze(Object.defineProperty({__proto__:null,default:ape},Symbol.toStringTag,{value:"Module"})),qA=wa(ope);var spe=self.fetch||(self.fetch=qA.default||qA);const lpe=$t(spe);var Ew=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(c){try{u(r.next(c))}catch(f){o(f)}}function l(c){try{u(r.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})},Ow=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]"):this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale===void 0?this._defaultLocale:this._locale},enumerable:!0,configurable:!0}),e.prototype.addValue=function(t){Array.isArray(this._value)||(this._value=[this._value]),Array.isArray(t)?this._value=this._value.concat(t):this._value.push(t)},e}(),gr=function(e){upe(t,e);function t(n,r){n===void 0&&(n=[]);var i=e.apply(this,n)||this;return i.__proto__=t.prototype,i._defaultLocale=r,i}return t.parse=function(n,r){if(!n)return new t([],r);if(Array.isArray(n)){var i=n.map(function(o){return gl.parseV2Value(o,r)}).filter(function(o){return o!==null}),a=i.reduce(function(o,s){var l=s._locale;return l||(l="none"),o[l]?o[l].addValue(s._value):o[l]=s,o},{});return new t(Object.values(a),r)}else{if(typeof n=="string")return new t([new gl(n,void 0,r)],r);if(n["@language"]){var i=gl.parseV2Value(n);return new t(i!==null?[i]:[],r)}else if(n["@value"]){var i=gl.parseV2Value(n);return new t(i!==null?[i]:[],r)}else return new t(Object.keys(n).map(function(o){var s=n[o];if(!Array.isArray(s))throw new Error("A IIIF v3 localized property value must have an array as the value for a given language.");return new gl(s,o,r)}),r)}},t.prototype.getSuitableLocale=function(n){for(var r=cpe(this).map(function(p){return p._locale}).filter(function(p){return p!==void 0}),i=function(p){var h=r.find(function(v){return v===p});if(h)return{value:h}},a=0,o=n;a1},t.prototype.isPagingEnabled=function(){var n=this.getViewingHint();if(n)return n===ke.ViewingHint.PAGED;var r=this.getBehavior();return r?r===ke.Behavior.PAGED:!1},t.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")},t.prototype.getViewingHint=function(){return this.getProperty("viewingHint")},t}(Ez),p1;(function(e){e.EMPTY="",e.MANUSCRIPT="manuscript",e.MONOGRAPH="monograph"})(p1||(p1={}));var ppe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hpe=function(e){ppe(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i._ranges=null,i.canvases=null,i.items=[],i}return t.prototype.getCanvasIds=function(){return this.__jsonld.canvases?this.__jsonld.canvases:this.canvases?this.canvases:[]},t.prototype.getDuration=function(){if(this.canvases&&this.canvases.length){for(var n=[],r=[],i=0,a=this.canvases;i1&&(g===0&&(w=Number(y[0])),g===this.canvases.length-1&&(m=Number(y[1])))}else for(var f=this.getRanges(),g=0;g=r.start&&n<=r.end)},t.prototype._parseTreeNode=function(n,r){n.label=r.getLabel().getValue(this.options.locale),n.data=r,n.data.type=Je.normaliseType(ha.RANGE),r.treeNode=n;var i=r.getRanges();if(i&&i.length)for(var a=0;a=0;r--){var i=this.getCanvasByIndex(r),a=i.getLabel().getValue(this.options.locale);if(n){var o=/^[a-zA-Z0-9]*$/;if(o.test(a))return a}else if(a)return a}return this.options.defaultLabel},t.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},t.prototype.getNextPageIndex=function(n,r){var i;if(r){var a=this.getPagedIndices(n),o=this.getViewingDirection();o&&o===ke.ViewingDirection.RIGHT_TO_LEFT?i=a[0]+1:i=a[a.length-1]+1}else i=n+1;return i>this.getLastPageIndex()?-1:i},t.prototype.getPagedIndices=function(n,r){var i=[];if(!r)i.push(n);else{this.isFirstCanvas(n)||this.isLastCanvas(n)?i=[n]:n%2?i=[n,n+1]:i=[n-1,n];var a=this.getViewingDirection();a&&a===ke.ViewingDirection.RIGHT_TO_LEFT&&(i=i.reverse())}return i},t.prototype.getPrevPageIndex=function(n,r){var i;if(r){var a=this.getPagedIndices(n),o=this.getViewingDirection();o&&o===ke.ViewingDirection.RIGHT_TO_LEFT?i=a[a.length-1]-1:i=a[0]-1}else i=n-1;return i},t.prototype.getStartCanvasIndex=function(){var n=this.getStartCanvas();if(n)for(var r=0;rthis.getTotalCanvases()-1},t.prototype.isFirstCanvas=function(n){return n===0},t.prototype.isLastCanvas=function(n){return n===this.getTotalCanvases()-1},t.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},t.prototype.isPagingEnabled=function(){var n=this.getViewingHint();return n?n===ke.ViewingHint.PAGED:!1},t.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2===0},t}(Xa),Oz=function(){function e(){}return e.parse=function(t,n){return typeof t=="string"&&(t=JSON.parse(t)),this.parseJson(t,n)},e.parseJson=function(t,n){var r;if(n&&n.navDate&&!isNaN(n.navDate.getTime())&&(t.navDate=n.navDate.toString()),t["@type"])switch(t["@type"]){case"sc:Collection":r=this.parseCollection(t,n);break;case"sc:Manifest":r=this.parseManifest(t,n);break;default:return null}else switch(t.type){case"Collection":r=this.parseCollection(t,n);break;case"Manifest":r=this.parseManifest(t,n);break;default:return null}return r.isLoaded=!0,r},e.parseCollection=function(t,n){var r=new npe(t,n);return n?(r.index=n.index||0,n.resource&&(r.parentCollection=n.resource.parentCollection)):r.index=0,this.parseCollections(r,n),this.parseManifests(r,n),this.parseItems(r,n),r},e.parseCollections=function(t,n){var r;if(t.__jsonld.collections?r=t.__jsonld.collections:t.__jsonld.items&&(r=t.__jsonld.items.filter(function(o){return o.type.toLowerCase()==="collection"})),r)for(var i=0;i0?this.canvas.getLabel().getValue():String(this.canvas.index+1)}}]),e}();function Ipe(e){return Object.values(An(e).windows).map(function(t){return t.manifestId})}function el(e){return An(e).windows||{}}function pn(e,t){var n=t.windowId;return el(e)[n]}var Cpe=ge([function(e){return An(e).viewers},function(e,t){var n=t.windowId;return n}],function(e,t){return e[t]});function tl(e){return An(e).workspace}var Iz=ge([tl],function(e){var t=e.windowIds;return t||[]});function ay(e){return An(e).manifests||{}}function Ds(e,t){var n=t.manifestId,r=t.windowId,i=ay(e);return i&&i[n||r&&(pn(e,{windowId:r})||{}).manifestId]}function Tpe(e){return An(e).catalog||{}}function Ppe(e){return typeof e=="string"||typeof e=="number"}var xpe=function(){function e(){this._cache={}}var t=e.prototype;return t.set=function(r,i){this._cache[r]=i},t.get=function(r){return this._cache[r]},t.remove=function(r){delete this._cache[r]},t.clear=function(){this._cache={}},t.isValidCacheKey=function(r){return Ppe(r)},e}(),Rpe=xpe,Ape=function(){return!0};function $pe(){for(var e=arguments.length,t=new Array(e),n=0;n1&&arguments[1]!==void 0?arguments[1]:{};Npe(this,e),this.resource=t,this.iiifOpts=n}return Lpe(e,[{key:"iiifThumbnailUrl",value:function(n){var r,i,a,o=120,s=o,l=o,u=this.iiifOpts,c=u.maxHeight,f=u.maxWidth;c&&(s=Math.max(c,o)),f&&(l=Math.max(f,o));var d=Iw(n);if(!d)return e.staticImageUrl(n);var p=n.getWidth()&&n.getHeight()&&n.getWidth()/n.getHeight(),h=f&&c?f*c:s*l,v=e.selectBestImageSize(d,h);if(v)i=v.width,a=v.height,r="".concat(i,",").concat(a);else if(Mpe(d)){if(!d.getProperty("height")&&!d.getProperty("width"))return e.staticImageUrl(n)}else c&&f?jpe(d)?(r="!".concat(l,",").concat(s),i=l,a=s,p&&p>1&&(a=Math.round(l/p)),p&&p<1&&(i=Math.round(s*p))):l/sr*6&&(a=i.reduce(function(s,l){return Math.abs(o(l))e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.locale||t.language}),Uhe=ge([Ds],function(e){return e||{missing:!0}}),Hhe=ge([Ds],function(e){return e&&e.error}),Vhe=$pe(Ds,g1,function(e,t){return e&&Nz(e.json,t)})(function(e,t){var n=t.companionWindowId,r=t.manifestId,i=t.windowId;return[r,i,g1(e,{companionWindowId:n})].join(" - ")}),rn=ge(Vhe,function(e,t){var n=t.json;return n},g1,function(e,t,n){return t&&Nz(t,n)||e}),nl=ge([rn],function(e){return e&&e.options&&e.options.locale&&e.options.locale.replace(/-.*$/,"")});function id(e){return ge([rn],function(t){return t&&t.getProperty(e)})}var Lz=ge([rn],function(e){return e&&e.getLogo()}),Ghe=ge([id("provider"),nl],function(e,t){return e&&e[0].label&&gr.parse(e[0].label,t).getValue()}),Mz=ge([id("homepage"),nl],function(e,t){return e&&Ju(e).map(function(n){return{label:gr.parse(n.label,t).getValue(),value:n.id||n["@id"]}})}),jz=ge([rn],function(e){return e&&e.getRenderings().map(function(t){return{label:t.getLabel().getValue(),value:t.id}})}),Fz=ge([id("seeAlso"),nl],function(e,t){return e&&Ju(e).map(function(n){return{format:n.format,label:gr.parse(n.label,t).getValue(),value:n.id||n["@id"]}})}),Wz=ge([rn],function(e){return e&&Ju(e.getRequiredStatement()).filter(function(t){return t.getValues().some(function(n){return n})}).map(function(t){return{label:t.label&&t.label.getValue()||null,values:t.getValues()}})}),zz=ge([id("rights"),id("license"),nl],function(e,t,n){var r=e||t;return Ju(gr.parse(r,n).getValues())});function qhe(e,t){var n=rn(e,t),r=dn(e),i=r.thumbnails,a=i===void 0?{}:i;if(n){var o=Tz(n,{maxHeight:80,maxWidth:120,preferredFormats:a.preferredFormats});return o&&o.url}}var oy=ge([rn],function(e){return e&&e.getLabel().getValue()}),Bz=ge([rn],function(e){return e&&e.getDescription().getValue()}),Uz=ge([rn],function(e){return e&&e.id});function CI(e){return e&&e.getMetadata().map(function(t){return{label:t.getLabel(),values:t.getValues()}})}var Hz=ge([rn],function(e){return e&&CI(e)});function r$(e){var t=[];return Array.isArray(e)?t.push.apply(t,jhe(e.filter(function(n){return typeof n=="object"&&n["@language"]}).map(function(n){return n["@language"]}))):e&&typeof e=="object"&&e["@language"]&&t.push(e["@language"]),t}function Khe(e){if(!e)return[];for(var t=e.getProperty("metadata")||[],n={},r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{};return o$(o$({},t),n)});function ive(e){var t={};return Object.keys(el(e)).forEach(function(n){t[n]=oy(e,{windowId:n})}),t}var ave=ge([el],function(e){return Object.values(e).filter(function(t){return t.maximized===!0}).map(function(t){return t.id})}),AI=ge([pn,ec,PI,RI],function(e,t,n,r){var i=t.views,a=i===void 0?[]:i,o=t.defaultView;if(e&&e.view)return e.view;var s=(a||[]).find(function(l){return l.behaviors&&l.behaviors.some(function(u){return n===u||r.includes(u)})});return s&&s.key||o}),ove=ge([PI,RI,ec],function(e,t,n){var r=n.views,i=r===void 0?[]:r,a=n.defaultView;return(i||[]).reduce(function(o,s){return(s.key===a||!s.behaviors||s.behaviors.some(function(l){return e===l||t.includes(l)}))&&o.push(s.key),o},[])}),sve=ge([Xz,pn,function(e){return Iz(e).length>1}],function(e,t,n){return e==="elastic"?!0:n&&t&&t.maximized===!1}),Ud=function(t){return An(t).infoResponses},es=ge([Sa],function(e){return e&&e.getCanvases()||[]}),Za=ge([Sa,function(e,t){var n=t.canvasId;return n}],function(e,t){if(!(!e||!t))return e.getCanvasById(t)}),sy=ge([Sa,pn],function(e,t){if(!(!e||!t))return t.canvasId?e.getCanvasById(t.canvasId):e.getCanvasByIndex(0)}),Ji=ge([pn],function(e){return e&&(e.visibleCanvases||e.canvasId&&[e.canvasId])||[]}),ts=ge([Ji,es],function(e,t){return(t||[]).filter(function(n){return e.includes(n.id)})}),Hd=ge([es,AI],function(e,t){return e&&new Wde(e,t).groupings()}),$I=ge([Hd,function(e,t){var n=t.canvasId;return n}],function(e,t){return e&&e.find(function(n){return n.some(function(r){return r.id===t})})||[]}),kI=ge([Hd,sy],function(e,t,n){if(!(!e||!t)){var r=e.findIndex(function(a){return a.some(function(o){return o.id===t.id})});if(!(r<0||r+1>=e.length)){var i=e[r+1];return i}}}),DI=ge([Hd,sy],function(e,t,n){if(!(!e||!t)){var r=e.findIndex(function(a){return a.some(function(o){return o.id===t.id})});if(!(r<1)){var i=e[r-1];return i}}}),Vd=ge([Za],function(e){return e&&(e.getLabel().length>0?e.getLabel().getValue():String(e.index+1))}),Qz=ge([Za],function(e){return e&&e.getProperty("description")}),lve=ge([ts],function(e){return wt(e.map(function(t){return new ai(t).imageResources})).filter(function(t){return t.getServices().length<1})}),uve=ge([ts],function(e){return wt(e.map(function(t){return new ai(t).videoResources}))}),cve=ge([ts],function(e){return wt(e.map(function(t){return new ai(t).vttContent}))}),fve=ge([ts],function(e){return wt(e.map(function(t){return new ai(t).audioResources}))}),Zz=ge([function(e,t){var n=t.infoId;return n},Za,Ud],function(e,t,n){var r=e;if(!e){if(!t)return;var i=new ai(t),a=i.iiifImageResources[0];r=a&&a.getServices()[0].id}return r&&n[r]&&!n[r].isFetching&&n[r]}),dve=["canvasId"];function pve(e,t){if(e==null)return{};var n=hve(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hve(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var ly=function(t){return An(t).annotations},Jz=ge([dn,function(e,t){var n=t.motivations;return n}],function(e,t){return t||e.annotations.filteredMotivations}),vve=ge([Za,ly],function(e,t){return!t||!e?[]:t[e.id]?wt(Object.values(t[e.id])):[]}),gve=ge([vve],function(e){return iy(Object.values(e).map(function(t){return t&&Sz.determineAnnotation(t.json)}),function(t){return t&&t.present()})}),mve=ge([function(e,t){var n=t.canvasId,r=pve(t,dve);return n?[n]:Ji(e,r)},ly],function(e,t){return!t||e.length===0?[]:wt(e.map(function(n){return t[n]&&Object.values(t[n])}))}),NI=ge([mve],function(e){return iy(Object.values(e).map(function(t){return t&&Sz.determineAnnotation(t.json)}),function(t){return t&&t.present()})}),e3=ge([gve,Jz],function(e,t){return iy(wt(e.map(function(n){return n.resources})),function(n){return n.motivations.some(function(r){return t.includes(r)})})}),LI=ge([NI,Jz],function(e,t){return iy(wt(e.map(function(n){return n.resources})),function(n){return n.motivations.some(function(r){return t.includes(r)})})}),uy=ge([pn],function(e){var t=e.selectedAnnotationId;return t}),yve=ge([NI,uy],function(e,t){return e.map(function(n){return{id:n["@id"]||n.id,resources:n.resources.filter(function(r){return t===r.id})}}).filter(function(n){return n.resources.length>0})}),bve=function(t){return An(t).searches},cy=ge([function(e,t){var n=t.windowId;return n},bve],function(e,t){return!e||!t?{}:t[e]}),Gd=ge([cy,function(e,t){var n=t.companionWindowId;return n}],function(e,t){if(!(!e||!t))return e[t]}),MI=ge([Gd],function(e){return e?Object.values(e.data):[]}),fy=ge([Gd],function(e){return e&&e.query}),jI=ge([MI],function(e){return e.some(function(t){return t.isFetching})}),FI=ge([Gd],function(e){var t,n;if(!(!e||!e.data)){var r=Object.values(e.data).find(function(i){return!i.isFetching&&i.json&&i.json.within});return r==null||(t=r.json)===null||t===void 0||(n=t.within)===null||n===void 0?void 0:n.total}}),t3=ge([Gd],function(e){if(!(!e||!e.data)){var t=Object.values(e.data).find(function(n){return!n.isFetching&&n.json&&n.json.next&&!e.data[n.json.next]});return t&&t.json&&t.json.next}}),wve=ge([MI],function(e){return wt(e.map(function(t){return!t||!t.json||t.isFetching||!t.json.hits?[]:t.json.hits}))}),WI=ge([wve,es,function(e,t){var n=t.companionWindowId,r=t.windowId;return function(i){return hy(e,{annotationUri:i,companionWindowId:n,windowId:r})}}],function(e,t,n){if(!t||t.length===0)return[];if(!e||e.length===0)return[];var r=t.map(function(i){return i.id});return[].concat(e).sort(function(i,a){var o=n(i.annotations[0]),s=n(a.annotations[0]);return r.indexOf(o.targetId)-r.indexOf(s.targetId)})}),n3=function(t){var n=t.map(function(r){if(!(!r||!r.json||r.isFetching||!r.json.resources)){var i=new wz(r.json);return{id:i.id,resources:i.resources}}}).filter(Boolean);return{id:(n.find(function(r){return r.id})||{}).id,resources:wt(n.map(function(r){return r.resources}))}},dy=ge([MI],function(e){return e&&n3(e)});function r3(e,t){if(!e||!e.resources||e.length===0)return[];if(!t||t.length===0)return[];var n=t.map(function(r){return r.id});return[].concat(e.resources).sort(function(r,i){return n.indexOf(r.targetId)-n.indexOf(i.targetId)})}var zI=ge([dy,es],function(e,t){return r3(e,t)}),i3=ge([cy],function(e){if(!e)return[];var t=Object.values(e).map(function(n){return Object.values(n.data)});return t.map(function(n){return n3(n)}).filter(function(n){return n.resources.length>0})}),py=ge([pn,Gd],function(e,t){return t&&t.selectedContentSearchAnnotationIds||[]}),hy=ge([dy,function(e,t){var n=t.annotationUri;return n}],function(e,t){return e.resources.find(function(n){return n.id===t})}),a3=ge([hy,nl],function(e,t){return e&&e.resource&&e.resource.label?gr.parse(e.resource.label,t).getValues():[]}),Sve=ge([i3,function(e,t){var n=t.annotationId;return n}],function(e,t){var n=wt(e.map(function(r){return r.resources}));return n.find(function(r){return r.id===t})}),o3=ge([Sve,function(e,t){var n=t.windowId;return function(r){return Za(e,{canvasId:r,windowId:n})}}],function(e,t){var n=e&&e.targetId;return n&&t(n)}),_ve=eI,s$=Math.max;function Eve(e,t,n){return t=s$(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=s$(r.length-t,0),o=Array(a);++i=Wve){var u=t?null:jve(e);if(u)return Fve(u);o=!1,i=Mve,l=new Dve}else l=t?[]:s;e:for(;++r=age&&(a=ige,o=!1,t=new Jve(t));e:for(;++ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?p3(r.nodes,t):[];return i.push.apply(i,Vs(o)),(a||o.length>0)&&i.push({containsVisibleCanvas:a,descendantsContainVisibleCanvas:o.length>0,id:r.id,leaf:r.nodes.length===0,parentIds:d3(r)}),i},[])}var BI=ge([Bd,Ji],function(e,t){return t.length===0||!e?[]:p3(e.nodes,t)}),UI=ge([BI],function(e){return e.map(function(t){return t.id})}),wge=ge([BI],function(e){return e.reduce(function(t,n){return n.leaf||!n.descendantsContainVisibleCanvas?t:[].concat(Vs(t),[n.id])},[])}),Sge=ge([BI],function(e){return e.reduce(function(t,n){return n.containsVisibleCanvas?[].concat(Vs(t),[n]):t},[])});function _u(e,t,n){var r=t.companionWindowId,i=Qa(e,{companionWindowId:r});return i.tocNodes?Object.keys(i.tocNodes).reduce(function(a,o){return i.tocNodes[o].expanded===n?[].concat(Vs(a),[o]):a},[]):[]}function h3(e,t){var n=t.companionWindowId,r=t.windowId,i=wge(e,{companionWindowId:n,windowId:r}),a=_u(e,{companionWindowId:n},!0),o=_u(e,{companionWindowId:n},!1);return f3.apply(void 0,[Zve(a,i)].concat(Vs(o)))}function v3(e,t){var n=m1({},t),r=Sge(e,pge({},n)),i=_u(e,n,!1);if(r&&r.length>0){for(var a=0;a0?"tableOfContents":"item"}),g3=ge([Za],function(e){if(!e)return[];var t=new ai(e);return t.imageResources}),vy=ge([function(e){return An(e).layers||{}},function(e,t){var n=t.windowId;return n},function(e,t){var n=t.canvasId;return n}],function(e,t,n){return(e[t]||{})[n]}),m3=ge([g3,vy],function(e,t){if(!t)return e;var n=e.sort(function(r,i){return t[r.id]&&t[r.id].index!==void 0&&t[i.id]&&t[i.id].index!==void 0?t[r.id].index-t[i.id].index:t[r.id]&&t[r.id].index!==void 0?-1:t[i.id]&&t[i.id].index!==void 0?1:0});return n}),y3=ge([Ji,function(e,t){var n=t.windowId;return function(r){return vy(e,{canvasId:r,windowId:n})}}],function(e,t){return e.reduce(function(n,r){return n[r]=t(r),n},{})});function u$(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_ge(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function _ge(e,t){if(e){if(typeof e=="string")return c$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c$(e,t)}}function c$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=i;if(!a&&e&&(a=wt(e.map(function(s){var l=new ai(s),u=l.iiifImageResources;return u.map(function(c){var f=c.getServices()[0],d=t[f.id];return d&&d.json?d$(d$({},d.json),{},{options:{}}):f})}))),!a)return[];if(a.length===0)return[];var o=a.map(function(s){var l,u=Je.getServices(s),c=u$(n),f;try{var d=function(){var v=f.value,w=u.filter(function(S){return v.profile===S.getProfile()}),m=u$(w),g;try{for(m.s();!(g=m.n()).done;){var y=g.value;if(l=y,!r[y.id]||r[y.id].isFetching||r[y.id].ok)return{v:y}}}catch(S){m.e(S)}finally{m.f()}};for(c.s();!(f=c.n()).done;){var p=d();if(typeof p=="object")return p.v}}catch(h){c.e(h)}finally{c.f()}return l});return Object.values(o.reduce(function(s,l){return l&&!s[l.id]&&(s[l.id]=l),s},{}))}),VI={exports:{}};const Ige={},Cge=Object.freeze(Object.defineProperty({__proto__:null,default:Ige},Symbol.toStringTag,{value:"Module"})),Tge=wa(Cge),Pge=typeof URL>"u"?Tge.URL:URL,xge="text/plain",Rge="us-ascii",p$=(e,t)=>t.some(n=>n instanceof RegExp?n.test(e):n===e),Age=(e,{stripHash:t})=>{const n=e.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!n)throw new Error(`Invalid URL: ${e}`);const r=n[1].split(";"),i=n[2],a=t?"":n[3];let o=!1;r[r.length-1]==="base64"&&(r.pop(),o=!0);const s=(r.shift()||"").toLowerCase(),u=[...r.map(c=>{let[f,d=""]=c.split("=").map(p=>p.trim());return f==="charset"&&(d=d.toLowerCase(),d===Rge)?"":`${f}${d?`=${d}`:""}`}).filter(Boolean)];return o&&u.push("base64"),(u.length!==0||s&&s!==xge)&&u.unshift(s),`data:${u.join(";")},${o?i.trim():i}${a?`#${a}`:""}`},w3=(e,t)=>{if(t={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...t},Reflect.has(t,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(t,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(t,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(e=e.trim(),/^data:/i.test(e))return Age(e,t);const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const i=new Pge(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&i.protocol==="https:"&&(i.protocol="http:"),t.forceHttps&&i.protocol==="http:"&&(i.protocol="https:"),t.stripAuthentication&&(i.username="",i.password=""),t.stripHash&&(i.hash=""),i.pathname&&(i.pathname=i.pathname.replace(/((?!:).|^)\/{2,}/g,(a,o)=>/^(?!\/)/g.test(o)?`${o}/`:"/")),i.pathname&&(i.pathname=decodeURI(i.pathname)),t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let a=i.pathname.split("/");const o=a[a.length-1];p$(o,t.removeDirectoryIndex)&&(a=a.slice(0,a.length-1),i.pathname=a.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const a of[...i.searchParams.keys()])p$(a,t.removeQueryParameters)&&i.searchParams.delete(a);return t.sortQueryParameters&&i.searchParams.sort(),t.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,"")),e=i.toString(),(t.removeTrailingSlash||i.pathname==="/")&&i.hash===""&&(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e};VI.exports=w3;VI.exports.default=w3;var $ge=VI.exports;const Vl=$t($ge);function h$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tw(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:"left-to-right";Wge(this,e),this.canvases=t.map(function(i){return new ai(i)}),this.layers=n,this.viewingDirection=r,this._canvasDimensions=null}return zge(e,[{key:"canvasIds",get:function(){return this.canvases.map(function(n){return n.id})}},{key:"canvasDimensions",get:function(){if(this._canvasDimensions)return this._canvasDimensions;var n=v$(this.canvasDirection,2),r=n[0],i=n[1],a=i===0?Math.min.apply(Math,zp(this.canvases.map(function(f){return f.getHeight()}))):Math.min.apply(Math,zp(this.canvases.map(function(f){return f.getWidth()}))),o=0,s=0,l=this.canvases.reduce(function(f,d){var p=0,h=0;return isNaN(d.aspectRatio)||(i===0?(p=a,h=Math.floor(a*d.aspectRatio)):(h=a,p=Math.floor(a*(1/d.aspectRatio)))),f.push({canvas:d,height:p,width:h,x:o,y:s}),o+=r*h,s+=i*p,f},[]),u=i===0?a:Math.abs(s),c=r===0?a:Math.abs(o);return this._canvasDimensions=l.reduce(function(f,d){return f.push(Tw(Tw({},d),{},{x:r===-1?d.x+c-d.width:d.x,y:i===-1?d.y+u-d.height:d.y})),f},[]),this._canvasDimensions}},{key:"contentResourceToWorldCoordinates",value:function(n){var r=this.canvases.findIndex(function(d){return d.imageResources.find(function(p){return p.id===n.id})}),i=this.canvases[r];if(!i)return[];var a=this.canvasToWorldCoordinates(i.id),o=v$(a,4),s=o[0],l=o[1],u=o[2],c=o[3],f=i.onFragment(n.id);return f?[s+f[0],l+f[1],f[2],f[3]]:[s,l,u,c]}},{key:"canvasToWorldCoordinates",value:function(n){var r=this.canvasDimensions.find(function(i){return i.canvas.id===n});return[r.x,r.y,r.width,r.height]}},{key:"canvasDirection",get:function(){switch(this.viewingDirection){case"left-to-right":return[1,0];case"right-to-left":return[-1,0];case"top-to-bottom":return[0,1];case"bottom-to-top":return[0,-1];default:return[1,0]}}},{key:"contentResource",value:function(n){var r=this.canvases.find(function(i){return i.imageServiceIds.some(function(a){return Vl(a,{stripAuthentication:!1})===Vl(n,{stripAuthentication:!1})})});if(r)return r.imageResources.find(function(i){return Vl(i.getServices()[0].id,{stripAuthentication:!1})===Vl(n,{stripAuthentication:!1})})}},{key:"getLayerMetadata",value:function(n){if(this.layers){var r=this.canvases.find(function(s){return s.imageResources.find(function(l){return l.id===n.id})});if(r){var i=r.imageResources.findIndex(function(s){return s.id===n.id}),a=this.layers[r.canvas.id],o=a&&a[n.id];return Tw({index:i,opacity:1,total:r.imageResources.length,visibility:!0},o)}}}},{key:"layerOpacityOfImageResource",value:function(n){var r=this.getLayerMetadata(n);return r?r.visibility?r.opacity:0:1}},{key:"layerIndexOfImageResource",value:function(n){var r=this.getLayerMetadata(n);if(r)return r.total-r.index-1}},{key:"offsetByCanvas",value:function(n){var r=this.canvasToWorldCoordinates(n);return{x:r[0],y:r[1]}}},{key:"worldBounds",value:function(){var n=Math.max.apply(Math,zp(this.canvasDimensions.map(function(i){return i.x+i.width}))),r=Math.max.apply(Math,zp(this.canvasDimensions.map(function(i){return i.y+i.height})));return[0,0,n,r]}},{key:"canvasAtPoint",value:function(n){var r=this.canvasDimensions.find(function(i){return i.x<=n.x&&n.x<=i.x+i.width&&i.y<=n.y&&n.y<=i.y+i.height});return r&&r.canvas}}]),e}(),Bge=ge(ts,y3,xI,function(e,t,n){return new _3(e,t,n)});const Uge=Object.freeze(Object.defineProperty({__proto__:null,getAccessTokens:gy,getAllowedWindowViewTypes:ove,getAnnotationResourcesByMotivation:LI,getAnnotationResourcesByMotivationForCanvas:e3,getAnnotations:ly,getAuth:my,getAuthProfiles:b3,getCanvas:Za,getCanvasDescription:Qz,getCanvasForAnnotation:o3,getCanvasGrouping:$I,getCanvasGroupings:Hd,getCanvasIndex:qz,getCanvasLabel:Vd,getCanvasLayers:g3,getCanvases:es,getCatalog:Tpe,getCompanionAreaVisibility:hhe,getCompanionWindow:Qa,getCompanionWindowIdsForPosition:OI,getCompanionWindows:Fd,getCompanionWindowsForContent:phe,getCompanionWindowsForPosition:dhe,getConfig:dn,getContainerId:kz,getCurrentCanvas:sy,getCurrentCanvasWorld:Bge,getDefaultSidebarVariant:HI,getDestructuredMetadata:CI,getElasticLayout:Kz,getExpandedNodeIds:h3,getExportableState:Dhe,getFullScreenEnabled:Yz,getLanguagesFromConfigWithCurrent:Nhe,getLatestError:eve,getLayers:vy,getLayersForVisibleCanvases:y3,getManifest:Ds,getManifestAutocompleteService:Gz,getManifestDescription:Bz,getManifestError:Hhe,getManifestHomepage:Mz,getManifestLocale:nl,getManifestLogo:Lz,getManifestMetadata:Hz,getManifestProvider:Ghe,getManifestRelatedContent:Fz,getManifestRenderings:jz,getManifestSearchService:zd,getManifestStatus:Uhe,getManifestThumbnail:qhe,getManifestTitle:oy,getManifestUrl:Uz,getManifestoInstance:rn,getManifests:ay,getManuallyExpandedNodeIds:_u,getMaximizedWindowsIds:ave,getMetadataLocales:Vz,getNextCanvasGrouping:kI,getNextSearchId:t3,getNodeIdToScrollTo:v3,getPresentAnnotationsOnSelectedCanvases:NI,getPreviousCanvasGrouping:DI,getRequestsConfig:Dz,getRequiredStatement:Wz,getResourceAnnotationForSearchHit:hy,getResourceAnnotationLabel:a3,getRights:zz,getSearchAnnotationsForCompanionWindow:dy,getSearchAnnotationsForWindow:i3,getSearchForWindow:cy,getSearchIsFetching:jI,getSearchNumTotal:FI,getSearchQuery:fy,getSelectedAnnotationId:uy,getSelectedAnnotationsOnCanvases:yve,getSelectedContentSearchAnnotationIds:py,getSequence:Sa,getSequenceBehaviors:RI,getSequenceTreeStructure:Bd,getSequenceViewingDirection:xI,getSequenceViewingHint:PI,getSequences:TI,getShowZoomControlsConfig:Lhe,getSortedLayers:m3,getSortedSearchAnnotationsForCompanionWindow:zI,getSortedSearchHitsForCompanionWindow:WI,getTheme:$z,getThemeDirection:II,getThemeIds:Mhe,getThumbnailNavigationPosition:lhe,getViewer:Cpe,getVisibleCanvasAudioResources:fve,getVisibleCanvasCaptions:cve,getVisibleCanvasIds:Ji,getVisibleCanvasNonTiledResources:lve,getVisibleCanvasVideoResources:uve,getVisibleCanvases:ts,getVisibleNodeIds:UI,getWindow:pn,getWindowConfig:ec,getWindowDraggability:sve,getWindowIds:Iz,getWindowManifests:Ipe,getWindowTitles:ive,getWindowViewType:AI,getWindows:el,getWorkspace:tl,getWorkspaceType:Xz,isFocused:nve,miradorSlice:An,selectCompanionWindowDimensions:vhe,selectCurrentAuthServices:Oge,selectInfoResponse:Zz,selectInfoResponses:Ud,sortSearchAnnotationsByCanvasOrder:r3},Symbol.toStringTag,{value:"Module"}));function m$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pw(e){for(var t=1;t2&&arguments[2]!==void 0?arguments[2]:O3,r="cw-".concat(wi());return{id:r,payload:Pw(Pw(Pw({},n),t),{},{id:r,windowId:e}),type:q.ADD_COMPANION_WINDOW,windowId:e}}function C3(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O3;return function(r,i){var a=i(),o=t.position,s=o==="left"&&OI(a,{position:o,windowId:e})[0];r(s?tc(e,s,t):I3(e,t,n))}}function tc(e,t,n){return{id:t,payload:n,type:q.UPDATE_COMPANION_WINDOW,windowId:e}}function T3(e,t){return{id:t,type:q.REMOVE_COMPANION_WINDOW,windowId:e}}function P3(e,t,n){return function(r,i){var a=i(),o=_u(a,{companionWindowId:t},!1),s=_u(a,{companionWindowId:t},!0),l=UI(a,{id:t,windowId:e}),u=o.indexOf(n)!==-1||s.indexOf(n)===-1&&l.indexOf(n)===-1;return r({id:t,payload:E3({},n,{expanded:u}),type:q.TOGGLE_TOC_NODE,windowId:e})}}function y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bp(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ime(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function ame(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{pan:t,type:q.FOCUS_WINDOW,windowId:e}}function R3(e){var t=e.companionWindows,n=e.manifest,r=rme(e,Xge);return function(i,a){var o=An(a()),s=o.config,l=o.workspace.windowIds,u=l===void 0?[]:l,c=u.length,f=r.id||"window-".concat(wi()),d="cw-".concat(wi()),p=[{content:"thumbnailNavigation",default:!0,id:d,position:r.thumbnailNavigationPosition||s.thumbnailNavigation.defaultPosition,windowId:f}].concat(Zge((t||[]).map(function(w,m){return ml(ml({},w),{},{id:"cw-".concat(wi())})})));(r.sideBarPanel||s.window.defaultSideBarPanel||s.window.sideBarPanel)&&p.unshift({content:r.sideBarPanel||r.defaultSearchQuery&&"search"||s.window.defaultSideBarPanel||s.window.sideBarPanel,default:!0,id:"cw-".concat(wi()),position:"left",windowId:f});var h={canvasId:void 0,collectionIndex:0,companionAreaOpen:!0,companionWindowIds:p.map(function(w){return w.id}),draggingEnabled:!0,highlightAllAnnotations:s.window.highlightAllAnnotations||!1,id:f,manifestId:null,maximized:!1,rangeId:null,rotation:null,selectedAnnotations:{},sideBarOpen:s.window.sideBarOpenByDefault!==void 0?s.window.sideBarOpenByDefault||!!r.defaultSearchQuery:s.window.sideBarOpen||!!r.defaultSearchQuery,sideBarPanel:r.sideBarPanel||s.window.defaultSideBarPanel||s.window.sideBarPanel,thumbnailNavigationId:d},v=ml(ml({},s.window.elastic||{height:400,width:480}),{},{x:200+(Math.floor(c/10)*50+c*30%300),y:200+c*50%300});i({companionWindows:p,elasticLayout:v,manifest:n,type:q.ADD_WINDOW,window:ml(ml({},h),r)})}}function qd(e,t){return{id:e,payload:t,type:q.UPDATE_WINDOW}}function ome(e,t){return{type:q.MAXIMIZE_WINDOW,windowId:e}}function sme(e){return{type:q.MINIMIZE_WINDOW,windowId:e}}function lme(e,t){return{id:e,payload:{companionAreaOpen:t},type:q.UPDATE_WINDOW}}function ume(e){return{type:q.REMOVE_WINDOW,windowId:e}}function cme(e){return{type:q.TOGGLE_WINDOW_SIDE_BAR,windowId:e}}function fme(e,t){return function(n,r){var i=r(),a=i.windows,o=a[e].thumbnailNavigationId;n({id:o,payload:{position:t},type:q.UPDATE_COMPANION_WINDOW})}}function dme(e,t){return{type:q.SET_WINDOW_VIEW_TYPE,viewType:t,windowId:e}}function GI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return{collectionPath:t,manifestId:e,type:q.SHOW_COLLECTION_DIALOG,windowId:n}}function pme(e){return{type:q.HIDE_COLLECTION_DIALOG,windowId:e}}function w$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S$(e){for(var t=1;t2&&arguments[2]!==void 0?arguments[2]:void 0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return function(i,a){var o=a(),s=n;if(!s){var l=$I(o,{canvasId:t,windowId:e});s=(l||[]).map(function(u){return u.id})}i(E$(E$({},r),{},{canvasId:t,type:q.SET_CANVAS,visibleCanvases:s,windowId:e}))}}function j3(e){return function(t,n){var r=n(),i=kI(r,{windowId:e}),a=(i||[]).map(function(o){return o.id});i&&t(ma(e,a[0],a))}}function F3(e){return function(t,n){var r=n(),i=DI(r,{windowId:e}),a=(i||[]).map(function(o){return o.id});i&&t(ma(e,a[0],a))}}function bme(e,t){return{payload:t,type:q.UPDATE_VIEWPORT,windowId:e}}function wme(e){return{config:e,type:q.UPDATE_WORKSPACE}}function W3(e){return{isFullscreenEnabled:e,type:q.SET_WORKSPACE_FULLSCREEN}}function Sme(e){return{showZoomControls:e,type:q.TOGGLE_ZOOM_CONTROLS}}function _me(e){return{layout:e,type:q.UPDATE_WORKSPACE_MOSAIC_LAYOUT}}function Eme(e){return{isWorkspaceAddVisible:e,type:q.SET_WORKSPACE_ADD_VISIBILITY}}function z3(e){var t=e.x,n=e.y;return{payload:{position:{x:t,y:n}},type:q.SET_WORKSPACE_VIEWPORT_POSITION}}function Ome(e){var t=e.width,n=e.height;return{payload:{position:{height:n,width:t}},type:q.SET_WORKSPACE_VIEWPORT_POSITION}}function Ime(){return{type:q.TOGGLE_DRAGGING}}function B3(e,t){return{canvasId:t,type:q.REQUEST_CANVAS_ANNOTATIONS,windowId:e}}function S1(e,t){return{annotationId:t,targetId:e,type:q.REQUEST_ANNOTATION}}function qI(e,t,n){return{annotationId:t,annotationJson:n,targetId:e,type:q.RECEIVE_ANNOTATION}}function U3(e,t,n){return{annotationId:t,error:n,targetId:e,type:q.RECEIVE_ANNOTATION_FAILURE}}function nc(e,t){return{annotationId:t,type:q.SELECT_ANNOTATION,windowId:e}}function H3(e,t){return{annotationId:t,type:q.DESELECT_ANNOTATION,windowId:e}}function V3(e){return{type:q.TOGGLE_ANNOTATION_DISPLAY,windowId:e}}function G3(e,t){return{annotationIds:t,type:q.HOVER_ANNOTATION,windowId:e}}function O$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cme(e){for(var t=1;t2&&arguments[2]!==void 0?arguments[2]:void 0;return{id:t,profile:n,type:q.ADD_AUTHENTICATION_REQUEST,windowId:e}}function KI(e,t,n){return Cme({id:e,tokenServiceId:t,type:q.RESOLVE_AUTHENTICATION_REQUEST},n)}function YI(e,t){return{authId:t,serviceId:e,type:q.REQUEST_ACCESS_TOKEN}}function K3(e,t,n){return{authId:e,json:n,serviceId:t,type:q.RECEIVE_ACCESS_TOKEN}}function Y3(e,t,n){return{authId:e,error:n,serviceId:t,type:q.RECEIVE_ACCESS_TOKEN_FAILURE}}function Pme(e,t,n){return n.accessToken?K3(e,t,n):Y3(e,t,n)}function X3(e){var t=e.authServiceId,n=e.tokenServiceId;return{id:t,tokenServiceId:n,type:q.RESET_AUTHENTICATION_STATE}}function xme(e,t){return{payload:t,type:q.UPDATE_ELASTIC_WINDOW_LAYOUT,windowId:e}}function Q3(e,t,n,r){return{companionWindowId:t,query:r,searchId:n,type:q.REQUEST_SEARCH,windowId:e}}function Z3(e,t,n,r){return{companionWindowId:t,searchId:n,searchJson:r,type:q.RECEIVE_SEARCH,windowId:e}}function J3(e,t,n,r){return{companionWindowId:t,error:r,searchId:n,type:q.RECEIVE_SEARCH_FAILURE,windowId:e}}function e4(e,t){return{companionWindowId:t,type:q.REMOVE_SEARCH,windowId:e}}function Kd(e,t,n,r){return Q3(e,t,n,r)}function t4(e,t,n){return{annotationIds:n,companionWindowId:t,type:q.SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS,windowId:e}}function n4(e,t,n){return{canvasId:t,payload:n,type:q.UPDATE_LAYERS,windowId:e}}function Rme(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return{manifestId:e,manifestJson:t,payload:n,type:q.ADD_RESOURCE}}function Ame(e){return{manifestId:e,type:q.REMOVE_RESOURCE}}const Ha=Object.freeze(Object.defineProperty({__proto__:null,addAuthenticationRequest:q3,addCompanionWindow:I3,addError:Kge,addOrUpdateCompanionWindow:C3,addResource:Rme,addWindow:R3,deselectAnnotation:H3,fetchInfoResponse:M3,fetchManifest:vme,fetchSearch:Kd,focusWindow:ame,hideCollectionDialog:pme,hoverAnnotation:G3,importConfig:x3,importMiradorState:qge,maximizeWindow:ome,minimizeWindow:sme,receiveAccessToken:K3,receiveAccessTokenFailure:Y3,receiveAnnotation:qI,receiveAnnotationFailure:U3,receiveDegradedInfoResponse:N3,receiveInfoResponse:D3,receiveInfoResponseFailure:L3,receiveManifest:yy,receiveManifestFailure:$3,receiveSearch:Z3,receiveSearchFailure:J3,removeCompanionWindow:T3,removeError:Yge,removeInfoResponse:mme,removeManifest:gme,removeResource:Ame,removeSearch:e4,removeWindow:ume,requestAccessToken:YI,requestAnnotation:S1,requestCanvasAnnotations:B3,requestInfoResponse:k3,requestManifest:A3,requestSearch:Q3,resetAuthenticationState:X3,resolveAccessTokenRequest:Pme,resolveAuthenticationRequest:KI,selectAnnotation:nc,setCanvas:ma,setCompanionAreaOpen:lme,setConfig:Vge,setContentSearchCurrentAnnotation:t4,setNextCanvas:j3,setPreviousCanvas:F3,setWindowThumbnailPosition:fme,setWindowViewType:dme,setWorkspaceAddVisibility:Eme,setWorkspaceFullscreen:W3,setWorkspaceViewportDimensions:Ome,setWorkspaceViewportPosition:z3,showCollectionDialog:GI,toggleAnnotationDisplay:V3,toggleDraggingEnabled:Ime,toggleNode:P3,toggleWindowSideBar:cme,toggleZoomControls:Sme,updateCompanionWindow:tc,updateConfig:Gge,updateElasticWindowLayout:xme,updateLayers:n4,updateViewport:bme,updateWindow:qd,updateWorkspace:wme,updateWorkspaceMosaicLayout:_me},Symbol.toStringTag,{value:"Module"}));var $me=function(t){var n={};return t.shadows.forEach(function(r,i){n["elevation".concat(i)]={boxShadow:r}}),M({root:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},rounded:{borderRadius:t.shape.borderRadius},outlined:{border:"1px solid ".concat(t.palette.divider)}},n)},kme=b.forwardRef(function(t,n){var r=t.classes,i=t.className,a=t.component,o=a===void 0?"div":a,s=t.square,l=s===void 0?!1:s,u=t.elevation,c=u===void 0?1:u,f=t.variant,d=f===void 0?"elevation":f,p=Ge(t,["classes","className","component","square","elevation","variant"]);return b.createElement(o,M({className:Pe(r.root,i,d==="outlined"?r.outlined:r["elevation".concat(c)],!l&&r.rounded),ref:n},p))});const ad=ze($me,{name:"MuiPaper"})(kme);let Ci;typeof window<"u"?Ci=window:typeof self<"u"?Ci=self:Ci=global;let _1=null,E1=null;const I$=20,xw=Ci.clearTimeout,C$=Ci.setTimeout,Rw=Ci.cancelAnimationFrame||Ci.mozCancelAnimationFrame||Ci.webkitCancelAnimationFrame,T$=Ci.requestAnimationFrame||Ci.mozRequestAnimationFrame||Ci.webkitRequestAnimationFrame;Rw==null||T$==null?(_1=xw,E1=function(t){return C$(t,I$)}):(_1=function([t,n]){Rw(t),xw(n)},E1=function(t){const n=T$(function(){xw(r),t()}),r=C$(function(){Rw(n),t()},I$);return[n,r]});function Dme(e){let t,n,r,i,a,o,s;const l=typeof document<"u"&&document.attachEvent;if(!l){o=function(m){const g=m.__resizeTriggers__,y=g.firstElementChild,S=g.lastElementChild,_=y.firstElementChild;S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight,_.style.width=y.offsetWidth+1+"px",_.style.height=y.offsetHeight+1+"px",y.scrollLeft=y.scrollWidth,y.scrollTop=y.scrollHeight},a=function(m){return m.offsetWidth!==m.__resizeLast__.width||m.offsetHeight!==m.__resizeLast__.height},s=function(m){if(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)return;const g=this;o(this),this.__resizeRAF__&&_1(this.__resizeRAF__),this.__resizeRAF__=E1(function(){a(g)&&(g.__resizeLast__.width=g.offsetWidth,g.__resizeLast__.height=g.offsetHeight,g.__resizeListeners__.forEach(function(_){_.call(g,m)}))})};let d=!1,p="";r="animationstart";const h="Webkit Moz O ms".split(" ");let v="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),w="";{const m=document.createElement("fakeelement");if(m.style.animationName!==void 0&&(d=!0),d===!1){for(let g=0;g div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',h=d.head||d.getElementsByTagName("head")[0],v=d.createElement("style");v.id="detectElementResize",v.type="text/css",e!=null&&v.setAttribute("nonce",e),v.styleSheet?v.styleSheet.cssText=p:v.appendChild(d.createTextNode(p)),h.appendChild(v)}};return{addResizeListener:function(d,p){if(l)d.attachEvent("onresize",p);else{if(!d.__resizeTriggers__){const h=d.ownerDocument,v=Ci.getComputedStyle(d);v&&v.position==="static"&&(d.style.position="relative"),u(h),d.__resizeLast__={},d.__resizeListeners__=[],(d.__resizeTriggers__=h.createElement("div")).className="resize-triggers";const w=h.createElement("div");w.className="expand-trigger",w.appendChild(h.createElement("div"));const m=h.createElement("div");m.className="contract-trigger",d.__resizeTriggers__.appendChild(w),d.__resizeTriggers__.appendChild(m),d.appendChild(d.__resizeTriggers__),o(d),d.addEventListener("scroll",s,!0),r&&(d.__resizeTriggers__.__animationListener__=function(y){y.animationName===n&&o(d)},d.__resizeTriggers__.addEventListener(r,d.__resizeTriggers__.__animationListener__))}d.__resizeListeners__.push(p)}},removeResizeListener:function(d,p){if(l)d.detachEvent("onresize",p);else if(d.__resizeListeners__.splice(d.__resizeListeners__.indexOf(p),1),!d.__resizeListeners__.length){d.removeEventListener("scroll",s,!0),d.__resizeTriggers__.__animationListener__&&(d.__resizeTriggers__.removeEventListener(r,d.__resizeTriggers__.__animationListener__),d.__resizeTriggers__.__animationListener__=null);try{d.__resizeTriggers__=!d.removeChild(d.__resizeTriggers__)}catch{}}}}}class Nme extends b.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){var a,o,s,l;const u=window.getComputedStyle(this._parentNode)||{},c=parseFloat((a=u.paddingLeft)!==null&&a!==void 0?a:"0"),f=parseFloat((o=u.paddingRight)!==null&&o!==void 0?o:"0"),d=parseFloat((s=u.paddingTop)!==null&&s!==void 0?s:"0"),p=parseFloat((l=u.paddingBottom)!==null&&l!==void 0?l:"0"),h=this._parentNode.getBoundingClientRect(),v=h.height-d-p,w=h.width-c-f,m=this._parentNode.offsetHeight-d-p,g=this._parentNode.offsetWidth-c-f;(!n&&(this.state.height!==m||this.state.scaledHeight!==v)||!r&&(this.state.width!==g||this.state.scaledWidth!==w))&&(this.setState({height:m,width:g,scaledHeight:v,scaledWidth:w}),typeof i=="function"&&i({height:m,scaledHeight:v,scaledWidth:w,width:g}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=Dme(t),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:a=!1,nonce:o,onResize:s,style:l={},tagName:u="div",...c}=this.props,{height:f,scaledHeight:d,scaledWidth:p,width:h}=this.state,v={overflow:"visible"},w={};let m=!1;return i||(f===0&&(m=!0),v.height=0,w.height=f,w.scaledHeight=d),a||(h===0&&(m=!0),v.width=0,w.width=h,w.scaledWidth=p),b.createElement(u,{ref:this._setRef,style:{...v,...l},...c},!m&&t(w))}}var P$=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Lme(e,t){return!!(e===t||P$(e)&&P$(t))}function Mme(e,t){if(e.length!==t.length)return!1;for(var n=0;n=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var Aw=-1;function A$(e){if(e===void 0&&(e=!1),Aw===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Aw=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Aw}var yl=null;function $$(e){if(e===void 0&&(e=!1),yl===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?yl="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?yl="negative":yl="positive-ascending"),document.body.removeChild(t),yl}return yl}var Wme=150,zme=function(t,n){return t};function Bme(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(f){Js(d,f);function d(h){var v;return v=f.call(this,h)||this,v._instanceProps=l(v.props,Ri(v)),v._outerRef=void 0,v._resetIsScrollingTimeoutId=null,v.state={instance:Ri(v),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof v.props.initialScrollOffset=="number"?v.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},v._callOnItemsRendered=void 0,v._callOnItemsRendered=mn(function(w,m,g,y){return v.props.onItemsRendered({overscanStartIndex:w,overscanStopIndex:m,visibleStartIndex:g,visibleStopIndex:y})}),v._callOnScroll=void 0,v._callOnScroll=mn(function(w,m,g){return v.props.onScroll({scrollDirection:w,scrollOffset:m,scrollUpdateWasRequested:g})}),v._getItemStyle=void 0,v._getItemStyle=function(w){var m=v.props,g=m.direction,y=m.itemSize,S=m.layout,_=v._getItemStyleCache(u&&y,u&&S,u&&g),E;if(_.hasOwnProperty(w))E=_[w];else{var O=n(v.props,w,v._instanceProps),T=i(v.props,w,v._instanceProps),R=g==="horizontal"||S==="horizontal",$=g==="rtl",F=R?O:0;_[w]=E={position:"absolute",left:$?void 0:F,right:$?F:void 0,top:R?0:O,height:R?"100%":T,width:R?T:"100%"}}return E},v._getItemStyleCache=void 0,v._getItemStyleCache=mn(function(w,m,g){return{}}),v._onScrollHorizontal=function(w){var m=w.currentTarget,g=m.clientWidth,y=m.scrollLeft,S=m.scrollWidth;v.setState(function(_){if(_.scrollOffset===y)return null;var E=v.props.direction,O=y;if(E==="rtl")switch($$()){case"negative":O=-y;break;case"positive-descending":O=S-g-y;break}return O=Math.max(0,Math.min(O,S-g)),{isScrolling:!0,scrollDirection:_.scrollOffsetE.clientWidth?A$():0:_=E.scrollHeight>E.clientHeight?A$():0}this.scrollTo(a(this.props,v,w,S,this._instanceProps,_))},p.componentDidMount=function(){var v=this.props,w=v.direction,m=v.initialScrollOffset,g=v.layout;if(typeof m=="number"&&this._outerRef!=null){var y=this._outerRef;w==="horizontal"||g==="horizontal"?y.scrollLeft=m:y.scrollTop=m}this._callPropsCallbacks()},p.componentDidUpdate=function(){var v=this.props,w=v.direction,m=v.layout,g=this.state,y=g.scrollOffset,S=g.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var _=this._outerRef;if(w==="horizontal"||m==="horizontal")if(w==="rtl")switch($$()){case"negative":_.scrollLeft=-y;break;case"positive-ascending":_.scrollLeft=y;break;default:var E=_.clientWidth,O=_.scrollWidth;_.scrollLeft=O-E-y;break}else _.scrollLeft=y;else _.scrollTop=y}this._callPropsCallbacks()},p.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&R$(this._resetIsScrollingTimeoutId)},p.render=function(){var v=this.props,w=v.children,m=v.className,g=v.direction,y=v.height,S=v.innerRef,_=v.innerElementType,E=v.innerTagName,O=v.itemCount,T=v.itemData,R=v.itemKey,$=R===void 0?zme:R,F=v.layout,H=v.outerElementType,Y=v.outerTagName,Q=v.style,ne=v.useIsScrolling,J=v.width,ae=this.state.isScrolling,N=g==="horizontal"||F==="horizontal",D=N?this._onScrollHorizontal:this._onScrollVertical,k=this._getRangeToRender(),W=k[0],C=k[1],z=[];if(O>0)for(var L=W;L<=C;L++)z.push(b.createElement(w,{data:T,key:$(L,T),index:L,isScrolling:ne?ae:void 0,style:this._getItemStyle(L)}));var j=r(this.props,this._instanceProps);return b.createElement(H||Y||"div",{className:m,onScroll:D,ref:this._outerRefSetter,style:M({position:"relative",height:y,width:J,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:g},Q)},b.createElement(_||E||"div",{children:z,ref:S,style:{height:N?"100%":j,pointerEvents:ae?"none":void 0,width:N?j:"100%"}}))},p._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var v=this.props.itemCount;if(v>0){var w=this._getRangeToRender(),m=w[0],g=w[1],y=w[2],S=w[3];this._callOnItemsRendered(m,g,y,S)}}if(typeof this.props.onScroll=="function"){var _=this.state,E=_.scrollDirection,O=_.scrollOffset,T=_.scrollUpdateWasRequested;this._callOnScroll(E,O,T)}},p._getRangeToRender=function(){var v=this.props,w=v.itemCount,m=v.overscanCount,g=this.state,y=g.isScrolling,S=g.scrollDirection,_=g.scrollOffset;if(w===0)return[0,0,0,0];var E=o(this.props,_,this._instanceProps),O=s(this.props,E,_,this._instanceProps),T=!y||S==="backward"?Math.max(1,m):1,R=!y||S==="forward"?Math.max(1,m):1;return[Math.max(0,E-T),Math.max(0,Math.min(w-1,O+R)),E,O]},d}(b.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ume=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},Hme=50,Gl=function(t,n,r){var i=t,a=i.itemSize,o=r.itemMetadataMap,s=r.lastMeasuredIndex;if(n>s){var l=0;if(s>=0){var u=o[s];l=u.offset+u.size}for(var c=s+1;c<=n;c++){var f=a(c);o[c]={offset:l,size:f},l+=f}r.lastMeasuredIndex=n}return o[n]},Vme=function(t,n,r){var i=n.itemMetadataMap,a=n.lastMeasuredIndex,o=a>0?i[a].offset:0;return o>=r?r4(t,n,a,0,r):Gme(t,n,Math.max(0,a),r)},r4=function(t,n,r,i,a){for(;i<=r;){var o=i+Math.floor((r-i)/2),s=Gl(t,o,n).offset;if(s===a)return o;sa&&(r=o-1)}return i>0?i-1:0},Gme=function(t,n,r,i){for(var a=t.itemCount,o=1;r=r&&(o=r-1),o>=0){var l=i[o];s=l.offset+l.size}var u=r-o-1,c=u*a;return s+c},qme=Bme({getItemOffset:function(t,n,r){return Gl(t,n,r).offset},getItemSize:function(t,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:k$,getOffsetForIndexAndAlignment:function(t,n,r,i,a,o){var s=t.direction,l=t.height,u=t.layout,c=t.width,f=s==="horizontal"||u==="horizontal",d=f?c:l,p=Gl(t,n,a),h=k$(t,a),v=Math.max(0,Math.min(h-d,p.offset)),w=Math.max(0,p.offset-d+p.size+o);switch(r==="smart"&&(i>=w-d&&i<=v+d?r="auto":r="center"),r){case"start":return v;case"end":return w;case"center":return Math.round(w+(v-w)/2);case"auto":default:return i>=w&&i<=v?i:i0}});return}var e=window.document,t=[],n=null,r=null;function i(g){this.time=g.time,this.target=g.target,this.rootBounds=p(g.rootBounds),this.boundingClientRect=p(g.boundingClientRect),this.intersectionRect=p(g.intersectionRect||d()),this.isIntersecting=!!g.intersectionRect;var y=this.boundingClientRect,S=y.width*y.height,_=this.intersectionRect,E=_.width*_.height;S?this.intersectionRatio=Number((E/S).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function a(g,y){var S=y||{};if(typeof g!="function")throw new Error("callback must be a function");if(S.root&&S.root.nodeType!=1)throw new Error("root must be an Element");this._checkForIntersections=s(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=g,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(S.rootMargin),this.thresholds=this._initThresholds(S.threshold),this.root=S.root||null,this.rootMargin=this._rootMarginValues.map(function(_){return _.value+_.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}a.prototype.THROTTLE_TIMEOUT=100,a.prototype.POLL_INTERVAL=null,a.prototype.USE_MUTATION_OBSERVER=!0,a._setupCrossOriginUpdater=function(){return n||(n=function(g,y){!g||!y?r=d():r=h(g,y),t.forEach(function(S){S._checkForIntersections()})}),n},a._resetCrossOriginUpdater=function(){n=null,r=null},a.prototype.observe=function(g){var y=this._observationTargets.some(function(S){return S.element==g});if(!y){if(!(g&&g.nodeType==1))throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:g,entry:null}),this._monitorIntersections(g.ownerDocument),this._checkForIntersections()}},a.prototype.unobserve=function(g){this._observationTargets=this._observationTargets.filter(function(y){return y.element!=g}),this._unmonitorIntersections(g.ownerDocument),this._observationTargets.length==0&&this._unregisterInstance()},a.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},a.prototype.takeRecords=function(){var g=this._queuedEntries.slice();return this._queuedEntries=[],g},a.prototype._initThresholds=function(g){var y=g||[0];return Array.isArray(y)||(y=[y]),y.sort().filter(function(S,_,E){if(typeof S!="number"||isNaN(S)||S<0||S>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return S!==E[_-1]})},a.prototype._parseRootMargin=function(g){var y=g||"0px",S=y.split(/\s+/).map(function(_){var E=/^(-?\d*\.?\d+)(px|%)$/.exec(_);if(!E)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(E[1]),unit:E[2]}});return S[1]=S[1]||S[0],S[2]=S[2]||S[0],S[3]=S[3]||S[1],S},a.prototype._monitorIntersections=function(g){var y=g.defaultView;if(y&&this._monitoringDocuments.indexOf(g)==-1){var S=this._checkForIntersections,_=null,E=null;if(this.POLL_INTERVAL?_=y.setInterval(S,this.POLL_INTERVAL):(l(y,"resize",S,!0),l(g,"scroll",S,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in y&&(E=new y.MutationObserver(S),E.observe(g,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))),this._monitoringDocuments.push(g),this._monitoringUnsubscribes.push(function(){var T=g.defaultView;T&&(_&&T.clearInterval(_),u(T,"resize",S,!0)),u(g,"scroll",S,!0),E&&E.disconnect()}),g!=(this.root&&this.root.ownerDocument||e)){var O=m(g);O&&this._monitorIntersections(O.ownerDocument)}}},a.prototype._unmonitorIntersections=function(g){var y=this._monitoringDocuments.indexOf(g);if(y!=-1){var S=this.root&&this.root.ownerDocument||e,_=this._observationTargets.some(function(T){var R=T.element.ownerDocument;if(R==g)return!0;for(;R&&R!=S;){var $=m(R);if(R=$&&$.ownerDocument,R==g)return!0}return!1});if(!_){var E=this._monitoringUnsubscribes[y];if(this._monitoringDocuments.splice(y,1),this._monitoringUnsubscribes.splice(y,1),E(),g!=S){var O=m(g);O&&this._unmonitorIntersections(O.ownerDocument)}}}},a.prototype._unmonitorAllIntersections=function(){var g=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var y=0;y=0&&R>=0&&{top:S,bottom:_,left:E,right:O,width:T,height:R}||null}function f(g){var y;try{y=g.getBoundingClientRect()}catch{}return y?(y.width&&y.height||(y={top:y.top,right:y.right,bottom:y.bottom,left:y.left,width:y.right-y.left,height:y.bottom-y.top}),y):d()}function d(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function p(g){return!g||"x"in g?g:{top:g.top,y:g.top,bottom:g.bottom,left:g.left,x:g.left,right:g.right,width:g.width,height:g.height}}function h(g,y){var S=y.top-g.top,_=y.left-g.left;return{top:S,left:_,height:y.height,width:y.width,bottom:S+y.height,right:_+y.width}}function v(g,y){for(var S=y;S;){if(S==g)return!0;S=w(S)}return!1}function w(g){var y=g.parentNode;return g.nodeType==9&&g!=e?m(g):y&&y.nodeType==11&&y.host?y.host:y&&y.assignedSlot?y.assignedSlot.parentNode:y}function m(g){try{return g.defaultView&&g.defaultView.frameElement||null}catch{return null}}window.IntersectionObserver=a,window.IntersectionObserverEntry=i})();function mt(e){if(typeof e!="string")throw new Error(Bs(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Yme=function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},D$={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Xme=b.forwardRef(function(t,n){var r=t.align,i=r===void 0?"inherit":r,a=t.classes,o=t.className,s=t.color,l=s===void 0?"initial":s,u=t.component,c=t.display,f=c===void 0?"initial":c,d=t.gutterBottom,p=d===void 0?!1:d,h=t.noWrap,v=h===void 0?!1:h,w=t.paragraph,m=w===void 0?!1:w,g=t.variant,y=g===void 0?"body1":g,S=t.variantMapping,_=S===void 0?D$:S,E=Ge(t,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),O=u||(m?"p":_[y]||D$[y])||"span";return b.createElement(O,M({className:Pe(a.root,o,y!=="inherit"&&a[y],l!=="initial"&&a["color".concat(mt(l))],v&&a.noWrap,p&&a.gutterBottom,m&&a.paragraph,i!=="inherit"&&a["align".concat(mt(i))],f!=="initial"&&a["display".concat(mt(f))]),ref:n},E))});const ut=ze(Yme,{name:"MuiTypography"})(Xme);var O1,Qme=/^-?\d*\.?\d+(px|%)$/;function Zme(e){var t=e?e.trim():"0px",n=t.split(/\s+/).map(function(c){if(!Qme.test(c))throw new Error("rootMargin must be a string literal containing pixels and/or percent values");return c}),r=n.shift(),i=n[0],a=i===void 0?r:i,o=n[1],s=o===void 0?r:o,l=n[2],u=l===void 0?a:l;return r+" "+a+" "+s+" "+u}function XI(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length?e.some(function(n,r){return XI(e[r],t[r])}):e!==t}var a4=(O1=Object.prototype,O1.hasOwnProperty),Jme=O1.toString;function eye(e){return e&&a4.call(e,"ref")}var Ma=new Map;function tye(e){e===void 0&&(e={});for(var t=e.root||null,n=Zme(e.rootMargin),r=Array.isArray(e.threshold)?e.threshold:[e.threshold!=null?e.threshold:0],i=Ma.keys(),a;a=i.next().value;){var o=t!==a.root||n!==a.rootMargin||XI(r,a.thresholds);if(!o)return a}return null}function nye(e,t){var n=Ma.get(e);if(n){for(var r=n.values(),i=void 0;i=r.next().value;)if(i.target===t.target)return i}return null}function rye(e,t){for(var n=0;n0?e.observer.unobserve(t):(e.observer.disconnect(),Ma.delete(e.observer)))}}var sye=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lye=["root","rootMargin","threshold"],uye=["root","rootMargin","threshold","disabled"],cye=function(e){return lye.reduce(function(t,n){var r,i=n==="root"&&Jme.call(e.root)==="[object String]";return Object.assign(t,(r={},r[n]=i?document.querySelector(e[n]):e[n],r))},{})},fye=function(e){sye(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.handleChange=function(r){n.props.onChange(r,n.externalUnobserve)},n.handleNode=function(r){var i=n.props.children;if(eye(i)){var a=i.ref;typeof a=="function"?a(r):a&&a4.call(a,"current")&&(a.current=r)}if(n.targetNode=void 0,r){var o=Xn.findDOMNode(r);o&&o.nodeType===1&&(n.targetNode=o)}},n.observe=function(){if(n.props.children==null||n.props.disabled)return!1;if(!n.targetNode)throw new Error("ReactIntersectionObserver: Can't find DOM node in the provided children. Make sure to render at least one DOM node in the tree.");return n.observer=iye(cye(n.props)),n.target=n.targetNode,aye(n),!0},n.unobserve=function(r){oye(n,r)},n.externalUnobserve=function(){n.targetNode&&n.unobserve(n.targetNode)},n}return t.prototype.getSnapshotBeforeUpdate=function(n){var r=this;this.prevTargetNode=this.targetNode;var i=uye.some(function(a){return XI(r.props[a],n[a])});return i&&this.prevTargetNode&&(n.disabled||this.unobserve(this.prevTargetNode)),i},t.prototype.componentDidUpdate=function(n,r,i){var a=!1;i||(a=this.prevTargetNode!==this.targetNode,a&&this.prevTargetNode!=null&&this.unobserve(this.prevTargetNode)),(i||a)&&this.observe()},t.prototype.componentDidMount=function(){this.observe()},t.prototype.componentWillUnmount=function(){this.targetNode&&this.unobserve(this.targetNode)},t.prototype.render=function(){var n=this.props.children;return n!=null?I.cloneElement(I.Children.only(n),{ref:this.handleNode}):null},t.displayName="IntersectionObserver",t}(I.Component);function N$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}var s4=function(e){hye(n,e);var t=vye(n);function n(r){var i;return dye(this,n),i=t.call(this,r),i.state={loaded:!1},i.handleIntersection=i.handleIntersection.bind(o4(i)),i}return pye(n,[{key:"componentDidMount",value:function(){var i=this;this.setState(function(a){return ui(ui({},a),{},{image:i.image()})})}},{key:"componentDidUpdate",value:function(i){var a=this,o=this.props,s=o.maxHeight,l=o.maxWidth,u=o.resource;(i.maxHeight!==s||i.maxWidth!==l||i.resource!==u)&&this.setState(function(c){return ui(ui({},c),{},{image:a.image()})})}},{key:"handleIntersection",value:function(i){var a=this.state.loaded;a||!i.isIntersecting||this.setState(function(o){return ui(ui({},o),{},{loaded:!0})})}},{key:"imageStyles",value:function(){var i=this.props,a=i.maxHeight,o=i.maxWidth,s=i.style,l=this.image(),u={height:"auto",width:"auto"};if(!l)return ui(ui({},s),{},{height:a||"auto",width:o||"auto"});var c=l.height,f=l.width;if(c&&f)if(a&&c>a||o&&f>o){var d=f/c;a&&o?o/a0?i.getLabel().getValue():String(a+1)}}]),n}(b.Component);s4.defaultProps={children:null,classes:{},imagePlaceholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mMMDQmtBwADgwF/Op8FmAAAAABJRU5ErkJggg==",label:void 0,labelled:!1,maxHeight:null,maxWidth:null,style:{},thumbnail:null,thumbnailsConfig:{},variant:null};var yye=function(t){return{thumbnailsConfig:dn(t).thumbnails}},bye=function(t){return{caption:{lineHeight:"1.5em",wordBreak:"break-word"},image:{},insideCaption:{color:"#ffffff",lineClamp:"1",whiteSpace:"nowrap"},insideLabel:{background:"linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%)",bottom:"5px",boxSizing:"border-box",left:"0px",padding:"4px",position:"absolute",width:"100%"},insideRoot:{display:"inline-block",height:"inherit",position:"relative"},label:{overflow:"hidden",textOverflow:"ellipsis"},outsideCaption:{boxOrient:"vertical",display:"-webkit-box",lineClamp:"2",maxHeight:"3em"},outsideLabel:{},outsideRoot:{},root:{}}},wye=_t(ze(bye),Ft(),kt(yye),Bt("IIIFThumbnail"));const by=wye(s4);var Sye=function(t){return wt([t]).map(function(n){return[Hs.createGenerateClassNameOptions.productionPrefix,n].join("-")}).join(" ")};const mr=Sye;function M$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j$(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}var Pye=function(e){Oye(n,e);var t=Iye(n);function n(r){var i;return _ye(this,n),i=t.call(this,r),i.setCanvas=i.setCanvas.bind(u4(i)),i}return Eye(n,[{key:"setCanvas",value:function(i){var a=this.props.setCanvas;a(i.currentTarget.dataset.canvasId)}},{key:"currentCanvasClass",value:function(i){var a=this.props.index;return i.includes(a)?"current-canvas-grouping":""}},{key:"render",value:function(){var i=this.props,a=i.index,o=i.style,s=i.data,l=i.classes,u=i.currentCanvasId,c=s.canvasGroupings,f=s.position,d=s.height,p=c[a],h=8;return I.createElement("div",{style:j$(j$({},o),{},{boxSizing:"content-box",height:Number.isInteger(o.height)?o.height-h:null,left:o.left+h,top:o.top+h,width:Number.isInteger(o.width)?o.width-h:null}),className:mr("thumbnail-nav-container"),role:"gridcell","aria-colindex":a+1},I.createElement("div",{role:"button","data-canvas-id":p[0].id,"data-canvas-index":p[0].index,onKeyUp:this.setCanvas,onClick:this.setCanvas,tabIndex:-1,style:{height:f==="far-right"?"auto":"".concat(d-h,"px"),width:f==="far-bottom"?"auto":"".concat(o.width,"px")},className:La(mr(["thumbnail-nav-canvas","thumbnail-nav-canvas-".concat(a),this.currentCanvasClass(p.map(function(v){return v.index}))]),l.canvas,l4({},l.currentCanvas,p.map(function(v){return v.id}).includes(u)))},p.map(function(v,w){return I.createElement(by,{key:v.id,resource:v,labelled:!0,maxHeight:f==="far-right"?o.height-1.5*h:d-1.5*h,variant:"inside"})})))}}]),n}(b.PureComponent),xye=function(t,n){var r=n.data;return{setCanvas:function(){for(var a=arguments.length,o=new Array(a),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}var c4=function(e){Lye(n,e);var t=Mye(n);function n(r){var i;return Dye(this,n),i=t.call(this,r),i.scrollbarSize=15,i.spacing=8,i.calculateScaledSize=i.calculateScaledSize.bind(Tl(i)),i.itemCount=i.itemCount.bind(Tl(i)),i.handleKeyUp=i.handleKeyUp.bind(Tl(i)),i.nextCanvas=i.nextCanvas.bind(Tl(i)),i.previousCanvas=i.previousCanvas.bind(Tl(i)),i.gridRef=I.createRef(),i}return Nye(n,[{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.canvasIndex,s=a.position,l=a.view;if(i.view!==l&&s!=="off"&&this.gridRef.current.resetAfterIndex(0),i.canvasIndex!==o){var u=o;l==="book"&&(u=Math.ceil(u/2)),this.gridRef.current.scrollToItem(u,"center")}}},{key:"handleKeyUp",value:function(i){var a=this.props.position,o="ArrowRight",s="ArrowLeft";switch(a==="far-right"&&(o="ArrowDown",s="ArrowUp"),i.key){case o:this.nextCanvas();break;case s:this.previousCanvas();break}}},{key:"calculateScaledSize",value:function(i){var a=this.props,o=a.thumbnailNavigation,s=a.canvasGroupings,l=a.position,u=s[i]||[],c=new _3(u),f=c.worldBounds();switch(l){case"far-right":{var d=Math.floor(this.calculatingWidth(u.length)*f[3]/f[2]);return Number.isInteger(d)?d+this.spacing:o.width+this.spacing}default:{if(f[3]===0)return o.width+this.spacing;var p=Math.ceil((o.height-this.scrollbarSize-this.spacing-4)*f[2]/f[3]);return p}}}},{key:"calculatingWidth",value:function(i){var a=this.props.thumbnailNavigation;return i===1?a.width:a.width*2}},{key:"rightWidth",value:function(){var i=this.props,a=i.view,o=i.thumbnailNavigation;switch(a){case"book":return o.width*2;default:return o.width}}},{key:"style",value:function(){var i=this.props,a=i.position,o=i.thumbnailNavigation;switch(a){case"far-right":return{height:"100%",minHeight:0,width:"".concat(this.rightWidth()+this.scrollbarSize+this.spacing,"px")};default:return{height:"".concat(o.height,"px"),width:"100%"}}}},{key:"areaHeight",value:function(i){var a=this.props,o=a.position,s=a.thumbnailNavigation;switch(o){case"far-right":return i;default:return s.height}}},{key:"itemCount",value:function(){var i=this.props.canvasGroupings;return i.length}},{key:"nextCanvas",value:function(){var i=this.props,a=i.hasNextCanvas,o=i.setNextCanvas;a&&o()}},{key:"previousCanvas",value:function(){var i=this.props,a=i.hasPreviousCanvas,o=i.setPreviousCanvas;a&&o()}},{key:"render",value:function(){var i=this,a=this.props,o=a.t,s=a.canvasGroupings,l=a.classes,u=a.position,c=a.thumbnailNavigation,f=a.viewingDirection,d=a.windowId;if(u==="off")return I.createElement(I.Fragment,null);var p=f==="right-to-left"?"rtl":"ltr",h={canvasGroupings:s,height:c.height-this.spacing-this.scrollbarSize,position:u,windowId:d};return I.createElement(ad,{className:La(mr("thumb-navigation"),l.thumbNavigation),"aria-label":o("thumbnailNavigation"),square:!0,elevation:0,style:this.style(),tabIndex:0,onKeyUp:this.handleKeyUp,role:"grid"},I.createElement("div",{role:"row",style:{height:"100%",width:"100%"}},I.createElement(Nme,{defaultHeight:100,defaultWidth:400},function(v){var w=v.height,m=v.width;return I.createElement(qme,{direction:p,height:i.areaHeight(w),itemCount:i.itemCount(),itemSize:i.calculateScaledSize,width:m,layout:u==="far-bottom"?"horizontal":"vertical",itemData:h,ref:i.gridRef},kye)})))}}]),n}(b.Component);c4.defaultProps={hasNextCanvas:!1,hasPreviousCanvas:!1,setNextCanvas:function(){},setPreviousCanvas:function(){},view:void 0,viewingDirection:""};var Wye=function(t,n){var r=n.windowId;return{canvasGroupings:Hd(t,{windowId:r}),canvasIndex:qz(t,{windowId:r}),hasNextCanvas:!!kI(t,{windowId:r}),hasPreviousCanvas:!!DI(t,{windowId:r}),position:Qa(t,{companionWindowId:pn(t,{windowId:r}).thumbnailNavigationId}).position,thumbnailNavigation:dn(t).thumbnailNavigation,view:AI(t,{windowId:r}),viewingDirection:xI(t,{windowId:r})}},zye=function(t,n){var r=n.windowId;return{setNextCanvas:function(){return t(j3(r))},setPreviousCanvas:function(){return t(F3(r))}}},Bye=function(t){return{thumbNavigation:{"&:focus":{boxShadow:0,outline:0}}}},Uye=_t(ze(Bye),Ft(),kt(Wye,zye),Bt("ThumbnailNavigation"));const Hye=Uye(c4);var QI={},f4={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(f4);var yn=f4.exports,d4={exports:{}},p4={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(p4);var h4=p4.exports;(function(e){var t=h4.default;function n(i){if(typeof WeakMap!="function")return null;var a=new WeakMap,o=new WeakMap;return(n=function(l){return l?o:a})(i)}function r(i,a){if(!a&&i&&i.__esModule)return i;if(i===null||t(i)!="object"&&typeof i!="function")return{default:i};var o=n(a);if(o&&o.has(i))return o.get(i);var s={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(u!=="default"&&Object.prototype.hasOwnProperty.call(i,u)){var c=l?Object.getOwnPropertyDescriptor(i,u):null;c&&(c.get||c.set)?Object.defineProperty(s,u,c):s[u]=i[u]}return s.default=i,o&&o.set(i,s),s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(d4);var bn=d4.exports,$w={};function Eu(){for(var e=arguments.length,t=new Array(e),n=0;n1&&arguments[1]!==void 0?arguments[1]:166,n;function r(){for(var i=arguments.length,a=new Array(i),o=0;ov?"".concat(v,"+"):a),b.createElement(d,M({className:Pe(s.root,l),ref:n},E),o,b.createElement("span",{className:Pe(s.badge,s["".concat(i.horizontal).concat(mt(i.vertical),"}")],s["anchorOrigin".concat(mt(i.vertical)).concat(mt(i.horizontal)).concat(mt(m))],c!=="default"&&s["color".concat(mt(c))],O&&s.invisible,_==="dot"&&s.dot)},T))});const mbe=ze(vbe,{name:"MuiBadge"})(gbe),H$={disabled:!1},Wv=I.createContext(null);var ybe=function(t){return t.scrollTop},Xc="unmounted",ds="exited",ps="entering",Pl="entered",x1="exiting",Ja=function(e){Js(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=i,s=o&&!o.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?s?(l=ds,a.appearStatus=ps):l=Pl:r.unmountOnExit||r.mountOnEnter?l=Xc:l=ds,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===Xc?{status:ds}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==ps&&o!==Pl&&(a=ps):(o===ps||o===Pl)&&(a=x1)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===ps){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Oo.findDOMNode(this);o&&ybe(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ds&&this.setState({status:Xc})},n.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Oo.findDOMNode(this),s],u=l[0],c=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!i&&!o||H$.disabled){this.safeSetState({status:Pl},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:ps},function(){a.props.onEntering(u,c),a.onTransitionEnd(d,function(){a.safeSetState({status:Pl},function(){a.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Oo.findDOMNode(this);if(!a||H$.disabled){this.safeSetState({status:ds},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:x1},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:ds},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:Oo.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Xc)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=ga(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return I.createElement(Wv.Provider,{value:null},typeof o=="function"?o(i,s):I.cloneElement(I.Children.only(o),s))},t}(I.Component);Ja.contextType=Wv;Ja.propTypes={};function bl(){}Ja.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bl,onEntering:bl,onEntered:bl,onExit:bl,onExiting:bl,onExited:bl};Ja.UNMOUNTED=Xc;Ja.EXITED=ds;Ja.ENTERING=ps;Ja.ENTERED=Pl;Ja.EXITING=x1;const g4=Ja;function nC(e,t){var n=function(a){return t&&b.isValidElement(a)?t(a):a},r=Object.create(null);return e&&b.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function bbe(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var l in t){if(r[l])for(o=0;o"u"?b.useEffect:b.useLayoutEffect;function Cbe(e){var t=e.classes,n=e.pulsate,r=n===void 0?!1:n,i=e.rippleX,a=e.rippleY,o=e.rippleSize,s=e.in,l=e.onExited,u=l===void 0?function(){}:l,c=e.timeout,f=b.useState(!1),d=f[0],p=f[1],h=Pe(t.ripple,t.rippleVisible,r&&t.ripplePulsate),v={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},w=Pe(t.child,d&&t.childLeaving,r&&t.childPulsate),m=Qt(u);return Ibe(function(){if(!s){p(!0);var g=setTimeout(m,c);return function(){clearTimeout(g)}}},[m,s,c]),b.createElement("span",{className:h,style:v},b.createElement("span",{className:w}))}var R1=550,Tbe=80,Pbe=function(t){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(R1,"ms ").concat(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(R1,"ms ").concat(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},xbe=b.forwardRef(function(t,n){var r=t.center,i=r===void 0?!1:r,a=t.classes,o=t.className,s=Ge(t,["center","classes","className"]),l=b.useState([]),u=l[0],c=l[1],f=b.useRef(0),d=b.useRef(null);b.useEffect(function(){d.current&&(d.current(),d.current=null)},[u]);var p=b.useRef(!1),h=b.useRef(null),v=b.useRef(null),w=b.useRef(null);b.useEffect(function(){return function(){clearTimeout(h.current)}},[]);var m=b.useCallback(function(_){var E=_.pulsate,O=_.rippleX,T=_.rippleY,R=_.rippleSize,$=_.cb;c(function(F){return[].concat(Km(F),[b.createElement(Cbe,{key:f.current,classes:a,timeout:R1,pulsate:E,rippleX:O,rippleY:T,rippleSize:R})])}),f.current+=1,d.current=$},[a]),g=b.useCallback(function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=arguments.length>2?arguments[2]:void 0,T=E.pulsate,R=T===void 0?!1:T,$=E.center,F=$===void 0?i||E.pulsate:$,H=E.fakeElement,Y=H===void 0?!1:H;if(_.type==="mousedown"&&p.current){p.current=!1;return}_.type==="touchstart"&&(p.current=!0);var Q=Y?null:w.current,ne=Q?Q.getBoundingClientRect():{width:0,height:0,left:0,top:0},J,ae,N;if(F||_.clientX===0&&_.clientY===0||!_.clientX&&!_.touches)J=Math.round(ne.width/2),ae=Math.round(ne.height/2);else{var D=_.touches?_.touches[0]:_,k=D.clientX,W=D.clientY;J=Math.round(k-ne.left),ae=Math.round(W-ne.top)}if(F)N=Math.sqrt((2*Math.pow(ne.width,2)+Math.pow(ne.height,2))/3),N%2===0&&(N+=1);else{var C=Math.max(Math.abs((Q?Q.clientWidth:0)-J),J)*2+2,z=Math.max(Math.abs((Q?Q.clientHeight:0)-ae),ae)*2+2;N=Math.sqrt(Math.pow(C,2)+Math.pow(z,2))}_.touches?v.current===null&&(v.current=function(){m({pulsate:R,rippleX:J,rippleY:ae,rippleSize:N,cb:O})},h.current=setTimeout(function(){v.current&&(v.current(),v.current=null)},Tbe)):m({pulsate:R,rippleX:J,rippleY:ae,rippleSize:N,cb:O})},[i,m]),y=b.useCallback(function(){g({},{pulsate:!0})},[g]),S=b.useCallback(function(_,E){if(clearTimeout(h.current),_.type==="touchend"&&v.current){_.persist(),v.current(),v.current=null,h.current=setTimeout(function(){S(_,E)});return}v.current=null,c(function(O){return O.length>0?O.slice(1):O}),d.current=E},[]);return b.useImperativeHandle(n,function(){return{pulsate:y,start:g,stop:S}},[y,g,S]),b.createElement("span",M({className:Pe(a.root,o),ref:w},s),b.createElement(Obe,{component:null,exit:!0},u))});const Rbe=ze(Pbe,{flip:!1,name:"MuiTouchRipple"})(b.memo(xbe));var Abe={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},$be=b.forwardRef(function(t,n){var r=t.action,i=t.buttonRef,a=t.centerRipple,o=a===void 0?!1:a,s=t.children,l=t.classes,u=t.className,c=t.component,f=c===void 0?"button":c,d=t.disabled,p=d===void 0?!1:d,h=t.disableRipple,v=h===void 0?!1:h,w=t.disableTouchRipple,m=w===void 0?!1:w,g=t.focusRipple,y=g===void 0?!1:g,S=t.focusVisibleClassName,_=t.onBlur,E=t.onClick,O=t.onFocus,T=t.onFocusVisible,R=t.onKeyDown,$=t.onKeyUp,F=t.onMouseDown,H=t.onMouseLeave,Y=t.onMouseUp,Q=t.onTouchEnd,ne=t.onTouchMove,J=t.onTouchStart,ae=t.onDragLeave,N=t.tabIndex,D=N===void 0?0:N,k=t.TouchRippleProps,W=t.type,C=W===void 0?"button":W,z=Ge(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),L=b.useRef(null);function j(){return Xn.findDOMNode(L.current)}var x=b.useRef(null),B=b.useState(!1),te=B[0],V=B[1];p&&te&&V(!1);var Z=Yd(),ce=Z.isFocusVisible,P=Z.onBlurVisible,A=Z.ref;b.useImperativeHandle(r,function(){return{focusVisible:function(){V(!0),L.current.focus()}}},[]),b.useEffect(function(){te&&y&&!v&&x.current.pulsate()},[v,y,te]);function U(be,Qe){var Be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m;return Qt(function(Et){Qe&&Qe(Et);var Ot=Be;return!Ot&&x.current&&x.current[be](Et),!0})}var ee=U("start",F),K=U("stop",ae),X=U("stop",Y),oe=U("stop",function(be){te&&be.preventDefault(),H&&H(be)}),ie=U("start",J),se=U("stop",Q),re=U("stop",ne),le=U("stop",function(be){te&&(P(be),V(!1)),_&&_(be)},!1),ue=Qt(function(be){L.current||(L.current=be.currentTarget),ce(be)&&(V(!0),T&&T(be)),O&&O(be)}),de=function(){var Qe=j();return f&&f!=="button"&&!(Qe.tagName==="A"&&Qe.href)},xe=b.useRef(!1),Ee=Qt(function(be){y&&!xe.current&&te&&x.current&&be.key===" "&&(xe.current=!0,be.persist(),x.current.stop(be,function(){x.current.start(be)})),be.target===be.currentTarget&&de()&&be.key===" "&&be.preventDefault(),R&&R(be),be.target===be.currentTarget&&de()&&be.key==="Enter"&&!p&&(be.preventDefault(),E&&E(be))}),Fe=Qt(function(be){y&&be.key===" "&&x.current&&te&&!be.defaultPrevented&&(xe.current=!1,be.persist(),x.current.stop(be,function(){x.current.pulsate(be)})),$&&$(be),E&&be.target===be.currentTarget&&de()&&be.key===" "&&!be.defaultPrevented&&E(be)}),Ce=f;Ce==="button"&&z.href&&(Ce="a");var Re={};Ce==="button"?(Re.type=C,Re.disabled=p):((Ce!=="a"||!z.href)&&(Re.role="button"),Re["aria-disabled"]=p);var Ye=Ut(i,n),ve=Ut(A,L),Me=Ut(Ye,ve),Te=b.useState(!1),it=Te[0],Ze=Te[1];b.useEffect(function(){Ze(!0)},[]);var je=it&&!v&&!p;return b.createElement(Ce,M({className:Pe(l.root,u,te&&[l.focusVisible,S],p&&l.disabled),onBlur:le,onClick:E,onFocus:ue,onKeyDown:Ee,onKeyUp:Fe,onMouseDown:ee,onMouseLeave:oe,onMouseUp:X,onDragLeave:K,onTouchEnd:se,onTouchMove:re,onTouchStart:ie,ref:Me,tabIndex:p?-1:D},Re,z),s,je?b.createElement(Rbe,M({ref:x,center:o},k)):null)});const Gs=ze(Abe,{name:"MuiButtonBase"})($be);var kbe=function(t){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:Wt(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:t.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Wt(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Wt(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:t.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},Dbe=b.forwardRef(function(t,n){var r=t.edge,i=r===void 0?!1:r,a=t.children,o=t.classes,s=t.className,l=t.color,u=l===void 0?"default":l,c=t.disabled,f=c===void 0?!1:c,d=t.disableFocusRipple,p=d===void 0?!1:d,h=t.size,v=h===void 0?"medium":h,w=Ge(t,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return b.createElement(Gs,M({className:Pe(o.root,s,u!=="default"&&o["color".concat(mt(u))],f&&o.disabled,v==="small"&&o["size".concat(mt(v))],{start:o.edgeStart,end:o.edgeEnd}[i]),centerRipple:!0,focusRipple:!p,disabled:f,ref:n},w),b.createElement("span",{className:o.label},a))});const A1=ze(kbe,{name:"MuiIconButton"})(Dbe);var Nbe=function(t){return t.scrollTop};function zv(e,t){var n=e.timeout,r=e.style,i=r===void 0?{}:r;return{duration:i.transitionDuration||typeof n=="number"?n:n[t.mode]||0,delay:i.transitionDelay}}function $1(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Lbe={entering:{opacity:1,transform:$1(1)},entered:{opacity:1,transform:"none"}},m4=b.forwardRef(function(t,n){var r=t.children,i=t.disableStrictModeCompat,a=i===void 0?!1:i,o=t.in,s=t.onEnter,l=t.onEntered,u=t.onEntering,c=t.onExit,f=t.onExited,d=t.onExiting,p=t.style,h=t.timeout,v=h===void 0?"auto":h,w=t.TransitionComponent,m=w===void 0?g4:w,g=Ge(t,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),y=b.useRef(),S=b.useRef(),_=Jo(),E=_.unstable_strictMode&&!a,O=b.useRef(null),T=Ut(r.ref,n),R=Ut(E?O:void 0,T),$=function(D){return function(k,W){if(D){var C=E?[O.current,k]:[k,W],z=Ii(C,2),L=z[0],j=z[1];j===void 0?D(L):D(L,j)}}},F=$(u),H=$(function(N,D){Nbe(N);var k=zv({style:p,timeout:v},{mode:"enter"}),W=k.duration,C=k.delay,z;v==="auto"?(z=_.transitions.getAutoHeightDuration(N.clientHeight),S.current=z):z=W,N.style.transition=[_.transitions.create("opacity",{duration:z,delay:C}),_.transitions.create("transform",{duration:z*.666,delay:C})].join(","),s&&s(N,D)}),Y=$(l),Q=$(d),ne=$(function(N){var D=zv({style:p,timeout:v},{mode:"exit"}),k=D.duration,W=D.delay,C;v==="auto"?(C=_.transitions.getAutoHeightDuration(N.clientHeight),S.current=C):C=k,N.style.transition=[_.transitions.create("opacity",{duration:C,delay:W}),_.transitions.create("transform",{duration:C*.666,delay:W||C*.333})].join(","),N.style.opacity="0",N.style.transform=$1(.75),c&&c(N)}),J=$(f),ae=function(D,k){var W=E?D:k;v==="auto"&&(y.current=setTimeout(W,S.current||0))};return b.useEffect(function(){return function(){clearTimeout(y.current)}},[]),b.createElement(m,M({appear:!0,in:o,nodeRef:E?O:void 0,onEnter:H,onEntered:Y,onEntering:F,onExit:ne,onExited:J,onExiting:Q,addEndListener:ae,timeout:v==="auto"?null:v},g),function(N,D){return b.cloneElement(r,M({style:M({opacity:0,transform:$1(.75),visibility:N==="exited"&&!o?"hidden":void 0},Lbe[N],p,r.props.style),ref:R},D))})});m4.muiSupportAuto=!0;const y4=m4;/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1-lts + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */var Xd=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Mbe=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function jbe(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function Fbe(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Mbe))}}var Wbe=Xd&&window.Promise,zbe=Wbe?jbe:Fbe;function b4(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function il(e,t){if(e.nodeType!==1)return[];var n=e.ownerDocument.defaultView,r=n.getComputedStyle(e,null);return t?r[t]:r}function iC(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function Qd(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=il(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:Qd(iC(e))}function w4(e){return e&&e.referenceNode?e.referenceNode:e}var V$=Xd&&!!(window.MSInputMethodContext&&document.documentMode),G$=Xd&&/MSIE 10/.test(navigator.userAgent);function rc(e){return e===11?V$:e===10?G$:V$||G$}function Iu(e){if(!e)return document.documentElement;for(var t=rc(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return!r||r==="BODY"||r==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(n.nodeName)!==-1&&il(n,"position")==="static"?Iu(n):n}function Bbe(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Iu(e.firstElementChild)===e}function k1(e){return e.parentNode!==null?k1(e.parentNode):e}function Bv(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,a=document.createRange();a.setStart(r,0),a.setEnd(i,0);var o=a.commonAncestorContainer;if(e!==o&&t!==o||r.contains(i))return Bbe(o)?o:Iu(o);var s=k1(e);return s.host?Bv(s.host,t):Bv(e,k1(t).host)}function Cu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",n=t==="top"?"scrollTop":"scrollLeft",r=e.nodeName;if(r==="BODY"||r==="HTML"){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[n]}return e[n]}function Ube(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=Cu(t,"top"),i=Cu(t,"left"),a=n?-1:1;return e.top+=r*a,e.bottom+=r*a,e.left+=i*a,e.right+=i*a,e}function q$(e,t){var n=t==="x"?"Left":"Top",r=n==="Left"?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function K$(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],rc(10)?parseInt(n["offset"+e])+parseInt(r["margin"+(e==="Height"?"Top":"Left")])+parseInt(r["margin"+(e==="Height"?"Bottom":"Right")]):0)}function S4(e){var t=e.body,n=e.documentElement,r=rc(10)&&getComputedStyle(n);return{height:K$("Height",t,n,r),width:K$("Width",t,n,r)}}var Hbe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Vbe=function(){function e(t,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=rc(10),i=t.nodeName==="HTML",a=D1(e),o=D1(t),s=Qd(e),l=il(t),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);n&&i&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=Go({top:a.top-o.top-u,left:a.left-o.left-c,width:a.width,height:a.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var d=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(r&&!n?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=Ube(f,t)),f}function Gbe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.ownerDocument.documentElement,r=aC(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:Cu(n),s=t?0:Cu(n,"left"),l={top:o-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:a};return Go(l)}function _4(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(il(e,"position")==="fixed")return!0;var n=iC(e);return n?_4(n):!1}function E4(e){if(!e||!e.parentElement||rc())return document.documentElement;for(var t=e.parentElement;t&&il(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function oC(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a={top:0,left:0},o=i?E4(e):Bv(e,w4(t));if(r==="viewport")a=Gbe(o,i);else{var s=void 0;r==="scrollParent"?(s=Qd(iC(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):r==="window"?s=e.ownerDocument.documentElement:s=r;var l=aC(s,o,i);if(s.nodeName==="HTML"&&!_4(o)){var u=S4(e.ownerDocument),c=u.height,f=u.width;a.top+=l.top-l.marginTop,a.bottom=c+l.top,a.left+=l.left-l.marginLeft,a.right=f+l.left}else a=l}n=n||0;var d=typeof n=="number";return a.left+=d?n:n.left||0,a.top+=d?n:n.top||0,a.right-=d?n:n.right||0,a.bottom-=d?n:n.bottom||0,a}function qbe(e){var t=e.width,n=e.height;return t*n}function O4(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=oC(n,r,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(d){return Si({key:d},s[d],{area:qbe(s[d])})}).sort(function(d,p){return p.area-d.area}),u=l.filter(function(d){var p=d.width,h=d.height;return p>=n.clientWidth&&h>=n.clientHeight}),c=u.length>0?u[0].key:l[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function I4(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=r?E4(t):Bv(t,w4(n));return aC(n,i,r)}function C4(e){var t=e.ownerDocument.defaultView,n=t.getComputedStyle(e),r=parseFloat(n.marginTop||0)+parseFloat(n.marginBottom||0),i=parseFloat(n.marginLeft||0)+parseFloat(n.marginRight||0),a={width:e.offsetWidth+i,height:e.offsetHeight+r};return a}function Uv(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(n){return t[n]})}function T4(e,t,n){n=n.split("-")[0];var r=C4(e),i={width:r.width,height:r.height},a=["right","left"].indexOf(n)!==-1,o=a?"top":"left",s=a?"left":"top",l=a?"height":"width",u=a?"width":"height";return i[o]=t[o]+t[l]/2-r[l]/2,n===s?i[s]=t[s]-r[u]:i[s]=t[Uv(s)],i}function Zd(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Kbe(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(i){return i[t]===n});var r=Zd(e,function(i){return i[t]===n});return e.indexOf(r)}function P4(e,t,n){var r=n===void 0?e:e.slice(0,Kbe(e,"name",n));return r.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var a=i.function||i.fn;i.enabled&&b4(a)&&(t.offsets.popper=Go(t.offsets.popper),t.offsets.reference=Go(t.offsets.reference),t=a(t,i))}),t}function Ybe(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=I4(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O4(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=T4(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=P4(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function x4(e,t){return e.some(function(n){var r=n.name,i=n.enabled;return i&&r===t})}function sC(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;ro[p]&&(e.offsets.popper[f]+=s[f]+h-o[p]),e.offsets.popper=Go(e.offsets.popper);var v=s[f]+s[u]/2-h/2,w=il(e.instance.popper),m=parseFloat(w["margin"+c]),g=parseFloat(w["border"+c+"Width"]),y=v-e.offsets.popper[f]-m-g;return y=Math.max(Math.min(o[u]-h,y),0),e.arrowElement=r,e.offsets.arrow=(n={},Tu(n,f,Math.round(y)),Tu(n,d,""),n),e}function lwe(e){return e==="end"?"start":e==="start"?"end":e}var k4=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Lw=k4.slice(3);function Y$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Lw.indexOf(e),r=Lw.slice(n+1).concat(Lw.slice(0,n));return t?r.reverse():r}var Mw={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function uwe(e,t){if(x4(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var n=oC(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=Uv(r),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case Mw.FLIP:o=[r,i];break;case Mw.CLOCKWISE:o=Y$(r);break;case Mw.COUNTERCLOCKWISE:o=Y$(r,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(r!==s||o.length===l+1)return e;r=e.placement.split("-")[0],i=Uv(r);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=r==="left"&&f(u.right)>f(c.left)||r==="right"&&f(u.left)f(c.top)||r==="bottom"&&f(u.top)f(n.right),v=f(u.top)f(n.bottom),m=r==="left"&&p||r==="right"&&h||r==="top"&&v||r==="bottom"&&w,g=["top","bottom"].indexOf(r)!==-1,y=!!t.flipVariations&&(g&&a==="start"&&p||g&&a==="end"&&h||!g&&a==="start"&&v||!g&&a==="end"&&w),S=!!t.flipVariationsByContent&&(g&&a==="start"&&h||g&&a==="end"&&p||!g&&a==="start"&&w||!g&&a==="end"&&v),_=y||S;(d||m||_)&&(e.flipped=!0,(d||m)&&(r=o[l+1]),_&&(a=lwe(a)),e.placement=r+(a?"-"+a:""),e.offsets.popper=Si({},e.offsets.popper,T4(e.instance.popper,e.offsets.reference,e.placement)),e=P4(e.instance.modifiers,e,"flip"))}),e}function cwe(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=["top","bottom"].indexOf(i)!==-1,s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return n[s]a(r[s])&&(e.offsets.popper[l]=a(r[s])),e}function fwe(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(o.indexOf("%")===0){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=r}var l=Go(s);return l[t]/100*a}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*a}else return a}function dwe(e,t,n,r){var i=[0,0],a=["right","left"].indexOf(r)!==-1,o=e.split(/(\+|\-)/).map(function(c){return c.trim()}),s=o.indexOf(Zd(o,function(c){return c.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(c,f){var d=(f===1?!a:a)?"height":"width",p=!1;return c.reduce(function(h,v){return h[h.length-1]===""&&["+","-"].indexOf(v)!==-1?(h[h.length-1]=v,p=!0,h):p?(h[h.length-1]+=v,p=!1,h):h.concat(v)},[]).map(function(h){return fwe(h,d,t,n)})}),u.forEach(function(c,f){c.forEach(function(d,p){lC(d)&&(i[f]+=d*(c[p-1]==="-"?-1:1))})}),i}function pwe(e,t){var n=t.offset,r=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=r.split("-")[0],l=void 0;return lC(+n)?l=[+n,0]:l=dwe(n,a,o,s),s==="left"?(a.top+=l[0],a.left-=l[1]):s==="right"?(a.top+=l[0],a.left+=l[1]):s==="top"?(a.left+=l[0],a.top-=l[1]):s==="bottom"&&(a.left+=l[0],a.top+=l[1]),e.popper=a,e}function hwe(e,t){var n=t.boundariesElement||Iu(e.instance.popper);e.instance.reference===n&&(n=Iu(n));var r=sC("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=oC(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=a,i.left=o,i[r]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]l[p]&&!t.escapeWithReference&&(v=Math.min(c[h],l[p]-(p==="right"?c.width:c.height))),Tu({},h,v)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=Si({},c,f[p](d))}),e.offsets.popper=c,e}function vwe(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,a=i.reference,o=i.popper,s=["bottom","top"].indexOf(n)!==-1,l=s?"left":"top",u=s?"width":"height",c={start:Tu({},l,a[l]),end:Tu({},l,a[l]+a[u]-o[u])};e.offsets.popper=Si({},o,c[r])}return e}function gwe(e){if(!$4(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=Zd(e.instance.modifiers,function(r){return r.name==="preventOverflow"}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};Hbe(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=zbe(this.update.bind(this)),this.options=Si({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Si({},e.Defaults.modifiers,i.modifiers)).forEach(function(o){r.options.modifiers[o]=Si({},e.Defaults.modifiers[o]||{},i.modifiers?i.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return Si({name:o},r.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&b4(o.onLoad)&&o.onLoad(r.reference,r.popper,r.options,o,r.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return Vbe(e,[{key:"update",value:function(){return Ybe.call(this)}},{key:"destroy",value:function(){return Xbe.call(this)}},{key:"enableEventListeners",value:function(){return Zbe.call(this)}},{key:"disableEventListeners",value:function(){return ewe.call(this)}}]),e}();_y.Utils=(typeof window<"u"?window:global).PopperUtils;_y.placements=k4;_y.Defaults=bwe;const wwe=_y;function Swe(e){return e=typeof e=="function"?e():e,Xn.findDOMNode(e)}var jw=typeof window<"u"?b.useLayoutEffect:b.useEffect,_we=b.forwardRef(function(t,n){var r=t.children,i=t.container,a=t.disablePortal,o=a===void 0?!1:a,s=t.onRendered,l=b.useState(null),u=l[0],c=l[1],f=Ut(b.isValidElement(r)?r.ref:null,n);return jw(function(){o||c(Swe(i)||document.body)},[i,o]),jw(function(){if(u&&!o)return Va(n,u),function(){Va(n,null)}},[n,u,o]),jw(function(){s&&(u||o)&&s()},[s,u,o]),o?b.isValidElement(r)?b.cloneElement(r,{ref:f}):r:u&&Xn.createPortal(r,u)});const D4=_we;function Ewe(e,t){var n=t&&t.direction||"ltr";if(n==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function X$(e){return typeof e=="function"?e():e}var Owe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Iwe={},Cwe=b.forwardRef(function(t,n){var r=t.anchorEl,i=t.children,a=t.container,o=t.disablePortal,s=o===void 0?!1:o,l=t.keepMounted,u=l===void 0?!1:l,c=t.modifiers,f=t.open,d=t.placement,p=d===void 0?"bottom":d,h=t.popperOptions,v=h===void 0?Iwe:h,w=t.popperRef,m=t.style,g=t.transition,y=g===void 0?!1:g,S=Ge(t,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),_=b.useRef(null),E=Ut(_,n),O=b.useRef(null),T=Ut(O,w),R=b.useRef(T);Owe(function(){R.current=T},[T]),b.useImperativeHandle(w,function(){return O.current},[]);var $=b.useState(!0),F=$[0],H=$[1],Y=Ku(),Q=Ewe(p,Y),ne=b.useState(Q),J=ne[0],ae=ne[1];b.useEffect(function(){O.current&&O.current.update()});var N=b.useCallback(function(){if(!(!_.current||!r||!f)){O.current&&(O.current.destroy(),R.current(null));var L=function(B){ae(B.placement)};X$(r);var j=new wwe(X$(r),_.current,M({placement:Q},v,{modifiers:M({},s?{}:{preventOverflow:{boundariesElement:"window"}},c,v.modifiers),onCreate:Eu(L,v.onCreate),onUpdate:Eu(L,v.onUpdate)}));R.current(j)}},[r,s,c,f,Q,v]),D=b.useCallback(function(L){Va(E,L),N()},[E,N]),k=function(){H(!1)},W=function(){O.current&&(O.current.destroy(),R.current(null))},C=function(){H(!0),W()};if(b.useEffect(function(){return function(){W()}},[]),b.useEffect(function(){!f&&!y&&W()},[f,y]),!u&&!f&&(!y||F))return null;var z={placement:J};return y&&(z.TransitionProps={in:f,onEnter:k,onExited:C}),b.createElement(D4,{disablePortal:s,container:a},b.createElement("div",M({ref:D,role:"tooltip"},S,{style:M({position:"fixed",top:0,left:0,display:!f&&u&&!y?"none":null},m)}),typeof i=="function"?i(z):i))});const N4=Cwe;function Q$(e){return Math.round(e*1e5)/1e5}function Twe(){return{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}}}var Pwe=function(t){return{popper:{zIndex:t.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:Twe(),tooltip:{backgroundColor:Wt(t.palette.grey[700],.9),borderRadius:t.shape.borderRadius,color:t.palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(10),lineHeight:"".concat(Q$(14/10),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:Wt(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat(Q$(16/14),"em"),fontWeight:t.typography.fontWeightRegular},tooltipPlacementLeft:Dt({transformOrigin:"right center",margin:"0 24px "},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Dt({transformOrigin:"left center",margin:"0 24px"},t.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Dt({transformOrigin:"center bottom",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Dt({transformOrigin:"center top",margin:"24px 0"},t.breakpoints.up("sm"),{margin:"14px 0"})}},Up=!1,Fw=null,xwe=b.forwardRef(function(t,n){var r=t.arrow,i=r===void 0?!1:r,a=t.children,o=t.classes,s=t.disableFocusListener,l=s===void 0?!1:s,u=t.disableHoverListener,c=u===void 0?!1:u,f=t.disableTouchListener,d=f===void 0?!1:f,p=t.enterDelay,h=p===void 0?100:p,v=t.enterNextDelay,w=v===void 0?0:v,m=t.enterTouchDelay,g=m===void 0?700:m,y=t.id,S=t.interactive,_=S===void 0?!1:S,E=t.leaveDelay,O=E===void 0?0:E,T=t.leaveTouchDelay,R=T===void 0?1500:T,$=t.onClose,F=t.onOpen,H=t.open,Y=t.placement,Q=Y===void 0?"bottom":Y,ne=t.PopperComponent,J=ne===void 0?N4:ne,ae=t.PopperProps,N=t.title,D=t.TransitionComponent,k=D===void 0?y4:D,W=t.TransitionProps,C=Ge(t,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),z=Jo(),L=b.useState(),j=L[0],x=L[1],B=b.useState(null),te=B[0],V=B[1],Z=b.useRef(!1),ce=b.useRef(),P=b.useRef(),A=b.useRef(),U=b.useRef(),ee=ja({controlled:H,default:!1,name:"Tooltip",state:"open"}),K=Ii(ee,2),X=K[0],oe=K[1],ie=X,se=ZI(y);b.useEffect(function(){return function(){clearTimeout(ce.current),clearTimeout(P.current),clearTimeout(A.current),clearTimeout(U.current)}},[]);var re=function($e){clearTimeout(Fw),Up=!0,oe(!0),F&&F($e)},le=function(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(he){var Se=a.props;he.type==="mouseover"&&Se.onMouseOver&&$e&&Se.onMouseOver(he),!(Z.current&&he.type!=="touchstart")&&(j&&j.removeAttribute("title"),clearTimeout(P.current),clearTimeout(A.current),h||Up&&w?(he.persist(),P.current=setTimeout(function(){re(he)},Up?w:h)):re(he))}},ue=Yd(),de=ue.isFocusVisible,xe=ue.onBlurVisible,Ee=ue.ref,Fe=b.useState(!1),Ce=Fe[0],Re=Fe[1],Ye=function(){Ce&&(Re(!1),xe())},ve=function(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(he){j||x(he.currentTarget),de(he)&&(Re(!0),le()(he));var Se=a.props;Se.onFocus&&$e&&Se.onFocus(he)}},Me=function($e){clearTimeout(Fw),Fw=setTimeout(function(){Up=!1},800+O),oe(!1),$&&$($e),clearTimeout(ce.current),ce.current=setTimeout(function(){Z.current=!1},z.transitions.duration.shortest)},Te=function(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(he){var Se=a.props;he.type==="blur"&&(Se.onBlur&&$e&&Se.onBlur(he),Ye()),he.type==="mouseleave"&&Se.onMouseLeave&&he.currentTarget===j&&Se.onMouseLeave(he),clearTimeout(P.current),clearTimeout(A.current),he.persist(),A.current=setTimeout(function(){Me(he)},O)}},it=function($e){Z.current=!0;var he=a.props;he.onTouchStart&&he.onTouchStart($e)},Ze=function($e){it($e),clearTimeout(A.current),clearTimeout(ce.current),clearTimeout(U.current),$e.persist(),U.current=setTimeout(function(){le()($e)},g)},je=function($e){a.props.onTouchEnd&&a.props.onTouchEnd($e),clearTimeout(U.current),clearTimeout(A.current),$e.persist(),A.current=setTimeout(function(){Me($e)},R)},be=Ut(x,n),Qe=Ut(Ee,be),Be=b.useCallback(function(pt){Va(Qe,Xn.findDOMNode(pt))},[Qe]),Et=Ut(a.ref,Be);N===""&&(ie=!1);var Ot=!ie&&!c,tt=M({"aria-describedby":ie?se:null,title:Ot&&typeof N=="string"?N:null},C,a.props,{className:Pe(C.className,a.props.className),onTouchStart:it,ref:Et}),at={};d||(tt.onTouchStart=Ze,tt.onTouchEnd=je),c||(tt.onMouseOver=le(),tt.onMouseLeave=Te(),_&&(at.onMouseOver=le(!1),at.onMouseLeave=Te(!1))),l||(tt.onFocus=ve(),tt.onBlur=Te(),_&&(at.onFocus=ve(!1),at.onBlur=Te(!1)));var Nt=b.useMemo(function(){return Ho({popperOptions:{modifiers:{arrow:{enabled:!!te,element:te}}}},ae)},[te,ae]);return b.createElement(b.Fragment,null,b.cloneElement(a,tt),b.createElement(J,M({className:Pe(o.popper,_&&o.popperInteractive,i&&o.popperArrow),placement:Q,anchorEl:j,open:j?ie:!1,id:tt["aria-describedby"],transition:!0},at,Nt),function(pt){var $e=pt.placement,he=pt.TransitionProps;return b.createElement(k,M({timeout:z.transitions.duration.shorter},he,W),b.createElement("div",{className:Pe(o.tooltip,o["tooltipPlacement".concat(mt($e.split("-")[0]))],Z.current&&o.touch,i&&o.tooltipArrow)},N,i?b.createElement("span",{className:o.arrow,ref:V}):null))}))});const au=ze(Pwe,{name:"MuiTooltip",flip:!1})(xwe);var Rwe=["badge","children","containerId","dispatch","BadgeProps","TooltipProps"];function Awe(e,t){if(e==null)return{};var n=$we(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $we(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function L4(e){var t=e["aria-label"],n=e.badge,r=e.children,i=e.containerId;e.dispatch;var a=e.BadgeProps,o=e.TooltipProps,s=Awe(e,Rwe),l=I.createElement(A1,s,n?I.createElement(mbe,a,r):r);return s.disabled?l:I.createElement(au,Object.assign({PopperProps:{container:document.querySelector("#".concat(i," .").concat(mr("viewer")))},title:t},o),l)}L4.defaultProps={badge:!1,BadgeProps:{},dispatch:function(){},TooltipProps:{}};var kwe=function(t){return{containerId:kz(t)}},Dwe=_t(kt(kwe,null),Bt("MiradorMenuButton"));const va=Dwe(L4);function Nwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z$(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}var Bwe=function(e){Mwe(n,e);var t=jwe(n);function n(){return Nwe(this,n),t.apply(this,arguments)}return Lwe(n,[{key:"render",value:function(){var i=this.props,a=i.displayAll,o=i.displayAllDisabled,s=i.t,l=i.toggleAnnotationDisplay;return I.createElement(va,{"aria-label":s(a?"displayNoAnnotations":"highlightAllAnnotations"),onClick:l,disabled:o,size:"small"},a?I.createElement(JI,null):I.createElement(tC,null))}}]),n}(b.Component),Uwe=function(t,n){var r=n.windowId;return{displayAll:pn(t,{windowId:r}).highlightAllAnnotations,displayAllDisabled:LI(t,{windowId:r}).length<2}},Hwe=function(t,n){var r=n.windowId;return{toggleAnnotationDisplay:function(){t(V3(r))}}},Vwe=_t(Ft(),kt(Uwe,Hwe),Bt("AnnotationSettings"));const Gwe=Vwe(Bwe),qwe=rl(b.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));var Kwe=function(t){var n=t.palette.type==="light"?t.palette.grey[300]:t.palette.grey[700],r=Wt(t.palette.text.primary,.26);return{root:{fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:t.palette.getContrastText(n),backgroundColor:n,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],fontSize:t.typography.pxToRem(12)},"& $avatarColorPrimary":{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.dark},"& $avatarColorSecondary":{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:t.palette.primary.main,color:t.palette.primary.contrastText},colorSecondary:{backgroundColor:t.palette.secondary.main,color:t.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:dl(n,.08)},"&:active":{boxShadow:t.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:dl(t.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:dl(t.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:dl(n,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:dl(t.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:dl(t.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat(t.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Wt(t.palette.text.primary,t.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(t.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Wt(t.palette.primary.main,t.palette.action.hoverOpacity)}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(t.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:Wt(t.palette.secondary.main,t.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:t.palette.type==="light"?t.palette.grey[700]:t.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:r,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:Wt(r,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:Wt(t.palette.primary.contrastText,.7),"&:hover, &:active":{color:t.palette.primary.contrastText}},deleteIconColorSecondary:{color:Wt(t.palette.secondary.contrastText,.7),"&:hover, &:active":{color:t.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:Wt(t.palette.primary.main,.7),"&:hover, &:active":{color:t.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:Wt(t.palette.secondary.main,.7),"&:hover, &:active":{color:t.palette.secondary.main}}}};function J$(e){return e.key==="Backspace"||e.key==="Delete"}var Ywe=b.forwardRef(function(t,n){var r=t.avatar,i=t.classes,a=t.className,o=t.clickable,s=t.color,l=s===void 0?"default":s,u=t.component,c=t.deleteIcon,f=t.disabled,d=f===void 0?!1:f,p=t.icon,h=t.label,v=t.onClick,w=t.onDelete,m=t.onKeyDown,g=t.onKeyUp,y=t.size,S=y===void 0?"medium":y,_=t.variant,E=_===void 0?"default":_,O=Ge(t,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),T=b.useRef(null),R=Ut(T,n),$=function(C){C.stopPropagation(),w&&w(C)},F=function(C){C.currentTarget===C.target&&J$(C)&&C.preventDefault(),m&&m(C)},H=function(C){C.currentTarget===C.target&&(w&&J$(C)?w(C):C.key==="Escape"&&T.current&&T.current.blur()),g&&g(C)},Y=o!==!1&&v?!0:o,Q=S==="small",ne=u||(Y?Gs:"div"),J=ne===Gs?{component:"div"}:{},ae=null;if(w){var N=Pe(l!=="default"&&(E==="default"?i["deleteIconColor".concat(mt(l))]:i["deleteIconOutlinedColor".concat(mt(l))]),Q&&i.deleteIconSmall);ae=c&&b.isValidElement(c)?b.cloneElement(c,{className:Pe(c.props.className,i.deleteIcon,N),onClick:$}):b.createElement(qwe,{className:Pe(i.deleteIcon,N),onClick:$})}var D=null;r&&b.isValidElement(r)&&(D=b.cloneElement(r,{className:Pe(i.avatar,r.props.className,Q&&i.avatarSmall,l!=="default"&&i["avatarColor".concat(mt(l))])}));var k=null;return p&&b.isValidElement(p)&&(k=b.cloneElement(p,{className:Pe(i.icon,p.props.className,Q&&i.iconSmall,l!=="default"&&i["iconColor".concat(mt(l))])})),b.createElement(ne,M({role:Y||w?"button":void 0,className:Pe(i.root,a,l!=="default"&&[i["color".concat(mt(l))],Y&&i["clickableColor".concat(mt(l))],w&&i["deletableColor".concat(mt(l))]],E!=="default"&&[i.outlined,{primary:i.outlinedPrimary,secondary:i.outlinedSecondary}[l]],d&&i.disabled,Q&&i.sizeSmall,Y&&i.clickable,w&&i.deletable),"aria-disabled":d?!0:void 0,tabIndex:Y||w?0:void 0,onClick:v,onKeyDown:F,onKeyUp:H,ref:R},J,O),D||k,b.createElement("span",{className:Pe(i.label,Q&&i.labelSmall)},h),ae)});const Ey=ze(Kwe,{name:"MuiChip"})(Ywe);var Xwe=b.createContext({});const ou=Xwe;var Qwe={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},Zwe=b.forwardRef(function(t,n){var r=t.children,i=t.classes,a=t.className,o=t.component,s=o===void 0?"ul":o,l=t.dense,u=l===void 0?!1:l,c=t.disablePadding,f=c===void 0?!1:c,d=t.subheader,p=Ge(t,["children","classes","className","component","dense","disablePadding","subheader"]),h=b.useMemo(function(){return{dense:u}},[u]);return b.createElement(ou.Provider,{value:h},b.createElement(s,M({className:Pe(i.root,a,u&&i.dense,!f&&i.padding,d&&i.subheader),ref:n},p),d,r))});const Oy=ze(Qwe,{name:"MuiList"})(Zwe);function M4(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function Ww(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ek(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function j4(e,t){if(t===void 0)return!0;var n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function Pc(e,t,n,r,i,a){for(var o=!1,s=i(e,t,t?n:!1);s;){if(s===e.firstChild){if(o)return;o=!0}var l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!j4(s,a)||l)s=i(e,s,n);else{s.focus();return}}}var Jwe=typeof window>"u"?b.useEffect:b.useLayoutEffect,e0e=b.forwardRef(function(t,n){var r=t.actions,i=t.autoFocus,a=i===void 0?!1:i,o=t.autoFocusItem,s=o===void 0?!1:o,l=t.children,u=t.className,c=t.disabledItemsFocusable,f=c===void 0?!1:c,d=t.disableListWrap,p=d===void 0?!1:d,h=t.onKeyDown,v=t.variant,w=v===void 0?"selectedMenu":v,m=Ge(t,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),g=b.useRef(null),y=b.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Jwe(function(){a&&g.current.focus()},[a]),b.useImperativeHandle(r,function(){return{adjustStyleForScrollbar:function($,F){var H=!g.current.style.width;if($.clientHeight0&&(J-Q.lastTime>500?(Q.keys=[],Q.repeating=!0,Q.previousKeyMatched=!0):Q.repeating&&ne!==Q.keys[0]&&(Q.repeating=!1)),Q.lastTime=J,Q.keys.push(ne);var ae=Y&&!Q.repeating&&j4(Y,Q);Q.previousKeyMatched&&(ae||Pc(F,Y,!1,f,Ww,Q))?$.preventDefault():Q.previousKeyMatched=!1}h&&h($)},_=b.useCallback(function(R){g.current=Xn.findDOMNode(R)},[]),E=Ut(_,n),O=-1;b.Children.forEach(l,function(R,$){b.isValidElement(R)&&(R.props.disabled||(w==="selectedMenu"&&R.props.selected||O===-1)&&(O=$))});var T=b.Children.map(l,function(R,$){if($===O){var F={};return s&&(F.autoFocus=!0),R.props.tabIndex===void 0&&w==="selectedMenu"&&(F.tabIndex=0),b.cloneElement(R,F)}return R});return b.createElement(Oy,M({role:"menu",ref:E,className:u,onKeyDown:S,tabIndex:a?0:-1},m),T)});const Iy=e0e;var t0e=function(t){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:t.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:t.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(t.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},n0e=typeof window>"u"?b.useEffect:b.useLayoutEffect,r0e=b.forwardRef(function(t,n){var r=t.alignItems,i=r===void 0?"center":r,a=t.autoFocus,o=a===void 0?!1:a,s=t.button,l=s===void 0?!1:s,u=t.children,c=t.classes,f=t.className,d=t.component,p=t.ContainerComponent,h=p===void 0?"li":p,v=t.ContainerProps;v=v===void 0?{}:v;var w=v.className,m=Ge(v,["className"]),g=t.dense,y=g===void 0?!1:g,S=t.disabled,_=S===void 0?!1:S,E=t.disableGutters,O=E===void 0?!1:E,T=t.divider,R=T===void 0?!1:T,$=t.focusVisibleClassName,F=t.selected,H=F===void 0?!1:F,Y=Ge(t,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),Q=b.useContext(ou),ne={dense:y||Q.dense||!1,alignItems:i},J=b.useRef(null);n0e(function(){o&&J.current&&J.current.focus()},[o]);var ae=b.Children.toArray(u),N=ae.length&&_f(ae[ae.length-1],["ListItemSecondaryAction"]),D=b.useCallback(function(z){J.current=Xn.findDOMNode(z)},[]),k=Ut(D,n),W=M({className:Pe(c.root,f,ne.dense&&c.dense,!O&&c.gutters,R&&c.divider,_&&c.disabled,l&&c.button,i!=="center"&&c.alignItemsFlexStart,N&&c.secondaryAction,H&&c.selected),disabled:_},Y),C=d||"li";return l&&(W.component=d||"div",W.focusVisibleClassName=Pe(c.focusVisible,$),C=Gs),N?(C=!W.component&&!d?"div":C,h==="li"&&(C==="li"?C="div":W.component==="li"&&(W.component="div")),b.createElement(ou.Provider,{value:ne},b.createElement(h,M({className:Pe(c.container,w),ref:k},m),b.createElement(C,W,ae),ae.pop()))):b.createElement(ou.Provider,{value:ne},b.createElement(C,M({ref:k},W),ae))});const Cy=ze(t0e,{name:"MuiListItem"})(r0e);var i0e=function(t){return{root:M({},t.typography.body1,Dt({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},t.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:M({},t.typography.body2,{minHeight:"auto"})}},a0e=b.forwardRef(function(t,n){var r=t.classes,i=t.className,a=t.component,o=a===void 0?"li":a,s=t.disableGutters,l=s===void 0?!1:s,u=t.ListItemClasses,c=t.role,f=c===void 0?"menuitem":c,d=t.selected,p=t.tabIndex,h=Ge(t,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),v;return t.disabled||(v=p!==void 0?p:-1),b.createElement(Cy,M({button:!0,role:f,tabIndex:v,component:o,selected:d,disableGutters:l,classes:M({dense:r.dense},u),className:Pe(r.root,i,d&&r.selected,!l&&r.gutters),ref:n},h))});const Pu=ze(i0e,{name:"MuiMenuItem"})(a0e);var o0e={root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},s0e=b.forwardRef(function(t,n){var r=t.children,i=t.classes,a=t.className,o=t.disableTypography,s=o===void 0?!1:o,l=t.inset,u=l===void 0?!1:l,c=t.primary,f=t.primaryTypographyProps,d=t.secondary,p=t.secondaryTypographyProps,h=Ge(t,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),v=b.useContext(ou),w=v.dense,m=c??r;m!=null&&m.type!==ut&&!s&&(m=b.createElement(ut,M({variant:w?"body2":"body1",className:i.primary,component:"span",display:"block"},f),m));var g=d;return g!=null&&g.type!==ut&&!s&&(g=b.createElement(ut,M({variant:"body2",className:i.secondary,color:"textSecondary",display:"block"},p),g)),b.createElement("div",M({className:Pe(i.root,a,w&&i.dense,u&&i.inset,m&&g&&i.multiline),ref:n},h),m,g)});const Ef=ze(o0e,{name:"MuiListItemText"})(s0e);/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function M1(e,t){return M1=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},M1(e,t)}function l0e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ah(e,t,n){return l0e()?Ah=Reflect.construct:Ah=function(i,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(i,s),u=new l;return o&&M1(u,o.prototype),u},Ah.apply(null,arguments)}function Di(e){return u0e(e)||c0e(e)||f0e(e)||d0e()}function u0e(e){if(Array.isArray(e))return j1(e)}function c0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f0e(e,t){if(e){if(typeof e=="string")return j1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j1(e,t)}}function j1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),i=1;i/gm),T0e=Yi(/\${[\w\W]*}/gm),P0e=Yi(/^data-[\-\w.\u00B7-\uFFFF]/),x0e=Yi(/^aria-[\-\w]+$/),R0e=Yi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),A0e=Yi(/^(?:\w+script|data):/i),$0e=Yi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),k0e=Yi(/^html$/i),D0e=function(){return typeof window>"u"?null:window},N0e=function(t,n){if(wo(t)!=="object"||typeof t.createPolicy!="function")return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function W4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:D0e(),t=function(G){return W4(G)};if(t.version="2.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;var n=e.document,r=e.document,i=e.DocumentFragment,a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter,u=e.NamedNodeMap,c=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,f=e.HTMLFormElement,d=e.DOMParser,p=e.trustedTypes,h=s.prototype,v=Hp(h,"cloneNode"),w=Hp(h,"nextSibling"),m=Hp(h,"childNodes"),g=Hp(h,"parentNode");if(typeof a=="function"){var y=r.createElement("template");y.content&&y.content.ownerDocument&&(r=y.content.ownerDocument)}var S=N0e(p,n),_=S?S.createHTML(""):"",E=r,O=E.implementation,T=E.createNodeIterator,R=E.createDocumentFragment,$=E.getElementsByTagName,F=n.importNode,H={};try{H=ss(r).documentMode?r.documentMode:{}}catch{}var Y={};t.isSupported=typeof g=="function"&&O&&O.createHTMLDocument!==void 0&&H!==9;var Q=I0e,ne=C0e,J=T0e,ae=P0e,N=x0e,D=A0e,k=$0e,W=R0e,C=null,z=vt({},[].concat(Di(rk),Di(Uw),Di(Hw),Di(Vw),Di(ik))),L=null,j=vt({},[].concat(Di(ak),Di(Gw),Di(ok),Di(Vp))),x=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,te=null,V=!0,Z=!0,ce=!1,P=!0,A=!1,U=!1,ee=!1,K=!1,X=!1,oe=!1,ie=!1,se=!0,re=!1,le="user-content-",ue=!0,de=!1,xe={},Ee=null,Fe=vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ce=null,Re=vt({},["audio","video","img","source","image","track"]),Ye=null,ve=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Me="http://www.w3.org/1998/Math/MathML",Te="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml",Ze=it,je=!1,be=null,Qe=vt({},[Me,Te,it],zw),Be,Et=["application/xhtml+xml","text/html"],Ot="text/html",tt,at=null,Nt=r.createElement("form"),pt=function(G){return G instanceof RegExp||G instanceof Function},$e=function(G){at&&at===G||((!G||wo(G)!=="object")&&(G={}),G=ss(G),Be=Et.indexOf(G.PARSER_MEDIA_TYPE)===-1?Be=Ot:Be=G.PARSER_MEDIA_TYPE,tt=Be==="application/xhtml+xml"?zw:$h,C="ALLOWED_TAGS"in G?vt({},G.ALLOWED_TAGS,tt):z,L="ALLOWED_ATTR"in G?vt({},G.ALLOWED_ATTR,tt):j,be="ALLOWED_NAMESPACES"in G?vt({},G.ALLOWED_NAMESPACES,zw):Qe,Ye="ADD_URI_SAFE_ATTR"in G?vt(ss(ve),G.ADD_URI_SAFE_ATTR,tt):ve,Ce="ADD_DATA_URI_TAGS"in G?vt(ss(Re),G.ADD_DATA_URI_TAGS,tt):Re,Ee="FORBID_CONTENTS"in G?vt({},G.FORBID_CONTENTS,tt):Fe,B="FORBID_TAGS"in G?vt({},G.FORBID_TAGS,tt):{},te="FORBID_ATTR"in G?vt({},G.FORBID_ATTR,tt):{},xe="USE_PROFILES"in G?G.USE_PROFILES:!1,V=G.ALLOW_ARIA_ATTR!==!1,Z=G.ALLOW_DATA_ATTR!==!1,ce=G.ALLOW_UNKNOWN_PROTOCOLS||!1,P=G.ALLOW_SELF_CLOSE_IN_ATTR!==!1,A=G.SAFE_FOR_TEMPLATES||!1,U=G.WHOLE_DOCUMENT||!1,X=G.RETURN_DOM||!1,oe=G.RETURN_DOM_FRAGMENT||!1,ie=G.RETURN_TRUSTED_TYPE||!1,K=G.FORCE_BODY||!1,se=G.SANITIZE_DOM!==!1,re=G.SANITIZE_NAMED_PROPS||!1,ue=G.KEEP_CONTENT!==!1,de=G.IN_PLACE||!1,W=G.ALLOWED_URI_REGEXP||W,Ze=G.NAMESPACE||it,x=G.CUSTOM_ELEMENT_HANDLING||{},G.CUSTOM_ELEMENT_HANDLING&&pt(G.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(x.tagNameCheck=G.CUSTOM_ELEMENT_HANDLING.tagNameCheck),G.CUSTOM_ELEMENT_HANDLING&&pt(G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(x.attributeNameCheck=G.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),G.CUSTOM_ELEMENT_HANDLING&&typeof G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(x.allowCustomizedBuiltInElements=G.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),A&&(Z=!1),oe&&(X=!0),xe&&(C=vt({},Di(ik)),L=[],xe.html===!0&&(vt(C,rk),vt(L,ak)),xe.svg===!0&&(vt(C,Uw),vt(L,Gw),vt(L,Vp)),xe.svgFilters===!0&&(vt(C,Hw),vt(L,Gw),vt(L,Vp)),xe.mathMl===!0&&(vt(C,Vw),vt(L,ok),vt(L,Vp))),G.ADD_TAGS&&(C===z&&(C=ss(C)),vt(C,G.ADD_TAGS,tt)),G.ADD_ATTR&&(L===j&&(L=ss(L)),vt(L,G.ADD_ATTR,tt)),G.ADD_URI_SAFE_ATTR&&vt(Ye,G.ADD_URI_SAFE_ATTR,tt),G.FORBID_CONTENTS&&(Ee===Fe&&(Ee=ss(Ee)),vt(Ee,G.FORBID_CONTENTS,tt)),ue&&(C["#text"]=!0),U&&vt(C,["html","head","body"]),C.table&&(vt(C,["tbody"]),delete B.tbody),br&&br(G),at=G)},he=vt({},["mi","mo","mn","ms","mtext"]),Se=vt({},["foreignobject","desc","title","annotation-xml"]),qe=vt({},["title","style","font","a","script"]),ye=vt({},Uw);vt(ye,Hw),vt(ye,E0e);var Oe=vt({},Vw);vt(Oe,O0e);var rt=function(G){var _e=g(G);(!_e||!_e.tagName)&&(_e={namespaceURI:Ze,tagName:"template"});var Ne=$h(G.tagName),bt=$h(_e.tagName);return be[G.namespaceURI]?G.namespaceURI===Te?_e.namespaceURI===it?Ne==="svg":_e.namespaceURI===Me?Ne==="svg"&&(bt==="annotation-xml"||he[bt]):!!ye[Ne]:G.namespaceURI===Me?_e.namespaceURI===it?Ne==="math":_e.namespaceURI===Te?Ne==="math"&&Se[bt]:!!Oe[Ne]:G.namespaceURI===it?_e.namespaceURI===Te&&!Se[bt]||_e.namespaceURI===Me&&!he[bt]?!1:!Oe[Ne]&&(qe[Ne]||!ye[Ne]):!!(Be==="application/xhtml+xml"&&be[G.namespaceURI]):!1},Xe=function(G){xc(t.removed,{element:G});try{G.parentNode.removeChild(G)}catch{try{G.outerHTML=_}catch{G.remove()}}},We=function(G,_e){try{xc(t.removed,{attribute:_e.getAttributeNode(G),from:_e})}catch{xc(t.removed,{attribute:null,from:_e})}if(_e.removeAttribute(G),G==="is"&&!L[G])if(X||oe)try{Xe(_e)}catch{}else try{_e.setAttribute(G,"")}catch{}},st=function(G){var _e,Ne;if(K)G=""+G;else{var bt=b0e(G,/^[\r\n\t ]+/);Ne=bt&&bt[0]}Be==="application/xhtml+xml"&&Ze===it&&(G=''+G+"");var Zn=S?S.createHTML(G):G;if(Ze===it)try{_e=new d().parseFromString(Zn,Be)}catch{}if(!_e||!_e.documentElement){_e=O.createDocument(Ze,"template",null);try{_e.documentElement.innerHTML=je?_:Zn}catch{}}var $n=_e.body||_e.documentElement;return G&&Ne&&$n.insertBefore(r.createTextNode(Ne),$n.childNodes[0]||null),Ze===it?$.call(_e,U?"html":"body")[0]:U?_e.documentElement:$n},gt=function(G){return T.call(G.ownerDocument||G,G,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Er=function(G){return G instanceof f&&(typeof G.nodeName!="string"||typeof G.textContent!="string"||typeof G.removeChild!="function"||!(G.attributes instanceof c)||typeof G.removeAttribute!="function"||typeof G.setAttribute!="function"||typeof G.namespaceURI!="string"||typeof G.insertBefore!="function"||typeof G.hasChildNodes!="function")},On=function(G){return wo(o)==="object"?G instanceof o:G&&wo(G)==="object"&&typeof G.nodeType=="number"&&typeof G.nodeName=="string"},on=function(G,_e,Ne){Y[G]&&y0e(Y[G],function(bt){bt.call(t,_e,Ne,at)})},ta=function(G){var _e;if(on("beforeSanitizeElements",G,null),Er(G)||ur(/[\u0080-\uFFFF]/,G.nodeName))return Xe(G),!0;var Ne=tt(G.nodeName);if(on("uponSanitizeElement",G,{tagName:Ne,allowedTags:C}),G.hasChildNodes()&&!On(G.firstElementChild)&&(!On(G.content)||!On(G.content.firstElementChild))&&ur(/<[/\w]/g,G.innerHTML)&&ur(/<[/\w]/g,G.textContent)||Ne==="select"&&ur(/